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 specific Amazon Web Services accounts.

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. This value should be specified as an Amazon Resource Name (ARN).

    • (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