resource_data_syncs
Creates, updates, deletes or gets a resource_data_sync resource or lists resource_data_syncs in a region
Overview
| Name | resource_data_syncs |
| Type | Resource |
| Description | Resource Type definition for AWS::SSM::ResourceDataSync |
| Id | awscc.ssm.resource_data_syncs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
s3_destination | object | |
kms_key_arn | string | |
sync_source | object | |
bucket_name | string | |
bucket_region | string | |
sync_format | string | |
sync_name | string | |
sync_type | string | |
bucket_prefix | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
sync_name | string | |
region | string | AWS region. |
For more information, see AWS::SSM::ResourceDataSync.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | resource_data_syncs | INSERT | SyncName, region |
delete_resource | resource_data_syncs | DELETE | Identifier, region |
update_resource | resource_data_syncs | UPDATE | Identifier, PatchDocument, region |
list_resources | resource_data_syncs_list_only | SELECT | region |
get_resource | resource_data_syncs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual resource_data_sync.
SELECT
region,
s3_destination,
kms_key_arn,
sync_source,
bucket_name,
bucket_region,
sync_format,
sync_name,
sync_type,
bucket_prefix
FROM awscc.ssm.resource_data_syncs
WHERE
region = '{{ region }}' AND
Identifier = '{{ sync_name }}';
Lists all resource_data_syncs in a region.
SELECT
region,
sync_name
FROM awscc.ssm.resource_data_syncs_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new resource_data_sync resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ssm.resource_data_syncs (
SyncName,
region
)
SELECT
'{{ sync_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.ssm.resource_data_syncs (
S3Destination,
KMSKeyArn,
SyncSource,
BucketName,
BucketRegion,
SyncFormat,
SyncName,
SyncType,
BucketPrefix,
region
)
SELECT
'{{ s3_destination }}',
'{{ kms_key_arn }}',
'{{ sync_source }}',
'{{ bucket_name }}',
'{{ bucket_region }}',
'{{ sync_format }}',
'{{ sync_name }}',
'{{ sync_type }}',
'{{ bucket_prefix }}',
'{{ 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: resource_data_sync
props:
- name: s3_destination
value:
kms_key_arn: '{{ kms_key_arn }}'
bucket_prefix: '{{ bucket_prefix }}'
bucket_name: '{{ bucket_name }}'
bucket_region: '{{ bucket_region }}'
sync_format: '{{ sync_format }}'
- name: kms_key_arn
value: '{{ kms_key_arn }}'
- name: sync_source
value:
include_future_regions: '{{ include_future_regions }}'
source_regions:
- '{{ source_regions[0] }}'
source_type: '{{ source_type }}'
aws_organizations_source:
organizational_units:
- '{{ organizational_units[0] }}'
organization_source_type: '{{ organization_source_type }}'
- name: bucket_name
value: '{{ bucket_name }}'
- name: bucket_region
value: '{{ bucket_region }}'
- name: sync_format
value: '{{ sync_format }}'
- name: sync_name
value: '{{ sync_name }}'
- name: sync_type
value: '{{ sync_type }}'
- name: bucket_prefix
value: '{{ bucket_prefix }}'
UPDATE example
Use the following StackQL query and manifest file to update a resource_data_sync resource, using stack-deploy.
/*+ update */
UPDATE awscc.ssm.resource_data_syncs
SET PatchDocument = string('{{ {
"SyncSource": sync_source
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ sync_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.ssm.resource_data_syncs
WHERE
Identifier = '{{ sync_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 resource_data_syncs resource, the following permissions are required:
- Create
- Delete
- Update
- List
- Read
ssm:CreateResourceDataSync,
ssm:ListResourceDataSync
ssm:ListResourceDataSync,
ssm:DeleteResourceDataSync
ssm:ListResourceDataSync,
ssm:UpdateResourceDataSync
ssm:ListResourceDataSync
ssm:ListResourceDataSync