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 beShare.account_ids- The AWS user accounts that should have access to the document. The account IDs can either be a group of account IDs orAll.
Inherited Members
Namespace: Pulumi.Aws.Ssm
Assembly: Pulumi.Aws.dll
Syntax
public class Document : CustomResource
Constructors
View SourceDocument(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 SourceArn
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
Content
The JSON or YAML content of the document.
Declaration
public Output<string> Content { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreatedDate
The date the document was created.
Declaration
public Output<string> CreatedDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultVersion
The default version of the document.
Declaration
public Output<string> DefaultVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the document.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
DocumentVersion
The document version.
Declaration
public Output<string> DocumentVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Hash
The sha1 or sha256 of the document content
Declaration
public Output<string> Hash { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
HashType
"Sha1" "Sha256". The hashing algorithm used when hashing the content.
Declaration
public Output<string> HashType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LatestVersion
The latest version of the document.
Declaration
public Output<string> LatestVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the document.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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>> |
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>> |
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>> |
SchemaVersion
The schema version of the document.
Declaration
public Output<string> SchemaVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
"Creating", "Active" or "Deleting". The current status of the document.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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 SourceGet(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 |