GetDocument

Gets the contents of the specified Systems Manager document.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Aws.Ssm.GetDocument.InvokeAsync(new Aws.Ssm.GetDocumentArgs
        {
            DocumentFormat = "YAML",
            Name = "AWS-GatherSoftwareInventory",
        }));
        this.Content = foo.Apply(foo => foo.Content);
    }

    [Output("content")]
    public Output<string> Content { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ssm"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "YAML"
        foo, err := ssm.LookupDocument(ctx, &ssm.LookupDocumentArgs{
            DocumentFormat: &opt0,
            Name:           "AWS-GatherSoftwareInventory",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("content", foo.Content)
        return nil
    })
}
import pulumi
import pulumi_aws as aws

foo = aws.ssm.get_document(document_format="YAML",
    name="AWS-GatherSoftwareInventory")
pulumi.export("content", foo.content)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const foo = pulumi.output(aws.ssm.getDocument({
    documentFormat: "YAML",
    name: "AWS-GatherSoftwareInventory",
}, { async: true }));

export const content = foo.content;

Using GetDocument

function getDocument(args: GetDocumentArgs, opts?: InvokeOptions): Promise<GetDocumentResult>
function  get_document(document_format=None, document_version=None, name=None, opts=None)
func LookupDocument(ctx *Context, args *LookupDocumentArgs, opts ...InvokeOption) (*LookupDocumentResult, error)

Note: This function is named LookupDocument in the Go SDK.

public static class GetDocument {
    public static Task<GetDocumentResult> InvokeAsync(GetDocumentArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Systems Manager document.

DocumentFormat string

Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.

DocumentVersion string

The document version for which you want information.

Name string

The name of the Systems Manager document.

DocumentFormat string

Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.

DocumentVersion string

The document version for which you want information.

name string

The name of the Systems Manager document.

documentFormat string

Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.

documentVersion string

The document version for which you want information.

name str

The name of the Systems Manager document.

document_format str

Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.

document_version str

The document version for which you want information.

GetDocument Result

The following output properties are available:

Arn string

The ARN of the document.

Content string

The contents of the document.

DocumentType string

The type of the document.

Id string

The provider-assigned unique ID for this managed resource.

Name string
DocumentFormat string
DocumentVersion string
Arn string

The ARN of the document.

Content string

The contents of the document.

DocumentType string

The type of the document.

Id string

The provider-assigned unique ID for this managed resource.

Name string
DocumentFormat string
DocumentVersion string
arn string

The ARN of the document.

content string

The contents of the document.

documentType string

The type of the document.

id string

The provider-assigned unique ID for this managed resource.

name string
documentFormat string
documentVersion string
arn str

The ARN of the document.

content str

The contents of the document.

document_type str

The type of the document.

id str

The provider-assigned unique ID for this managed resource.

name str
document_format str
document_version str

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.