@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
88 lines • 2.98 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.getSecretVersionOutput = exports.getSecretVersion = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Retrieve information about a Secrets Manager secret version, including its secret value. To retrieve secret metadata, see the `aws.secretsmanager.Secret` data source.
*
* ## Example Usage
*
* ### Retrieve Current Secret Version
*
* By default, this data sources retrieves information based on the `AWSCURRENT` staging label.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const secret_version = aws.secretsmanager.getSecretVersion({
* secretId: example.id,
* });
* ```
*
* ### Retrieve Specific Secret Version
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const by_version_stage = aws.secretsmanager.getSecretVersion({
* secretId: example.id,
* versionStage: "example",
* });
* ```
*/
function getSecretVersion(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:secretsmanager/getSecretVersion:getSecretVersion", {
"region": args.region,
"secretId": args.secretId,
"versionId": args.versionId,
"versionStage": args.versionStage,
}, opts);
}
exports.getSecretVersion = getSecretVersion;
/**
* Retrieve information about a Secrets Manager secret version, including its secret value. To retrieve secret metadata, see the `aws.secretsmanager.Secret` data source.
*
* ## Example Usage
*
* ### Retrieve Current Secret Version
*
* By default, this data sources retrieves information based on the `AWSCURRENT` staging label.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const secret_version = aws.secretsmanager.getSecretVersion({
* secretId: example.id,
* });
* ```
*
* ### Retrieve Specific Secret Version
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const by_version_stage = aws.secretsmanager.getSecretVersion({
* secretId: example.id,
* versionStage: "example",
* });
* ```
*/
function getSecretVersionOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:secretsmanager/getSecretVersion:getSecretVersion", {
"region": args.region,
"secretId": args.secretId,
"versionId": args.versionId,
"versionStage": args.versionStage,
}, opts);
}
exports.getSecretVersionOutput = getSecretVersionOutput;
//# sourceMappingURL=getSecretVersion.js.map
;