AWS Config

2022/08/24 - AWS Config - 2 updated api methods

Changes  AWS Config now supports ConformancePackTemplate documents in SSM Docs for the deployment and update of conformance packs.

DescribeConformancePacks (updated) Link ¶
Changes (response)
{'ConformancePackDetails': {'TemplateSSMDocumentDetails': {'DocumentName': 'string',
                                                           'DocumentVersion': 'string'}}}

Returns a list of one or more conformance packs.

See also: AWS API Documentation

Request Syntax

client.describe_conformance_packs(
    ConformancePackNames=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
type ConformancePackNames

list

param ConformancePackNames

Comma-separated list of conformance pack names for which you want details. If you do not specify any names, Config returns details for all your conformance packs.

  • (string) --

type Limit

integer

param Limit

The maximum number of conformance packs returned on each page.

type NextToken

string

param NextToken

The nextToken string returned in a previous request that you use to request the next page of results in a paginated response.

rtype

dict

returns

Response Syntax

{
    'ConformancePackDetails': [
        {
            'ConformancePackName': 'string',
            'ConformancePackArn': 'string',
            'ConformancePackId': 'string',
            'DeliveryS3Bucket': 'string',
            'DeliveryS3KeyPrefix': 'string',
            'ConformancePackInputParameters': [
                {
                    'ParameterName': 'string',
                    'ParameterValue': 'string'
                },
            ],
            'LastUpdateRequestedTime': datetime(2015, 1, 1),
            'CreatedBy': 'string',
            'TemplateSSMDocumentDetails': {
                'DocumentName': 'string',
                'DocumentVersion': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ConformancePackDetails (list) --

      Returns a list of ConformancePackDetail objects.

      • (dict) --

        Returns details of a conformance pack. A conformance pack is a collection of Config rules and remediation actions that can be easily deployed in an account and a region.

        • ConformancePackName (string) --

          Name of the conformance pack.

        • ConformancePackArn (string) --

          Amazon Resource Name (ARN) of the conformance pack.

        • ConformancePackId (string) --

          ID of the conformance pack.

        • DeliveryS3Bucket (string) --

          The name of the Amazon S3 bucket where Config stores conformance pack templates.

          Note

          This field is optional.

        • DeliveryS3KeyPrefix (string) --

          The prefix for the Amazon S3 bucket.

          Note

          This field is optional.

        • ConformancePackInputParameters (list) --

          A list of ConformancePackInputParameter objects.

          • (dict) --

            Input parameters in the form of key-value pairs for the conformance pack, both of which you define. Keys can have a maximum character length of 255 characters, and values can have a maximum length of 4096 characters.

            • ParameterName (string) --

              One part of a key-value pair.

            • ParameterValue (string) --

              Another part of the key-value pair.

        • LastUpdateRequestedTime (datetime) --

          The last time a conformation pack update was requested.

        • CreatedBy (string) --

          The Amazon Web Services service that created the conformance pack.

        • TemplateSSMDocumentDetails (dict) --

          An object that contains the name or Amazon Resource Name (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM document that is used to create a conformance pack.

          • DocumentName (string) --

            The name or Amazon Resource Name (ARN) of the SSM document to use to create a conformance pack. If you use the Document Name, Config checks only your account and region for the SSM document. If you want to use an SSM document from another region or account, you must provide the ARN.

          • DocumentVersion (string) --

            The version of the SSM document to use to create a conformance pack. By default, Config uses the latest version.

            Note

            This field is optional.

    • NextToken (string) --

      The nextToken string returned in a previous request that you use to request the next page of results in a paginated response.

PutConformancePack (updated) Link ¶
Changes (request)
{'TemplateSSMDocumentDetails': {'DocumentName': 'string',
                                'DocumentVersion': 'string'}}

Creates or updates a conformance pack. A conformance pack is a collection of Config rules that can be easily deployed in an account and a region and across Amazon Web Services Organization. For information on how many conformance packs you can have per account, see ` Service Limits https://docs.aws.amazon.com/config/latest/developerguide/configlimits.html`__ in the Config Developer Guide.

This API creates a service-linked role AWSServiceRoleForConfigConforms in your account. The service-linked role is created only when the role does not exist in your account.

Note

You must specify one and only one of the``TemplateS3Uri`` , TemplateBody or TemplateSSMDocumentDetails parameters.

See also: AWS API Documentation

Request Syntax

client.put_conformance_pack(
    ConformancePackName='string',
    TemplateS3Uri='string',
    TemplateBody='string',
    DeliveryS3Bucket='string',
    DeliveryS3KeyPrefix='string',
    ConformancePackInputParameters=[
        {
            'ParameterName': 'string',
            'ParameterValue': 'string'
        },
    ],
    TemplateSSMDocumentDetails={
        'DocumentName': 'string',
        'DocumentVersion': 'string'
    }
)
type ConformancePackName

string

param ConformancePackName

[REQUIRED]

The unique name of the conformance pack you want to deploy.

type TemplateS3Uri

string

param TemplateS3Uri

The location of the file containing the template body (s3://bucketname/prefix ). The uri must point to a conformance pack template (max size: 300 KB) that is located in an Amazon S3 bucket in the same region as the conformance pack.

Note

You must have access to read Amazon S3 bucket.

type TemplateBody

string

param TemplateBody

A string containing the full conformance pack template body. The structure containing the template body has a minimum length of 1 byte and a maximum length of 51,200 bytes.

Note

You can only use a YAML template with two resource types: Config rule (AWS::Config::ConfigRule ) and remediation action (AWS::Config::RemediationConfiguration ).

type DeliveryS3Bucket

string

param DeliveryS3Bucket

The name of the Amazon S3 bucket where Config stores conformance pack templates.

Note

This field is optional.

type DeliveryS3KeyPrefix

string

param DeliveryS3KeyPrefix

The prefix for the Amazon S3 bucket.

Note

This field is optional.

type ConformancePackInputParameters

list

param ConformancePackInputParameters

A list of ConformancePackInputParameter objects.

  • (dict) --

    Input parameters in the form of key-value pairs for the conformance pack, both of which you define. Keys can have a maximum character length of 255 characters, and values can have a maximum length of 4096 characters.

    • ParameterName (string) -- [REQUIRED]

      One part of a key-value pair.

    • ParameterValue (string) -- [REQUIRED]

      Another part of the key-value pair.

type TemplateSSMDocumentDetails

dict

param TemplateSSMDocumentDetails

An object of type TemplateSSMDocumentDetails , which contains the name or the Amazon Resource Name (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM document that is used to create a conformance pack.

  • DocumentName (string) -- [REQUIRED]

    The name or Amazon Resource Name (ARN) of the SSM document to use to create a conformance pack. If you use the Document Name, Config checks only your account and region for the SSM document. If you want to use an SSM document from another region or account, you must provide the ARN.

  • DocumentVersion (string) --

    The version of the SSM document to use to create a conformance pack. By default, Config uses the latest version.

    Note

    This field is optional.

rtype

dict

returns

Response Syntax

{
    'ConformancePackArn': 'string'
}

Response Structure

  • (dict) --

    • ConformancePackArn (string) --

      ARN of the conformance pack.