@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:20.889Z") @Stability(value=Stable) public class CfnDocument extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnDocument.AttachmentsSourceProperty
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 class |
CfnDocument.Builder
A fluent builder for
CfnDocument. |
static interface |
CfnDocument.DocumentRequiresProperty
An SSM document required by the current document.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnDocument(Construct scope,
String id,
CfnDocumentProps props)
Create a new `AWS::SSM::Document`.
|
protected |
CfnDocument(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDocument(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttachments()
A list of key-value pairs that describe attachments to a version of a document.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getContent()
The content for the new SSM document in JSON or YAML.
|
String |
getDocumentFormat()
Specify the document format for the request.
|
String |
getDocumentType()
The type of document to create.
|
String |
getName()
A name for the SSM document.
|
Object |
getRequires()
A list of SSM documents required by a document.
|
TagManager |
getTags()
AWS CloudFormation resource tags to apply to the document.
|
String |
getTargetType()
Specify a target type to define the kinds of resources the document can run on.
|
String |
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.
|
String |
getVersionName()
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.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAttachments(IResolvable value)
A list of key-value pairs that describe attachments to a version of a document.
|
void |
setAttachments(List<Object> 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 |
setName(String value)
A name for the SSM document.
|
void |
setRequires(IResolvable value)
A list of SSM documents required by a document.
|
void |
setRequires(List<Object> 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.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnDocument(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDocument(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnDocument(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnDocumentProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
Use tags to help you identify and categorize resources.
@Stability(value=Stable) @NotNull public Object getContent()
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.
@Stability(value=Stable)
public void setContent(@NotNull
Object value)
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.
@Stability(value=Stable) @Nullable public Object getAttachments()
@Stability(value=Stable)
public void setAttachments(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setAttachments(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public String getDocumentFormat()
JSON is the default format.
@Stability(value=Stable)
public void setDocumentFormat(@Nullable
String value)
JSON is the default format.
@Stability(value=Stable) @Nullable public String getDocumentType()
Allowed Values : ApplicationConfigurationSchema | Automation | Automation.ChangeTemplate | Command | DeploymentStrategy | Package | Policy | Session
@Stability(value=Stable)
public void setDocumentType(@Nullable
String value)
Allowed Values : ApplicationConfigurationSchema | Automation | Automation.ChangeTemplate | Command | DeploymentStrategy | Package | Policy | Session
@Stability(value=Stable) @Nullable public String getName()
You can't use the following strings as document name prefixes. These are reserved by AWS for use as document name prefixes:
awsamazonamzn
@Stability(value=Stable)
public void setName(@Nullable
String value)
You can't use the following strings as document name prefixes. These are reserved by AWS for use as document name prefixes:
awsamazonamzn
@Stability(value=Stable) @Nullable public Object getRequires()
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 .
@Stability(value=Stable)
public void setRequires(@Nullable
IResolvable value)
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 .
@Stability(value=Stable)
public void setRequires(@Nullable
List<Object> value)
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 .
@Stability(value=Stable) @Nullable public String getTargetType()
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 .
@Stability(value=Stable)
public void setTargetType(@Nullable
String value)
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 .
@Stability(value=Stable) @Nullable public String getUpdateMethod()
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.
@Stability(value=Stable)
public void setUpdateMethod(@Nullable
String value)
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.
@Stability(value=Stable) @Nullable public String getVersionName()
For example, Release12.1 . This value is unique across all versions of a document, and can't be changed.
@Stability(value=Stable)
public void setVersionName(@Nullable
String value)
For example, Release12.1 . This value is unique across all versions of a document, and can't be changed.
Copyright © 2023. All rights reserved.