SSM.
Client
¶A low-level client representing Amazon Simple Systems Management Service (SSM):
import boto3
client = boto3.client('ssm')
These are the available methods:
can_paginate()
create_association()
create_association_batch()
create_document()
delete_association()
delete_document()
describe_association()
describe_document()
generate_presigned_url()
get_document()
get_paginator()
get_waiter()
list_associations()
list_documents()
update_association_status()
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. |
create_association
(**kwargs)¶Associates the specified configuration document with the specified instance.
When you associate a configuration document with an instance, the configuration agent on the instance processes the configuration document and configures the instance as specified.
If you associate a configuration document with an instance that already has an associated configuration document, we replace the current configuration document with the new configuration document.
Request Syntax
response = client.create_association(
Name='string',
InstanceId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'AssociationDescription': {
'Name': 'string',
'InstanceId': 'string',
'Date': datetime(2015, 1, 1),
'Status': {
'Date': datetime(2015, 1, 1),
'Name': 'Pending'|'Success'|'Failed',
'Message': 'string',
'AdditionalInfo': 'string'
}
}
}
Response Structure
|
create_association_batch
(**kwargs)¶Associates the specified configuration documents with the specified instances.
When you associate a configuration document with an instance, the configuration agent on the instance processes the configuration document and configures the instance as specified.
If you associate a configuration document with an instance that already has an associated configuration document, we replace the current configuration document with the new configuration document.
Request Syntax
response = client.create_association_batch(
Entries=[
{
'Name': 'string',
'InstanceId': 'string'
},
]
)
Parameters: | Entries (list) -- [REQUIRED] One or more associations.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'Successful': [
{
'Name': 'string',
'InstanceId': 'string',
'Date': datetime(2015, 1, 1),
'Status': {
'Date': datetime(2015, 1, 1),
'Name': 'Pending'|'Success'|'Failed',
'Message': 'string',
'AdditionalInfo': 'string'
}
},
],
'Failed': [
{
'Entry': {
'Name': 'string',
'InstanceId': 'string'
},
'Message': 'string',
'Fault': 'Client'|'Server'|'Unknown'
},
]
}
Response Structure
|
create_document
(**kwargs)¶Creates a configuration document.
After you create a configuration document, you can use CreateAssociation to associate it with one or more running instances.
Request Syntax
response = client.create_document(
Content='string',
Name='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'DocumentDescription': {
'Sha1': 'string',
'Name': 'string',
'CreatedDate': datetime(2015, 1, 1),
'Status': 'Creating'|'Active'|'Deleting'
}
}
Response Structure
|
delete_association
(**kwargs)¶Disassociates the specified configuration document from the specified instance.
When you disassociate a configuration document from an instance, it does not change the configuration of the instance. To change the configuration state of an instance after you disassociate a configuration document, you must create a new configuration document with the desired configuration and associate it with the instance.
Request Syntax
response = client.delete_association(
Name='string',
InstanceId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {}
Response Structure
|
delete_document
(**kwargs)¶Deletes the specified configuration document.
You must use DeleteAssociation to disassociate all instances that are associated with the configuration document before you can delete it.
Request Syntax
response = client.delete_document(
Name='string'
)
Parameters: | Name (string) -- [REQUIRED] The name of the configuration document. |
---|---|
Return type: | dict |
Returns: | Response Syntax{}
Response Structure
|
describe_association
(**kwargs)¶Describes the associations for the specified configuration document or instance.
Request Syntax
response = client.describe_association(
Name='string',
InstanceId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'AssociationDescription': {
'Name': 'string',
'InstanceId': 'string',
'Date': datetime(2015, 1, 1),
'Status': {
'Date': datetime(2015, 1, 1),
'Name': 'Pending'|'Success'|'Failed',
'Message': 'string',
'AdditionalInfo': 'string'
}
}
}
Response Structure
|
describe_document
(**kwargs)¶Describes the specified configuration document.
Request Syntax
response = client.describe_document(
Name='string'
)
Parameters: | Name (string) -- [REQUIRED] The name of the configuration document. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'Document': {
'Sha1': 'string',
'Name': 'string',
'CreatedDate': datetime(2015, 1, 1),
'Status': 'Creating'|'Active'|'Deleting'
}
}
Response Structure
|
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
Parameters: |
|
---|---|
Returns: | The presigned url |
get_document
(**kwargs)¶Gets the contents of the specified configuration document.
Request Syntax
response = client.get_document(
Name='string'
)
Parameters: | Name (string) -- [REQUIRED] The name of the configuration document. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'Name': 'string',
'Content': 'string'
}
Response Structure
|
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_waiter
(waiter_name)¶list_associations
(**kwargs)¶Lists the associations for the specified configuration document or instance.
Request Syntax
response = client.list_associations(
AssociationFilterList=[
{
'key': 'InstanceId'|'Name',
'value': 'string'
},
],
MaxResults=123,
NextToken='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Associations': [
{
'Name': 'string',
'InstanceId': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
list_documents
(**kwargs)¶Describes one or more of your configuration documents.
Request Syntax
response = client.list_documents(
DocumentFilterList=[
{
'key': 'Name',
'value': 'string'
},
],
MaxResults=123,
NextToken='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'DocumentIdentifiers': [
{
'Name': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
update_association_status
(**kwargs)¶Updates the status of the configuration document associated with the specified instance.
Request Syntax
response = client.update_association_status(
Name='string',
InstanceId='string',
AssociationStatus={
'Date': datetime(2015, 1, 1),
'Name': 'Pending'|'Success'|'Failed',
'Message': 'string',
'AdditionalInfo': 'string'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'AssociationDescription': {
'Name': 'string',
'InstanceId': 'string',
'Date': datetime(2015, 1, 1),
'Status': {
'Date': datetime(2015, 1, 1),
'Name': 'Pending'|'Success'|'Failed',
'Message': 'string',
'AdditionalInfo': 'string'
}
}
}
Response Structure
|