ConfigService / Client / put_conformance_pack

put_conformance_pack#

ConfigService.Client.put_conformance_pack(**kwargs)#

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 an organization. For information on how many conformance packs you can have per account, see **Service Limits** 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 only one of the follow parameters: TemplateS3Uri, TemplateBody or TemplateSSMDocumentDetails.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

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

  • TemplateS3Uri (string) –

    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. In addition, in order to ensure a successful deployment, the template object must not be in an archived storage class if this parameter is passed.

  • TemplateBody (string) –

    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 use a YAML template with two resource types: Config rule ( AWS::Config::ConfigRule) and remediation action ( AWS::Config::RemediationConfiguration).

  • 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) – [REQUIRED]

        One part of a key-value pair.

      • ParameterValue (string) – [REQUIRED]

        Another part of the key-value pair.

  • TemplateSSMDocumentDetails (dict) –

    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 Amazon Web Services Region for the SSM document.

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

Return type:

dict

Returns:

Response Syntax

{
    'ConformancePackArn': 'string'
}

Response Structure

  • (dict) –

    • ConformancePackArn (string) –

      ARN of the conformance pack.

Exceptions

  • ConfigService.Client.exceptions.InsufficientPermissionsException

  • ConfigService.Client.exceptions.ConformancePackTemplateValidationException

  • ConfigService.Client.exceptions.ResourceInUseException

  • ConfigService.Client.exceptions.InvalidParameterValueException

  • ConfigService.Client.exceptions.MaxNumberOfConformancePacksExceededException