Skip to main content

configuration_profiles

Creates, updates, deletes, gets or lists a configuration_profiles resource.

Overview

Nameconfiguration_profiles
TypeResource
Idaws.appconfig.configuration_profiles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_idstringThe application ID. (pattern: <code>[a-z0-9]{4,7}</code>)
descriptionstringThe configuration profile description.
idstringThe configuration profile ID. (pattern: <code>[a-z0-9]{4,7}</code>)
kms_key_arnstringThe 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. (pattern: <code>arn:(aws[a-zA-Z-]*)?:[a-z]+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:[a-zA-Z0-9-_/:.]+</code>)
kms_key_identifierstringThe Key Management Service key identifier (key ID, key alias, or key ARN) provided when the resource was created or updated.
location_uristringThe URI location of the configuration.
namestringThe name of the configuration profile.
retrieval_role_arnstringThe ARN of an IAM role with permission to access the configuration at the specified LocationUri. (pattern: <code>^((arn):(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov|aws-eusc):(iam)::\d{12}:role[/].*)$</code>)
typestringThe 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 (pattern: <code>^[a-zA-Z0-9.-]+</code>)
validatorsarrayA list of methods for validating the configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_configuration_profileselectapplication_id, configuration_profile_id, regionRetrieves information about a configuration profile.
list_configuration_profilesselectapplication_id, regionmax_results, next_token, typeLists the configuration profiles for an application.
create_configuration_profileinsertapplication_id, region, LocationUriCreates 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.
update_configuration_profileupdateapplication_id, configuration_profile_id, regionUpdates a configuration profile.
delete_configuration_profiledeleteapplication_id, configuration_profile_id, regionx-amzn-deletion-protection-checkDeletes a configuration profile. To prevent users from unintentionally deleting actively-used configuration profiles, enable deletion protection.
validate_configurationexecapplication_id, configuration_profile_id, configuration_version, regionUses the validators in a configuration profile to validate a configuration.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
application_idstringThe application ID.
configuration_profile_idstringThe configuration profile ID.
configuration_versionstringThe version of the configuration to validate.
regionstringAWS region (default: us-east-1)
max_resultsintegerThe 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.
next_tokenstringA token to start the list. Use this token to get the next set of results.
typestringA filter based on the type of configurations that the configuration profile contains. A configuration can be a feature flag or a freeform configuration.
x-amzn-deletion-protection-checkstringA parameter to configure deletion protection. Deletion protection prevents a user from deleting a configuration profile if your application has called either GetLatestConfiguration or for the configuration profile during the specified interval. This parameter supports the following values: BYPASS: Instructs AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it. APPLY: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level. APPLY also forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks. ACCOUNT_DEFAULT: The default setting, which instructs AppConfig to implement the deletion protection value specified in the UpdateAccountSettings API.

SELECT examples

Retrieves information about a configuration profile.

SELECT
application_id,
description,
id,
kms_key_arn,
kms_key_identifier,
location_uri,
name,
retrieval_role_arn,
type,
validators
FROM aws.appconfig.configuration_profiles
WHERE application_id = '{{ application_id }}' -- required
AND configuration_profile_id = '{{ configuration_profile_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.appconfig.configuration_profiles (
Name,
Description,
LocationUri,
RetrievalRoleArn,
Validators,
Tags,
Type,
KmsKeyIdentifier,
application_id,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ LocationUri }}' /* required */,
'{{ RetrievalRoleArn }}',
'{{ Validators }}',
'{{ Tags }}',
'{{ Type }}',
'{{ KmsKeyIdentifier }}',
'{{ application_id }}',
'{{ region }}'
RETURNING
application_id,
description,
id,
kms_key_arn,
kms_key_identifier,
location_uri,
name,
retrieval_role_arn,
type,
validators
;

UPDATE examples

Updates a configuration profile.

UPDATE aws.appconfig.configuration_profiles
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
RetrievalRoleArn = '{{ RetrievalRoleArn }}',
Validators = '{{ Validators }}',
KmsKeyIdentifier = '{{ KmsKeyIdentifier }}'
WHERE
application_id = '{{ application_id }}' --required
AND configuration_profile_id = '{{ configuration_profile_id }}' --required
AND region = '{{ region }}' --required
RETURNING
application_id,
description,
id,
kms_key_arn,
kms_key_identifier,
location_uri,
name,
retrieval_role_arn,
type,
validators;

DELETE examples

Deletes a configuration profile. To prevent users from unintentionally deleting actively-used configuration profiles, enable deletion protection.

DELETE FROM aws.appconfig.configuration_profiles
WHERE application_id = '{{ application_id }}' --required
AND configuration_profile_id = '{{ configuration_profile_id }}' --required
AND region = '{{ region }}' --required
AND `x-amzn-deletion-protection-check` = '{{ x-amzn-deletion-protection-check }}'
;

Lifecycle Methods

Uses the validators in a configuration profile to validate a configuration.

EXEC aws.appconfig.configuration_profiles.validate_configuration
@application_id='{{ application_id }}' --required,
@configuration_profile_id='{{ configuration_profile_id }}' --required,
@configuration_version='{{ configuration_version }}' --required,
@region='{{ region }}' --required
;