Amazon Simple Systems Management Service

2015/05/07 - Amazon Simple Systems Management Service - 11 new api methods

DeleteDocument (new) Link ¶

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'
)
type Name:

string

param Name:

[REQUIRED]

The name of the configuration document.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DeleteAssociation (new) Link ¶

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'
)
type Name:

string

param Name:

[REQUIRED]

The name of the configuration document.

type InstanceId:

string

param InstanceId:

[REQUIRED]

The ID of the instance.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

CreateAssociationBatch (new) Link ¶

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'
        },
    ]
)
type Entries:

list

param Entries:

[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.

rtype:

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

  • (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.

CreateAssociation (new) Link ¶

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'
)
type Name:

string

param Name:

[REQUIRED]

The name of the configuration document.

type InstanceId:

string

param InstanceId:

[REQUIRED]

The ID of the instance.

rtype:

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

  • (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.

CreateDocument (new) Link ¶

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'
)
type Content:

string

param Content:

[REQUIRED]

A valid JSON file. For more information about the contents of this file, see Configuration Document.

type Name:

string

param Name:

[REQUIRED]

A name for the configuration document.

rtype:

dict

returns:

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.

DescribeDocument (new) Link ¶

Describes the specified configuration document.

Request Syntax

client.describe_document(
    Name='string'
)
type Name:

string

param Name:

[REQUIRED]

The name of the configuration document.

rtype:

dict

returns:

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.

ListAssociations (new) Link ¶

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'
)
type AssociationFilterList:

list

param AssociationFilterList:

[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.

type MaxResults:

integer

param MaxResults:

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.

type NextToken:

string

param NextToken:

The token for the next set of items to return. (You received this token from a previous call.)

rtype:

dict

returns:

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.

ListDocuments (new) Link ¶

Describes one or more of your configuration documents.

Request Syntax

client.list_documents(
    DocumentFilterList=[
        {
            'key': 'Name',
            'value': 'string'
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type DocumentFilterList:

list

param DocumentFilterList:

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.

type MaxResults:

integer

param MaxResults:

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.

type NextToken:

string

param NextToken:

The token for the next set of items to return. (You received this token from a previous call.)

rtype:

dict

returns:

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.

GetDocument (new) Link ¶

Gets the contents of the specified configuration document.

Request Syntax

client.get_document(
    Name='string'
)
type Name:

string

param Name:

[REQUIRED]

The name of the configuration document.

rtype:

dict

returns:

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.

DescribeAssociation (new) Link ¶

Describes the associations for the specified configuration document or instance.

Request Syntax

client.describe_association(
    Name='string',
    InstanceId='string'
)
type Name:

string

param Name:

[REQUIRED]

The name of the configuration document.

type InstanceId:

string

param InstanceId:

[REQUIRED]

The ID of the instance.

rtype:

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

  • (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.

UpdateAssociationStatus (new) Link ¶

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'
    }
)
type Name:

string

param Name:

[REQUIRED]

The name of the configuration document.

type InstanceId:

string

param InstanceId:

[REQUIRED]

The ID of the instance.

type AssociationStatus:

dict

param AssociationStatus:

[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.

rtype:

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

  • (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.