CfnDocumentProps
Properties for defining a CfnDocument.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ssm as ssm } from 'aws-cdk-lib';
declare const content: any;
const cfnDocumentProps: ssm.CfnDocumentProps = {
content: content,
// the properties below are optional
attachments: [{
key: 'key',
name: 'name',
values: ['values'],
}],
documentFormat: 'documentFormat',
documentType: 'documentType',
name: 'name',
requires: [{
name: 'name',
version: 'version',
}],
tags: [{
key: 'key',
value: 'value',
}],
targetType: 'targetType',
updateMethod: 'updateMethod',
versionName: 'versionName',
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ssm as ssm
# content: Any
cfn_document_props = ssm.CfnDocumentProps(
content=content,
# the properties below are optional
attachments=[ssm.CfnDocument.AttachmentsSourceProperty(
key="key",
name="name",
values=["values"]
)],
document_format="documentFormat",
document_type="documentType",
name="name",
requires=[ssm.CfnDocument.DocumentRequiresProperty(
name="name",
version="version"
)],
tags=[CfnTag(
key="key",
value="value"
)],
target_type="targetType",
update_method="updateMethod",
version_name="versionName"
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ssm.*;
Object content;
CfnDocumentProps cfnDocumentProps = CfnDocumentProps.builder()
.content(content)
// the properties below are optional
.attachments(List.of(AttachmentsSourceProperty.builder()
.key("key")
.name("name")
.values(List.of("values"))
.build()))
.documentFormat("documentFormat")
.documentType("documentType")
.name("name")
.requires(List.of(DocumentRequiresProperty.builder()
.name("name")
.version("version")
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.targetType("targetType")
.updateMethod("updateMethod")
.versionName("versionName")
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SSM;
var content;
var cfnDocumentProps = new CfnDocumentProps {
Content = content,
// the properties below are optional
Attachments = new [] { new AttachmentsSourceProperty {
Key = "key",
Name = "name",
Values = new [] { "values" }
} },
DocumentFormat = "documentFormat",
DocumentType = "documentType",
Name = "name",
Requires = new [] { new DocumentRequiresProperty {
Name = "name",
Version = "version"
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TargetType = "targetType",
UpdateMethod = "updateMethod",
VersionName = "versionName"
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var content interface{}
cfnDocumentProps := &CfnDocumentProps{
Content: content,
// the properties below are optional
Attachments: []interface{}{
&AttachmentsSourceProperty{
Key: jsii.String("key"),
Name: jsii.String("name"),
Values: []*string{
jsii.String("values"),
},
},
},
DocumentFormat: jsii.String("documentFormat"),
DocumentType: jsii.String("documentType"),
Name: jsii.String("name"),
Requires: []interface{}{
&DocumentRequiresProperty{
Name: jsii.String("name"),
Version: jsii.String("version"),
},
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TargetType: jsii.String("targetType"),
UpdateMethod: jsii.String("updateMethod"),
VersionName: jsii.String("versionName"),
}
Properties
attachmentsoptionalIResolvable | IResolvable | CfnDocument.attachmentsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AttachmentsSourceProperty]]]attachmentsoptionalIResolvableAttachmentsoptionalIResolvableAttachmentsoptionalinterface{} #notes
For more information about the schemas for SSM document content, see SSM document schema features and examples in the AWS Systems Manager User Guide .
This parameter also supports
Stringdata types.
documentFormatoptionalstringdocument_formatoptionalstrdocumentFormatoptionalStringDocumentFormatoptionalstringDocumentFormatoptional*string = "JSON" #JSON is the default format.
documentTypeoptionalstringdocument_typeoptionalstrdocumentTypeoptionalStringDocumentTypeoptionalstringDocumentTypeoptional*string #You can't use the following strings as document name prefixes. These are reserved by AWS for use as document name prefixes:
awsamazonamznAWSEC2AWSConfigRemediationAWSSupport
requiresoptionalIResolvable | IResolvable | CfnDocument.requiresoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DocumentRequiresProperty]]]requiresoptionalIResolvableRequiresoptionalIResolvableRequiresoptionalinterface{} #notes
This parameter is used exclusively by AWS AppConfig . When a user creates an AWS AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document for validation purposes. For more information, see What is AWS AppConfig ? in the AWS AppConfig User Guide .
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #Use tags to help you identify and categorize resources.
targetTypeoptionalstringtarget_typeoptionalstrtargetTypeoptionalStringTargetTypeoptionalstringTargetTypeoptional*string #notes
For example, to run a document on EC2 instances, specify the following value: /AWS::EC2::Instance . If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see AWS resource and property types reference in the AWS CloudFormation User Guide .
updateMethodoptionalstringupdate_methodoptionalstrupdateMethodoptionalStringUpdateMethodoptionalstringUpdateMethodoptional*string = "Replace" #notes
Replace is the default method. If you specify NewVersion for the UpdateMethod parameter, and the Name of the document does not match an existing resource, a new document is created. When you specify NewVersion , the default version of the document is changed to the newly created version.
versionNameoptionalstringversion_nameoptionalstrversionNameoptionalStringVersionNameoptionalstringVersionNameoptional*string #For example, Release12.1 . This value is unique across all versions of a document, and can't be changed.