Show / Hide Table of Contents

Class Document

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.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var foo = new Aws.Ssm.Document("foo", new Aws.Ssm.DocumentArgs
    {
        Content = @"  {
""schemaVersion"": ""1.2"",
""description"": ""Check ip configuration of a Linux instance."",
""parameters"": {

},
""runtimeConfig"": {
  ""aws:runShellScript"": {
    ""properties"": [
      {
        ""id"": ""0.aws:runShellScript"",
        ""runCommand"": [""ifconfig""]
      }
    ]
  }
}
}

",
        DocumentType = "Command",
    });
}

}

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.
Inheritance
System.Object
Resource
CustomResource
Document
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ssm
Assembly: Pulumi.Aws.dll
Syntax
public class Document : CustomResource

Constructors

View Source

Document(String, DocumentArgs, CustomResourceOptions)

Create a Document resource with the given unique name, arguments, and options.

Declaration
public Document(string name, DocumentArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

DocumentArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

AttachmentsSources

One or more configuration blocks describing attachments sources to a version of a document. Defined below.

Declaration
public Output<ImmutableArray<DocumentAttachmentsSource>> AttachmentsSources { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<DocumentAttachmentsSource>>
View Source

Content

The JSON or YAML content of the document.

Declaration
public Output<string> Content { get; }
Property Value
Type Description
Output<System.String>
View Source

CreatedDate

The date the document was created.

Declaration
public Output<string> CreatedDate { get; }
Property Value
Type Description
Output<System.String>
View Source

DefaultVersion

The default version of the document.

Declaration
public Output<string> DefaultVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The description of the document.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DocumentFormat

The format of the document. Valid document types include: JSON and YAML

Declaration
public Output<string> DocumentFormat { get; }
Property Value
Type Description
Output<System.String>
View Source

DocumentType

The type of the document. Valid document types include: Automation, Command, Package, Policy, and Session

Declaration
public Output<string> DocumentType { get; }
Property Value
Type Description
Output<System.String>
View Source

DocumentVersion

The document version.

Declaration
public Output<string> DocumentVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

Hash

The sha1 or sha256 of the document content

Declaration
public Output<string> Hash { get; }
Property Value
Type Description
Output<System.String>
View Source

HashType

"Sha1" "Sha256". The hashing algorithm used when hashing the content.

Declaration
public Output<string> HashType { get; }
Property Value
Type Description
Output<System.String>
View Source

LatestVersion

The latest version of the document.

Declaration
public Output<string> LatestVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the document.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Owner

The AWS user account of the person who created the document.

Declaration
public Output<string> Owner { get; }
Property Value
Type Description
Output<System.String>
View Source

Parameters

The parameters that are available to this document.

Declaration
public Output<ImmutableArray<DocumentParameter>> Parameters { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<DocumentParameter>>
View Source

Permissions

Additional Permissions to attach to the document. See Permissions below for details.

Declaration
public Output<ImmutableDictionary<string, string>> Permissions { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

PlatformTypes

A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".

Declaration
public Output<ImmutableArray<string>> PlatformTypes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SchemaVersion

The schema version of the document.

Declaration
public Output<string> SchemaVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

Status

"Creating", "Active" or "Deleting". The current status of the document.

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

A map of tags to assign to the object.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

TargetType

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)

Declaration
public Output<string> TargetType { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, DocumentState, CustomResourceOptions)

Get an existing Document resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Document Get(string name, Input<string> id, DocumentState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

DocumentState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Document
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.