We recommend new projects start with resources from the AWS provider.
aws-native.ssm.Document
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
The AWS::SSM::Document resource is an SSM document in AWS Systems Manager that defines the actions that Systems Manager performs, which can be used to set up and run commands on your instances.
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() => 
{
    var sessionPreferencesDocument = new AwsNative.Ssm.Document("sessionPreferencesDocument", new()
    {
        Name = "SSM-SessionManagerRunShell",
        Content = new Dictionary<string, object?>
        {
            ["schemaVersion"] = "1.0",
            ["description"] = "Document to hold regional settings for Session Manager",
            ["sessionType"] = "Standard_Stream",
            ["inputs"] = new Dictionary<string, object?>
            {
                ["s3BucketName"] = "DOC-EXAMPLE-BUCKET",
                ["s3KeyPrefix"] = "MyBucketPrefix",
                ["s3EncryptionEnabled"] = true,
                ["cloudWatchLogGroupName"] = "MyLogGroupName",
                ["cloudWatchEncryptionEnabled"] = true,
                ["cloudWatchStreamingEnabled"] = false,
                ["kmsKeyId"] = "MyKMSKeyID",
                ["runAsEnabled"] = false,
                ["runAsDefaultUser"] = "MyDefaultRunAsUser",
                ["idleSessionTimeout"] = "20",
                ["shellProfile"] = new Dictionary<string, object?>
                {
                    ["windows"] = "example commands",
                    ["linux"] = "example commands",
                },
            },
        },
        DocumentType = AwsNative.Ssm.DocumentType.Session,
    });
    return new Dictionary<string, object?>
    {
        ["documentName"] = "SSM-SessionManagerRunShell",
    };
});
package main
import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ssm.NewDocument(ctx, "sessionPreferencesDocument", &ssm.DocumentArgs{
			Name: pulumi.String("SSM-SessionManagerRunShell"),
			Content: pulumi.Any(map[string]interface{}{
				"schemaVersion": "1.0",
				"description":   "Document to hold regional settings for Session Manager",
				"sessionType":   "Standard_Stream",
				"inputs": map[string]interface{}{
					"s3BucketName":                "DOC-EXAMPLE-BUCKET",
					"s3KeyPrefix":                 "MyBucketPrefix",
					"s3EncryptionEnabled":         true,
					"cloudWatchLogGroupName":      "MyLogGroupName",
					"cloudWatchEncryptionEnabled": true,
					"cloudWatchStreamingEnabled":  false,
					"kmsKeyId":                    "MyKMSKeyID",
					"runAsEnabled":                false,
					"runAsDefaultUser":            "MyDefaultRunAsUser",
					"idleSessionTimeout":          "20",
					"shellProfile": map[string]interface{}{
						"windows": "example commands",
						"linux":   "example commands",
					},
				},
			}),
			DocumentType: ssm.DocumentTypeSession,
		})
		if err != nil {
			return err
		}
		ctx.Export("documentName", pulumi.String("SSM-SessionManagerRunShell"))
		return nil
	})
}
Coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const sessionPreferencesDocument = new aws_native.ssm.Document("sessionPreferencesDocument", {
    name: "SSM-SessionManagerRunShell",
    content: {
        schemaVersion: "1.0",
        description: "Document to hold regional settings for Session Manager",
        sessionType: "Standard_Stream",
        inputs: {
            s3BucketName: "DOC-EXAMPLE-BUCKET",
            s3KeyPrefix: "MyBucketPrefix",
            s3EncryptionEnabled: true,
            cloudWatchLogGroupName: "MyLogGroupName",
            cloudWatchEncryptionEnabled: true,
            cloudWatchStreamingEnabled: false,
            kmsKeyId: "MyKMSKeyID",
            runAsEnabled: false,
            runAsDefaultUser: "MyDefaultRunAsUser",
            idleSessionTimeout: "20",
            shellProfile: {
                windows: "example commands",
                linux: "example commands",
            },
        },
    },
    documentType: aws_native.ssm.DocumentType.Session,
});
export const documentName = "SSM-SessionManagerRunShell";
import pulumi
import pulumi_aws_native as aws_native
session_preferences_document = aws_native.ssm.Document("sessionPreferencesDocument",
    name="SSM-SessionManagerRunShell",
    content={
        "schemaVersion": "1.0",
        "description": "Document to hold regional settings for Session Manager",
        "sessionType": "Standard_Stream",
        "inputs": {
            "s3BucketName": "DOC-EXAMPLE-BUCKET",
            "s3KeyPrefix": "MyBucketPrefix",
            "s3EncryptionEnabled": True,
            "cloudWatchLogGroupName": "MyLogGroupName",
            "cloudWatchEncryptionEnabled": True,
            "cloudWatchStreamingEnabled": False,
            "kmsKeyId": "MyKMSKeyID",
            "runAsEnabled": False,
            "runAsDefaultUser": "MyDefaultRunAsUser",
            "idleSessionTimeout": "20",
            "shellProfile": {
                "windows": "example commands",
                "linux": "example commands",
            },
        },
    },
    document_type=aws_native.ssm.DocumentType.SESSION)
pulumi.export("documentName", "SSM-SessionManagerRunShell")
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() => 
{
    var sessionPreferencesDocument = new AwsNative.Ssm.Document("sessionPreferencesDocument", new()
    {
        Name = "SSM-SessionManagerRunShell",
        Content = new Dictionary<string, object?>
        {
            ["schemaVersion"] = "1.0",
            ["description"] = "Document to hold regional settings for Session Manager",
            ["sessionType"] = "Standard_Stream",
            ["inputs"] = new Dictionary<string, object?>
            {
                ["s3BucketName"] = "DOC-EXAMPLE-BUCKET",
                ["s3KeyPrefix"] = "MyBucketPrefix",
                ["s3EncryptionEnabled"] = true,
                ["cloudWatchLogGroupName"] = "MyLogGroupName",
                ["cloudWatchEncryptionEnabled"] = true,
                ["cloudWatchStreamingEnabled"] = false,
                ["kmsKeyId"] = "MyKMSKeyID",
                ["runAsEnabled"] = false,
                ["runAsDefaultUser"] = "MyDefaultRunAsUser",
                ["idleSessionTimeout"] = "20",
                ["shellProfile"] = new Dictionary<string, object?>
                {
                    ["windows"] = "example commands",
                    ["linux"] = "example commands",
                },
            },
        },
        DocumentFormat = AwsNative.Ssm.DocumentFormat.Yaml,
        DocumentType = AwsNative.Ssm.DocumentType.Session,
    });
    return new Dictionary<string, object?>
    {
        ["documentName"] = "SSM-SessionManagerRunShell",
    };
});
package main
import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ssm.NewDocument(ctx, "sessionPreferencesDocument", &ssm.DocumentArgs{
			Name: pulumi.String("SSM-SessionManagerRunShell"),
			Content: pulumi.Any(map[string]interface{}{
				"schemaVersion": "1.0",
				"description":   "Document to hold regional settings for Session Manager",
				"sessionType":   "Standard_Stream",
				"inputs": map[string]interface{}{
					"s3BucketName":                "DOC-EXAMPLE-BUCKET",
					"s3KeyPrefix":                 "MyBucketPrefix",
					"s3EncryptionEnabled":         true,
					"cloudWatchLogGroupName":      "MyLogGroupName",
					"cloudWatchEncryptionEnabled": true,
					"cloudWatchStreamingEnabled":  false,
					"kmsKeyId":                    "MyKMSKeyID",
					"runAsEnabled":                false,
					"runAsDefaultUser":            "MyDefaultRunAsUser",
					"idleSessionTimeout":          "20",
					"shellProfile": map[string]interface{}{
						"windows": "example commands",
						"linux":   "example commands",
					},
				},
			}),
			DocumentFormat: ssm.DocumentFormatYaml,
			DocumentType:   ssm.DocumentTypeSession,
		})
		if err != nil {
			return err
		}
		ctx.Export("documentName", pulumi.String("SSM-SessionManagerRunShell"))
		return nil
	})
}
Coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const sessionPreferencesDocument = new aws_native.ssm.Document("sessionPreferencesDocument", {
    name: "SSM-SessionManagerRunShell",
    content: {
        schemaVersion: "1.0",
        description: "Document to hold regional settings for Session Manager",
        sessionType: "Standard_Stream",
        inputs: {
            s3BucketName: "DOC-EXAMPLE-BUCKET",
            s3KeyPrefix: "MyBucketPrefix",
            s3EncryptionEnabled: true,
            cloudWatchLogGroupName: "MyLogGroupName",
            cloudWatchEncryptionEnabled: true,
            cloudWatchStreamingEnabled: false,
            kmsKeyId: "MyKMSKeyID",
            runAsEnabled: false,
            runAsDefaultUser: "MyDefaultRunAsUser",
            idleSessionTimeout: "20",
            shellProfile: {
                windows: "example commands",
                linux: "example commands",
            },
        },
    },
    documentFormat: aws_native.ssm.DocumentFormat.Yaml,
    documentType: aws_native.ssm.DocumentType.Session,
});
export const documentName = "SSM-SessionManagerRunShell";
import pulumi
import pulumi_aws_native as aws_native
session_preferences_document = aws_native.ssm.Document("sessionPreferencesDocument",
    name="SSM-SessionManagerRunShell",
    content={
        "schemaVersion": "1.0",
        "description": "Document to hold regional settings for Session Manager",
        "sessionType": "Standard_Stream",
        "inputs": {
            "s3BucketName": "DOC-EXAMPLE-BUCKET",
            "s3KeyPrefix": "MyBucketPrefix",
            "s3EncryptionEnabled": True,
            "cloudWatchLogGroupName": "MyLogGroupName",
            "cloudWatchEncryptionEnabled": True,
            "cloudWatchStreamingEnabled": False,
            "kmsKeyId": "MyKMSKeyID",
            "runAsEnabled": False,
            "runAsDefaultUser": "MyDefaultRunAsUser",
            "idleSessionTimeout": "20",
            "shellProfile": {
                "windows": "example commands",
                "linux": "example commands",
            },
        },
    },
    document_format=aws_native.ssm.DocumentFormat.YAML,
    document_type=aws_native.ssm.DocumentType.SESSION)
pulumi.export("documentName", "SSM-SessionManagerRunShell")
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() => 
{
    var examplePackageDocument = new AwsNative.Ssm.Document("examplePackageDocument", new()
    {
        Content = "{\"files\": {\"NewPackage_WINDOWS.zip\": {\"checksums\": {\"sha256\": \"36aeb0ec2c706013cf8c68163459678f7f6daa9489cd3f91d52799331EXAMPLE\"}}}, \"publisher\": \"publisherName\", \"schemaVersion\": \"2.0\", \"packages\": {\"_any\": {\"_any\": {\"x86_64\": {\"file\": \"NewPackage_WINDOWS.zip\"}}}}, \"version\": \"1.0\"}",
        DocumentType = AwsNative.Ssm.DocumentType.Package,
        Attachments = new[]
        {
            new AwsNative.Ssm.Inputs.DocumentAttachmentsSourceArgs
            {
                Key = AwsNative.Ssm.DocumentAttachmentsSourceKey.SourceUrl,
                Values = new[]
                {
                    "s3://example-package-path/valid-package",
                },
            },
        },
    });
});
package main
import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ssm.NewDocument(ctx, "examplePackageDocument", &ssm.DocumentArgs{
			Content:      pulumi.Any("{\"files\": {\"NewPackage_WINDOWS.zip\": {\"checksums\": {\"sha256\": \"36aeb0ec2c706013cf8c68163459678f7f6daa9489cd3f91d52799331EXAMPLE\"}}}, \"publisher\": \"publisherName\", \"schemaVersion\": \"2.0\", \"packages\": {\"_any\": {\"_any\": {\"x86_64\": {\"file\": \"NewPackage_WINDOWS.zip\"}}}}, \"version\": \"1.0\"}"),
			DocumentType: ssm.DocumentTypePackage,
			Attachments: ssm.DocumentAttachmentsSourceArray{
				&ssm.DocumentAttachmentsSourceArgs{
					Key: ssm.DocumentAttachmentsSourceKeySourceUrl,
					Values: pulumi.StringArray{
						pulumi.String("s3://example-package-path/valid-package"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const examplePackageDocument = new aws_native.ssm.Document("examplePackageDocument", {
    content: "{\"files\": {\"NewPackage_WINDOWS.zip\": {\"checksums\": {\"sha256\": \"36aeb0ec2c706013cf8c68163459678f7f6daa9489cd3f91d52799331EXAMPLE\"}}}, \"publisher\": \"publisherName\", \"schemaVersion\": \"2.0\", \"packages\": {\"_any\": {\"_any\": {\"x86_64\": {\"file\": \"NewPackage_WINDOWS.zip\"}}}}, \"version\": \"1.0\"}",
    documentType: aws_native.ssm.DocumentType.Package,
    attachments: [{
        key: aws_native.ssm.DocumentAttachmentsSourceKey.SourceUrl,
        values: ["s3://example-package-path/valid-package"],
    }],
});
import pulumi
import pulumi_aws_native as aws_native
example_package_document = aws_native.ssm.Document("examplePackageDocument",
    content="{\"files\": {\"NewPackage_WINDOWS.zip\": {\"checksums\": {\"sha256\": \"36aeb0ec2c706013cf8c68163459678f7f6daa9489cd3f91d52799331EXAMPLE\"}}}, \"publisher\": \"publisherName\", \"schemaVersion\": \"2.0\", \"packages\": {\"_any\": {\"_any\": {\"x86_64\": {\"file\": \"NewPackage_WINDOWS.zip\"}}}}, \"version\": \"1.0\"}",
    document_type=aws_native.ssm.DocumentType.PACKAGE,
    attachments=[{
        "key": aws_native.ssm.DocumentAttachmentsSourceKey.SOURCE_URL,
        "values": ["s3://example-package-path/valid-package"],
    }])
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() => 
{
    var examplePackageDocument = new AwsNative.Ssm.Document("examplePackageDocument", new()
    {
        Content = "{\\\"files\\\": {\\\"NewPackage_WINDOWS.zip\\\": {\\\"checksums\\\": {\\\"sha256\\\": \\\"36aeb0ec2c706013cf8c68163459678f7f6daa9489cd3f91d52799331EXAMPLE\\\"}}}, \\\"publisher\\\": \\\"publisherName\\\", \\\"schemaVersion\\\": \\\"2.0\\\", \\\"packages\\\": {\\\"_any\\\": {\\\"_any\\\": {\\\"x86_64\\\": {\\\"file\\\": \\\"NewPackage_WINDOWS.zip\\\"}}}}, \\\"version\\\": \\\"1.0\\\"}",
        DocumentType = AwsNative.Ssm.DocumentType.Package,
        Attachments = new[]
        {
            new AwsNative.Ssm.Inputs.DocumentAttachmentsSourceArgs
            {
                Key = AwsNative.Ssm.DocumentAttachmentsSourceKey.SourceUrl,
                Values = new[]
                {
                    "s3://example-package-path/valid-package",
                },
            },
        },
    });
});
package main
import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ssm.NewDocument(ctx, "examplePackageDocument", &ssm.DocumentArgs{
			Content:      pulumi.Any("{\\\"files\\\": {\\\"NewPackage_WINDOWS.zip\\\": {\\\"checksums\\\": {\\\"sha256\\\": \\\"36aeb0ec2c706013cf8c68163459678f7f6daa9489cd3f91d52799331EXAMPLE\\\"}}}, \\\"publisher\\\": \\\"publisherName\\\", \\\"schemaVersion\\\": \\\"2.0\\\", \\\"packages\\\": {\\\"_any\\\": {\\\"_any\\\": {\\\"x86_64\\\": {\\\"file\\\": \\\"NewPackage_WINDOWS.zip\\\"}}}}, \\\"version\\\": \\\"1.0\\\"}"),
			DocumentType: ssm.DocumentTypePackage,
			Attachments: ssm.DocumentAttachmentsSourceArray{
				&ssm.DocumentAttachmentsSourceArgs{
					Key: ssm.DocumentAttachmentsSourceKeySourceUrl,
					Values: pulumi.StringArray{
						pulumi.String("s3://example-package-path/valid-package"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const examplePackageDocument = new aws_native.ssm.Document("examplePackageDocument", {
    content: "{\\\"files\\\": {\\\"NewPackage_WINDOWS.zip\\\": {\\\"checksums\\\": {\\\"sha256\\\": \\\"36aeb0ec2c706013cf8c68163459678f7f6daa9489cd3f91d52799331EXAMPLE\\\"}}}, \\\"publisher\\\": \\\"publisherName\\\", \\\"schemaVersion\\\": \\\"2.0\\\", \\\"packages\\\": {\\\"_any\\\": {\\\"_any\\\": {\\\"x86_64\\\": {\\\"file\\\": \\\"NewPackage_WINDOWS.zip\\\"}}}}, \\\"version\\\": \\\"1.0\\\"}",
    documentType: aws_native.ssm.DocumentType.Package,
    attachments: [{
        key: aws_native.ssm.DocumentAttachmentsSourceKey.SourceUrl,
        values: ["s3://example-package-path/valid-package"],
    }],
});
import pulumi
import pulumi_aws_native as aws_native
example_package_document = aws_native.ssm.Document("examplePackageDocument",
    content="{\\\"files\\\": {\\\"NewPackage_WINDOWS.zip\\\": {\\\"checksums\\\": {\\\"sha256\\\": \\\"36aeb0ec2c706013cf8c68163459678f7f6daa9489cd3f91d52799331EXAMPLE\\\"}}}, \\\"publisher\\\": \\\"publisherName\\\", \\\"schemaVersion\\\": \\\"2.0\\\", \\\"packages\\\": {\\\"_any\\\": {\\\"_any\\\": {\\\"x86_64\\\": {\\\"file\\\": \\\"NewPackage_WINDOWS.zip\\\"}}}}, \\\"version\\\": \\\"1.0\\\"}",
    document_type=aws_native.ssm.DocumentType.PACKAGE,
    attachments=[{
        "key": aws_native.ssm.DocumentAttachmentsSourceKey.SOURCE_URL,
        "values": ["s3://example-package-path/valid-package"],
    }])
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() => 
{
    var exampleChangeCalendarDocument = new AwsNative.Ssm.Document("exampleChangeCalendarDocument", new()
    {
        Content = @"BEGIN:VCALENDAR\r
PRODID:-//AWS//Change Calendar 1.0//EN\r
VERSION:2.0\r
X-CALENDAR-TYPE:DEFAULT_OPEN\r
X-WR-CALDESC:test\r
BEGIN:VTODO\r
DTSTAMP:20200320T004207Z\r
UID:3b5af39a-d0b3-4049-a839-d7bb8af01f92\r
SUMMARY:Add events to this calendar.\r
END:VTODO\r
END:VCALENDAR\r
",
        DocumentType = AwsNative.Ssm.DocumentType.ChangeCalendar,
        DocumentFormat = AwsNative.Ssm.DocumentFormat.Text,
    });
});
package main
import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ssm.NewDocument(ctx, "exampleChangeCalendarDocument", &ssm.DocumentArgs{
			Content: pulumi.Any(`BEGIN:VCALENDAR\r
PRODID:-//AWS//Change Calendar 1.0//EN\r
VERSION:2.0\r
X-CALENDAR-TYPE:DEFAULT_OPEN\r
X-WR-CALDESC:test\r
BEGIN:VTODO\r
DTSTAMP:20200320T004207Z\r
UID:3b5af39a-d0b3-4049-a839-d7bb8af01f92\r
SUMMARY:Add events to this calendar.\r
END:VTODO\r
END:VCALENDAR\r
`),
			DocumentType:   ssm.DocumentTypeChangeCalendar,
			DocumentFormat: ssm.DocumentFormatText,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const exampleChangeCalendarDocument = new aws_native.ssm.Document("exampleChangeCalendarDocument", {
    content: `BEGIN:VCALENDAR\\r
PRODID:-//AWS//Change Calendar 1.0//EN\\r
VERSION:2.0\\r
X-CALENDAR-TYPE:DEFAULT_OPEN\\r
X-WR-CALDESC:test\\r
BEGIN:VTODO\\r
DTSTAMP:20200320T004207Z\\r
UID:3b5af39a-d0b3-4049-a839-d7bb8af01f92\\r
SUMMARY:Add events to this calendar.\\r
END:VTODO\\r
END:VCALENDAR\\r
`,
    documentType: aws_native.ssm.DocumentType.ChangeCalendar,
    documentFormat: aws_native.ssm.DocumentFormat.Text,
});
import pulumi
import pulumi_aws_native as aws_native
example_change_calendar_document = aws_native.ssm.Document("exampleChangeCalendarDocument",
    content="""BEGIN:VCALENDAR\r
PRODID:-//AWS//Change Calendar 1.0//EN\r
VERSION:2.0\r
X-CALENDAR-TYPE:DEFAULT_OPEN\r
X-WR-CALDESC:test\r
BEGIN:VTODO\r
DTSTAMP:20200320T004207Z\r
UID:3b5af39a-d0b3-4049-a839-d7bb8af01f92\r
SUMMARY:Add events to this calendar.\r
END:VTODO\r
END:VCALENDAR\r
""",
    document_type=aws_native.ssm.DocumentType.CHANGE_CALENDAR,
    document_format=aws_native.ssm.DocumentFormat.TEXT)
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() => 
{
    var exampleChangeCalendarDocument = new AwsNative.Ssm.Document("exampleChangeCalendarDocument", new()
    {
        Content = @"BEGIN:VCALENDAR\r
PRODID:-//AWS//Change Calendar 1.0//EN\r
VERSION:2.0\r
X-CALENDAR-TYPE:DEFAULT_OPEN\r
X-WR-CALDESC:test\r
BEGIN:VTODO\r
DTSTAMP:20200320T004207Z\r
UID:3b5af39a-d0b3-4049-a839-d7bb8af01f92\r
SUMMARY:Add events to this calendar.\r
END:VTODO\r
END:VCALENDAR\r
",
        DocumentType = AwsNative.Ssm.DocumentType.ChangeCalendar,
        DocumentFormat = AwsNative.Ssm.DocumentFormat.Text,
    });
});
package main
import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ssm.NewDocument(ctx, "exampleChangeCalendarDocument", &ssm.DocumentArgs{
			Content: pulumi.Any(`BEGIN:VCALENDAR\r
PRODID:-//AWS//Change Calendar 1.0//EN\r
VERSION:2.0\r
X-CALENDAR-TYPE:DEFAULT_OPEN\r
X-WR-CALDESC:test\r
BEGIN:VTODO\r
DTSTAMP:20200320T004207Z\r
UID:3b5af39a-d0b3-4049-a839-d7bb8af01f92\r
SUMMARY:Add events to this calendar.\r
END:VTODO\r
END:VCALENDAR\r
`),
			DocumentType:   ssm.DocumentTypeChangeCalendar,
			DocumentFormat: ssm.DocumentFormatText,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const exampleChangeCalendarDocument = new aws_native.ssm.Document("exampleChangeCalendarDocument", {
    content: `BEGIN:VCALENDAR\\r
PRODID:-//AWS//Change Calendar 1.0//EN\\r
VERSION:2.0\\r
X-CALENDAR-TYPE:DEFAULT_OPEN\\r
X-WR-CALDESC:test\\r
BEGIN:VTODO\\r
DTSTAMP:20200320T004207Z\\r
UID:3b5af39a-d0b3-4049-a839-d7bb8af01f92\\r
SUMMARY:Add events to this calendar.\\r
END:VTODO\\r
END:VCALENDAR\\r
`,
    documentType: aws_native.ssm.DocumentType.ChangeCalendar,
    documentFormat: aws_native.ssm.DocumentFormat.Text,
});
import pulumi
import pulumi_aws_native as aws_native
example_change_calendar_document = aws_native.ssm.Document("exampleChangeCalendarDocument",
    content="""BEGIN:VCALENDAR\r
PRODID:-//AWS//Change Calendar 1.0//EN\r
VERSION:2.0\r
X-CALENDAR-TYPE:DEFAULT_OPEN\r
X-WR-CALDESC:test\r
BEGIN:VTODO\r
DTSTAMP:20200320T004207Z\r
UID:3b5af39a-d0b3-4049-a839-d7bb8af01f92\r
SUMMARY:Add events to this calendar.\r
END:VTODO\r
END:VCALENDAR\r
""",
    document_type=aws_native.ssm.DocumentType.CHANGE_CALENDAR,
    document_format=aws_native.ssm.DocumentFormat.TEXT)
Coming soon!
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[Any] = None,
             attachments: Optional[Sequence[DocumentAttachmentsSourceArgs]] = None,
             document_format: Optional[DocumentFormat] = None,
             document_type: Optional[DocumentType] = None,
             name: Optional[str] = None,
             requires: Optional[Sequence[DocumentRequiresArgs]] = None,
             tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
             target_type: Optional[str] = None,
             update_method: Optional[DocumentUpdateMethod] = 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-native: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.
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Document resource accepts the following input properties:
- Content object
- The content for the Systems Manager document in JSON, YAML or String format. - Search the CloudFormation User Guide for - AWS::SSM::Documentfor more information about the expected schema for this property.
- Attachments
List<Pulumi.Aws Native. Ssm. Inputs. Document Attachments Source> 
- A list of key and value pairs that describe attachments to a version of a document.
- DocumentFormat Pulumi.Aws Native. Ssm. Document Format 
- Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
- DocumentType Pulumi.Aws Native. Ssm. Document Type 
- The type of document to create.
- Name string
- A name for the Systems Manager document.
- Requires
List<Pulumi.Aws Native. Ssm. Inputs. Document Requires> 
- A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
- 
List<Pulumi.Aws Native. Inputs. Tag> 
- Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
- TargetType string
- Specify a target type to define the kinds of resources the document can run on.
- UpdateMethod Pulumi.Aws Native. Ssm. Document Update Method 
- Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
- VersionName string
- An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
- Content interface{}
- The content for the Systems Manager document in JSON, YAML or String format. - Search the CloudFormation User Guide for - AWS::SSM::Documentfor more information about the expected schema for this property.
- Attachments
[]DocumentAttachments Source Args 
- A list of key and value pairs that describe attachments to a version of a document.
- DocumentFormat DocumentFormat 
- Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
- DocumentType DocumentType 
- The type of document to create.
- Name string
- A name for the Systems Manager document.
- Requires
[]DocumentRequires Args 
- A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
- 
TagArgs 
- Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
- TargetType string
- Specify a target type to define the kinds of resources the document can run on.
- UpdateMethod DocumentUpdate Method 
- Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
- VersionName string
- An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
- content Object
- The content for the Systems Manager document in JSON, YAML or String format. - Search the CloudFormation User Guide for - AWS::SSM::Documentfor more information about the expected schema for this property.
- attachments
List<DocumentAttachments Source> 
- A list of key and value pairs that describe attachments to a version of a document.
- documentFormat DocumentFormat 
- Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
- documentType DocumentType 
- The type of document to create.
- name String
- A name for the Systems Manager document.
- requires
List<DocumentRequires> 
- A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
- List<Tag>
- Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
- targetType String
- Specify a target type to define the kinds of resources the document can run on.
- updateMethod DocumentUpdate Method 
- Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
- versionName String
- An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
- content any
- The content for the Systems Manager document in JSON, YAML or String format. - Search the CloudFormation User Guide for - AWS::SSM::Documentfor more information about the expected schema for this property.
- attachments
DocumentAttachments Source[] 
- A list of key and value pairs that describe attachments to a version of a document.
- documentFormat DocumentFormat 
- Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
- documentType DocumentType 
- The type of document to create.
- name string
- A name for the Systems Manager document.
- requires
DocumentRequires[] 
- A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
- Tag[]
- Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
- targetType string
- Specify a target type to define the kinds of resources the document can run on.
- updateMethod DocumentUpdate Method 
- Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
- versionName string
- An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
- content Any
- The content for the Systems Manager document in JSON, YAML or String format. - Search the CloudFormation User Guide for - AWS::SSM::Documentfor more information about the expected schema for this property.
- attachments
Sequence[DocumentAttachments Source Args] 
- A list of key and value pairs that describe attachments to a version of a document.
- document_format DocumentFormat 
- Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
- document_type DocumentType 
- The type of document to create.
- name str
- A name for the Systems Manager document.
- requires
Sequence[DocumentRequires Args] 
- A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
- 
Sequence[TagArgs] 
- Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
- target_type str
- Specify a target type to define the kinds of resources the document can run on.
- update_method DocumentUpdate Method 
- Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
- version_name str
- An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
- content Any
- The content for the Systems Manager document in JSON, YAML or String format. - Search the CloudFormation User Guide for - AWS::SSM::Documentfor more information about the expected schema for this property.
- attachments List<Property Map>
- A list of key and value pairs that describe attachments to a version of a document.
- documentFormat "YAML" | "JSON" | "TEXT"
- Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
- documentType "ApplicationConfiguration" | "Application Configuration Schema" | "Automation" | "Automation. Change Template" | "Change Calendar" | "Cloud Formation" | "Command" | "Deployment Strategy" | "Package" | "Policy" | "Problem Analysis" | "Problem Analysis Template" | "Session" 
- The type of document to create.
- name String
- A name for the Systems Manager document.
- requires List<Property Map>
- A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
- List<Property Map>
- Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
- targetType String
- Specify a target type to define the kinds of resources the document can run on.
- updateMethod "Replace" | "NewVersion" 
- Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
- versionName String
- An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
Outputs
All input properties are implicitly available as output properties. Additionally, the Document resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
DocumentAttachmentsSource, DocumentAttachmentsSourceArgs      
- Key
Pulumi.Aws Native. Ssm. Document Attachments Source Key 
- The key of a key-value pair that identifies the location of an attachment to a document.
- Name string
- The name of the document attachment file.
- Values List<string>
- The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify.
- Key
DocumentAttachments Source Key 
- The key of a key-value pair that identifies the location of an attachment to a document.
- Name string
- The name of the document attachment file.
- Values []string
- The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify.
- key
DocumentAttachments Source Key 
- The key of a key-value pair that identifies the location of an attachment to a document.
- name String
- The name of the document attachment file.
- values List<String>
- The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify.
- key
DocumentAttachments Source Key 
- The key of a key-value pair that identifies the location of an attachment to a document.
- name string
- The name of the document attachment file.
- values string[]
- The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify.
- key
DocumentAttachments Source Key 
- The key of a key-value pair that identifies the location of an attachment to a document.
- name str
- The name of the document attachment file.
- values Sequence[str]
- The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify.
- key
"SourceUrl" | "S3File Url" | "Attachment Reference" 
- The key of a key-value pair that identifies the location of an attachment to a document.
- name String
- The name of the document attachment file.
- values List<String>
- The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify.
DocumentAttachmentsSourceKey, DocumentAttachmentsSourceKeyArgs        
- SourceUrl 
- SourceUrl
- S3FileUrl 
- S3FileUrl
- AttachmentReference 
- AttachmentReference
- DocumentAttachments Source Key Source Url 
- SourceUrl
- DocumentAttachments Source Key S3File Url 
- S3FileUrl
- DocumentAttachments Source Key Attachment Reference 
- AttachmentReference
- SourceUrl 
- SourceUrl
- S3FileUrl 
- S3FileUrl
- AttachmentReference 
- AttachmentReference
- SourceUrl 
- SourceUrl
- S3FileUrl 
- S3FileUrl
- AttachmentReference 
- AttachmentReference
- SOURCE_URL
- SourceUrl
- S3_FILE_URL
- S3FileUrl
- ATTACHMENT_REFERENCE
- AttachmentReference
- "SourceUrl" 
- SourceUrl
- "S3FileUrl" 
- S3FileUrl
- "AttachmentReference" 
- AttachmentReference
DocumentFormat, DocumentFormatArgs    
- Yaml
- YAML
- Json
- JSON
- Text
- TEXT
- DocumentFormat Yaml 
- YAML
- DocumentFormat Json 
- JSON
- DocumentFormat Text 
- TEXT
- Yaml
- YAML
- Json
- JSON
- Text
- TEXT
- Yaml
- YAML
- Json
- JSON
- Text
- TEXT
- YAML
- YAML
- JSON
- JSON
- TEXT
- TEXT
- "YAML"
- YAML
- "JSON"
- JSON
- "TEXT"
- TEXT
DocumentRequires, DocumentRequiresArgs    
DocumentType, DocumentTypeArgs    
- ApplicationConfiguration 
- ApplicationConfiguration
- ApplicationConfiguration Schema 
- ApplicationConfigurationSchema
- Automation
- Automation
- AutomationChange Template 
- Automation.ChangeTemplate
- ChangeCalendar 
- ChangeCalendar
- CloudFormation 
- CloudFormation
- Command
- Command
- DeploymentStrategy 
- DeploymentStrategy
- Package
- Package
- Policy
- Policy
- ProblemAnalysis 
- ProblemAnalysis
- ProblemAnalysis Template 
- ProblemAnalysisTemplate
- Session
- Session
- DocumentType Application Configuration 
- ApplicationConfiguration
- DocumentType Application Configuration Schema 
- ApplicationConfigurationSchema
- DocumentType Automation 
- Automation
- DocumentType Automation Change Template 
- Automation.ChangeTemplate
- DocumentType Change Calendar 
- ChangeCalendar
- DocumentType Cloud Formation 
- CloudFormation
- DocumentType Command 
- Command
- DocumentType Deployment Strategy 
- DeploymentStrategy
- DocumentType Package 
- Package
- DocumentType Policy 
- Policy
- DocumentType Problem Analysis 
- ProblemAnalysis
- DocumentType Problem Analysis Template 
- ProblemAnalysisTemplate
- DocumentType Session 
- Session
- ApplicationConfiguration 
- ApplicationConfiguration
- ApplicationConfiguration Schema 
- ApplicationConfigurationSchema
- Automation
- Automation
- AutomationChange Template 
- Automation.ChangeTemplate
- ChangeCalendar 
- ChangeCalendar
- CloudFormation 
- CloudFormation
- Command
- Command
- DeploymentStrategy 
- DeploymentStrategy
- Package
- Package
- Policy
- Policy
- ProblemAnalysis 
- ProblemAnalysis
- ProblemAnalysis Template 
- ProblemAnalysisTemplate
- Session
- Session
- ApplicationConfiguration 
- ApplicationConfiguration
- ApplicationConfiguration Schema 
- ApplicationConfigurationSchema
- Automation
- Automation
- AutomationChange Template 
- Automation.ChangeTemplate
- ChangeCalendar 
- ChangeCalendar
- CloudFormation 
- CloudFormation
- Command
- Command
- DeploymentStrategy 
- DeploymentStrategy
- Package
- Package
- Policy
- Policy
- ProblemAnalysis 
- ProblemAnalysis
- ProblemAnalysis Template 
- ProblemAnalysisTemplate
- Session
- Session
- APPLICATION_CONFIGURATION
- ApplicationConfiguration
- APPLICATION_CONFIGURATION_SCHEMA
- ApplicationConfigurationSchema
- AUTOMATION
- Automation
- AUTOMATION_CHANGE_TEMPLATE
- Automation.ChangeTemplate
- CHANGE_CALENDAR
- ChangeCalendar
- CLOUD_FORMATION
- CloudFormation
- COMMAND
- Command
- DEPLOYMENT_STRATEGY
- DeploymentStrategy
- PACKAGE
- Package
- POLICY
- Policy
- PROBLEM_ANALYSIS
- ProblemAnalysis
- PROBLEM_ANALYSIS_TEMPLATE
- ProblemAnalysisTemplate
- SESSION
- Session
- "ApplicationConfiguration" 
- ApplicationConfiguration
- "ApplicationConfiguration Schema" 
- ApplicationConfigurationSchema
- "Automation"
- Automation
- "Automation.Change Template" 
- Automation.ChangeTemplate
- "ChangeCalendar" 
- ChangeCalendar
- "CloudFormation" 
- CloudFormation
- "Command"
- Command
- "DeploymentStrategy" 
- DeploymentStrategy
- "Package"
- Package
- "Policy"
- Policy
- "ProblemAnalysis" 
- ProblemAnalysis
- "ProblemAnalysis Template" 
- ProblemAnalysisTemplate
- "Session"
- Session
DocumentUpdateMethod, DocumentUpdateMethodArgs      
- Replace
- Replace
- NewVersion 
- NewVersion
- DocumentUpdate Method Replace 
- Replace
- DocumentUpdate Method New Version 
- NewVersion
- Replace
- Replace
- NewVersion 
- NewVersion
- Replace
- Replace
- NewVersion 
- NewVersion
- REPLACE
- Replace
- NEW_VERSION
- NewVersion
- "Replace"
- Replace
- "NewVersion" 
- NewVersion
Tag, TagArgs  
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.