resource_data_syncs
Creates, updates, deletes, gets or lists a resource_data_syncs resource.
Overview
| Name | resource_data_syncs |
| Type | Resource |
| Id | aws.ssm.resource_data_syncs |
Fields
The following fields are returned by SELECT queries:
- list_resource_data_sync
| Name | Datatype | Description |
|---|---|---|
last_status | string | The status reported by the last sync. (Successful, Failed, InProgress) |
last_successful_sync_time | string (date-time) | The last time the sync operations returned a status of SUCCESSFUL (UTC). |
last_sync_status_message | string | The status message details reported by the last sync. |
last_sync_time | string (date-time) | The last time the configuration attempted to sync (UTC). |
s3_destination | object | Configuration information for the target S3 bucket. |
sync_created_time | string (date-time) | The date and time the configuration was created (UTC). |
sync_last_modified_time | string (date-time) | The date and time the resource data sync was changed. |
sync_name | string | The name of the resource data sync. |
sync_source | object | Information about the source where the data was synchronized. |
sync_type | string | The type of resource data sync. If SyncType is SyncToDestination, then the resource data sync synchronizes data to an S3 bucket. If the SyncType is SyncFromSource then the resource data sync synchronizes data from Organizations or from multiple Amazon Web Services Regions. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_resource_data_sync | select | region | Lists your resource data sync configurations. Includes information about the last time a sync attempted to start, the last sync status, and the last time a sync successfully completed. The number of sync configurations might be too large to return using a single call to ListResourceDataSync. You can limit the number of sync configurations returned by using the MaxResults parameter. To determine whether there are more sync configurations to list, check the value of NextToken in the output. If there are more sync configurations to list, you can request them by specifying the NextToken returned in the call to the parameter of a subsequent call. | |
create_resource_data_sync | insert | region, SyncName | A resource data sync helps you view data from multiple sources in a single location. Amazon Web Services Systems Manager offers two types of resource data sync: SyncToDestination and SyncFromSource. You can configure Systems Manager Inventory to use the SyncToDestination type to synchronize Inventory data from multiple Amazon Web Services Regions to a single Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Creating a resource data sync for Inventory in the Amazon Web Services Systems Manager User Guide. You can configure Systems Manager Explorer to use the SyncFromSource type to synchronize operational work items (OpsItems) and operational data (OpsData) from multiple Amazon Web Services Regions to a single Amazon S3 bucket. This type can synchronize OpsItems and OpsData from multiple Amazon Web Services accounts and Amazon Web Services Regions or EntireOrganization by using Organizations. For more information, see Setting up Systems Manager Explorer to display data from multiple accounts and Regions in the Amazon Web Services Systems Manager User Guide. A resource data sync is an asynchronous operation that returns immediately. After a successful initial sync is completed, the system continuously syncs data. To check the status of a sync, use the ListResourceDataSync. By default, data isn't encrypted in Amazon S3. We strongly recommend that you enable encryption in Amazon S3 to ensure secure data storage. We also recommend that you secure access to the Amazon S3 bucket by creating a restrictive bucket policy. | |
update_resource_data_sync | update | region, SyncName, SyncType, SyncSource | Update a resource data sync. After you create a resource data sync for a Region, you can't change the account options for that sync. For example, if you create a sync in the us-east-2 (Ohio) Region and you choose the Include only the current account option, you can't edit that sync later and choose the Include all accounts from my Organizations configuration option. Instead, you must delete the first resource data sync, and create a new one. This API operation only supports a resource data sync that was created with a SyncFromSource SyncType. | |
delete_resource_data_sync | delete | region | Deletes a resource data sync configuration. After the configuration is deleted, changes to data on managed nodes are no longer synced to or from the target. Deleting a sync configuration doesn't delete data. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_resource_data_sync
Lists your resource data sync configurations. Includes information about the last time a sync attempted to start, the last sync status, and the last time a sync successfully completed. The number of sync configurations might be too large to return using a single call to ListResourceDataSync. You can limit the number of sync configurations returned by using the MaxResults parameter. To determine whether there are more sync configurations to list, check the value of NextToken in the output. If there are more sync configurations to list, you can request them by specifying the NextToken returned in the call to the parameter of a subsequent call.
SELECT
last_status,
last_successful_sync_time,
last_sync_status_message,
last_sync_time,
s3_destination,
sync_created_time,
sync_last_modified_time,
sync_name,
sync_source,
sync_type
FROM aws.ssm.resource_data_syncs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_resource_data_sync
- Manifest
A resource data sync helps you view data from multiple sources in a single location. Amazon Web Services Systems Manager offers two types of resource data sync: SyncToDestination and SyncFromSource. You can configure Systems Manager Inventory to use the SyncToDestination type to synchronize Inventory data from multiple Amazon Web Services Regions to a single Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Creating a resource data sync for Inventory in the Amazon Web Services Systems Manager User Guide. You can configure Systems Manager Explorer to use the SyncFromSource type to synchronize operational work items (OpsItems) and operational data (OpsData) from multiple Amazon Web Services Regions to a single Amazon S3 bucket. This type can synchronize OpsItems and OpsData from multiple Amazon Web Services accounts and Amazon Web Services Regions or EntireOrganization by using Organizations. For more information, see Setting up Systems Manager Explorer to display data from multiple accounts and Regions in the Amazon Web Services Systems Manager User Guide. A resource data sync is an asynchronous operation that returns immediately. After a successful initial sync is completed, the system continuously syncs data. To check the status of a sync, use the ListResourceDataSync. By default, data isn't encrypted in Amazon S3. We strongly recommend that you enable encryption in Amazon S3 to ensure secure data storage. We also recommend that you secure access to the Amazon S3 bucket by creating a restrictive bucket policy.
INSERT INTO aws.ssm.resource_data_syncs (
SyncName,
S3Destination,
SyncType,
SyncSource,
region
)
SELECT
'{{ SyncName }}' /* required */,
'{{ S3Destination }}',
'{{ SyncType }}',
'{{ SyncSource }}',
'{{ region }}'
;
# Description fields are for documentation purposes
- name: resource_data_syncs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the resource_data_syncs resource.
- name: SyncName
value: "{{ SyncName }}"
description: |
A name for the configuration.
- name: S3Destination
description: |
Amazon S3 configuration details for the sync. This parameter is required if the SyncType value is SyncToDestination.
value:
BucketName: "{{ BucketName }}"
Prefix: "{{ Prefix }}"
SyncFormat: "{{ SyncFormat }}"
Region: "{{ Region }}"
AWSKMSKeyARN: "{{ AWSKMSKeyARN }}"
DestinationDataSharing:
DestinationDataSharingType: "{{ DestinationDataSharingType }}"
- name: SyncType
value: "{{ SyncType }}"
description: |
Specify SyncToDestination to create a resource data sync that synchronizes data to an S3 bucket for Inventory. If you specify SyncToDestination, you must provide a value for S3Destination. Specify SyncFromSource to synchronize data from a single account and multiple Regions, or multiple Amazon Web Services accounts and Amazon Web Services Regions, as listed in Organizations for Explorer. If you specify SyncFromSource, you must provide a value for SyncSource. The default value is SyncToDestination.
- name: SyncSource
description: |
Specify information about the data sources to synchronize. This parameter is required if the SyncType value is SyncFromSource.
value:
SourceType: "{{ SourceType }}"
AwsOrganizationsSource:
OrganizationSourceType: "{{ OrganizationSourceType }}"
OrganizationalUnits:
- OrganizationalUnitId: "{{ OrganizationalUnitId }}"
SourceRegions:
- "{{ SourceRegions }}"
IncludeFutureRegions: {{ IncludeFutureRegions }}
EnableAllOpsDataSources: {{ EnableAllOpsDataSources }}
UPDATE examples
- update_resource_data_sync
Update a resource data sync. After you create a resource data sync for a Region, you can't change the account options for that sync. For example, if you create a sync in the us-east-2 (Ohio) Region and you choose the Include only the current account option, you can't edit that sync later and choose the Include all accounts from my Organizations configuration option. Instead, you must delete the first resource data sync, and create a new one. This API operation only supports a resource data sync that was created with a SyncFromSource SyncType.
UPDATE aws.ssm.resource_data_syncs
SET
SyncName = '{{ SyncName }}',
SyncType = '{{ SyncType }}',
SyncSource = '{{ SyncSource }}'
WHERE
region = '{{ region }}' --required
AND SyncName = '{{ SyncName }}' --required
AND SyncType = '{{ SyncType }}' --required
AND SyncSource = '{{ SyncSource }}' --required;
DELETE examples
- delete_resource_data_sync
Deletes a resource data sync configuration. After the configuration is deleted, changes to data on managed nodes are no longer synced to or from the target. Deleting a sync configuration doesn't delete data.
DELETE FROM aws.ssm.resource_data_syncs
WHERE region = '{{ region }}' --required
;