configuration_profiles
Creates, updates, deletes, gets or lists a configuration_profiles resource.
Overview
| Name | configuration_profiles |
| Type | Resource |
| Id | aws.appconfig.configuration_profiles |
Fields
The following fields are returned by SELECT queries:
- get_configuration_profile
- list_configuration_profiles
| Name | Datatype | Description |
|---|---|---|
application_id | string | The application ID. (pattern: <code>[a-z0-9]{4,7}</code>) |
description | string | The configuration profile description. |
id | string | The configuration profile ID. (pattern: <code>[a-z0-9]{4,7}</code>) |
kms_key_arn | 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. (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_identifier | string | The Key Management Service key identifier (key ID, key alias, or key ARN) provided when the resource was created or updated. |
location_uri | string | The URI location of the configuration. |
name | string | The name of the configuration profile. |
retrieval_role_arn | string | The 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>) |
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 (pattern: <code>^[a-zA-Z0-9.-]+</code>) |
validators | array | A list of methods for validating the configuration. |
| Name | Datatype | Description |
|---|---|---|
application_id | string | The application ID. (pattern: <code>[a-z0-9]{4,7}</code>) |
id | string | The ID of the configuration profile. (pattern: <code>[a-z0-9]{4,7}</code>) |
location_uri | string | The URI location of the configuration. |
name | string | The name of the configuration profile. |
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 (pattern: <code>^[a-zA-Z0-9.-]+</code>) |
validator_types | array | The types of validators in the configuration profile. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_configuration_profile | select | application_id, configuration_profile_id, region | Retrieves information about a configuration profile. | |
list_configuration_profiles | select | application_id, region | max_results, next_token, type | Lists the configuration profiles for an application. |
create_configuration_profile | insert | application_id, region, LocationUri | 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. | |
update_configuration_profile | update | application_id, configuration_profile_id, region | Updates a configuration profile. | |
delete_configuration_profile | delete | application_id, configuration_profile_id, region | x-amzn-deletion-protection-check | Deletes a configuration profile. To prevent users from unintentionally deleting actively-used configuration profiles, enable deletion protection. |
validate_configuration | exec | application_id, configuration_profile_id, configuration_version, region | Uses 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.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The application ID. |
configuration_profile_id | string | The configuration profile ID. |
configuration_version | string | The version of the configuration to validate. |
region | string | AWS region (default: us-east-1) |
max_results | integer | 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. |
next_token | string | A token to start the list. Use this token to get the next set of results. |
type | string | A 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-check | string | A 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
- get_configuration_profile
- list_configuration_profiles
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
;
Lists the configuration profiles for an application.
SELECT
application_id,
id,
location_uri,
name,
type,
validator_types
FROM aws.appconfig.configuration_profiles
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
AND max_results = '{{ max_results }}'
AND next_token = '{{ next_token }}'
AND type = '{{ type }}'
;
INSERT examples
- create_configuration_profile
- Manifest
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
;
# Description fields are for documentation purposes
- name: configuration_profiles
props:
- name: application_id
value: "{{ application_id }}"
description: Required parameter for the configuration_profiles resource.
- name: region
value: "{{ region }}"
description: Required parameter for the configuration_profiles resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: LocationUri
value: "{{ LocationUri }}"
- name: RetrievalRoleArn
value: "{{ RetrievalRoleArn }}"
- name: Validators
value:
- Type: "{{ Type }}"
Content: "{{ Content }}"
- name: Tags
value: "{{ Tags }}"
- name: Type
value: "{{ Type }}"
- name: KmsKeyIdentifier
value: "{{ KmsKeyIdentifier }}"
UPDATE examples
- update_configuration_profile
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
- delete_configuration_profile
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
- validate_configuration
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
;