CfnDocumentPropsMixin

class aws_cdk.mixins_preview.aws_ssm.mixins.CfnDocumentPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::SSM::Document resource creates a Systems Manager (SSM) document in AWS Systems Manager .

This document defines the actions that Systems Manager performs on your AWS resources. .. epigraph:

This resource does not support CloudFormation drift detection.
See:

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

CloudformationResource:

AWS::SSM::Document

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

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

# content: Any

cfn_document_props_mixin = ssm_mixins.CfnDocumentPropsMixin(ssm_mixins.CfnDocumentMixinProps(
    attachments=[ssm_mixins.CfnDocumentPropsMixin.AttachmentsSourceProperty(
        key="key",
        name="name",
        values=["values"]
    )],
    content=content,
    document_format="documentFormat",
    document_type="documentType",
    name="name",
    requires=[ssm_mixins.CfnDocumentPropsMixin.DocumentRequiresProperty(
        name="name",
        version="version"
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    target_type="targetType",
    update_method="updateMethod",
    version_name="versionName"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::SSM::Document.

Parameters:
  • props (Union[CfnDocumentMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['attachments', 'content', 'documentFormat', 'documentType', 'name', 'requires', 'tags', 'targetType', 'updateMethod', 'versionName']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AttachmentsSourceProperty

class CfnDocumentPropsMixin.AttachmentsSourceProperty(*, key=None, name=None, values=None)

Bases: object

Identifying information about a document attachment, including the file name and a key-value pair that identifies the location of an attachment to a document.

Parameters:
  • key (Optional[str]) – The key of a key-value pair that identifies the location of an attachment to a document.

  • name (Optional[str]) – The name of the document attachment file.

  • values (Optional[Sequence[str]]) – The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify. - For the key SourceUrl , the value is an S3 bucket location. For example: "Values": [ "s3://amzn-s3-demo-bucket/my-prefix" ] - For the key S3FileUrl , the value is a file in an S3 bucket. For example: "Values": [ "s3://amzn-s3-demo-bucket/my-prefix/my-file.py" ] - For the key AttachmentReference , the value is constructed from the name of another SSM document in your account, a version number of that document, and a file attached to that document version that you want to reuse. For example: "Values": [ "MyOtherDocument/3/my-other-file.py" ] However, if the SSM document is shared with you from another account, the full SSM document ARN must be specified instead of the document name only. For example: "Values": [ "arn:aws:ssm:us-east-2:111122223333:document/OtherAccountDocument/3/their-file.py" ]

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-attachmentssource.html

ExampleMetadata:

fixture=_generated

Example:

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

attachments_source_property = ssm_mixins.CfnDocumentPropsMixin.AttachmentsSourceProperty(
    key="key",
    name="name",
    values=["values"]
)

Attributes

key

The key of a key-value pair that identifies the location of an attachment to a document.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-attachmentssource.html#cfn-ssm-document-attachmentssource-key

name

The name of the document attachment file.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-attachmentssource.html#cfn-ssm-document-attachmentssource-name

values

The value of a key-value pair that identifies the location of an attachment to a document.

The format for Value depends on the type of key you specify.

  • For the key SourceUrl , the value is an S3 bucket location. For example:

"Values": [ "s3://amzn-s3-demo-bucket/my-prefix" ]

  • For the key S3FileUrl , the value is a file in an S3 bucket. For example:

"Values": [ "s3://amzn-s3-demo-bucket/my-prefix/my-file.py" ]

  • For the key AttachmentReference , the value is constructed from the name of another SSM document in your account, a version number of that document, and a file attached to that document version that you want to reuse. For example:

"Values": [ "MyOtherDocument/3/my-other-file.py" ]

However, if the SSM document is shared with you from another account, the full SSM document ARN must be specified instead of the document name only. For example:

"Values": [ "arn:aws:ssm:us-east-2:111122223333:document/OtherAccountDocument/3/their-file.py" ]

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-attachmentssource.html#cfn-ssm-document-attachmentssource-values

DocumentRequiresProperty

class CfnDocumentPropsMixin.DocumentRequiresProperty(*, name=None, version=None)

Bases: object

An SSM document required by the current document.

Parameters:
  • name (Optional[str]) – The name of the required SSM document. The name can be an Amazon Resource Name (ARN).

  • version (Optional[str]) – The document version required by the current document.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-documentrequires.html

ExampleMetadata:

fixture=_generated

Example:

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

document_requires_property = ssm_mixins.CfnDocumentPropsMixin.DocumentRequiresProperty(
    name="name",
    version="version"
)

Attributes

name

The name of the required SSM document.

The name can be an Amazon Resource Name (ARN).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-documentrequires.html#cfn-ssm-document-documentrequires-name

version

The document version required by the current document.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-documentrequires.html#cfn-ssm-document-documentrequires-version