aws-cdk-lib.aws_ssm.CfnDocumentProps

interface CfnDocumentProps

LanguageType name
.NETAmazon.CDK.AWS.SSM.CfnDocumentProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsssm#CfnDocumentProps
Javasoftware.amazon.awscdk.services.ssm.CfnDocumentProps
Pythonaws_cdk.aws_ssm.CfnDocumentProps
TypeScript aws-cdk-lib » aws_ssm » CfnDocumentProps

Properties for defining a CfnDocument.

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',
};

Properties

NameTypeDescription
contentanyThe content for the new SSM document in JSON or YAML.
attachments?IResolvable | IResolvable | AttachmentsSourceProperty[]A list of key-value pairs that describe attachments to a version of a document.
documentFormat?stringSpecify the document format for the request.
documentType?stringThe type of document to create.
name?stringA name for the SSM document.
requires?IResolvable | IResolvable | DocumentRequiresProperty[]A list of SSM documents required by a document.
tags?CfnTag[]AWS CloudFormation resource tags to apply to the document.
targetType?stringSpecify a target type to define the kinds of resources the document can run on.
updateMethod?stringIf 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.
versionName?stringAn optional field specifying the version of the artifact you are creating with the document.

content

Type: any

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.


attachments?

Type: IResolvable | IResolvable | AttachmentsSourceProperty[] (optional)

A list of key-value pairs that describe attachments to a version of a document.


documentFormat?

Type: string (optional)

Specify the document format for the request.

JSON is the default format.


documentType?

Type: string (optional)

The type of document to create.

Allowed Values : ApplicationConfigurationSchema | Automation | Automation.ChangeTemplate | Command | DeploymentStrategy | Package | Policy | Session


name?

Type: string (optional)

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

requires?

Type: IResolvable | IResolvable | DocumentRequiresProperty[] (optional)

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 an ApplicationConfigurationSchema document for validation purposes. For more information, see What is AWS AppConfig ? in the AWS AppConfig User Guide .


tags?

Type: CfnTag[] (optional)

AWS CloudFormation resource tags to apply to the document.

Use tags to help you identify and categorize resources.


targetType?

Type: string (optional)

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 .


updateMethod?

Type: string (optional)

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 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.


versionName?

Type: string (optional)

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.