aws_ssm_resource_data_syncs resource
Use the aws_ssm_resource_data_syncs InSpec audit resource to test properties of the plural resource of an AWS Systems Manager (SSM) resource data sync.
The AWS::SSM::ResourceDataSync resource creates, updates, or deletes a resource data sync for AWS Systems Manager. A resource data sync helps you view data from multiple sources in a single location. Systems Manager offers two types of resource data sync: SyncToDestination and SyncFromSource.
For additional information, including details on parameters and properties, see the AWS documentation on AWS SSM ResourceDataSync.
Syntax
Ensure that the resource data syncs exists:
describe aws_ssm_resource_data_syncs do
it { should exist }
end
Parameters
This resource does not expect any required parameters.
Properties
sync_names- The name of the resource data sync.
Field:
sync_namesync_types- The type of resource data sync.
Field:
sync_typesync_sources- Information about the source where the data was synchronized.
Field:
sync_sources3_destinations- Configuration information for the target S3 bucket.
Field:
s3_destinationlast_sync_times- The last time the configuration attempted to sync (UTC).
Field:
last_sync_timelast_successful_sync_times- The last time the sync operations returned a status of SUCCESSFUL (UTC).
Field:
last_successful_sync_timesync_last_modified_times- The date and time the resource data sync was changed.
Field:
sync_last_modified_timelast_statuses- The status reported by the last sync.
Field:
last_statussync_created_times- The date and time the configuration was created (UTC).
Field:
sync_created_timelast_sync_status_messages- The status message details reported by the last sync.
Field:
last_sync_status_message
Examples
Ensure a sync name is available:
describe aws_ssm_resource_data_syncs do
its('sync_names') { should include 'RESOURCE_DATA_SYNC_NAME' }
end
Ensure a sync type is available:
describe aws_ssm_resource_data_syncs do
its('sync_types') { should include 'RESOURCE_DATA_SYNC_TYPE' }
end
Ensure a status is Successful:
describe aws_ssm_resource_data_syncs do
its('last_statuses') { should include 'Successful' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.The controls will pass if the list method returns at least one result.
exist
Use should to test that the entity exists.
describe aws_ssm_resource_data_syncs do
it { should exist }
end
Use should_not to test the entity does not exist.
describe aws_ssm_resource_data_syncs do
it { should_not exist }
end
AWS Permissions
Your AWS principal will need the SSM:Client:ListResourceDataSyncResult action with Effect set to Allow.