CfnResourceDataSync

class aws_cdk.aws_ssm.CfnResourceDataSync(scope, id, *, sync_name, bucket_name=None, bucket_prefix=None, bucket_region=None, kms_key_arn=None, s3_destination=None, sync_format=None, sync_source=None, sync_type=None)

Bases: CfnResource

A CloudFormation AWS::SSM::ResourceDataSync.

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 .

You can configure Systems Manager Inventory to use the SyncToDestination type to synchronize Inventory data from multiple AWS Regions to a single Amazon S3 bucket.

You can configure Systems Manager Explorer to use the SyncFromSource type to synchronize operational work items (OpsItems) and operational data (OpsData) from multiple AWS Regions . This type can synchronize OpsItems and OpsData from multiple AWS accounts and Regions or from an EntireOrganization by using AWS Organizations .

A resource data sync is an asynchronous operation that returns immediately. After a successful initial sync is completed, the system continuously syncs data.

By default, data is not 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.

For more information, see Configuring Inventory Collection and Setting Up Systems Manager Explorer to Display Data from Multiple Accounts and Regions in the AWS Systems Manager User Guide .

Important: The following Syntax section shows all fields that are supported for a resource data sync. The Examples section below shows the recommended way to specify configurations for each sync type. Please see the Examples section when you create your resource data sync.

CloudformationResource:

AWS::SSM::ResourceDataSync

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ssm as ssm

cfn_resource_data_sync = ssm.CfnResourceDataSync(self, "MyCfnResourceDataSync",
    sync_name="syncName",

    # the properties below are optional
    bucket_name="bucketName",
    bucket_prefix="bucketPrefix",
    bucket_region="bucketRegion",
    kms_key_arn="kmsKeyArn",
    s3_destination=ssm.CfnResourceDataSync.S3DestinationProperty(
        bucket_name="bucketName",
        bucket_region="bucketRegion",
        sync_format="syncFormat",

        # the properties below are optional
        bucket_prefix="bucketPrefix",
        kms_key_arn="kmsKeyArn"
    ),
    sync_format="syncFormat",
    sync_source=ssm.CfnResourceDataSync.SyncSourceProperty(
        source_regions=["sourceRegions"],
        source_type="sourceType",

        # the properties below are optional
        aws_organizations_source=ssm.CfnResourceDataSync.AwsOrganizationsSourceProperty(
            organization_source_type="organizationSourceType",

            # the properties below are optional
            organizational_units=["organizationalUnits"]
        ),
        include_future_regions=False
    ),
    sync_type="syncType"
)

Create a new AWS::SSM::ResourceDataSync.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • sync_name (str) – A name for the resource data sync.

  • bucket_name (Optional[str]) – The name of the S3 bucket where the aggregated data is stored.

  • bucket_prefix (Optional[str]) – An Amazon S3 prefix for the bucket.

  • bucket_region (Optional[str]) – The AWS Region with the S3 bucket targeted by the resource data sync.

  • kms_key_arn (Optional[str]) – The ARN of an encryption key for a destination in Amazon S3 . You can use a KMS key to encrypt inventory data in Amazon S3 . You must specify a key that exist in the same region as the destination Amazon S3 bucket.

  • s3_destination (Union[IResolvable, S3DestinationProperty, Dict[str, Any], None]) – Configuration information for the target S3 bucket.

  • sync_format (Optional[str]) – A supported sync format. The following format is currently supported: JsonSerDe

  • sync_source (Union[IResolvable, SyncSourceProperty, Dict[str, Any], None]) – Information about the source where the data was synchronized.

  • sync_type (Optional[str]) – 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 AWS Organizations or from multiple AWS Regions .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::SSM::ResourceDataSync'
attr_sync_name

The name of the resource data sync.

CloudformationAttribute:

SyncName

bucket_name

The name of the S3 bucket where the aggregated data is stored.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-bucketname

bucket_prefix

An Amazon S3 prefix for the bucket.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-bucketprefix

bucket_region

The AWS Region with the S3 bucket targeted by the resource data sync.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-bucketregion

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

kms_key_arn

The ARN of an encryption key for a destination in Amazon S3 .

You can use a KMS key to encrypt inventory data in Amazon S3 . You must specify a key that exist in the same region as the destination Amazon S3 bucket.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-kmskeyarn

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

s3_destination

Configuration information for the target S3 bucket.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-s3destination

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

sync_format

A supported sync format.

The following format is currently supported: JsonSerDe

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-syncformat

sync_name

A name for the resource data sync.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-syncname

sync_source

Information about the source where the data was synchronized.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-syncsource

sync_type

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 AWS Organizations or from multiple AWS Regions .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-resourcedatasync.html#cfn-ssm-resourcedatasync-synctype

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AwsOrganizationsSourceProperty

class CfnResourceDataSync.AwsOrganizationsSourceProperty(*, organization_source_type, organizational_units=None)

Bases: object

Information about the AwsOrganizationsSource resource data sync source.

A sync source of this type can synchronize data from AWS Organizations or, if an AWS organization isn’t present, from multiple AWS Regions .

Parameters:
  • organization_source_type (str) – If an AWS organization is present, this is either OrganizationalUnits or EntireOrganization . For OrganizationalUnits , the data is aggregated from a set of organization units. For EntireOrganization , the data is aggregated from the entire AWS organization.

  • organizational_units (Optional[Sequence[str]]) – The AWS Organizations organization units included in the sync.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-awsorganizationssource.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ssm as ssm

aws_organizations_source_property = ssm.CfnResourceDataSync.AwsOrganizationsSourceProperty(
    organization_source_type="organizationSourceType",

    # the properties below are optional
    organizational_units=["organizationalUnits"]
)

Attributes

organization_source_type

If an AWS organization is present, this is either OrganizationalUnits or EntireOrganization .

For OrganizationalUnits , the data is aggregated from a set of organization units. For EntireOrganization , the data is aggregated from the entire AWS organization.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-awsorganizationssource.html#cfn-ssm-resourcedatasync-awsorganizationssource-organizationsourcetype

organizational_units

The AWS Organizations organization units included in the sync.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-awsorganizationssource.html#cfn-ssm-resourcedatasync-awsorganizationssource-organizationalunits

S3DestinationProperty

class CfnResourceDataSync.S3DestinationProperty(*, bucket_name, bucket_region, sync_format, bucket_prefix=None, kms_key_arn=None)

Bases: object

Information about the target S3 bucket for the resource data sync.

Parameters:
  • bucket_name (str) – The name of the S3 bucket where the aggregated data is stored.

  • bucket_region (str) – The AWS Region with the S3 bucket targeted by the resource data sync.

  • sync_format (str) – A supported sync format. The following format is currently supported: JsonSerDe

  • bucket_prefix (Optional[str]) – An Amazon S3 prefix for the bucket.

  • kms_key_arn (Optional[str]) – The ARN of an encryption key for a destination in Amazon S3. Must belong to the same Region as the destination S3 bucket.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-s3destination.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ssm as ssm

s3_destination_property = ssm.CfnResourceDataSync.S3DestinationProperty(
    bucket_name="bucketName",
    bucket_region="bucketRegion",
    sync_format="syncFormat",

    # the properties below are optional
    bucket_prefix="bucketPrefix",
    kms_key_arn="kmsKeyArn"
)

Attributes

bucket_name

The name of the S3 bucket where the aggregated data is stored.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-s3destination.html#cfn-ssm-resourcedatasync-s3destination-bucketname

bucket_prefix

An Amazon S3 prefix for the bucket.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-s3destination.html#cfn-ssm-resourcedatasync-s3destination-bucketprefix

bucket_region

The AWS Region with the S3 bucket targeted by the resource data sync.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-s3destination.html#cfn-ssm-resourcedatasync-s3destination-bucketregion

kms_key_arn

The ARN of an encryption key for a destination in Amazon S3.

Must belong to the same Region as the destination S3 bucket.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-s3destination.html#cfn-ssm-resourcedatasync-s3destination-kmskeyarn

sync_format

A supported sync format.

The following format is currently supported: JsonSerDe

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-s3destination.html#cfn-ssm-resourcedatasync-s3destination-syncformat

SyncSourceProperty

class CfnResourceDataSync.SyncSourceProperty(*, source_regions, source_type, aws_organizations_source=None, include_future_regions=None)

Bases: object

Information about the source of the data included in the resource data sync.

Parameters:
  • source_regions (Sequence[str]) – The SyncSource AWS Regions included in the resource data sync.

  • source_type (str) – The type of data source for the resource data sync. SourceType is either AwsOrganizations (if an organization is present in AWS Organizations ) or SingleAccountMultiRegions .

  • aws_organizations_source (Union[IResolvable, AwsOrganizationsSourceProperty, Dict[str, Any], None]) – Information about the AwsOrganizationsSource resource data sync source. A sync source of this type can synchronize data from AWS Organizations .

  • include_future_regions (Union[bool, IResolvable, None]) – Whether to automatically synchronize and aggregate data from new AWS Regions when those Regions come online.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-syncsource.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ssm as ssm

sync_source_property = ssm.CfnResourceDataSync.SyncSourceProperty(
    source_regions=["sourceRegions"],
    source_type="sourceType",

    # the properties below are optional
    aws_organizations_source=ssm.CfnResourceDataSync.AwsOrganizationsSourceProperty(
        organization_source_type="organizationSourceType",

        # the properties below are optional
        organizational_units=["organizationalUnits"]
    ),
    include_future_regions=False
)

Attributes

aws_organizations_source

Information about the AwsOrganizationsSource resource data sync source.

A sync source of this type can synchronize data from AWS Organizations .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-syncsource.html#cfn-ssm-resourcedatasync-syncsource-awsorganizationssource

include_future_regions

Whether to automatically synchronize and aggregate data from new AWS Regions when those Regions come online.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-syncsource.html#cfn-ssm-resourcedatasync-syncsource-includefutureregions

source_regions

The SyncSource AWS Regions included in the resource data sync.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-syncsource.html#cfn-ssm-resourcedatasync-syncsource-sourceregions

source_type

The type of data source for the resource data sync.

SourceType is either AwsOrganizations (if an organization is present in AWS Organizations ) or SingleAccountMultiRegions .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-resourcedatasync-syncsource.html#cfn-ssm-resourcedatasync-syncsource-sourcetype