LicenseManager / Client / create_grant

create_grant#

LicenseManager.Client.create_grant(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.create_grant(
    ClientToken='string',
    GrantName='string',
    LicenseArn='string',
    Principals=[
        'string',
    ],
    HomeRegion='string',
    AllowedOperations=[
        'CreateGrant'|'CheckoutLicense'|'CheckoutBorrowLicense'|'CheckInLicense'|'ExtendConsumptionLicense'|'ListPurchasedLicenses'|'CreateToken',
    ]
)
Parameters:
  • ClientToken (string) –

    [REQUIRED]

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

  • GrantName (string) –

    [REQUIRED]

    Grant name.

  • LicenseArn (string) –

    [REQUIRED]

    Amazon Resource Name (ARN) of the license.

  • Principals (list) –

    [REQUIRED]

    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.

    • (string) –

  • HomeRegion (string) –

    [REQUIRED]

    Home Region of the grant.

  • AllowedOperations (list) –

    [REQUIRED]

    Allowed operations for the grant.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'GrantArn': 'string',
    'Status': 'PENDING_WORKFLOW'|'PENDING_ACCEPT'|'REJECTED'|'ACTIVE'|'FAILED_WORKFLOW'|'DELETED'|'PENDING_DELETE'|'DISABLED'|'WORKFLOW_COMPLETED',
    'Version': 'string'
}

Response Structure

  • (dict) –

    • GrantArn (string) –

      Grant ARN.

    • Status (string) –

      Grant status.

    • Version (string) –

      Grant version.

Exceptions

  • LicenseManager.Client.exceptions.ValidationException

  • LicenseManager.Client.exceptions.InvalidParameterValueException

  • LicenseManager.Client.exceptions.ResourceLimitExceededException

  • LicenseManager.Client.exceptions.ServerInternalException

  • LicenseManager.Client.exceptions.AuthorizationException

  • LicenseManager.Client.exceptions.RateLimitExceededException

  • LicenseManager.Client.exceptions.AccessDeniedException