2015/05/07 - Amazon Simple Systems Management Service - 11 new api methods
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
client.delete_document( Name='string' )
string
[REQUIRED]
The name of the configuration document.
dict
Response Syntax
{}
Response Structure
(dict) --
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
client.delete_association( Name='string', InstanceId='string' )
string
[REQUIRED]
The name of the configuration document.
string
[REQUIRED]
The ID of the instance.
dict
Response Syntax
{}
Response Structure
(dict) --
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
client.create_association_batch( Entries=[ { 'Name': 'string', 'InstanceId': 'string' }, ] )
list
[REQUIRED]
One or more associations.
(dict) --
Describes the association of a configuration document and an instance.
Name (string) --
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
dict
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
(dict) --
Successful (list) --
Information about the associations that succeeded.
(dict) --
Describes an association.
Name (string) --
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
Date (datetime) --
The date when the association was made.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
Failed (list) --
Information about the associations that failed.
(dict) --
Describes a failed association.
Entry (dict) --
The association.
Name (string) --
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
Message (string) --
A description of the failure.
Fault (string) --
The source of the failure.
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
client.create_association( Name='string', InstanceId='string' )
string
[REQUIRED]
The name of the configuration document.
string
[REQUIRED]
The ID of the instance.
dict
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
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
Date (datetime) --
The date when the association was made.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
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
client.create_document( Content='string', Name='string' )
string
[REQUIRED]
A valid JSON file. For more information about the contents of this file, see Configuration Document.
string
[REQUIRED]
A name for the configuration document.
dict
Response Syntax
{ 'DocumentDescription': { 'Sha1': 'string', 'Name': 'string', 'CreatedDate': datetime(2015, 1, 1), 'Status': 'Creating'|'Active'|'Deleting' } }
Response Structure
(dict) --
DocumentDescription (dict) --
Information about the configuration document.
Sha1 (string) --
The SHA1 hash of the document, which you can use for verification purposes.
Name (string) --
The name of the configuration document.
CreatedDate (datetime) --
The date when the configuration document was created.
Status (string) --
The status of the configuration document.
Describes the specified configuration document.
Request Syntax
client.describe_document( Name='string' )
string
[REQUIRED]
The name of the configuration document.
dict
Response Syntax
{ 'Document': { 'Sha1': 'string', 'Name': 'string', 'CreatedDate': datetime(2015, 1, 1), 'Status': 'Creating'|'Active'|'Deleting' } }
Response Structure
(dict) --
Document (dict) --
Information about the configuration document.
Sha1 (string) --
The SHA1 hash of the document, which you can use for verification purposes.
Name (string) --
The name of the configuration document.
CreatedDate (datetime) --
The date when the configuration document was created.
Status (string) --
The status of the configuration document.
Lists the associations for the specified configuration document or instance.
Request Syntax
client.list_associations( AssociationFilterList=[ { 'key': 'InstanceId'|'Name', 'value': 'string' }, ], MaxResults=123, NextToken='string' )
list
[REQUIRED]
One or more filters. Use a filter to return a more specific list of results.
(dict) --
Describes a filter.
key (string) -- [REQUIRED]
The name of the filter.
value (string) -- [REQUIRED]
The filter value.
integer
The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
string
The token for the next set of items to return. (You received this token from a previous call.)
dict
Response Syntax
{ 'Associations': [ { 'Name': 'string', 'InstanceId': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Associations (list) --
The associations.
(dict) --
Describes an association of a configuration document and an instance.
Name (string) --
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
NextToken (string) --
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.
Describes one or more of your configuration documents.
Request Syntax
client.list_documents( DocumentFilterList=[ { 'key': 'Name', 'value': 'string' }, ], MaxResults=123, NextToken='string' )
list
One or more filters. Use a filter to return a more specific list of results.
(dict) --
Describes a filter.
key (string) -- [REQUIRED]
The name of the filter.
value (string) -- [REQUIRED]
The value of the filter.
integer
The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
string
The token for the next set of items to return. (You received this token from a previous call.)
dict
Response Syntax
{ 'DocumentIdentifiers': [ { 'Name': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
DocumentIdentifiers (list) --
The names of the configuration documents.
(dict) --
Describes the name of a configuration document.
Name (string) --
The name of the configuration document.
NextToken (string) --
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.
Gets the contents of the specified configuration document.
Request Syntax
client.get_document( Name='string' )
string
[REQUIRED]
The name of the configuration document.
dict
Response Syntax
{ 'Name': 'string', 'Content': 'string' }
Response Structure
(dict) --
Name (string) --
The name of the configuration document.
Content (string) --
The contents of the configuration document.
Describes the associations for the specified configuration document or instance.
Request Syntax
client.describe_association( Name='string', InstanceId='string' )
string
[REQUIRED]
The name of the configuration document.
string
[REQUIRED]
The ID of the instance.
dict
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
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
Date (datetime) --
The date when the association was made.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
Updates the status of the configuration document associated with the specified instance.
Request Syntax
client.update_association_status( Name='string', InstanceId='string', AssociationStatus={ 'Date': datetime(2015, 1, 1), 'Name': 'Pending'|'Success'|'Failed', 'Message': 'string', 'AdditionalInfo': 'string' } )
string
[REQUIRED]
The name of the configuration document.
string
[REQUIRED]
The ID of the instance.
dict
[REQUIRED]
The association status.
Date (datetime) -- [REQUIRED]
The date when the status changed.
Name (string) -- [REQUIRED]
The status.
Message (string) -- [REQUIRED]
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
dict
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
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
Date (datetime) --
The date when the association was made.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.