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
LookupDocumentin 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.
- Document
Format string Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.
- Document
Version string The document version for which you want information.
- Name string
The name of the Systems Manager document.
- Document
Format string Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.
- Document
Version string The document version for which you want information.
- name string
The name of the Systems Manager document.
- document
Format string Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.
- document
Version 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.
- Document
Type string The type of the document.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Document
Format string - Document
Version string
- Arn string
The ARN of the document.
- Content string
The contents of the document.
- Document
Type string The type of the document.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Document
Format string - Document
Version string
- arn string
The ARN of the document.
- content string
The contents of the document.
- document
Type string The type of the document.
- id string
The provider-assigned unique ID for this managed resource.
- name string
- document
Format string - document
Version 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
awsTerraform Provider.