Try AWS Native preview for resources not in the classic version.
aws.ssm.Document
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides an SSM Document resource
NOTE on updating SSM documents: Only documents with a schema version of 2.0 or greater can update their content once created, see SSM Schema Features. To update a document with an older schema version you must recreate the resource. Not all document types support a schema version of 2.0 or greater. Refer to SSM document schema features and examples for information about which schema versions are supported for the respective
document_type
.
Example Usage
Create an ssm document in JSON format
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foo = new aws.ssm.Document("foo", {
name: "test_document",
documentType: "Command",
content: ` {
"schemaVersion": "1.2",
"description": "Check ip configuration of a Linux instance.",
"parameters": {
},
"runtimeConfig": {
"aws:runShellScript": {
"properties": [
{
"id": "0.aws:runShellScript",
"runCommand": ["ifconfig"]
}
]
}
}
}
`,
});
import pulumi
import pulumi_aws as aws
foo = aws.ssm.Document("foo",
name="test_document",
document_type="Command",
content=""" {
"schemaVersion": "1.2",
"description": "Check ip configuration of a Linux instance.",
"parameters": {
},
"runtimeConfig": {
"aws:runShellScript": {
"properties": [
{
"id": "0.aws:runShellScript",
"runCommand": ["ifconfig"]
}
]
}
}
}
""")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ssm.NewDocument(ctx, "foo", &ssm.DocumentArgs{
Name: pulumi.String("test_document"),
DocumentType: pulumi.String("Command"),
Content: pulumi.String(` {
"schemaVersion": "1.2",
"description": "Check ip configuration of a Linux instance.",
"parameters": {
},
"runtimeConfig": {
"aws:runShellScript": {
"properties": [
{
"id": "0.aws:runShellScript",
"runCommand": ["ifconfig"]
}
]
}
}
}
`),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var foo = new Aws.Ssm.Document("foo", new()
{
Name = "test_document",
DocumentType = "Command",
Content = @" {
""schemaVersion"": ""1.2"",
""description"": ""Check ip configuration of a Linux instance."",
""parameters"": {
},
""runtimeConfig"": {
""aws:runShellScript"": {
""properties"": [
{
""id"": ""0.aws:runShellScript"",
""runCommand"": [""ifconfig""]
}
]
}
}
}
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.Document;
import com.pulumi.aws.ssm.DocumentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new Document("foo", DocumentArgs.builder()
.name("test_document")
.documentType("Command")
.content("""
{
"schemaVersion": "1.2",
"description": "Check ip configuration of a Linux instance.",
"parameters": {
},
"runtimeConfig": {
"aws:runShellScript": {
"properties": [
{
"id": "0.aws:runShellScript",
"runCommand": ["ifconfig"]
}
]
}
}
}
""")
.build());
}
}
resources:
foo:
type: aws:ssm:Document
properties:
name: test_document
documentType: Command
content: |2
{
"schemaVersion": "1.2",
"description": "Check ip configuration of a Linux instance.",
"parameters": {
},
"runtimeConfig": {
"aws:runShellScript": {
"properties": [
{
"id": "0.aws:runShellScript",
"runCommand": ["ifconfig"]
}
]
}
}
}
Create an ssm document in YAML format
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foo = new aws.ssm.Document("foo", {
name: "test_document",
documentFormat: "YAML",
documentType: "Command",
content: `schemaVersion: '1.2'
description: Check ip configuration of a Linux instance.
parameters: {}
runtimeConfig:
'aws:runShellScript':
properties:
- id: '0.aws:runShellScript'
runCommand:
- ifconfig
`,
});
import pulumi
import pulumi_aws as aws
foo = aws.ssm.Document("foo",
name="test_document",
document_format="YAML",
document_type="Command",
content="""schemaVersion: '1.2'
description: Check ip configuration of a Linux instance.
parameters: {}
runtimeConfig:
'aws:runShellScript':
properties:
- id: '0.aws:runShellScript'
runCommand:
- ifconfig
""")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ssm.NewDocument(ctx, "foo", &ssm.DocumentArgs{
Name: pulumi.String("test_document"),
DocumentFormat: pulumi.String("YAML"),
DocumentType: pulumi.String("Command"),
Content: pulumi.String(`schemaVersion: '1.2'
description: Check ip configuration of a Linux instance.
parameters: {}
runtimeConfig:
'aws:runShellScript':
properties:
- id: '0.aws:runShellScript'
runCommand:
- ifconfig
`),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var foo = new Aws.Ssm.Document("foo", new()
{
Name = "test_document",
DocumentFormat = "YAML",
DocumentType = "Command",
Content = @"schemaVersion: '1.2'
description: Check ip configuration of a Linux instance.
parameters: {}
runtimeConfig:
'aws:runShellScript':
properties:
- id: '0.aws:runShellScript'
runCommand:
- ifconfig
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.Document;
import com.pulumi.aws.ssm.DocumentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new Document("foo", DocumentArgs.builder()
.name("test_document")
.documentFormat("YAML")
.documentType("Command")
.content("""
schemaVersion: '1.2'
description: Check ip configuration of a Linux instance.
parameters: {}
runtimeConfig:
'aws:runShellScript':
properties:
- id: '0.aws:runShellScript'
runCommand:
- ifconfig
""")
.build());
}
}
resources:
foo:
type: aws:ssm:Document
properties:
name: test_document
documentFormat: YAML
documentType: Command
content: |
schemaVersion: '1.2'
description: Check ip configuration of a Linux instance.
parameters: {}
runtimeConfig:
'aws:runShellScript':
properties:
- id: '0.aws:runShellScript'
runCommand:
- ifconfig
Create Document Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Document(name: string, args: DocumentArgs, opts?: CustomResourceOptions);
@overload
def Document(resource_name: str,
args: DocumentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Document(resource_name: str,
opts: Optional[ResourceOptions] = None,
content: Optional[str] = None,
document_type: Optional[str] = None,
attachments_sources: Optional[Sequence[DocumentAttachmentsSourceArgs]] = None,
document_format: Optional[str] = None,
name: Optional[str] = None,
permissions: Optional[Mapping[str, str]] = None,
tags: Optional[Mapping[str, str]] = None,
target_type: Optional[str] = None,
version_name: Optional[str] = None)
func NewDocument(ctx *Context, name string, args DocumentArgs, opts ...ResourceOption) (*Document, error)
public Document(string name, DocumentArgs args, CustomResourceOptions? opts = null)
public Document(String name, DocumentArgs args)
public Document(String name, DocumentArgs args, CustomResourceOptions options)
type: aws:ssm:Document
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DocumentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DocumentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DocumentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DocumentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DocumentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var documentResource = new Aws.Ssm.Document("documentResource", new()
{
Content = "string",
DocumentType = "string",
AttachmentsSources = new[]
{
new Aws.Ssm.Inputs.DocumentAttachmentsSourceArgs
{
Key = "string",
Values = new[]
{
"string",
},
Name = "string",
},
},
DocumentFormat = "string",
Name = "string",
Permissions =
{
{ "string", "string" },
},
Tags =
{
{ "string", "string" },
},
TargetType = "string",
VersionName = "string",
});
example, err := ssm.NewDocument(ctx, "documentResource", &ssm.DocumentArgs{
Content: pulumi.String("string"),
DocumentType: pulumi.String("string"),
AttachmentsSources: ssm.DocumentAttachmentsSourceArray{
&ssm.DocumentAttachmentsSourceArgs{
Key: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
},
},
DocumentFormat: pulumi.String("string"),
Name: pulumi.String("string"),
Permissions: pulumi.StringMap{
"string": pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TargetType: pulumi.String("string"),
VersionName: pulumi.String("string"),
})
var documentResource = new Document("documentResource", DocumentArgs.builder()
.content("string")
.documentType("string")
.attachmentsSources(DocumentAttachmentsSourceArgs.builder()
.key("string")
.values("string")
.name("string")
.build())
.documentFormat("string")
.name("string")
.permissions(Map.of("string", "string"))
.tags(Map.of("string", "string"))
.targetType("string")
.versionName("string")
.build());
document_resource = aws.ssm.Document("documentResource",
content="string",
document_type="string",
attachments_sources=[{
"key": "string",
"values": ["string"],
"name": "string",
}],
document_format="string",
name="string",
permissions={
"string": "string",
},
tags={
"string": "string",
},
target_type="string",
version_name="string")
const documentResource = new aws.ssm.Document("documentResource", {
content: "string",
documentType: "string",
attachmentsSources: [{
key: "string",
values: ["string"],
name: "string",
}],
documentFormat: "string",
name: "string",
permissions: {
string: "string",
},
tags: {
string: "string",
},
targetType: "string",
versionName: "string",
});
type: aws:ssm:Document
properties:
attachmentsSources:
- key: string
name: string
values:
- string
content: string
documentFormat: string
documentType: string
name: string
permissions:
string: string
tags:
string: string
targetType: string
versionName: string
Document Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Document resource accepts the following input properties:
- Content string
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- Document
Type string - The type of the document. For a list of valid values, see the API Reference.
- Attachments
Sources List<DocumentAttachments Source> - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - Document
Format string - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - Name string
- The name of the document.
- Permissions Dictionary<string, string>
- Additional permissions to attach to the document. See Permissions below for details.
- Dictionary<string, string>
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Target
Type string - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - Version
Name string - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- Content string
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- Document
Type string - The type of the document. For a list of valid values, see the API Reference.
- Attachments
Sources []DocumentAttachments Source Args - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - Document
Format string - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - Name string
- The name of the document.
- Permissions map[string]string
- Additional permissions to attach to the document. See Permissions below for details.
- map[string]string
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Target
Type string - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - Version
Name string - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- content String
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- document
Type String - The type of the document. For a list of valid values, see the API Reference.
- attachments
Sources List<DocumentAttachments Source> - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - document
Format String - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - name String
- The name of the document.
- permissions Map<String,String>
- Additional permissions to attach to the document. See Permissions below for details.
- Map<String,String>
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - target
Type String - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - version
Name String - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- content string
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- document
Type string - The type of the document. For a list of valid values, see the API Reference.
- attachments
Sources DocumentAttachments Source[] - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - document
Format string - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - name string
- The name of the document.
- permissions {[key: string]: string}
- Additional permissions to attach to the document. See Permissions below for details.
- {[key: string]: string}
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - target
Type string - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - version
Name string - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- content str
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- document_
type str - The type of the document. For a list of valid values, see the API Reference.
- attachments_
sources Sequence[DocumentAttachments Source Args] - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - document_
format str - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - name str
- The name of the document.
- permissions Mapping[str, str]
- Additional permissions to attach to the document. See Permissions below for details.
- Mapping[str, str]
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - target_
type str - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - version_
name str - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- content String
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- document
Type String - The type of the document. For a list of valid values, see the API Reference.
- attachments
Sources List<Property Map> - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - document
Format String - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - name String
- The name of the document.
- permissions Map<String>
- Additional permissions to attach to the document. See Permissions below for details.
- Map<String>
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - target
Type String - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - version
Name String - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
Outputs
All input properties are implicitly available as output properties. Additionally, the Document resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) of the document.
- Created
Date string - The date the document was created.
- Default
Version string - The default version of the document.
- Description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- Document
Version string - The document version.
- Hash string
- The Sha256 or Sha1 hash created by the system when the document was created.
- Hash
Type string - The hash type of the document. Valid values:
Sha256
,Sha1
. - Id string
- The provider-assigned unique ID for this managed resource.
- Latest
Version string - The latest version of the document.
- Owner string
- The Amazon Web Services user that created the document.
- Parameters
List<Document
Parameter> - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - Platform
Types List<string> - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - Schema
Version string - The schema version of the document.
- Status string
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The Amazon Resource Name (ARN) of the document.
- Created
Date string - The date the document was created.
- Default
Version string - The default version of the document.
- Description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- Document
Version string - The document version.
- Hash string
- The Sha256 or Sha1 hash created by the system when the document was created.
- Hash
Type string - The hash type of the document. Valid values:
Sha256
,Sha1
. - Id string
- The provider-assigned unique ID for this managed resource.
- Latest
Version string - The latest version of the document.
- Owner string
- The Amazon Web Services user that created the document.
- Parameters
[]Document
Parameter - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - Platform
Types []string - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - Schema
Version string - The schema version of the document.
- Status string
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The Amazon Resource Name (ARN) of the document.
- created
Date String - The date the document was created.
- default
Version String - The default version of the document.
- description String
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- document
Version String - The document version.
- hash String
- The Sha256 or Sha1 hash created by the system when the document was created.
- hash
Type String - The hash type of the document. Valid values:
Sha256
,Sha1
. - id String
- The provider-assigned unique ID for this managed resource.
- latest
Version String - The latest version of the document.
- owner String
- The Amazon Web Services user that created the document.
- parameters
List<Document
Parameter> - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - platform
Types List<String> - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - schema
Version String - The schema version of the document.
- status String
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The Amazon Resource Name (ARN) of the document.
- created
Date string - The date the document was created.
- default
Version string - The default version of the document.
- description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- document
Version string - The document version.
- hash string
- The Sha256 or Sha1 hash created by the system when the document was created.
- hash
Type string - The hash type of the document. Valid values:
Sha256
,Sha1
. - id string
- The provider-assigned unique ID for this managed resource.
- latest
Version string - The latest version of the document.
- owner string
- The Amazon Web Services user that created the document.
- parameters
Document
Parameter[] - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - platform
Types string[] - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - schema
Version string - The schema version of the document.
- status string
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The Amazon Resource Name (ARN) of the document.
- created_
date str - The date the document was created.
- default_
version str - The default version of the document.
- description str
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- document_
version str - The document version.
- hash str
- The Sha256 or Sha1 hash created by the system when the document was created.
- hash_
type str - The hash type of the document. Valid values:
Sha256
,Sha1
. - id str
- The provider-assigned unique ID for this managed resource.
- latest_
version str - The latest version of the document.
- owner str
- The Amazon Web Services user that created the document.
- parameters
Sequence[Document
Parameter] - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - platform_
types Sequence[str] - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - schema_
version str - The schema version of the document.
- status str
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The Amazon Resource Name (ARN) of the document.
- created
Date String - The date the document was created.
- default
Version String - The default version of the document.
- description String
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- document
Version String - The document version.
- hash String
- The Sha256 or Sha1 hash created by the system when the document was created.
- hash
Type String - The hash type of the document. Valid values:
Sha256
,Sha1
. - id String
- The provider-assigned unique ID for this managed resource.
- latest
Version String - The latest version of the document.
- owner String
- The Amazon Web Services user that created the document.
- parameters List<Property Map>
- One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - platform
Types List<String> - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - schema
Version String - The schema version of the document.
- status String
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing Document Resource
Get an existing Document resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DocumentState, opts?: CustomResourceOptions): Document
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
attachments_sources: Optional[Sequence[DocumentAttachmentsSourceArgs]] = None,
content: Optional[str] = None,
created_date: Optional[str] = None,
default_version: Optional[str] = None,
description: Optional[str] = None,
document_format: Optional[str] = None,
document_type: Optional[str] = None,
document_version: Optional[str] = None,
hash: Optional[str] = None,
hash_type: Optional[str] = None,
latest_version: Optional[str] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
parameters: Optional[Sequence[DocumentParameterArgs]] = None,
permissions: Optional[Mapping[str, str]] = None,
platform_types: Optional[Sequence[str]] = None,
schema_version: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
target_type: Optional[str] = None,
version_name: Optional[str] = None) -> Document
func GetDocument(ctx *Context, name string, id IDInput, state *DocumentState, opts ...ResourceOption) (*Document, error)
public static Document Get(string name, Input<string> id, DocumentState? state, CustomResourceOptions? opts = null)
public static Document get(String name, Output<String> id, DocumentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- The Amazon Resource Name (ARN) of the document.
- Attachments
Sources List<DocumentAttachments Source> - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - Content string
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- Created
Date string - The date the document was created.
- Default
Version string - The default version of the document.
- Description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- Document
Format string - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - Document
Type string - The type of the document. For a list of valid values, see the API Reference.
- Document
Version string - The document version.
- Hash string
- The Sha256 or Sha1 hash created by the system when the document was created.
- Hash
Type string - The hash type of the document. Valid values:
Sha256
,Sha1
. - Latest
Version string - The latest version of the document.
- Name string
- The name of the document.
- Owner string
- The Amazon Web Services user that created the document.
- Parameters
List<Document
Parameter> - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - Permissions Dictionary<string, string>
- Additional permissions to attach to the document. See Permissions below for details.
- Platform
Types List<string> - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - Schema
Version string - The schema version of the document.
- Status string
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - Dictionary<string, string>
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Target
Type string - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - Version
Name string - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- Arn string
- The Amazon Resource Name (ARN) of the document.
- Attachments
Sources []DocumentAttachments Source Args - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - Content string
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- Created
Date string - The date the document was created.
- Default
Version string - The default version of the document.
- Description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- Document
Format string - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - Document
Type string - The type of the document. For a list of valid values, see the API Reference.
- Document
Version string - The document version.
- Hash string
- The Sha256 or Sha1 hash created by the system when the document was created.
- Hash
Type string - The hash type of the document. Valid values:
Sha256
,Sha1
. - Latest
Version string - The latest version of the document.
- Name string
- The name of the document.
- Owner string
- The Amazon Web Services user that created the document.
- Parameters
[]Document
Parameter Args - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - Permissions map[string]string
- Additional permissions to attach to the document. See Permissions below for details.
- Platform
Types []string - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - Schema
Version string - The schema version of the document.
- Status string
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - map[string]string
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Target
Type string - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - Version
Name string - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- arn String
- The Amazon Resource Name (ARN) of the document.
- attachments
Sources List<DocumentAttachments Source> - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - content String
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- created
Date String - The date the document was created.
- default
Version String - The default version of the document.
- description String
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- document
Format String - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - document
Type String - The type of the document. For a list of valid values, see the API Reference.
- document
Version String - The document version.
- hash String
- The Sha256 or Sha1 hash created by the system when the document was created.
- hash
Type String - The hash type of the document. Valid values:
Sha256
,Sha1
. - latest
Version String - The latest version of the document.
- name String
- The name of the document.
- owner String
- The Amazon Web Services user that created the document.
- parameters
List<Document
Parameter> - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - permissions Map<String,String>
- Additional permissions to attach to the document. See Permissions below for details.
- platform
Types List<String> - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - schema
Version String - The schema version of the document.
- status String
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - Map<String,String>
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - target
Type String - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - version
Name String - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- arn string
- The Amazon Resource Name (ARN) of the document.
- attachments
Sources DocumentAttachments Source[] - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - content string
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- created
Date string - The date the document was created.
- default
Version string - The default version of the document.
- description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- document
Format string - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - document
Type string - The type of the document. For a list of valid values, see the API Reference.
- document
Version string - The document version.
- hash string
- The Sha256 or Sha1 hash created by the system when the document was created.
- hash
Type string - The hash type of the document. Valid values:
Sha256
,Sha1
. - latest
Version string - The latest version of the document.
- name string
- The name of the document.
- owner string
- The Amazon Web Services user that created the document.
- parameters
Document
Parameter[] - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - permissions {[key: string]: string}
- Additional permissions to attach to the document. See Permissions below for details.
- platform
Types string[] - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - schema
Version string - The schema version of the document.
- status string
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - {[key: string]: string}
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - target
Type string - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - version
Name string - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- arn str
- The Amazon Resource Name (ARN) of the document.
- attachments_
sources Sequence[DocumentAttachments Source Args] - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - content str
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- created_
date str - The date the document was created.
- default_
version str - The default version of the document.
- description str
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- document_
format str - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - document_
type str - The type of the document. For a list of valid values, see the API Reference.
- document_
version str - The document version.
- hash str
- The Sha256 or Sha1 hash created by the system when the document was created.
- hash_
type str - The hash type of the document. Valid values:
Sha256
,Sha1
. - latest_
version str - The latest version of the document.
- name str
- The name of the document.
- owner str
- The Amazon Web Services user that created the document.
- parameters
Sequence[Document
Parameter Args] - One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - permissions Mapping[str, str]
- Additional permissions to attach to the document. See Permissions below for details.
- platform_
types Sequence[str] - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - schema_
version str - The schema version of the document.
- status str
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - Mapping[str, str]
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - target_
type str - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - version_
name str - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
- arn String
- The Amazon Resource Name (ARN) of the document.
- attachments
Sources List<Property Map> - One or more configuration blocks describing attachments sources to a version of a document. See
attachments_source
block below for details. - content String
- The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
- created
Date String - The date the document was created.
- default
Version String - The default version of the document.
- description String
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- document
Format String - The format of the document. Valid values:
JSON
,TEXT
,YAML
. - document
Type String - The type of the document. For a list of valid values, see the API Reference.
- document
Version String - The document version.
- hash String
- The Sha256 or Sha1 hash created by the system when the document was created.
- hash
Type String - The hash type of the document. Valid values:
Sha256
,Sha1
. - latest
Version String - The latest version of the document.
- name String
- The name of the document.
- owner String
- The Amazon Web Services user that created the document.
- parameters List<Property Map>
- One or more configuration blocks describing the parameters for the document. See
parameter
block below for details. - permissions Map<String>
- Additional permissions to attach to the document. See Permissions below for details.
- platform
Types List<String> - The list of operating system (OS) platforms compatible with this SSM document. Valid values:
Windows
,Linux
,MacOS
. - schema
Version String - The schema version of the document.
- status String
- The status of the SSM document. Valid values:
Creating
,Active
,Updating
,Deleting
,Failed
. - Map<String>
- A map of tags to assign to the object. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - target
Type String - The target type which defines the kinds of resources the document can run on. For example,
/AWS::EC2::Instance
. For a list of valid resource types, see AWS resource and property types reference. - version
Name String - The version of the artifact associated with the document. For example,
12.6
. This value is unique across all versions of a document, and can't be changed.
Supporting Types
DocumentAttachmentsSource, DocumentAttachmentsSourceArgs
- Key string
- The key of a key-value pair that identifies the location of an attachment to the document. Valid values:
SourceUrl
,S3FileUrl
,AttachmentReference
. - Values List<string>
- The value of a key-value pair that identifies the location of an attachment to the document. The argument format is a list of a single string that depends on the type of key you specify - see the API Reference for details.
- Name string
- The name of the document attachment file.
- Key string
- The key of a key-value pair that identifies the location of an attachment to the document. Valid values:
SourceUrl
,S3FileUrl
,AttachmentReference
. - Values []string
- The value of a key-value pair that identifies the location of an attachment to the document. The argument format is a list of a single string that depends on the type of key you specify - see the API Reference for details.
- Name string
- The name of the document attachment file.
- key String
- The key of a key-value pair that identifies the location of an attachment to the document. Valid values:
SourceUrl
,S3FileUrl
,AttachmentReference
. - values List<String>
- The value of a key-value pair that identifies the location of an attachment to the document. The argument format is a list of a single string that depends on the type of key you specify - see the API Reference for details.
- name String
- The name of the document attachment file.
- key string
- The key of a key-value pair that identifies the location of an attachment to the document. Valid values:
SourceUrl
,S3FileUrl
,AttachmentReference
. - values string[]
- The value of a key-value pair that identifies the location of an attachment to the document. The argument format is a list of a single string that depends on the type of key you specify - see the API Reference for details.
- name string
- The name of the document attachment file.
- key str
- The key of a key-value pair that identifies the location of an attachment to the document. Valid values:
SourceUrl
,S3FileUrl
,AttachmentReference
. - values Sequence[str]
- The value of a key-value pair that identifies the location of an attachment to the document. The argument format is a list of a single string that depends on the type of key you specify - see the API Reference for details.
- name str
- The name of the document attachment file.
- key String
- The key of a key-value pair that identifies the location of an attachment to the document. Valid values:
SourceUrl
,S3FileUrl
,AttachmentReference
. - values List<String>
- The value of a key-value pair that identifies the location of an attachment to the document. The argument format is a list of a single string that depends on the type of key you specify - see the API Reference for details.
- name String
- The name of the document attachment file.
DocumentParameter, DocumentParameterArgs
- Default
Value string - If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
- Description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- Name string
- The name of the document.
- Type string
- The type of parameter. Valid values:
String
,StringList
.
- Default
Value string - If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
- Description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- Name string
- The name of the document.
- Type string
- The type of parameter. Valid values:
String
,StringList
.
- default
Value String - If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
- description String
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- name String
- The name of the document.
- type String
- The type of parameter. Valid values:
String
,StringList
.
- default
Value string - If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
- description string
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- name string
- The name of the document.
- type string
- The type of parameter. Valid values:
String
,StringList
.
- default_
value str - If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
- description str
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- name str
- The name of the document.
- type str
- The type of parameter. Valid values:
String
,StringList
.
- default
Value String - If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
- description String
- A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
- name String
- The name of the document.
- type String
- The type of parameter. Valid values:
String
,StringList
.
Import
Using pulumi import
, import SSM Documents using the name. For example:
$ pulumi import aws:ssm/document:Document example example
The attachments_source
argument does not have an SSM API method for reading the attachment information detail after creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use ignore_changes
to hide the difference. For example:
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.