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

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

aws-native.ssm.Document

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

    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 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")
    
    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";
    

    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 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")
    
    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";
    

    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 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"],
        }])
    
    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"],
        }],
    });
    

    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 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"],
        }])
    
    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"],
        }],
    });
    

    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 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)
    
    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,
    });
    

    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 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)
    
    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,
    });
    

    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

    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::Document for more information about the expected schema for this property.

    Attachments List<Pulumi.AwsNative.Ssm.Inputs.DocumentAttachmentsSource>
    A list of key and value pairs that describe attachments to a version of a document.
    DocumentFormat Pulumi.AwsNative.Ssm.DocumentFormat
    Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
    DocumentType Pulumi.AwsNative.Ssm.DocumentType
    The type of document to create.
    Name string
    A name for the Systems Manager document.
    Requires List<Pulumi.AwsNative.Ssm.Inputs.DocumentRequires>
    A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
    Tags List<Pulumi.AwsNative.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.AwsNative.Ssm.DocumentUpdateMethod
    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::Document for more information about the expected schema for this property.

    Attachments []DocumentAttachmentsSourceArgs
    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 []DocumentRequiresArgs
    A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
    Tags 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 DocumentUpdateMethod
    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::Document for more information about the expected schema for this property.

    attachments List<DocumentAttachmentsSource>
    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.
    tags 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 DocumentUpdateMethod
    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::Document for more information about the expected schema for this property.

    attachments DocumentAttachmentsSource[]
    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.
    tags 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 DocumentUpdateMethod
    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::Document for more information about the expected schema for this property.

    attachments Sequence[DocumentAttachmentsSourceArgs]
    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[DocumentRequiresArgs]
    A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
    tags 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 DocumentUpdateMethod
    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::Document for 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" | "ApplicationConfigurationSchema" | "Automation" | "Automation.ChangeTemplate" | "ChangeCalendar" | "CloudFormation" | "Command" | "DeploymentStrategy" | "Package" | "Policy" | "ProblemAnalysis" | "ProblemAnalysisTemplate" | "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.
    tags 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.AwsNative.Ssm.DocumentAttachmentsSourceKey
    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 DocumentAttachmentsSourceKey
    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 DocumentAttachmentsSourceKey
    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 DocumentAttachmentsSourceKey
    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 DocumentAttachmentsSourceKey
    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" | "S3FileUrl" | "AttachmentReference"
    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
    DocumentAttachmentsSourceKeySourceUrl
    SourceUrl
    DocumentAttachmentsSourceKeyS3FileUrl
    S3FileUrl
    DocumentAttachmentsSourceKeyAttachmentReference
    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
    DocumentFormatYaml
    YAML
    DocumentFormatJson
    JSON
    DocumentFormatText
    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

    Name string
    The name of the required SSM document. The name can be an Amazon Resource Name (ARN).
    Version string
    The document version required by the current document.
    Name string
    The name of the required SSM document. The name can be an Amazon Resource Name (ARN).
    Version string
    The document version required by the current document.
    name String
    The name of the required SSM document. The name can be an Amazon Resource Name (ARN).
    version String
    The document version required by the current document.
    name string
    The name of the required SSM document. The name can be an Amazon Resource Name (ARN).
    version string
    The document version required by the current document.
    name str
    The name of the required SSM document. The name can be an Amazon Resource Name (ARN).
    version str
    The document version required by the current document.
    name String
    The name of the required SSM document. The name can be an Amazon Resource Name (ARN).
    version String
    The document version required by the current document.

    DocumentType, DocumentTypeArgs

    ApplicationConfiguration
    ApplicationConfiguration
    ApplicationConfigurationSchema
    ApplicationConfigurationSchema
    Automation
    Automation
    AutomationChangeTemplate
    Automation.ChangeTemplate
    ChangeCalendar
    ChangeCalendar
    CloudFormation
    CloudFormation
    Command
    Command
    DeploymentStrategy
    DeploymentStrategy
    Package
    Package
    Policy
    Policy
    ProblemAnalysis
    ProblemAnalysis
    ProblemAnalysisTemplate
    ProblemAnalysisTemplate
    Session
    Session
    DocumentTypeApplicationConfiguration
    ApplicationConfiguration
    DocumentTypeApplicationConfigurationSchema
    ApplicationConfigurationSchema
    DocumentTypeAutomation
    Automation
    DocumentTypeAutomationChangeTemplate
    Automation.ChangeTemplate
    DocumentTypeChangeCalendar
    ChangeCalendar
    DocumentTypeCloudFormation
    CloudFormation
    DocumentTypeCommand
    Command
    DocumentTypeDeploymentStrategy
    DeploymentStrategy
    DocumentTypePackage
    Package
    DocumentTypePolicy
    Policy
    DocumentTypeProblemAnalysis
    ProblemAnalysis
    DocumentTypeProblemAnalysisTemplate
    ProblemAnalysisTemplate
    DocumentTypeSession
    Session
    ApplicationConfiguration
    ApplicationConfiguration
    ApplicationConfigurationSchema
    ApplicationConfigurationSchema
    Automation
    Automation
    AutomationChangeTemplate
    Automation.ChangeTemplate
    ChangeCalendar
    ChangeCalendar
    CloudFormation
    CloudFormation
    Command
    Command
    DeploymentStrategy
    DeploymentStrategy
    Package
    Package
    Policy
    Policy
    ProblemAnalysis
    ProblemAnalysis
    ProblemAnalysisTemplate
    ProblemAnalysisTemplate
    Session
    Session
    ApplicationConfiguration
    ApplicationConfiguration
    ApplicationConfigurationSchema
    ApplicationConfigurationSchema
    Automation
    Automation
    AutomationChangeTemplate
    Automation.ChangeTemplate
    ChangeCalendar
    ChangeCalendar
    CloudFormation
    CloudFormation
    Command
    Command
    DeploymentStrategy
    DeploymentStrategy
    Package
    Package
    Policy
    Policy
    ProblemAnalysis
    ProblemAnalysis
    ProblemAnalysisTemplate
    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
    "ApplicationConfigurationSchema"
    ApplicationConfigurationSchema
    "Automation"
    Automation
    "Automation.ChangeTemplate"
    Automation.ChangeTemplate
    "ChangeCalendar"
    ChangeCalendar
    "CloudFormation"
    CloudFormation
    "Command"
    Command
    "DeploymentStrategy"
    DeploymentStrategy
    "Package"
    Package
    "Policy"
    Policy
    "ProblemAnalysis"
    ProblemAnalysis
    "ProblemAnalysisTemplate"
    ProblemAnalysisTemplate
    "Session"
    Session

    DocumentUpdateMethod, DocumentUpdateMethodArgs

    Replace
    Replace
    NewVersion
    NewVersion
    DocumentUpdateMethodReplace
    Replace
    DocumentUpdateMethodNewVersion
    NewVersion
    Replace
    Replace
    NewVersion
    NewVersion
    Replace
    Replace
    NewVersion
    NewVersion
    REPLACE
    Replace
    NEW_VERSION
    NewVersion
    "Replace"
    Replace
    "NewVersion"
    NewVersion

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi