getDocument

Gets the contents of the specified Systems Manager document.

Example Usage

To get the contents of the document owned by AWS.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.SsmFunctions;
import com.pulumi.aws.ssm.inputs.GetDocumentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var foo = SsmFunctions.getDocument(GetDocumentArgs.builder()
.name("AWS-GatherSoftwareInventory")
.documentFormat("YAML")
.build());
ctx.export("content", foo.applyValue(getDocumentResult -> getDocumentResult.content()));
}
}

Return

A collection of values returned by getDocument.

Parameters

argument

A collection of arguments for invoking getDocument.


suspend fun getDocument(documentFormat: String? = null, documentVersion: String? = null, name: String): GetDocumentResult

Return

A collection of values returned by getDocument.

Parameters

documentFormat

Returns the document in the specified format. The document format can be either JSON, YAML and TEXT. JSON is the default format.

documentVersion

Document version for which you want information.

name

Name of the Systems Manager document.

See also


suspend fun getDocument(argument: suspend GetDocumentPlainArgsBuilder.() -> Unit): GetDocumentResult

Return

A collection of values returned by getDocument.

Parameters

argument

Builder for com.pulumi.aws.ssm.kotlin.inputs.GetDocumentPlainArgs.

See also