@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
87 lines • 3.66 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.VaultLockConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an AWS Backup vault lock configuration resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.backup.VaultLockConfiguration("test", {
* backupVaultName: "example_backup_vault",
* changeableForDays: 3,
* maxRetentionDays: 1200,
* minRetentionDays: 7,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Backup vault lock configuration using the `name`. For example:
*
* ```sh
* $ pulumi import aws:backup/vaultLockConfiguration:VaultLockConfiguration test TestVault
* ```
*/
class VaultLockConfiguration extends pulumi.CustomResource {
/**
* Get an existing VaultLockConfiguration resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new VaultLockConfiguration(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VaultLockConfiguration. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === VaultLockConfiguration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["backupVaultArn"] = state?.backupVaultArn;
resourceInputs["backupVaultName"] = state?.backupVaultName;
resourceInputs["changeableForDays"] = state?.changeableForDays;
resourceInputs["maxRetentionDays"] = state?.maxRetentionDays;
resourceInputs["minRetentionDays"] = state?.minRetentionDays;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.backupVaultName === undefined && !opts.urn) {
throw new Error("Missing required property 'backupVaultName'");
}
resourceInputs["backupVaultName"] = args?.backupVaultName;
resourceInputs["changeableForDays"] = args?.changeableForDays;
resourceInputs["maxRetentionDays"] = args?.maxRetentionDays;
resourceInputs["minRetentionDays"] = args?.minRetentionDays;
resourceInputs["region"] = args?.region;
resourceInputs["backupVaultArn"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VaultLockConfiguration.__pulumiType, name, resourceInputs, opts);
}
}
exports.VaultLockConfiguration = VaultLockConfiguration;
/** @internal */
VaultLockConfiguration.__pulumiType = 'aws:backup/vaultLockConfiguration:VaultLockConfiguration';
//# sourceMappingURL=vaultLockConfiguration.js.map
;