LicenseManagerUserSubscriptions / Client / associate_user

associate_user#

LicenseManagerUserSubscriptions.Client.associate_user(**kwargs)#

Associates the user to an EC2 instance to utilize user-based subscriptions.

Note

Your estimated bill for charges on the number of users and related costs will take 48 hours to appear for billing periods that haven’t closed (marked as Pending billing status) in Amazon Web Services Billing. For more information, see Viewing your monthly charges in the Amazon Web Services Billing User Guide.

See also: AWS API Documentation

Request Syntax

response = client.associate_user(
    Domain='string',
    IdentityProvider={
        'ActiveDirectoryIdentityProvider': {
            'DirectoryId': 'string'
        }
    },
    InstanceId='string',
    Username='string'
)
Parameters:
  • Domain (string) – The domain name of the user.

  • IdentityProvider (dict) –

    [REQUIRED]

    The identity provider of the user.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: ActiveDirectoryIdentityProvider.

    • ActiveDirectoryIdentityProvider (dict) –

      An object that details an Active Directory identity provider.

      • DirectoryId (string) –

        The directory ID for an Active Directory identity provider.

  • InstanceId (string) –

    [REQUIRED]

    The ID of the EC2 instance, which provides user-based subscriptions.

  • Username (string) –

    [REQUIRED]

    The user name from the identity provider for the user.

Return type:

dict

Returns:

Response Syntax

{
    'InstanceUserSummary': {
        'AssociationDate': 'string',
        'DisassociationDate': 'string',
        'Domain': 'string',
        'IdentityProvider': {
            'ActiveDirectoryIdentityProvider': {
                'DirectoryId': 'string'
            }
        },
        'InstanceId': 'string',
        'Status': 'string',
        'StatusMessage': 'string',
        'Username': 'string'
    }
}

Response Structure

  • (dict) –

    • InstanceUserSummary (dict) –

      Metadata that describes the associate user operation.

      • AssociationDate (string) –

        The date a user was associated with an EC2 instance.

      • DisassociationDate (string) –

        The date a user was disassociated from an EC2 instance.

      • Domain (string) –

        The domain name of the user.

      • IdentityProvider (dict) –

        An object that specifies details for the identity provider.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: ActiveDirectoryIdentityProvider. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • ActiveDirectoryIdentityProvider (dict) –

          An object that details an Active Directory identity provider.

          • DirectoryId (string) –

            The directory ID for an Active Directory identity provider.

      • InstanceId (string) –

        The ID of the EC2 instance, which provides user-based subscriptions.

      • Status (string) –

        The status of a user associated with an EC2 instance.

      • StatusMessage (string) –

        The status message for users of an EC2 instance.

      • Username (string) –

        The user name from the identity provider for the user.

Exceptions

  • LicenseManagerUserSubscriptions.Client.exceptions.ServiceQuotaExceededException

  • LicenseManagerUserSubscriptions.Client.exceptions.ConflictException

  • LicenseManagerUserSubscriptions.Client.exceptions.ValidationException

  • LicenseManagerUserSubscriptions.Client.exceptions.ThrottlingException

  • LicenseManagerUserSubscriptions.Client.exceptions.InternalServerException

  • LicenseManagerUserSubscriptions.Client.exceptions.ResourceNotFoundException

  • LicenseManagerUserSubscriptions.Client.exceptions.AccessDeniedException