conformance_packs
Creates, updates, deletes or gets a conformance_pack resource or lists conformance_packs in a region
Overview
| Name | conformance_packs |
| Type | Resource |
| Description | A conformance pack is a collection of AWS Config rules and remediation actions that can be easily deployed as a single entity in an account and a region or across an entire AWS Organization. |
| Id | awscc.config.conformance_packs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
conformance_pack_name | string | Name of the conformance pack which will be assigned as the unique identifier. |
delivery_s3_bucket | string | AWS Config stores intermediate files while processing conformance pack template. |
delivery_s3_key_prefix | string | The prefix for delivery S3 bucket. |
template_body | string | A string containing full conformance pack template body. You can only specify one of the template body or template S3Uri fields. |
template_s3_uri | string | Location of file containing the template body which points to the conformance pack template that is located in an Amazon S3 bucket. You can only specify one of the template body or template S3Uri fields. |
template_ssm_document_details | object | The TemplateSSMDocumentDetails object contains the name of the SSM document and the version of the SSM document. |
conformance_pack_input_parameters | array | A list of ConformancePackInputParameter objects. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
conformance_pack_name | string | Name of the conformance pack which will be assigned as the unique identifier. |
region | string | AWS region. |
For more information, see AWS::Config::ConformancePack.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | conformance_packs | INSERT | ConformancePackName, region |
delete_resource | conformance_packs | DELETE | Identifier, region |
update_resource | conformance_packs | UPDATE | Identifier, PatchDocument, region |
list_resources | conformance_packs_list_only | SELECT | region |
get_resource | conformance_packs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual conformance_pack.
SELECT
region,
conformance_pack_name,
delivery_s3_bucket,
delivery_s3_key_prefix,
template_body,
template_s3_uri,
template_ssm_document_details,
conformance_pack_input_parameters
FROM awscc.config.conformance_packs
WHERE
region = '{{ region }}' AND
Identifier = '{{ conformance_pack_name }}';
Lists all conformance_packs in a region.
SELECT
region,
conformance_pack_name
FROM awscc.config.conformance_packs_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new conformance_pack resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.config.conformance_packs (
ConformancePackName,
region
)
SELECT
'{{ conformance_pack_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.config.conformance_packs (
ConformancePackName,
DeliveryS3Bucket,
DeliveryS3KeyPrefix,
TemplateBody,
TemplateS3Uri,
TemplateSSMDocumentDetails,
ConformancePackInputParameters,
region
)
SELECT
'{{ conformance_pack_name }}',
'{{ delivery_s3_bucket }}',
'{{ delivery_s3_key_prefix }}',
'{{ template_body }}',
'{{ template_s3_uri }}',
'{{ template_ssm_document_details }}',
'{{ conformance_pack_input_parameters }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: conformance_pack
props:
- name: conformance_pack_name
value: '{{ conformance_pack_name }}'
- name: delivery_s3_bucket
value: '{{ delivery_s3_bucket }}'
- name: delivery_s3_key_prefix
value: '{{ delivery_s3_key_prefix }}'
- name: template_body
value: '{{ template_body }}'
- name: template_s3_uri
value: '{{ template_s3_uri }}'
- name: template_ssm_document_details
value:
document_name: '{{ document_name }}'
document_version: '{{ document_version }}'
- name: conformance_pack_input_parameters
value:
- parameter_name: '{{ parameter_name }}'
parameter_value: '{{ parameter_value }}'
UPDATE example
Use the following StackQL query and manifest file to update a conformance_pack resource, using stack-deploy.
/*+ update */
UPDATE awscc.config.conformance_packs
SET PatchDocument = string('{{ {
"DeliveryS3Bucket": delivery_s3_bucket,
"DeliveryS3KeyPrefix": delivery_s3_key_prefix,
"TemplateBody": template_body,
"TemplateS3Uri": template_s3_uri,
"TemplateSSMDocumentDetails": template_ssm_document_details,
"ConformancePackInputParameters": conformance_pack_input_parameters
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ conformance_pack_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.config.conformance_packs
WHERE
Identifier = '{{ conformance_pack_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the conformance_packs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
config:PutConformancePack,
config:DescribeConformancePackStatus,
config:DescribeConformancePacks,
s3:GetObject,
s3:GetBucketAcl,
iam:CreateServiceLinkedRole,
iam:PassRole
config:DescribeConformancePacks
config:PutConformancePack,
config:DescribeConformancePackStatus,
s3:GetObject,
s3:GetBucketAcl,
iam:CreateServiceLinkedRole,
iam:PassRole
config:DeleteConformancePack,
config:DescribeConformancePackStatus
config:DescribeConformancePacks