LicenseManagerLinuxSubscriptions

Client

class LicenseManagerLinuxSubscriptions.Client

A low-level client representing AWS License Manager Linux Subscriptions

With License Manager, you can discover and track your commercial Linux subscriptions on running Amazon EC2 instances.

import boto3

client = boto3.client('license-manager-linux-subscriptions')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
close()

Closes underlying endpoint connections.

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_service_settings()

Lists the Linux subscriptions service settings.

See also: AWS API Documentation

Request Syntax

response = client.get_service_settings()
Return type
dict
Returns
Response Syntax
{
    'HomeRegions': [
        'string',
    ],
    'LinuxSubscriptionsDiscovery': 'Enabled'|'Disabled',
    'LinuxSubscriptionsDiscoverySettings': {
        'OrganizationIntegration': 'Enabled'|'Disabled',
        'SourceRegions': [
            'string',
        ]
    },
    'Status': 'InProgress'|'Completed'|'Successful'|'Failed',
    'StatusMessage': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • HomeRegions (list) --

      The Region in which License Manager displays the aggregated data for Linux subscriptions.

      • (string) --
    • LinuxSubscriptionsDiscovery (string) --

      Lists if discovery has been enabled for Linux subscriptions.

    • LinuxSubscriptionsDiscoverySettings (dict) --

      Lists the settings defined for Linux subscriptions discovery. The settings include if Organizations integration has been enabled, and which Regions data will be aggregated from.

      • OrganizationIntegration (string) --

        Details if you have enabled resource discovery across your accounts in Organizations.

      • SourceRegions (list) --

        The Regions in which to discover data for Linux subscriptions.

        • (string) --
    • Status (string) --

      Indicates the status of Linux subscriptions settings being applied.

    • StatusMessage (dict) --

      A message which details the Linux subscriptions service settings current status.

      • (string) --
        • (string) --

Exceptions

  • LicenseManagerLinuxSubscriptions.Client.exceptions.InternalServerException
  • LicenseManagerLinuxSubscriptions.Client.exceptions.ThrottlingException
  • LicenseManagerLinuxSubscriptions.Client.exceptions.ValidationException
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_linux_subscription_instances(**kwargs)

Lists the running Amazon EC2 instances that were discovered with commercial Linux subscriptions.

See also: AWS API Documentation

Request Syntax

response = client.list_linux_subscription_instances(
    Filters=[
        {
            'Name': 'string',
            'Operator': 'Equal'|'NotEqual'|'Contains',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of AmiID with an optional operator to see subscriptions that match, partially match, or don't match a certain Amazon Machine Image (AMI) ID.

    The valid names for this filter are:

    • AmiID
    • InstanceID
    • AccountID
    • Status
    • Region
    • UsageOperation
    • ProductCode
    • InstanceType

    The valid Operators for this filter are:

    • contains
    • equals
    • Notequal
    • (dict) --

      A filter object that is used to return more specific results from a describe operation. Filters can be used to match a set of resources by specific criteria.

      • Name (string) --

        The type of name to filter by.

      • Operator (string) --

        An operator for filtering results.

      • Values (list) --

        One or more values for the name to filter by.

        • (string) --
  • MaxResults (integer) -- Maximum number of results to return in a single call.
  • NextToken (string) -- Token for the next set of results.
Return type

dict

Returns

Response Syntax

{
    'Instances': [
        {
            'AccountID': 'string',
            'AmiId': 'string',
            'InstanceID': 'string',
            'InstanceType': 'string',
            'LastUpdatedTime': 'string',
            'ProductCode': [
                'string',
            ],
            'Region': 'string',
            'Status': 'string',
            'SubscriptionName': 'string',
            'UsageOperation': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Instances (list) --

      An array that contains instance objects.

      • (dict) --

        Details discovered information about a running instance using Linux subscriptions.

        • AccountID (string) --

          The account ID which owns the instance.

        • AmiId (string) --

          The AMI ID used to launch the instance.

        • InstanceID (string) --

          The instance ID of the resource.

        • InstanceType (string) --

          The instance type of the resource.

        • LastUpdatedTime (string) --

          The time in which the last discovery updated the instance details.

        • ProductCode (list) --

          The product code for the instance. For more information, see Usage operation values in the License Manager User Guide .

          • (string) --
        • Region (string) --

          The Region the instance is running in.

        • Status (string) --

          The status of the instance.

        • SubscriptionName (string) --

          The name of the subscription being used by the instance.

        • UsageOperation (string) --

          The usage operation of the instance. For more information, see For more information, see Usage operation values in the License Manager User Guide .

    • NextToken (string) --

      Token for the next set of results.

Exceptions

  • LicenseManagerLinuxSubscriptions.Client.exceptions.InternalServerException
  • LicenseManagerLinuxSubscriptions.Client.exceptions.ThrottlingException
  • LicenseManagerLinuxSubscriptions.Client.exceptions.ValidationException
list_linux_subscriptions(**kwargs)

Lists the Linux subscriptions that have been discovered. If you have linked your organization, the returned results will include data aggregated across your accounts in Organizations.

See also: AWS API Documentation

Request Syntax

response = client.list_linux_subscriptions(
    Filters=[
        {
            'Name': 'string',
            'Operator': 'Equal'|'NotEqual'|'Contains',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of Subscription with an optional operator to see subscriptions that match, partially match, or don't match a certain subscription's name.

    The valid names for this filter are:

    • Subscription

    The valid Operators for this filter are:

    • contains
    • equals
    • Notequal
    • (dict) --

      A filter object that is used to return more specific results from a describe operation. Filters can be used to match a set of resources by specific criteria.

      • Name (string) --

        The type of name to filter by.

      • Operator (string) --

        An operator for filtering results.

      • Values (list) --

        One or more values for the name to filter by.

        • (string) --
  • MaxResults (integer) -- Maximum number of results to return in a single call.
  • NextToken (string) -- Token for the next set of results.
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'Subscriptions': [
        {
            'InstanceCount': 123,
            'Name': 'string',
            'Type': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      Token for the next set of results.

    • Subscriptions (list) --

      An array that contains subscription objects.

      • (dict) --

        An object which details a discovered Linux subscription.

        • InstanceCount (integer) --

          The total amount of running instances using this subscription.

        • Name (string) --

          The name of the subscription.

        • Type (string) --

          The type of subscription. The type can be subscription-included with Amazon EC2, Bring Your Own Subscription model (BYOS), or from the Amazon Web Services Marketplace. Certain subscriptions may use licensing from the Amazon Web Services Marketplace as well as OS licensing from Amazon EC2 or BYOS.

Exceptions

  • LicenseManagerLinuxSubscriptions.Client.exceptions.InternalServerException
  • LicenseManagerLinuxSubscriptions.Client.exceptions.ThrottlingException
  • LicenseManagerLinuxSubscriptions.Client.exceptions.ValidationException
update_service_settings(**kwargs)

Updates the service settings for Linux subscriptions.

See also: AWS API Documentation

Request Syntax

response = client.update_service_settings(
    AllowUpdate=True|False,
    LinuxSubscriptionsDiscovery='Enabled'|'Disabled',
    LinuxSubscriptionsDiscoverySettings={
        'OrganizationIntegration': 'Enabled'|'Disabled',
        'SourceRegions': [
            'string',
        ]
    }
)
Parameters
  • AllowUpdate (boolean) -- Describes if updates are allowed to the service settings for Linux subscriptions. If you allow updates, you can aggregate Linux subscription data in more than one home Region.
  • LinuxSubscriptionsDiscovery (string) --

    [REQUIRED]

    Describes if the discovery of Linux subscriptions is enabled.

  • LinuxSubscriptionsDiscoverySettings (dict) --

    [REQUIRED]

    The settings defined for Linux subscriptions discovery. The settings include if Organizations integration has been enabled, and which Regions data will be aggregated from.

    • OrganizationIntegration (string) -- [REQUIRED]

      Details if you have enabled resource discovery across your accounts in Organizations.

    • SourceRegions (list) -- [REQUIRED]

      The Regions in which to discover data for Linux subscriptions.

      • (string) --
Return type

dict

Returns

Response Syntax

{
    'HomeRegions': [
        'string',
    ],
    'LinuxSubscriptionsDiscovery': 'Enabled'|'Disabled',
    'LinuxSubscriptionsDiscoverySettings': {
        'OrganizationIntegration': 'Enabled'|'Disabled',
        'SourceRegions': [
            'string',
        ]
    },
    'Status': 'InProgress'|'Completed'|'Successful'|'Failed',
    'StatusMessage': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • HomeRegions (list) --

      The Region in which License Manager displays the aggregated data for Linux subscriptions.

      • (string) --
    • LinuxSubscriptionsDiscovery (string) --

      Lists if discovery has been enabled for Linux subscriptions.

    • LinuxSubscriptionsDiscoverySettings (dict) --

      The settings defined for Linux subscriptions discovery. The settings include if Organizations integration has been enabled, and which Regions data will be aggregated from.

      • OrganizationIntegration (string) --

        Details if you have enabled resource discovery across your accounts in Organizations.

      • SourceRegions (list) --

        The Regions in which to discover data for Linux subscriptions.

        • (string) --
    • Status (string) --

      Indicates the status of Linux subscriptions settings being applied.

    • StatusMessage (dict) --

      A message which details the Linux subscriptions service settings current status.

      • (string) --
        • (string) --

Exceptions

  • LicenseManagerLinuxSubscriptions.Client.exceptions.InternalServerException
  • LicenseManagerLinuxSubscriptions.Client.exceptions.ThrottlingException
  • LicenseManagerLinuxSubscriptions.Client.exceptions.ValidationException

Paginators

The available paginators are:

class LicenseManagerLinuxSubscriptions.Paginator.ListLinuxSubscriptionInstances
paginator = client.get_paginator('list_linux_subscription_instances')
paginate(**kwargs)

Creates an iterator that will paginate through responses from LicenseManagerLinuxSubscriptions.Client.list_linux_subscription_instances().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Operator': 'Equal'|'NotEqual'|'Contains',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of AmiID with an optional operator to see subscriptions that match, partially match, or don't match a certain Amazon Machine Image (AMI) ID.

    The valid names for this filter are:

    • AmiID
    • InstanceID
    • AccountID
    • Status
    • Region
    • UsageOperation
    • ProductCode
    • InstanceType

    The valid Operators for this filter are:

    • contains
    • equals
    • Notequal
    • (dict) --

      A filter object that is used to return more specific results from a describe operation. Filters can be used to match a set of resources by specific criteria.

      • Name (string) --

        The type of name to filter by.

      • Operator (string) --

        An operator for filtering results.

      • Values (list) --

        One or more values for the name to filter by.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Instances': [
        {
            'AccountID': 'string',
            'AmiId': 'string',
            'InstanceID': 'string',
            'InstanceType': 'string',
            'LastUpdatedTime': 'string',
            'ProductCode': [
                'string',
            ],
            'Region': 'string',
            'Status': 'string',
            'SubscriptionName': 'string',
            'UsageOperation': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Instances (list) --

      An array that contains instance objects.

      • (dict) --

        Details discovered information about a running instance using Linux subscriptions.

        • AccountID (string) --

          The account ID which owns the instance.

        • AmiId (string) --

          The AMI ID used to launch the instance.

        • InstanceID (string) --

          The instance ID of the resource.

        • InstanceType (string) --

          The instance type of the resource.

        • LastUpdatedTime (string) --

          The time in which the last discovery updated the instance details.

        • ProductCode (list) --

          The product code for the instance. For more information, see Usage operation values in the License Manager User Guide .

          • (string) --
        • Region (string) --

          The Region the instance is running in.

        • Status (string) --

          The status of the instance.

        • SubscriptionName (string) --

          The name of the subscription being used by the instance.

        • UsageOperation (string) --

          The usage operation of the instance. For more information, see For more information, see Usage operation values in the License Manager User Guide .

class LicenseManagerLinuxSubscriptions.Paginator.ListLinuxSubscriptions
paginator = client.get_paginator('list_linux_subscriptions')
paginate(**kwargs)

Creates an iterator that will paginate through responses from LicenseManagerLinuxSubscriptions.Client.list_linux_subscriptions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Operator': 'Equal'|'NotEqual'|'Contains',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of Subscription with an optional operator to see subscriptions that match, partially match, or don't match a certain subscription's name.

    The valid names for this filter are:

    • Subscription

    The valid Operators for this filter are:

    • contains
    • equals
    • Notequal
    • (dict) --

      A filter object that is used to return more specific results from a describe operation. Filters can be used to match a set of resources by specific criteria.

      • Name (string) --

        The type of name to filter by.

      • Operator (string) --

        An operator for filtering results.

      • Values (list) --

        One or more values for the name to filter by.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Subscriptions': [
        {
            'InstanceCount': 123,
            'Name': 'string',
            'Type': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Subscriptions (list) --

      An array that contains subscription objects.

      • (dict) --

        An object which details a discovered Linux subscription.

        • InstanceCount (integer) --

          The total amount of running instances using this subscription.

        • Name (string) --

          The name of the subscription.

        • Type (string) --

          The type of subscription. The type can be subscription-included with Amazon EC2, Bring Your Own Subscription model (BYOS), or from the Amazon Web Services Marketplace. Certain subscriptions may use licensing from the Amazon Web Services Marketplace as well as OS licensing from Amazon EC2 or BYOS.