@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
131 lines (130 loc) • 3.67 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* 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",
* });
* ```
*/
export declare function getDocument(args: GetDocumentArgs, opts?: pulumi.InvokeOptions): Promise<GetDocumentResult>;
/**
* A collection of arguments for invoking getDocument.
*/
export interface GetDocumentArgs {
/**
* The format of the document. Valid values: `JSON`, `TEXT`, `YAML`.
*/
documentFormat?: string;
/**
* The document version.
*/
documentVersion?: string;
/**
* The name of the document.
*/
name: string;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: string;
}
/**
* A collection of values returned by getDocument.
*/
export interface GetDocumentResult {
/**
* ARN of the document. If the document is an AWS managed document, this value will be set to the name of the document instead.
*/
readonly arn: string;
/**
* The content for the SSM document in JSON or YAML format.
*/
readonly content: string;
readonly documentFormat?: string;
/**
* The type of the document.
*/
readonly documentType: string;
readonly documentVersion?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name: string;
readonly region: string;
}
/**
* 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",
* });
* ```
*/
export declare function getDocumentOutput(args: GetDocumentOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDocumentResult>;
/**
* A collection of arguments for invoking getDocument.
*/
export interface GetDocumentOutputArgs {
/**
* The format of the document. Valid values: `JSON`, `TEXT`, `YAML`.
*/
documentFormat?: pulumi.Input<string>;
/**
* The document version.
*/
documentVersion?: pulumi.Input<string>;
/**
* The name of the document.
*/
name: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}