Class CfnDocument
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::SSM::Document
.
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.
This resource does not support CloudFormation drift detection.
Example:
// 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; CfnDocument cfnDocument = CfnDocument.Builder.create(this, "MyCfnDocument") .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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
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.static final class
A fluent builder forCfnDocument
.static interface
An SSM document required by the current document.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnDocument
(Construct scope, String id, CfnDocumentProps props) Create a newAWS::SSM::Document
.protected
CfnDocument
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnDocument
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionA list of key-value pairs that describe attachments to a version of a document.The content for the new SSM document in JSON or YAML.Specify the document format for the request.The type of document to create.getName()
A name for the SSM document.A list of SSM documents required by a document.getTags()
AWS CloudFormation resource tags to apply to the document.Specify a target type to define the kinds of resources the document can run on.If the document resource you specify in your template already exists, this parameter determines whether a new version of the existing document is created, or the existing document is replaced.An optional field specifying the version of the artifact you are creating with the document.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAttachments
(List<Object> value) A list of key-value pairs that describe attachments to a version of a document.void
setAttachments
(IResolvable value) A list of key-value pairs that describe attachments to a version of a document.void
setContent
(Object value) The content for the new SSM document in JSON or YAML.void
setDocumentFormat
(String value) Specify the document format for the request.void
setDocumentType
(String value) The type of document to create.void
A name for the SSM document.void
setRequires
(List<Object> value) A list of SSM documents required by a document.void
setRequires
(IResolvable value) A list of SSM documents required by a document.void
setTargetType
(String value) Specify a target type to define the kinds of resources the document can run on.void
setUpdateMethod
(String value) If the document resource you specify in your template already exists, this parameter determines whether a new version of the existing document is created, or the existing document is replaced.void
setVersionName
(String value) An optional field specifying the version of the artifact you are creating with the document.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDocument
protected CfnDocument(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDocument
protected CfnDocument(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDocument
@Stability(Stable) public CfnDocument(@NotNull Construct scope, @NotNull String id, @NotNull CfnDocumentProps props) Create a newAWS::SSM::Document
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
AWS CloudFormation resource tags to apply to the document.Use tags to help you identify and categorize resources.
-
getContent
The content for the new SSM document in JSON or YAML.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
String
data types. -
setContent
The content for the new SSM document in JSON or YAML.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
String
data types. -
getAttachments
A list of key-value pairs that describe attachments to a version of a document. -
setAttachments
A list of key-value pairs that describe attachments to a version of a document. -
setAttachments
A list of key-value pairs that describe attachments to a version of a document. -
getDocumentFormat
Specify the document format for the request.JSON is the default format.
-
setDocumentFormat
Specify the document format for the request.JSON is the default format.
-
getDocumentType
The type of document to create.Allowed Values :
ApplicationConfigurationSchema
|Automation
|Automation.ChangeTemplate
|Command
|DeploymentStrategy
|Package
|Policy
|Session
-
setDocumentType
The type of document to create.Allowed Values :
ApplicationConfigurationSchema
|Automation
|Automation.ChangeTemplate
|Command
|DeploymentStrategy
|Package
|Policy
|Session
-
getName
A name for the SSM document.You can't use the following strings as document name prefixes. These are reserved by AWS for use as document name prefixes:
aws
amazon
amzn
-
setName
A name for the SSM document.You can't use the following strings as document name prefixes. These are reserved by AWS for use as document name prefixes:
aws
amazon
amzn
-
getRequires
A list of SSM documents required by a document.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 anApplicationConfigurationSchema
document for validation purposes. For more information, see What is AWS AppConfig ? in the AWS AppConfig User Guide . -
setRequires
A list of SSM documents required by a document.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 anApplicationConfigurationSchema
document for validation purposes. For more information, see What is AWS AppConfig ? in the AWS AppConfig User Guide . -
setRequires
A list of SSM documents required by a document.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 anApplicationConfigurationSchema
document for validation purposes. For more information, see What is AWS AppConfig ? in the AWS AppConfig User Guide . -
getTargetType
Specify a target type to define the kinds of resources the document can run on.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 . -
setTargetType
Specify a target type to define the kinds of resources the document can run on.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 . -
getUpdateMethod
If the document resource you specify in your template already exists, this parameter determines whether a new version of the existing document is created, or the existing document is replaced.Replace
is the default method. If you specifyNewVersion
for theUpdateMethod
parameter, and theName
of the document does not match an existing resource, a new document is created. When you specifyNewVersion
, the default version of the document is changed to the newly created version. -
setUpdateMethod
If the document resource you specify in your template already exists, this parameter determines whether a new version of the existing document is created, or the existing document is replaced.Replace
is the default method. If you specifyNewVersion
for theUpdateMethod
parameter, and theName
of the document does not match an existing resource, a new document is created. When you specifyNewVersion
, the default version of the document is changed to the newly created version. -
getVersionName
An optional field specifying the version of the artifact you are creating with the document.For example,
Release12.1
. This value is unique across all versions of a document, and can't be changed. -
setVersionName
An optional field specifying the version of the artifact you are creating with the document.For example,
Release12.1
. This value is unique across all versions of a document, and can't be changed.
-