BrokerService.Grant BrokerService.Grant BrokerService.Grant Method

Definition

Grants access to the specified permission for the specified grantees on the Service Broker service.

Overloads

Grant(ObjectPermissionSet, String[], Boolean, String) Grant(ObjectPermissionSet, String[], Boolean, String) Grant(ObjectPermissionSet, String[], Boolean, String)

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the Service Broker service under an assumed role.

Grant(ObjectPermissionSet, String, Boolean, String) Grant(ObjectPermissionSet, String, Boolean, String) Grant(ObjectPermissionSet, String, Boolean, String)

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the Service Broker service.

Grant(ObjectPermissionSet, String[], Boolean) Grant(ObjectPermissionSet, String[], Boolean) Grant(ObjectPermissionSet, String[], Boolean)

Grants access to the specified permission and the ability to grant access to other users for the specified grantees on the Service Broker service.

Grant(ObjectPermissionSet, String, Boolean) Grant(ObjectPermissionSet, String, Boolean) Grant(ObjectPermissionSet, String, Boolean)

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the Service Broker service.

Grant(ObjectPermissionSet, String[]) Grant(ObjectPermissionSet, String[]) Grant(ObjectPermissionSet, String[])

Grants access to the specified permission for the specified grantees on the Service Broker service.

Grant(ObjectPermissionSet, String) Grant(ObjectPermissionSet, String) Grant(ObjectPermissionSet, String)

Grants access to the specified permission for the specified grantee on the Service Broker service.

Grant(ObjectPermissionSet, String[], Boolean, String) Grant(ObjectPermissionSet, String[], Boolean, String) Grant(ObjectPermissionSet, String[], Boolean, String)

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the Service Broker service under an assumed role.

public:
 virtual void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, cli::array <System::String ^> ^ granteeNames, bool grantGrant, System::String ^ asRole);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string[] granteeNames, bool grantGrant, string asRole);
Public Sub Grant (permission As ObjectPermissionSet, granteeNames As String(), grantGrant As Boolean, asRole As String)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeNames
String[]

A String array that specifies a list of grantees to be denied access to the permission.

grantGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to grant access to the BrokerService object for other users.

If True, the grantee is given the ability to grant other users access to the Service Broker service.

If False, the grantee is not given the ability to grant other users access to the Service Broker service.

asRole
String String String

A String value that specifies the role that the user assumes when granting access to the Service Broker service to other users. Use this parameter for grantees who are members of more than one role.

Implements

Examples

Granting, Revoking, and Denying Permissions

Readme_ServiceBrokerConfiguration

Grant(ObjectPermissionSet, String, Boolean, String) Grant(ObjectPermissionSet, String, Boolean, String) Grant(ObjectPermissionSet, String, Boolean, String)

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the Service Broker service.

public:
 virtual void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, System::String ^ granteeName, bool grantGrant, System::String ^ asRole);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string granteeName, bool grantGrant, string asRole);
Public Sub Grant (permission As ObjectPermissionSet, granteeName As String, grantGrant As Boolean, asRole As String)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeName
String String String

A String value that specifies a grantee to be denied access to the permission.

grantGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to grant access to the BrokerService object for other users.

If True, the grantee is given the ability to grant other users access to the Service Broker service.

If False, the grantee is not given the ability to grant other users access to the Service Broker service.

asRole
String String String

A String value that specifies the role that the user assumes when granting access to the Service Broker service to other users. Use this parameter for grantees who are members of more than one role.

Implements

Examples

Granting, Revoking, and Denying Permissions

Readme_ServiceBrokerConfiguration

Grant(ObjectPermissionSet, String[], Boolean) Grant(ObjectPermissionSet, String[], Boolean) Grant(ObjectPermissionSet, String[], Boolean)

Grants access to the specified permission and the ability to grant access to other users for the specified grantees on the Service Broker service.

public:
 virtual void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, cli::array <System::String ^> ^ granteeNames, bool grantGrant);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string[] granteeNames, bool grantGrant);
Public Sub Grant (permission As ObjectPermissionSet, granteeNames As String(), grantGrant As Boolean)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeNames
String[]

A String array that specifies a list of grantees to be denied access to the permission.

grantGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to grant access to the BrokerService object for other users.

If True, the grantee is given the ability to grant other users access to the Service Broker service.

If False, the grantee is not given the ability to deny other users access to the Service Broker service.

Implements

Examples

Granting, Revoking, and Denying Permissions

Readme_ServiceBrokerConfiguration

Grant(ObjectPermissionSet, String, Boolean) Grant(ObjectPermissionSet, String, Boolean) Grant(ObjectPermissionSet, String, Boolean)

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the Service Broker service.

public:
 virtual void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, System::String ^ granteeName, bool grantGrant);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string granteeName, bool grantGrant);
Public Sub Grant (permission As ObjectPermissionSet, granteeName As String, grantGrant As Boolean)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeName
String String String

A String value that specifies the grantee to be denied access to the permission.

grantGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to grant access to the BrokerService object for other users.

If True, the grantee is given the ability to grant other users access to the Service Broker service.

If False, the grantee is not given the ability to deny other users access to the Service Broker service.

Implements

Examples

Granting, Revoking, and Denying Permissions

Readme_ServiceBrokerConfiguration

Grant(ObjectPermissionSet, String[]) Grant(ObjectPermissionSet, String[]) Grant(ObjectPermissionSet, String[])

Grants access to the specified permission for the specified grantees on the Service Broker service.

public:
 virtual void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, cli::array <System::String ^> ^ granteeNames);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string[] granteeNames);
Public Sub Grant (permission As ObjectPermissionSet, granteeNames As String())
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeNames
String[]

A String array that lists the grantees to be granted access to the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Readme_ServiceBrokerConfiguration

Grant(ObjectPermissionSet, String) Grant(ObjectPermissionSet, String) Grant(ObjectPermissionSet, String)

Grants access to the specified permission for the specified grantee on the Service Broker service.

public:
 virtual void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, System::String ^ granteeName);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string granteeName);
Public Sub Grant (permission As ObjectPermissionSet, granteeName As String)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeName
String String String

A String value that specifies the grantee to be granted access to the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Readme_ServiceBrokerConfiguration

Applies to