create_grant
¶
create_grant(
client_token: ClientToken,
grant_name: String,
license_arn: Arn,
principals: PrincipalArnList,
home_region: String,
allowed_operations: AllowedOperationList,
*,
config_overrides: Optional[LicenseManagerClientConfig] = None,
tags: Optional[TagList] = None,
) -> CreateGrantResponse
Creates a grant for the specified license. A grant shares the use of license entitlements with a specific Amazon Web Services account, an organization, or an organizational unit (OU). For more information, see Granted licenses in License Manager in the License Manager User Guide.
Parameters:
-
client_token(ClientToken) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
-
grant_name(String) –Grant name.
-
license_arn(Arn) –Amazon Resource Name (ARN) of the license.
-
principals(PrincipalArnList) –The grant principals. You can specify one of the following as an Amazon Resource Name (ARN):
-
An Amazon Web Services account, which includes only the account specified.
-
An organizational unit (OU), which includes all accounts in the OU.
-
An organization, which will include all accounts across your organization.
-
-
home_region(String) –Home Region of the grant.
-
allowed_operations(AllowedOperationList) –Allowed operations for the grant.
-
tags(Optional[TagList], default:None) –Tags to add to the grant. For more information about tagging support in License Manager, see the TagResource operation.
Raises:
-
AccessDeniedException–Access to resource denied.
-
AuthorizationException–The Amazon Web Services user account does not have permission to perform the action. Check the IAM policy associated with this account.
-
InvalidParameterValueException–One or more parameter values are not valid.
-
RateLimitExceededException–Too many requests have been submitted. Try again after a brief wait.
-
ResourceLimitExceededException–Your resource limits have been exceeded.
-
ServerInternalException–The server experienced an internal error. Try again.
-
ValidationException–The provided input is not valid. Try your request again.
-
UnknownServiceError–The service returned an error code this client does not model.