Show / Hide Table of Contents

Class GetDocument

Inheritance
System.Object
GetDocument
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ssm
Assembly: Pulumi.Aws.dll
Syntax
public static class GetDocument

Methods

View Source

InvokeAsync(GetDocumentArgs, InvokeOptions)

Gets the contents of the specified Systems Manager document.

{{% examples %}}

Example Usage

{{% example %}}

To get the contents of the document owned by AWS.

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

To get the contents of the custom document.

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var test = Output.Create(Aws.Ssm.GetDocument.InvokeAsync(new Aws.Ssm.GetDocumentArgs
    {
        DocumentFormat = "JSON",
        Name = aws_ssm_document.Test.Name,
    }));
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetDocumentResult> InvokeAsync(GetDocumentArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetDocumentArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetDocumentResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.