Table of Contents
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()
close()
get_paginator()
get_service_settings()
get_waiter()
list_linux_subscription_instances()
list_linux_subscriptions()
update_service_settings()
can_paginate
(operation_name)¶Check if an operation can be paginated.
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")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
get_paginator
(operation_name)¶Create a paginator for an operation.
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")
.client.can_paginate
method to
check if an operation is pageable.get_service_settings
()¶Lists the Linux subscriptions service settings.
See also: AWS API Documentation
Request Syntax
response = client.get_service_settings()
{
'HomeRegions': [
'string',
],
'LinuxSubscriptionsDiscovery': 'Enabled'|'Disabled',
'LinuxSubscriptionsDiscoverySettings': {
'OrganizationIntegration': 'Enabled'|'Disabled',
'SourceRegions': [
'string',
]
},
'Status': 'InProgress'|'Completed'|'Successful'|'Failed',
'StatusMessage': {
'string': 'string'
}
}
Response Structure
The Region in which License Manager displays the aggregated data for Linux subscriptions.
Lists if discovery has been enabled for Linux subscriptions.
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.
Details if you have enabled resource discovery across your accounts in Organizations.
The Regions in which to discover data for Linux subscriptions.
Indicates the status of Linux subscriptions settings being applied.
A message which details the Linux subscriptions service settings current status.
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.
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'
)
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
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.
The type of name to filter by.
An operator for filtering results.
One or more values for the name to filter by.
dict
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 .
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'
)
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
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.
The type of name to filter by.
An operator for filtering results.
One or more values for the name to filter by.
dict
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',
]
}
)
[REQUIRED]
Describes if the discovery of Linux subscriptions is enabled.
[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.
Details if you have enabled resource discovery across your accounts in Organizations.
The Regions in which to discover data for Linux subscriptions.
dict
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.
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.
Status (string) --
Indicates the status of Linux subscriptions settings being applied.
StatusMessage (dict) --
A message which details the Linux subscriptions service settings current status.
Exceptions
LicenseManagerLinuxSubscriptions.Client.exceptions.InternalServerException
LicenseManagerLinuxSubscriptions.Client.exceptions.ThrottlingException
LicenseManagerLinuxSubscriptions.Client.exceptions.ValidationException
The available paginators are:
LicenseManagerLinuxSubscriptions.Paginator.ListLinuxSubscriptionInstances
LicenseManagerLinuxSubscriptions.Paginator.ListLinuxSubscriptions
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'
}
)
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
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.
The type of name to filter by.
An operator for filtering results.
One or more values for the name to filter by.
A dictionary that provides parameters to control pagination.
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.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
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 .
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 .
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'
}
)
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
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.
The type of name to filter by.
An operator for filtering results.
One or more values for the name to filter by.
A dictionary that provides parameters to control pagination.
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.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
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.