- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListResourceDataSyncCommand
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.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SSMClient, ListResourceDataSyncCommand } from "@aws-sdk/client-ssm"; // ES Modules import
// const { SSMClient, ListResourceDataSyncCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
const client = new SSMClient(config);
const input = { // ListResourceDataSyncRequest
SyncType: "STRING_VALUE",
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new ListResourceDataSyncCommand(input);
const response = await client.send(command);
// { // ListResourceDataSyncResult
// ResourceDataSyncItems: [ // ResourceDataSyncItemList
// { // ResourceDataSyncItem
// SyncName: "STRING_VALUE",
// SyncType: "STRING_VALUE",
// SyncSource: { // ResourceDataSyncSourceWithState
// SourceType: "STRING_VALUE",
// AwsOrganizationsSource: { // ResourceDataSyncAwsOrganizationsSource
// OrganizationSourceType: "STRING_VALUE", // required
// OrganizationalUnits: [ // ResourceDataSyncOrganizationalUnitList
// { // ResourceDataSyncOrganizationalUnit
// OrganizationalUnitId: "STRING_VALUE",
// },
// ],
// },
// SourceRegions: [ // ResourceDataSyncSourceRegionList
// "STRING_VALUE",
// ],
// IncludeFutureRegions: true || false,
// State: "STRING_VALUE",
// EnableAllOpsDataSources: true || false,
// },
// S3Destination: { // ResourceDataSyncS3Destination
// BucketName: "STRING_VALUE", // required
// Prefix: "STRING_VALUE",
// SyncFormat: "JsonSerDe", // required
// Region: "STRING_VALUE", // required
// AWSKMSKeyARN: "STRING_VALUE",
// DestinationDataSharing: { // ResourceDataSyncDestinationDataSharing
// DestinationDataSharingType: "STRING_VALUE",
// },
// },
// LastSyncTime: new Date("TIMESTAMP"),
// LastSuccessfulSyncTime: new Date("TIMESTAMP"),
// SyncLastModifiedTime: new Date("TIMESTAMP"),
// LastStatus: "Successful" || "Failed" || "InProgress",
// SyncCreatedTime: new Date("TIMESTAMP"),
// LastSyncStatusMessage: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListResourceDataSyncCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | 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. |
NextToken | string | undefined | A token to start the list. Use this token to get the next set of results. |
SyncType | string | undefined | View a list of resource data syncs according to the sync type. Specify |
ListResourceDataSyncCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextToken | string | undefined | The token for the next set of items to return. Use this token to get the next set of results. |
ResourceDataSyncItems | ResourceDataSyncItem[] | undefined | A list of your current resource data sync configurations and their statuses. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An error occurred on the server side. |
InvalidNextToken | client | The specified token isn't valid. |
ResourceDataSyncInvalidConfigurationException | client | The specified sync configuration is invalid. |
SSMServiceException | Base exception class for all service exceptions from SSM service. |