ListResourceDataSync - AWS Systems Manager

ListResourceDataSync

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.

Request Syntax

{ "MaxResults": number, "NextToken": "string", "SyncType": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

MaxResults

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.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 50.

Required: No

NextToken

A token to start the list. Use this token to get the next set of results.

Type: String

Required: No

SyncType

View a list of resource data syncs according to the sync type. Specify SyncToDestination to view resource data syncs that synchronize data to an Amazon S3 bucket. Specify SyncFromSource to view resource data syncs from AWS Organizations or from multiple AWS Regions.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: No

Response Syntax

{ "NextToken": "string", "ResourceDataSyncItems": [ { "LastStatus": "string", "LastSuccessfulSyncTime": number, "LastSyncStatusMessage": "string", "LastSyncTime": number, "S3Destination": { "AWSKMSKeyARN": "string", "BucketName": "string", "DestinationDataSharing": { "DestinationDataSharingType": "string" }, "Prefix": "string", "Region": "string", "SyncFormat": "string" }, "SyncCreatedTime": number, "SyncLastModifiedTime": number, "SyncName": "string", "SyncSource": { "AwsOrganizationsSource": { "OrganizationalUnits": [ { "OrganizationalUnitId": "string" } ], "OrganizationSourceType": "string" }, "EnableAllOpsDataSources": boolean, "IncludeFutureRegions": boolean, "SourceRegions": [ "string" ], "SourceType": "string", "State": "string" }, "SyncType": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

The token for the next set of items to return. Use this token to get the next set of results.

Type: String

ResourceDataSyncItems

A list of your current resource data sync configurations and their statuses.

Type: Array of ResourceDataSyncItem objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

InvalidNextToken

The specified token isn't valid.

HTTP Status Code: 400

ResourceDataSyncInvalidConfigurationException

The specified sync configuration is invalid.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of ListResourceDataSync.

Sample Request

POST / HTTP/1.1 Host: ssm.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Target: AmazonSSM.ListResourceDataSync Content-Type: application/x-amz-json-1.1 User-Agent: aws-cli/1.17.12 Python/3.6.8 Darwin/18.7.0 botocore/1.14.12 X-Amz-Date: 20240330T143820Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20240330/us-east-2/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE Content-Length: 2

Sample Response

{ "ResourceDataSyncItems": [ { "LastStatus": "Successful", "LastSuccessfulSyncTime": 1585578819.829, "LastSyncStatusMessage": "The sync was successfully completed", "LastSyncTime": 1585578819.829, "S3Destination": { "BucketName": "amzn-s3-demo-bucket", "Prefix": "amzn-s3-demo-bucket-prefix", "Region": "us-east-2", "SyncFormat": "JsonSerDe" }, "SyncCreatedTime": 1585330479.404, "SyncLastModifiedTime": 1585330479.404, "SyncName": "exampleSync" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: