Skip to main content

resource_data_syncs

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

Overview

Nameresource_data_syncs
TypeResource
Idaws.ssm.resource_data_syncs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
last_statusstringThe status reported by the last sync. (Successful, Failed, InProgress)
last_successful_sync_timestring (date-time)The last time the sync operations returned a status of SUCCESSFUL (UTC).
last_sync_status_messagestringThe status message details reported by the last sync.
last_sync_timestring (date-time)The last time the configuration attempted to sync (UTC).
s3_destinationobjectConfiguration information for the target S3 bucket.
sync_created_timestring (date-time)The date and time the configuration was created (UTC).
sync_last_modified_timestring (date-time)The date and time the resource data sync was changed.
sync_namestringThe name of the resource data sync.
sync_sourceobjectInformation about the source where the data was synchronized.
sync_typestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_resource_data_syncselectregionLists 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_syncinsertregion, SyncNameA 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_syncupdateregion, SyncName, SyncType, SyncSourceUpdate 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_syncdeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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 }}'
;

UPDATE examples

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

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
;