Amazon AppConfig

2023/10/04 - Amazon AppConfig - 6 updated api methods

Changes  AWS AppConfig introduces KMS customer-managed key (CMK) encryption support for data saved to AppConfig's hosted configuration store.

CreateConfigurationProfile (updated) Link ¶
Changes (request, response)
Request
{'KmsKeyIdentifier': 'string'}
Response
{'KmsKeyArn': 'string', 'KmsKeyIdentifier': 'string'}

Creates a configuration profile, which is information that enables AppConfig to access the configuration source. Valid configuration sources include the following:

  • Configuration data in YAML, JSON, and other formats stored in the AppConfig hosted configuration store

  • Configuration data stored as objects in an Amazon Simple Storage Service (Amazon S3) bucket

  • Pipelines stored in CodePipeline

  • Secrets stored in Secrets Manager

  • Standard and secure string parameters stored in Amazon Web Services Systems Manager Parameter Store

  • Configuration data in SSM documents stored in the Systems Manager document store

A configuration profile includes the following information:

  • The URI location of the configuration data.

  • The Identity and Access Management (IAM) role that provides access to the configuration data.

  • A validator for the configuration data. Available validators include either a JSON Schema or an Amazon Web Services Lambda function.

For more information, see Create a Configuration and a Configuration Profile in the AppConfig User Guide.

See also: AWS API Documentation

Request Syntax

client.create_configuration_profile(
    ApplicationId='string',
    Name='string',
    Description='string',
    LocationUri='string',
    RetrievalRoleArn='string',
    Validators=[
        {
            'Type': 'JSON_SCHEMA'|'LAMBDA',
            'Content': 'string'
        },
    ],
    Tags={
        'string': 'string'
    },
    Type='string',
    KmsKeyIdentifier='string'
)
type ApplicationId:

string

param ApplicationId:

[REQUIRED]

The application ID.

type Name:

string

param Name:

[REQUIRED]

A name for the configuration profile.

type Description:

string

param Description:

A description of the configuration profile.

type LocationUri:

string

param LocationUri:

[REQUIRED]

A URI to locate the configuration. You can specify the following:

  • For the AppConfig hosted configuration store and for feature flags, specify hosted.

  • For an Amazon Web Services Systems Manager Parameter Store parameter, specify either the parameter name in the format ssm-parameter://<parameter name> or the ARN.

  • For an Amazon Web Services CodePipeline pipeline, specify the URI in the following format: codepipeline://<pipeline name>.

  • For an Secrets Manager secret, specify the URI in the following format: secretsmanager://<secret name>.

  • For an Amazon S3 object, specify the URI in the following format: s3://<bucket>/<objectKey> ``. Here is an example: ``s3://my-bucket/my-app/us-east-1/my-config.json

  • For an SSM document, specify either the document name in the format ssm-document://<document name> or the Amazon Resource Name (ARN).

type RetrievalRoleArn:

string

param RetrievalRoleArn:

The ARN of an IAM role with permission to access the configuration at the specified LocationUri.

type Validators:

list

param Validators:

A list of methods for validating the configuration.

  • (dict) --

    A validator provides a syntactic or semantic check to ensure the configuration that you want to deploy functions as intended. To validate your application configuration data, you provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The configuration deployment or update can only proceed when the configuration data is valid.

    • Type (string) -- [REQUIRED]

      AppConfig supports validators of type JSON_SCHEMA and LAMBDA

    • Content (string) -- [REQUIRED]

      Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.

type Tags:

dict

param Tags:

Metadata to assign to the configuration profile. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

  • (string) --

    • (string) --

type Type:

string

param Type:

The type of configurations contained in the profile. AppConfig supports feature flags and freeform configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for Type:

AWS.AppConfig.FeatureFlags

AWS.Freeform

type KmsKeyIdentifier:

string

param KmsKeyIdentifier:

The identifier for an Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for hosted configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.

rtype:

dict

returns:

Response Syntax

{
    'ApplicationId': 'string',
    'Id': 'string',
    'Name': 'string',
    'Description': 'string',
    'LocationUri': 'string',
    'RetrievalRoleArn': 'string',
    'Validators': [
        {
            'Type': 'JSON_SCHEMA'|'LAMBDA',
            'Content': 'string'
        },
    ],
    'Type': 'string',
    'KmsKeyArn': 'string',
    'KmsKeyIdentifier': 'string'
}

Response Structure

  • (dict) --

    • ApplicationId (string) --

      The application ID.

    • Id (string) --

      The configuration profile ID.

    • Name (string) --

      The name of the configuration profile.

    • Description (string) --

      The configuration profile description.

    • LocationUri (string) --

      The URI location of the configuration.

    • RetrievalRoleArn (string) --

      The ARN of an IAM role with permission to access the configuration at the specified LocationUri.

    • Validators (list) --

      A list of methods for validating the configuration.

      • (dict) --

        A validator provides a syntactic or semantic check to ensure the configuration that you want to deploy functions as intended. To validate your application configuration data, you provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The configuration deployment or update can only proceed when the configuration data is valid.

        • Type (string) --

          AppConfig supports validators of type JSON_SCHEMA and LAMBDA

        • Content (string) --

          Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.

    • Type (string) --

      The type of configurations contained in the profile. AppConfig supports feature flags and freeform configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for Type:

      AWS.AppConfig.FeatureFlags

      AWS.Freeform

    • KmsKeyArn (string) --

      The Amazon Resource Name of the Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for hosted configuration types. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.

    • KmsKeyIdentifier (string) --

      The Key Management Service key identifier (key ID, key alias, or key ARN) provided when the resource was created or updated.

CreateHostedConfigurationVersion (updated) Link ¶
Changes (response)
{'KmsKeyArn': 'string'}

Creates a new configuration in the AppConfig hosted configuration store.

See also: AWS API Documentation

Request Syntax

client.create_hosted_configuration_version(
    ApplicationId='string',
    ConfigurationProfileId='string',
    Description='string',
    Content=b'bytes'|file,
    ContentType='string',
    LatestVersionNumber=123,
    VersionLabel='string'
)
type ApplicationId:

string

param ApplicationId:

[REQUIRED]

The application ID.

type ConfigurationProfileId:

string

param ConfigurationProfileId:

[REQUIRED]

The configuration profile ID.

type Description:

string

param Description:

A description of the configuration.

type Content:

bytes or seekable file-like object

param Content:

[REQUIRED]

The content of the configuration or the configuration data.

type ContentType:

string

param ContentType:

[REQUIRED]

A standard MIME type describing the format of the configuration content. For more information, see Content-Type.

type LatestVersionNumber:

integer

param LatestVersionNumber:

An optional locking token used to prevent race conditions from overwriting configuration updates when creating a new version. To ensure your data is not overwritten when creating multiple hosted configuration versions in rapid succession, specify the version number of the latest hosted configuration version.

type VersionLabel:

string

param VersionLabel:

An optional, user-defined label for the AppConfig hosted configuration version. This value must contain at least one non-numeric character. For example, "v2.2.0".

rtype:

dict

returns:

Response Syntax

{
    'ApplicationId': 'string',
    'ConfigurationProfileId': 'string',
    'VersionNumber': 123,
    'Description': 'string',
    'Content': b'bytes'|file,
    'ContentType': 'string',
    'VersionLabel': 'string',
    'KmsKeyArn': 'string'
}

Response Structure

  • (dict) --

    • ApplicationId (string) --

      The application ID.

    • ConfigurationProfileId (string) --

      The configuration profile ID.

    • VersionNumber (integer) --

      The configuration version.

    • Description (string) --

      A description of the configuration.

    • Content (bytes or seekable file-like object) --

      The content of the configuration or the configuration data.

    • ContentType (string) --

      A standard MIME type describing the format of the configuration content. For more information, see Content-Type.

    • VersionLabel (string) --

      A user-defined label for an AppConfig hosted configuration version.

    • KmsKeyArn (string) --

      The Amazon Resource Name of the Key Management Service key that was used to encrypt this specific version of the configuration data in the AppConfig hosted configuration store.

GetConfigurationProfile (updated) Link ¶
Changes (response)
{'KmsKeyArn': 'string', 'KmsKeyIdentifier': 'string'}

Retrieves information about a configuration profile.

See also: AWS API Documentation

Request Syntax

client.get_configuration_profile(
    ApplicationId='string',
    ConfigurationProfileId='string'
)
type ApplicationId:

string

param ApplicationId:

[REQUIRED]

The ID of the application that includes the configuration profile you want to get.

type ConfigurationProfileId:

string

param ConfigurationProfileId:

[REQUIRED]

The ID of the configuration profile that you want to get.

rtype:

dict

returns:

Response Syntax

{
    'ApplicationId': 'string',
    'Id': 'string',
    'Name': 'string',
    'Description': 'string',
    'LocationUri': 'string',
    'RetrievalRoleArn': 'string',
    'Validators': [
        {
            'Type': 'JSON_SCHEMA'|'LAMBDA',
            'Content': 'string'
        },
    ],
    'Type': 'string',
    'KmsKeyArn': 'string',
    'KmsKeyIdentifier': 'string'
}

Response Structure

  • (dict) --

    • ApplicationId (string) --

      The application ID.

    • Id (string) --

      The configuration profile ID.

    • Name (string) --

      The name of the configuration profile.

    • Description (string) --

      The configuration profile description.

    • LocationUri (string) --

      The URI location of the configuration.

    • RetrievalRoleArn (string) --

      The ARN of an IAM role with permission to access the configuration at the specified LocationUri.

    • Validators (list) --

      A list of methods for validating the configuration.

      • (dict) --

        A validator provides a syntactic or semantic check to ensure the configuration that you want to deploy functions as intended. To validate your application configuration data, you provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The configuration deployment or update can only proceed when the configuration data is valid.

        • Type (string) --

          AppConfig supports validators of type JSON_SCHEMA and LAMBDA

        • Content (string) --

          Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.

    • Type (string) --

      The type of configurations contained in the profile. AppConfig supports feature flags and freeform configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for Type:

      AWS.AppConfig.FeatureFlags

      AWS.Freeform

    • KmsKeyArn (string) --

      The Amazon Resource Name of the Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for hosted configuration types. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.

    • KmsKeyIdentifier (string) --

      The Key Management Service key identifier (key ID, key alias, or key ARN) provided when the resource was created or updated.

GetHostedConfigurationVersion (updated) Link ¶
Changes (response)
{'KmsKeyArn': 'string'}

Retrieves information about a specific configuration version.

See also: AWS API Documentation

Request Syntax

client.get_hosted_configuration_version(
    ApplicationId='string',
    ConfigurationProfileId='string',
    VersionNumber=123
)
type ApplicationId:

string

param ApplicationId:

[REQUIRED]

The application ID.

type ConfigurationProfileId:

string

param ConfigurationProfileId:

[REQUIRED]

The configuration profile ID.

type VersionNumber:

integer

param VersionNumber:

[REQUIRED]

The version.

rtype:

dict

returns:

Response Syntax

{
    'ApplicationId': 'string',
    'ConfigurationProfileId': 'string',
    'VersionNumber': 123,
    'Description': 'string',
    'Content': StreamingBody(),
    'ContentType': 'string',
    'VersionLabel': 'string',
    'KmsKeyArn': 'string'
}

Response Structure

  • (dict) --

    • ApplicationId (string) --

      The application ID.

    • ConfigurationProfileId (string) --

      The configuration profile ID.

    • VersionNumber (integer) --

      The configuration version.

    • Description (string) --

      A description of the configuration.

    • Content (:class:`.StreamingBody`) --

      The content of the configuration or the configuration data.

    • ContentType (string) --

      A standard MIME type describing the format of the configuration content. For more information, see Content-Type.

    • VersionLabel (string) --

      A user-defined label for an AppConfig hosted configuration version.

    • KmsKeyArn (string) --

      The Amazon Resource Name of the Key Management Service key that was used to encrypt this specific version of the configuration data in the AppConfig hosted configuration store.

ListHostedConfigurationVersions (updated) Link ¶
Changes (response)
{'Items': {'KmsKeyArn': 'string'}}

Lists configurations stored in the AppConfig hosted configuration store by version.

See also: AWS API Documentation

Request Syntax

client.list_hosted_configuration_versions(
    ApplicationId='string',
    ConfigurationProfileId='string',
    MaxResults=123,
    NextToken='string',
    VersionLabel='string'
)
type ApplicationId:

string

param ApplicationId:

[REQUIRED]

The application ID.

type ConfigurationProfileId:

string

param ConfigurationProfileId:

[REQUIRED]

The configuration profile ID.

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:

A token to start the list. Use this token to get the next set of results.

type VersionLabel:

string

param VersionLabel:

An optional filter that can be used to specify the version label of an AppConfig hosted configuration version. This parameter supports filtering by prefix using a wildcard, for example "v2*". If you don't specify an asterisk at the end of the value, only an exact match is returned.

rtype:

dict

returns:

Response Syntax

{
    'Items': [
        {
            'ApplicationId': 'string',
            'ConfigurationProfileId': 'string',
            'VersionNumber': 123,
            'Description': 'string',
            'ContentType': 'string',
            'VersionLabel': 'string',
            'KmsKeyArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Items (list) --

      The elements from this collection.

      • (dict) --

        Information about the configuration.

        • ApplicationId (string) --

          The application ID.

        • ConfigurationProfileId (string) --

          The configuration profile ID.

        • VersionNumber (integer) --

          The configuration version.

        • Description (string) --

          A description of the configuration.

        • ContentType (string) --

          A standard MIME type describing the format of the configuration content. For more information, see Content-Type.

        • VersionLabel (string) --

          A user-defined label for an AppConfig hosted configuration version.

        • KmsKeyArn (string) --

          The Amazon Resource Name of the Key Management Service key that was used to encrypt this specific version of the configuration data in the AppConfig hosted configuration store.

    • NextToken (string) --

      The token for the next set of items to return. Use this token to get the next set of results.

UpdateConfigurationProfile (updated) Link ¶
Changes (request, response)
Request
{'KmsKeyIdentifier': 'string'}
Response
{'KmsKeyArn': 'string', 'KmsKeyIdentifier': 'string'}

Updates a configuration profile.

See also: AWS API Documentation

Request Syntax

client.update_configuration_profile(
    ApplicationId='string',
    ConfigurationProfileId='string',
    Name='string',
    Description='string',
    RetrievalRoleArn='string',
    Validators=[
        {
            'Type': 'JSON_SCHEMA'|'LAMBDA',
            'Content': 'string'
        },
    ],
    KmsKeyIdentifier='string'
)
type ApplicationId:

string

param ApplicationId:

[REQUIRED]

The application ID.

type ConfigurationProfileId:

string

param ConfigurationProfileId:

[REQUIRED]

The ID of the configuration profile.

type Name:

string

param Name:

The name of the configuration profile.

type Description:

string

param Description:

A description of the configuration profile.

type RetrievalRoleArn:

string

param RetrievalRoleArn:

The ARN of an IAM role with permission to access the configuration at the specified LocationUri.

type Validators:

list

param Validators:

A list of methods for validating the configuration.

  • (dict) --

    A validator provides a syntactic or semantic check to ensure the configuration that you want to deploy functions as intended. To validate your application configuration data, you provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The configuration deployment or update can only proceed when the configuration data is valid.

    • Type (string) -- [REQUIRED]

      AppConfig supports validators of type JSON_SCHEMA and LAMBDA

    • Content (string) -- [REQUIRED]

      Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.

type KmsKeyIdentifier:

string

param KmsKeyIdentifier:

The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for hosted configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.

rtype:

dict

returns:

Response Syntax

{
    'ApplicationId': 'string',
    'Id': 'string',
    'Name': 'string',
    'Description': 'string',
    'LocationUri': 'string',
    'RetrievalRoleArn': 'string',
    'Validators': [
        {
            'Type': 'JSON_SCHEMA'|'LAMBDA',
            'Content': 'string'
        },
    ],
    'Type': 'string',
    'KmsKeyArn': 'string',
    'KmsKeyIdentifier': 'string'
}

Response Structure

  • (dict) --

    • ApplicationId (string) --

      The application ID.

    • Id (string) --

      The configuration profile ID.

    • Name (string) --

      The name of the configuration profile.

    • Description (string) --

      The configuration profile description.

    • LocationUri (string) --

      The URI location of the configuration.

    • RetrievalRoleArn (string) --

      The ARN of an IAM role with permission to access the configuration at the specified LocationUri.

    • Validators (list) --

      A list of methods for validating the configuration.

      • (dict) --

        A validator provides a syntactic or semantic check to ensure the configuration that you want to deploy functions as intended. To validate your application configuration data, you provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The configuration deployment or update can only proceed when the configuration data is valid.

        • Type (string) --

          AppConfig supports validators of type JSON_SCHEMA and LAMBDA

        • Content (string) --

          Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.

    • Type (string) --

      The type of configurations contained in the profile. AppConfig supports feature flags and freeform configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for Type:

      AWS.AppConfig.FeatureFlags

      AWS.Freeform

    • KmsKeyArn (string) --

      The Amazon Resource Name of the Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for hosted configuration types. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.

    • KmsKeyIdentifier (string) --

      The Key Management Service key identifier (key ID, key alias, or key ARN) provided when the resource was created or updated.