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 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
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::Document
for 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.
- Document
Format 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.
- Document
Type 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.
- Target
Type string - Specify a target type to define the kinds of resources the document can run on.
- Update
Method 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.
- Version
Name 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
[]Document
Attachments 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 string
- A name for the Systems Manager document.
- Requires
[]Document
Requires Args - A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
- Tag
Args - 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 string - 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 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<Document
Attachments Source> - 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 String
- A name for the Systems Manager document.
- requires
List<Document
Requires> - 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.
- target
Type String - 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 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
Document
Attachments Source[] - 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 string
- A name for the Systems Manager document.
- requires
Document
Requires[] - 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.
- target
Type string - 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 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[Document
Attachments 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[Document
Requires Args] - A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
- Sequence[Tag
Args] - 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::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.
- document
Format "YAML" | "JSON" | "TEXT" - Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
- document
Type "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.
- target
Type String - Specify a target type to define the kinds of resources the document can run on.
- update
Method "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.
- version
Name 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
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 []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
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
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 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
Document
Attachments 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
"Source
Url" | "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
- Source
Url - SourceUrl
- S3File
Url - S3FileUrl
- Attachment
Reference - AttachmentReference
- Document
Attachments Source Key Source Url - SourceUrl
- Document
Attachments Source Key S3File Url - S3FileUrl
- Document
Attachments Source Key Attachment Reference - AttachmentReference
- Source
Url - SourceUrl
- S3File
Url - S3FileUrl
- Attachment
Reference - AttachmentReference
- Source
Url - SourceUrl
- S3File
Url - S3FileUrl
- Attachment
Reference - AttachmentReference
- SOURCE_URL
- SourceUrl
- S3_FILE_URL
- S3FileUrl
- ATTACHMENT_REFERENCE
- AttachmentReference
- "Source
Url" - SourceUrl
- "S3File
Url" - S3FileUrl
- "Attachment
Reference" - AttachmentReference
DocumentFormat, DocumentFormatArgs
- Yaml
- YAML
- Json
- JSON
- Text
- TEXT
- Document
Format Yaml - YAML
- Document
Format Json - JSON
- Document
Format 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
- 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
- Document
Type Application Configuration - ApplicationConfiguration
- Document
Type Application Configuration Schema - ApplicationConfigurationSchema
- Document
Type Automation - Automation
- Document
Type Automation Change Template - Automation.ChangeTemplate
- Document
Type Change Calendar - ChangeCalendar
- Document
Type Cloud Formation - CloudFormation
- Document
Type Command - Command
- Document
Type Deployment Strategy - DeploymentStrategy
- Document
Type Package - Package
- Document
Type Policy - Policy
- Document
Type Problem Analysis - ProblemAnalysis
- Document
Type Problem Analysis Template - ProblemAnalysisTemplate
- Document
Type 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
- 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
- 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
- "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
DocumentUpdateMethod, DocumentUpdateMethodArgs
- Replace
- Replace
- New
Version - NewVersion
- Document
Update Method Replace - Replace
- Document
Update Method New Version - NewVersion
- Replace
- Replace
- New
Version - NewVersion
- Replace
- Replace
- New
Version - NewVersion
- REPLACE
- Replace
- NEW_VERSION
- NewVersion
- "Replace"
- Replace
- "New
Version" - 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.