1. Packages
  2. AWS Classic
  3. API Docs
  4. ssm
  5. Document

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

aws.ssm.Document

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

    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        
    

    Permissions

    The permissions attribute specifies how you want to share the document. If you share a document privately, you must specify the AWS user account IDs for those people who can use the document. If you share a document publicly, you must specify All as the account ID.

    The permissions mapping supports the following:

    • type - The permission type for the document. The permission type can be Share.
    • account_ids - The AWS user accounts that should have access to the document. The account IDs can either be a group of account IDs or All.

    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.

    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=[aws.ssm.DocumentAttachmentsSourceArgs(
            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 JSON or YAML content of the document.
    DocumentType string
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    AttachmentsSources List<DocumentAttachmentsSource>
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    DocumentFormat string
    The format of the document. Valid document types include: JSON and YAML
    Name string
    The name of the document.
    Permissions Dictionary<string, string>
    Additional Permissions to attach to the document. See Permissions below for details.
    Tags 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.
    TargetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    VersionName string
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    Content string
    The JSON or YAML content of the document.
    DocumentType string
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    AttachmentsSources []DocumentAttachmentsSourceArgs
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    DocumentFormat string
    The format of the document. Valid document types include: JSON and YAML
    Name string
    The name of the document.
    Permissions map[string]string
    Additional Permissions to attach to the document. See Permissions below for details.
    Tags 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.
    TargetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    VersionName string
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    content String
    The JSON or YAML content of the document.
    documentType String
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    attachmentsSources List<DocumentAttachmentsSource>
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    documentFormat String
    The format of the document. Valid document types include: JSON and YAML
    name String
    The name of the document.
    permissions Map<String,String>
    Additional Permissions to attach to the document. See Permissions below for details.
    tags 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.
    targetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    versionName String
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    content string
    The JSON or YAML content of the document.
    documentType string
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    attachmentsSources DocumentAttachmentsSource[]
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    documentFormat string
    The format of the document. Valid document types include: JSON and YAML
    name string
    The name of the document.
    permissions {[key: string]: string}
    Additional Permissions to attach to the document. See Permissions below for details.
    tags {[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.
    targetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    versionName string
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    content str
    The JSON or YAML content of the document.
    document_type str
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    attachments_sources Sequence[DocumentAttachmentsSourceArgs]
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    document_format str
    The format of the document. Valid document types include: JSON and YAML
    name str
    The name of the document.
    permissions Mapping[str, str]
    Additional Permissions to attach to the document. See Permissions below for details.
    tags 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    version_name str
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    content String
    The JSON or YAML content of the document.
    documentType String
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    attachmentsSources List<Property Map>
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    documentFormat String
    The format of the document. Valid document types include: JSON and YAML
    name String
    The name of the document.
    permissions Map<String>
    Additional Permissions to attach to the document. See Permissions below for details.
    tags 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.
    targetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    versionName String
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Document resource produces the following output properties:

    Arn string
    CreatedDate string
    The date the document was created.
    DefaultVersion string
    The default version of the document.
    Description string
    The description of the document.
    DocumentVersion string
    The document version.
    Hash string
    The sha1 or sha256 of the document content
    HashType string
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    Id string
    The provider-assigned unique ID for this managed resource.
    LatestVersion string
    The latest version of the document.
    Owner string
    The AWS user account of the person who created the document.
    Parameters List<DocumentParameter>
    The parameters that are available to this document.
    PlatformTypes List<string>
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    SchemaVersion string
    The schema version of the document.
    Status string
    "Creating", "Active" or "Deleting". The current status of the document.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    CreatedDate string
    The date the document was created.
    DefaultVersion string
    The default version of the document.
    Description string
    The description of the document.
    DocumentVersion string
    The document version.
    Hash string
    The sha1 or sha256 of the document content
    HashType string
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    Id string
    The provider-assigned unique ID for this managed resource.
    LatestVersion string
    The latest version of the document.
    Owner string
    The AWS user account of the person who created the document.
    Parameters []DocumentParameter
    The parameters that are available to this document.
    PlatformTypes []string
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    SchemaVersion string
    The schema version of the document.
    Status string
    "Creating", "Active" or "Deleting". The current status of the document.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    createdDate String
    The date the document was created.
    defaultVersion String
    The default version of the document.
    description String
    The description of the document.
    documentVersion String
    The document version.
    hash String
    The sha1 or sha256 of the document content
    hashType String
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    id String
    The provider-assigned unique ID for this managed resource.
    latestVersion String
    The latest version of the document.
    owner String
    The AWS user account of the person who created the document.
    parameters List<DocumentParameter>
    The parameters that are available to this document.
    platformTypes List<String>
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    schemaVersion String
    The schema version of the document.
    status String
    "Creating", "Active" or "Deleting". The current status of the document.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    createdDate string
    The date the document was created.
    defaultVersion string
    The default version of the document.
    description string
    The description of the document.
    documentVersion string
    The document version.
    hash string
    The sha1 or sha256 of the document content
    hashType string
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    id string
    The provider-assigned unique ID for this managed resource.
    latestVersion string
    The latest version of the document.
    owner string
    The AWS user account of the person who created the document.
    parameters DocumentParameter[]
    The parameters that are available to this document.
    platformTypes string[]
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    schemaVersion string
    The schema version of the document.
    status string
    "Creating", "Active" or "Deleting". The current status of the document.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    created_date str
    The date the document was created.
    default_version str
    The default version of the document.
    description str
    The description of the document.
    document_version str
    The document version.
    hash str
    The sha1 or sha256 of the document content
    hash_type str
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    id str
    The provider-assigned unique ID for this managed resource.
    latest_version str
    The latest version of the document.
    owner str
    The AWS user account of the person who created the document.
    parameters Sequence[DocumentParameter]
    The parameters that are available to this document.
    platform_types Sequence[str]
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    schema_version str
    The schema version of the document.
    status str
    "Creating", "Active" or "Deleting". The current status of the document.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    createdDate String
    The date the document was created.
    defaultVersion String
    The default version of the document.
    description String
    The description of the document.
    documentVersion String
    The document version.
    hash String
    The sha1 or sha256 of the document content
    hashType String
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    id String
    The provider-assigned unique ID for this managed resource.
    latestVersion String
    The latest version of the document.
    owner String
    The AWS user account of the person who created the document.
    parameters List<Property Map>
    The parameters that are available to this document.
    platformTypes List<String>
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    schemaVersion String
    The schema version of the document.
    status String
    "Creating", "Active" or "Deleting". The current status of the document.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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.
    The following state arguments are supported:
    Arn string
    AttachmentsSources List<DocumentAttachmentsSource>
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    Content string
    The JSON or YAML content of the document.
    CreatedDate string
    The date the document was created.
    DefaultVersion string
    The default version of the document.
    Description string
    The description of the document.
    DocumentFormat string
    The format of the document. Valid document types include: JSON and YAML
    DocumentType string
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    DocumentVersion string
    The document version.
    Hash string
    The sha1 or sha256 of the document content
    HashType string
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    LatestVersion string
    The latest version of the document.
    Name string
    The name of the document.
    Owner string
    The AWS user account of the person who created the document.
    Parameters List<DocumentParameter>
    The parameters that are available to this document.
    Permissions Dictionary<string, string>
    Additional Permissions to attach to the document. See Permissions below for details.
    PlatformTypes List<string>
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    SchemaVersion string
    The schema version of the document.
    Status string
    "Creating", "Active" or "Deleting". The current status of the document.
    Tags 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.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TargetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    VersionName string
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    Arn string
    AttachmentsSources []DocumentAttachmentsSourceArgs
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    Content string
    The JSON or YAML content of the document.
    CreatedDate string
    The date the document was created.
    DefaultVersion string
    The default version of the document.
    Description string
    The description of the document.
    DocumentFormat string
    The format of the document. Valid document types include: JSON and YAML
    DocumentType string
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    DocumentVersion string
    The document version.
    Hash string
    The sha1 or sha256 of the document content
    HashType string
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    LatestVersion string
    The latest version of the document.
    Name string
    The name of the document.
    Owner string
    The AWS user account of the person who created the document.
    Parameters []DocumentParameterArgs
    The parameters that are available to this document.
    Permissions map[string]string
    Additional Permissions to attach to the document. See Permissions below for details.
    PlatformTypes []string
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    SchemaVersion string
    The schema version of the document.
    Status string
    "Creating", "Active" or "Deleting". The current status of the document.
    Tags 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.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TargetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    VersionName string
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    arn String
    attachmentsSources List<DocumentAttachmentsSource>
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    content String
    The JSON or YAML content of the document.
    createdDate String
    The date the document was created.
    defaultVersion String
    The default version of the document.
    description String
    The description of the document.
    documentFormat String
    The format of the document. Valid document types include: JSON and YAML
    documentType String
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    documentVersion String
    The document version.
    hash String
    The sha1 or sha256 of the document content
    hashType String
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    latestVersion String
    The latest version of the document.
    name String
    The name of the document.
    owner String
    The AWS user account of the person who created the document.
    parameters List<DocumentParameter>
    The parameters that are available to this document.
    permissions Map<String,String>
    Additional Permissions to attach to the document. See Permissions below for details.
    platformTypes List<String>
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    schemaVersion String
    The schema version of the document.
    status String
    "Creating", "Active" or "Deleting". The current status of the document.
    tags 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.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    versionName String
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    arn string
    attachmentsSources DocumentAttachmentsSource[]
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    content string
    The JSON or YAML content of the document.
    createdDate string
    The date the document was created.
    defaultVersion string
    The default version of the document.
    description string
    The description of the document.
    documentFormat string
    The format of the document. Valid document types include: JSON and YAML
    documentType string
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    documentVersion string
    The document version.
    hash string
    The sha1 or sha256 of the document content
    hashType string
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    latestVersion string
    The latest version of the document.
    name string
    The name of the document.
    owner string
    The AWS user account of the person who created the document.
    parameters DocumentParameter[]
    The parameters that are available to this document.
    permissions {[key: string]: string}
    Additional Permissions to attach to the document. See Permissions below for details.
    platformTypes string[]
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    schemaVersion string
    The schema version of the document.
    status string
    "Creating", "Active" or "Deleting". The current status of the document.
    tags {[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.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    versionName string
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    arn str
    attachments_sources Sequence[DocumentAttachmentsSourceArgs]
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    content str
    The JSON or YAML content of the document.
    created_date str
    The date the document was created.
    default_version str
    The default version of the document.
    description str
    The description of the document.
    document_format str
    The format of the document. Valid document types include: JSON and YAML
    document_type str
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    document_version str
    The document version.
    hash str
    The sha1 or sha256 of the document content
    hash_type str
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    latest_version str
    The latest version of the document.
    name str
    The name of the document.
    owner str
    The AWS user account of the person who created the document.
    parameters Sequence[DocumentParameterArgs]
    The parameters that are available to this document.
    permissions Mapping[str, str]
    Additional Permissions to attach to the document. See Permissions below for details.
    platform_types Sequence[str]
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    schema_version str
    The schema version of the document.
    status str
    "Creating", "Active" or "Deleting". The current status of the document.
    tags 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.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    version_name str
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.
    arn String
    attachmentsSources List<Property Map>
    One or more configuration blocks describing attachments sources to a version of a document. Defined below.
    content String
    The JSON or YAML content of the document.
    createdDate String
    The date the document was created.
    defaultVersion String
    The default version of the document.
    description String
    The description of the document.
    documentFormat String
    The format of the document. Valid document types include: JSON and YAML
    documentType String
    The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session
    documentVersion String
    The document version.
    hash String
    The sha1 or sha256 of the document content
    hashType String
    "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    latestVersion String
    The latest version of the document.
    name String
    The name of the document.
    owner String
    The AWS user account of the person who created the document.
    parameters List<Property Map>
    The parameters that are available to this document.
    permissions Map<String>
    Additional Permissions to attach to the document. See Permissions below for details.
    platformTypes List<String>
    A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    schemaVersion String
    The schema version of the document.
    status String
    "Creating", "Active" or "Deleting". The current status of the document.
    tags 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.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targetType 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 Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
    versionName String
    A field specifying the version of the artifact you are creating with the document. For example, "Release 12, Update 6". This value is unique across all versions of a document and cannot be changed for an existing document version.

    Supporting Types

    DocumentAttachmentsSource, DocumentAttachmentsSourceArgs

    Key string
    The key describing the location of an attachment to a document. Valid key types include: SourceUrl and S3FileUrl
    Values List<string>
    The value describing the location of an attachment to a document
    Name string
    The name of the document attachment file
    Key string
    The key describing the location of an attachment to a document. Valid key types include: SourceUrl and S3FileUrl
    Values []string
    The value describing the location of an attachment to a document
    Name string
    The name of the document attachment file
    key String
    The key describing the location of an attachment to a document. Valid key types include: SourceUrl and S3FileUrl
    values List<String>
    The value describing the location of an attachment to a document
    name String
    The name of the document attachment file
    key string
    The key describing the location of an attachment to a document. Valid key types include: SourceUrl and S3FileUrl
    values string[]
    The value describing the location of an attachment to a document
    name string
    The name of the document attachment file
    key str
    The key describing the location of an attachment to a document. Valid key types include: SourceUrl and S3FileUrl
    values Sequence[str]
    The value describing the location of an attachment to a document
    name str
    The name of the document attachment file
    key String
    The key describing the location of an attachment to a document. Valid key types include: SourceUrl and S3FileUrl
    values List<String>
    The value describing the location of an attachment to a document
    name String
    The name of the document attachment file

    DocumentParameter, DocumentParameterArgs

    DefaultValue string
    Description string
    The description of the document.
    Name string
    The name of the document.
    Type string
    DefaultValue string
    Description string
    The description of the document.
    Name string
    The name of the document.
    Type string
    defaultValue String
    description String
    The description of the document.
    name String
    The name of the document.
    type String
    defaultValue string
    description string
    The description of the document.
    name string
    The name of the document.
    type string
    default_value str
    description str
    The description of the document.
    name str
    The name of the document.
    type str
    defaultValue String
    description String
    The description of the document.
    name String
    The name of the document.
    type String

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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi