AWS Config

2015/05/07 - AWS Config - 11 new api methods

DescribeConfigurationRecorders (new) Link ¶

Returns the name of one or more specified configuration recorders. If the recorder name is not specified, this action returns the names of all the configuration recorders associated with the account.

Request Syntax

client.describe_configuration_recorders(
    ConfigurationRecorderNames=[
        'string',
    ]
)
type ConfigurationRecorderNames:

list

param ConfigurationRecorderNames:

A list of configuration recorder names.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'ConfigurationRecorders': [
        {
            'name': 'string',
            'roleARN': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    The output for the DescribeConfigurationRecorders action.

    • ConfigurationRecorders (list) --

      A list that contains the descriptions of the specified configuration recorders.

      • (dict) --

        An object that represents the recording of configuration changes of an AWS resource.

        • name (string) --

          The name of the recorder. By default, AWS Config automatically assigns the name "default" when creating the configuration recorder. You cannot change the assigned name.

        • roleARN (string) --

          Amazon Resource Name (ARN) of the IAM role used to describe the AWS resources associated with the account.

PutConfigurationRecorder (new) Link ¶

Creates a new configuration recorder to record the resource configurations.

You can use this action to change the role ( roleARN) of an existing recorder. To change the role, call the action on the existing configuration recorder and specify a role.

Request Syntax

client.put_configuration_recorder(
    ConfigurationRecorder={
        'name': 'string',
        'roleARN': 'string'
    }
)
type ConfigurationRecorder:

dict

param ConfigurationRecorder:

[REQUIRED]

The configuration recorder object that records each configuration change made to the resources.

  • name (string) --

    The name of the recorder. By default, AWS Config automatically assigns the name "default" when creating the configuration recorder. You cannot change the assigned name.

  • roleARN (string) --

    Amazon Resource Name (ARN) of the IAM role used to describe the AWS resources associated with the account.

returns:

None

DeleteDeliveryChannel (new) Link ¶

Deletes the specified delivery channel.

The delivery channel cannot be deleted if it is the only delivery channel and the configuration recorder is still running. To delete the delivery channel, stop the running configuration recorder using the StopConfigurationRecorder action.

Request Syntax

client.delete_delivery_channel(
    DeliveryChannelName='string'
)
type DeliveryChannelName:

string

param DeliveryChannelName:

[REQUIRED]

The name of the delivery channel to delete.

returns:

None

PutDeliveryChannel (new) Link ¶

Creates a new delivery channel object to deliver the configuration information to an Amazon S3 bucket, and to an Amazon SNS topic.

You can use this action to change the Amazon S3 bucket or an Amazon SNS topic of the existing delivery channel. To change the Amazon S3 bucket or an Amazon SNS topic, call this action and specify the changed values for the S3 bucket and the SNS topic. If you specify a different value for either the S3 bucket or the SNS topic, this action will keep the existing value for the parameter that is not changed.

Request Syntax

client.put_delivery_channel(
    DeliveryChannel={
        'name': 'string',
        's3BucketName': 'string',
        's3KeyPrefix': 'string',
        'snsTopicARN': 'string'
    }
)
type DeliveryChannel:

dict

param DeliveryChannel:

[REQUIRED]

The configuration delivery channel object that delivers the configuration information to an Amazon S3 bucket, and to an Amazon SNS topic.

  • name (string) --

    The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.

  • s3BucketName (string) --

    The name of the Amazon S3 bucket used to store configuration history for the delivery channel.

  • s3KeyPrefix (string) --

    The prefix for the specified Amazon S3 bucket.

  • snsTopicARN (string) --

    The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.

returns:

None

StartConfigurationRecorder (new) Link ¶

Starts recording configurations of all the resources associated with the account.

You must have created at least one delivery channel to successfully start the configuration recorder.

Request Syntax

client.start_configuration_recorder(
    ConfigurationRecorderName='string'
)
type ConfigurationRecorderName:

string

param ConfigurationRecorderName:

[REQUIRED]

The name of the recorder object that records each configuration change made to the resources.

returns:

None

StopConfigurationRecorder (new) Link ¶

Stops recording configurations of all the resources associated with the account.

Request Syntax

client.stop_configuration_recorder(
    ConfigurationRecorderName='string'
)
type ConfigurationRecorderName:

string

param ConfigurationRecorderName:

[REQUIRED]

The name of the recorder object that records each configuration change made to the resources.

returns:

None

GetResourceConfigHistory (new) Link ¶

Returns a list of configuration items for the specified resource. The list contains details about each state of the resource during the specified time interval. You can specify a limit on the number of results returned on the page. If a limit is specified, a nextToken is returned as part of the result that you can use to continue this request.

Request Syntax

client.get_resource_config_history(
    resourceType='AWS::EC2::CustomerGateway'|'AWS::EC2::EIP'|'AWS::EC2::Instance'|'AWS::EC2::InternetGateway'|'AWS::EC2::NetworkAcl'|'AWS::EC2::NetworkInterface'|'AWS::EC2::RouteTable'|'AWS::EC2::SecurityGroup'|'AWS::EC2::Subnet'|'AWS::CloudTrail::Trail'|'AWS::EC2::Volume'|'AWS::EC2::VPC'|'AWS::EC2::VPNConnection'|'AWS::EC2::VPNGateway',
    resourceId='string',
    laterTime=datetime(2015, 1, 1),
    earlierTime=datetime(2015, 1, 1),
    chronologicalOrder='Reverse'|'Forward',
    limit=123,
    nextToken='string'
)
type resourceType:

string

param resourceType:

[REQUIRED]

The resource type.

type resourceId:

string

param resourceId:

[REQUIRED]

The ID of the resource (for example., sg-xxxxxx).

type laterTime:

datetime

param laterTime:

The time stamp that indicates a later time. If not specified, current time is taken.

type earlierTime:

datetime

param earlierTime:

The time stamp that indicates an earlier time. If not specified, the action returns paginated results that contain configuration items that start from when the first configuration item was recorded.

type chronologicalOrder:

string

param chronologicalOrder:

The chronological order for configuration items listed. By default the results are listed in reverse chronological order.

type limit:

integer

param limit:

The maximum number of configuration items returned in each page. The default is 10. You cannot specify a limit greater than 100.

type nextToken:

string

param nextToken:

An optional parameter used for pagination of the results.

rtype:

dict

returns:

Response Syntax

{
    'configurationItems': [
        {
            'version': 'string',
            'accountId': 'string',
            'configurationItemCaptureTime': datetime(2015, 1, 1),
            'configurationItemStatus': 'Ok'|'Failed'|'Discovered'|'Deleted',
            'configurationStateId': 'string',
            'configurationItemMD5Hash': 'string',
            'arn': 'string',
            'resourceType': 'AWS::EC2::CustomerGateway'|'AWS::EC2::EIP'|'AWS::EC2::Instance'|'AWS::EC2::InternetGateway'|'AWS::EC2::NetworkAcl'|'AWS::EC2::NetworkInterface'|'AWS::EC2::RouteTable'|'AWS::EC2::SecurityGroup'|'AWS::EC2::Subnet'|'AWS::CloudTrail::Trail'|'AWS::EC2::Volume'|'AWS::EC2::VPC'|'AWS::EC2::VPNConnection'|'AWS::EC2::VPNGateway',
            'resourceId': 'string',
            'availabilityZone': 'string',
            'resourceCreationTime': datetime(2015, 1, 1),
            'tags': {
                'string': 'string'
            },
            'relatedEvents': [
                'string',
            ],
            'relationships': [
                {
                    'resourceType': 'AWS::EC2::CustomerGateway'|'AWS::EC2::EIP'|'AWS::EC2::Instance'|'AWS::EC2::InternetGateway'|'AWS::EC2::NetworkAcl'|'AWS::EC2::NetworkInterface'|'AWS::EC2::RouteTable'|'AWS::EC2::SecurityGroup'|'AWS::EC2::Subnet'|'AWS::CloudTrail::Trail'|'AWS::EC2::Volume'|'AWS::EC2::VPC'|'AWS::EC2::VPNConnection'|'AWS::EC2::VPNGateway',
                    'resourceId': 'string',
                    'relationshipName': 'string'
                },
            ],
            'configuration': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The output for the GetResourceConfigHistory action.

    • configurationItems (list) --

      A list that contains the configuration history of one or more resources.

      • (dict) --

        A list that contains detailed configurations of a specified resource.

        • version (string) --

          The version number of the resource configuration.

        • accountId (string) --

          The 12 digit AWS account ID associated with the resource.

        • configurationItemCaptureTime (datetime) --

          The time when the configuration recording was initiated.

        • configurationItemStatus (string) --

          The configuration item status.

        • configurationStateId (string) --

          An identifier that indicates the ordering of the configuration items of a resource.

        • configurationItemMD5Hash (string) --

          Unique MD5 hash that represents the configuration item's state.

          You can use MD5 hash to compare the states of two or more configuration items that are associated with the same resource.

        • arn (string) --

          The Amazon Resource Name (ARN) of the resource.

        • resourceType (string) --

          The type of AWS resource.

        • resourceId (string) --

          The ID of the resource (for example., sg-xxxxxx).

        • availabilityZone (string) --

          The Availability Zone associated with the resource.

        • resourceCreationTime (datetime) --

          The time stamp when the resource was created.

        • tags (dict) --

          A mapping of key value tags associated with the resource.

          • (string) --

            • (string) --

        • relatedEvents (list) --

          A list of CloudTrail event IDs.

          A populated field indicates that the current configuration was initiated by the events recorded in the CloudTrail log. For more information about CloudTrail, see What is AWS CloudTrail?.

          An empty field indicates that the current configuration was not initiated by any event.

          • (string) --

        • relationships (list) --

          A list of related AWS resources.

          • (dict) --

            The relationship of the related resource to the main resource.

            • resourceType (string) --

              The resource type of the related resource.

            • resourceId (string) --

              The resource ID of the related resource (for example, sg-xxxxxx.

            • relationshipName (string) --

              The name of the related resource.

        • configuration (string) --

          The description of the resource configuration.

    • nextToken (string) --

      A token used for pagination of results.

DescribeConfigurationRecorderStatus (new) Link ¶

Returns the current status of the specified configuration recorder. If a configuration recorder is not specified, this action returns the status of all configuration recorder associated with the account.

Request Syntax

client.describe_configuration_recorder_status(
    ConfigurationRecorderNames=[
        'string',
    ]
)
type ConfigurationRecorderNames:

list

param ConfigurationRecorderNames:

The name(s) of the configuration recorder. If the name is not specified, the action returns the current status of all the configuration recorders associated with the account.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'ConfigurationRecordersStatus': [
        {
            'name': 'string',
            'lastStartTime': datetime(2015, 1, 1),
            'lastStopTime': datetime(2015, 1, 1),
            'recording': True|False,
            'lastStatus': 'Pending'|'Success'|'Failure',
            'lastErrorCode': 'string',
            'lastErrorMessage': 'string',
            'lastStatusChangeTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    The output for the DescribeConfigurationRecorderStatus action in JSON format.

    • ConfigurationRecordersStatus (list) --

      A list that contains status of the specified recorders.

      • (dict) --

        The current status of the configuration recorder.

        • name (string) --

          The name of the configuration recorder.

        • lastStartTime (datetime) --

          The time the recorder was last started.

        • lastStopTime (datetime) --

          The time the recorder was last stopped.

        • recording (boolean) --

          Specifies whether the recorder is currently recording or not.

        • lastStatus (string) --

          The last (previous) status of the recorder.

        • lastErrorCode (string) --

          The error code indicating that the recording failed.

        • lastErrorMessage (string) --

          The message indicating that the recording failed due to an error.

        • lastStatusChangeTime (datetime) --

          The time when the status was last changed.

DeliverConfigSnapshot (new) Link ¶

Schedules delivery of a configuration snapshot to the Amazon S3 bucket in the specified delivery channel. After the delivery has started, AWS Config sends following notifications using an Amazon SNS topic that you have specified.

  • Notification of starting the delivery.

  • Notification of delivery completed, if the delivery was successfully completed.

  • Notification of delivery failure, if the delivery failed to complete.

Request Syntax

client.deliver_config_snapshot(
    deliveryChannelName='string'
)
type deliveryChannelName:

string

param deliveryChannelName:

[REQUIRED]

The name of the delivery channel through which the snapshot is delivered.

rtype:

dict

returns:

Response Syntax

{
    'configSnapshotId': 'string'
}

Response Structure

  • (dict) --

    The output for the DeliverConfigSnapshot action in JSON format.

    • configSnapshotId (string) --

      The ID of the snapshot that is being created.

DescribeDeliveryChannels (new) Link ¶

Returns details about the specified delivery channel. If a delivery channel is not specified, this action returns the details of all delivery channels associated with the account.

Request Syntax

client.describe_delivery_channels(
    DeliveryChannelNames=[
        'string',
    ]
)
type DeliveryChannelNames:

list

param DeliveryChannelNames:

A list of delivery channel names.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'DeliveryChannels': [
        {
            'name': 'string',
            's3BucketName': 'string',
            's3KeyPrefix': 'string',
            'snsTopicARN': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    The output for the DescribeDeliveryChannels action.

    • DeliveryChannels (list) --

      A list that contains the descriptions of the specified delivery channel.

      • (dict) --

        A logical container used for storing the configuration changes of an AWS resource.

        • name (string) --

          The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.

        • s3BucketName (string) --

          The name of the Amazon S3 bucket used to store configuration history for the delivery channel.

        • s3KeyPrefix (string) --

          The prefix for the specified Amazon S3 bucket.

        • snsTopicARN (string) --

          The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.

DescribeDeliveryChannelStatus (new) Link ¶

Returns the current status of the specified delivery channel. If a delivery channel is not specified, this action returns the current status of all delivery channels associated with the account.

Request Syntax

client.describe_delivery_channel_status(
    DeliveryChannelNames=[
        'string',
    ]
)
type DeliveryChannelNames:

list

param DeliveryChannelNames:

A list of delivery channel names.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'DeliveryChannelsStatus': [
        {
            'name': 'string',
            'configSnapshotDeliveryInfo': {
                'lastStatus': 'Success'|'Failure'|'Not_Applicable',
                'lastErrorCode': 'string',
                'lastErrorMessage': 'string',
                'lastAttemptTime': datetime(2015, 1, 1),
                'lastSuccessfulTime': datetime(2015, 1, 1)
            },
            'configHistoryDeliveryInfo': {
                'lastStatus': 'Success'|'Failure'|'Not_Applicable',
                'lastErrorCode': 'string',
                'lastErrorMessage': 'string',
                'lastAttemptTime': datetime(2015, 1, 1),
                'lastSuccessfulTime': datetime(2015, 1, 1)
            },
            'configStreamDeliveryInfo': {
                'lastStatus': 'Success'|'Failure'|'Not_Applicable',
                'lastErrorCode': 'string',
                'lastErrorMessage': 'string',
                'lastStatusChangeTime': datetime(2015, 1, 1)
            }
        },
    ]
}

Response Structure

  • (dict) --

    The output for the DescribeDeliveryChannelStatus action.

    • DeliveryChannelsStatus (list) --

      A list that contains the status of a specified delivery channel.

      • (dict) --

        The status of a specified delivery channel.

        Valid values: Success | Failure

        • name (string) --

          The name of the delivery channel.

        • configSnapshotDeliveryInfo (dict) --

          A list containing the status of the delivery of the snapshot to the specified Amazon S3 bucket.

          • lastStatus (string) --

            Status of the last attempted delivery.

          • lastErrorCode (string) --

            The error code from the last attempted delivery.

          • lastErrorMessage (string) --

            The error message from the last attempted delivery.

          • lastAttemptTime (datetime) --

            The time of the last attempted delivery.

          • lastSuccessfulTime (datetime) --

            The time of the last successful delivery.

        • configHistoryDeliveryInfo (dict) --

          A list that contains the status of the delivery of the configuration history to the specified Amazon S3 bucket.

          • lastStatus (string) --

            Status of the last attempted delivery.

          • lastErrorCode (string) --

            The error code from the last attempted delivery.

          • lastErrorMessage (string) --

            The error message from the last attempted delivery.

          • lastAttemptTime (datetime) --

            The time of the last attempted delivery.

          • lastSuccessfulTime (datetime) --

            The time of the last successful delivery.

        • configStreamDeliveryInfo (dict) --

          A list containing the status of the delivery of the configuration stream notification to the specified Amazon SNS topic.

          • lastStatus (string) --

            Status of the last attempted delivery.

          • lastErrorCode (string) --

            The error code from the last attempted delivery.

          • lastErrorMessage (string) --

            The error message from the last attempted delivery.

          • lastStatusChangeTime (datetime) --

            The time from the last status change.