@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
88 lines • 2.65 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDocumentOutput = exports.getDocument = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Gets the contents of the specified Systems Manager document.
*
* ## Example Usage
*
* To get the contents of the document owned by AWS.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const foo = aws.ssm.getDocument({
* name: "AWS-GatherSoftwareInventory",
* documentFormat: "YAML",
* });
* export const content = foo.then(foo => foo.content);
* ```
*
* To get the contents of the custom document.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = aws.ssm.getDocument({
* name: testAwsSsmDocument.name,
* documentFormat: "JSON",
* });
* ```
*/
function getDocument(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ssm/getDocument:getDocument", {
"documentFormat": args.documentFormat,
"documentVersion": args.documentVersion,
"name": args.name,
"region": args.region,
}, opts);
}
exports.getDocument = getDocument;
/**
* Gets the contents of the specified Systems Manager document.
*
* ## Example Usage
*
* To get the contents of the document owned by AWS.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const foo = aws.ssm.getDocument({
* name: "AWS-GatherSoftwareInventory",
* documentFormat: "YAML",
* });
* export const content = foo.then(foo => foo.content);
* ```
*
* To get the contents of the custom document.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = aws.ssm.getDocument({
* name: testAwsSsmDocument.name,
* documentFormat: "JSON",
* });
* ```
*/
function getDocumentOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ssm/getDocument:getDocument", {
"documentFormat": args.documentFormat,
"documentVersion": args.documentVersion,
"name": args.name,
"region": args.region,
}, opts);
}
exports.getDocumentOutput = getDocumentOutput;
//# sourceMappingURL=getDocument.js.map
;