UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

114 lines 4.29 kB
"use strict"; // *** 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.Vault = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Glacier Vault Resource. You can refer to the [Glacier Developer Guide](https://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-vaults.html) for a full explanation of the Glacier Vault functionality * * > **NOTE:** When removing a Glacier Vault, the Vault must be empty. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const awsSnsTopic = new aws.sns.Topic("aws_sns_topic", {name: "glacier-sns-topic"}); * const myArchive = aws.iam.getPolicyDocument({ * statements: [{ * sid: "add-read-only-perm", * effect: "Allow", * principals: [{ * type: "*", * identifiers: ["*"], * }], * actions: [ * "glacier:InitiateJob", * "glacier:GetJobOutput", * ], * resources: ["arn:aws:glacier:eu-west-1:432981146916:vaults/MyArchive"], * }], * }); * const myArchiveVault = new aws.glacier.Vault("my_archive", { * name: "MyArchive", * notification: { * snsTopic: awsSnsTopic.arn, * events: [ * "ArchiveRetrievalCompleted", * "InventoryRetrievalCompleted", * ], * }, * accessPolicy: myArchive.then(myArchive => myArchive.json), * tags: { * Test: "MyArchive", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Glacier Vaults using the `name`. For example: * * ```sh * $ pulumi import aws:glacier/vault:Vault archive my_archive * ``` */ class Vault extends pulumi.CustomResource { /** * Get an existing Vault 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 Vault(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Vault. 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'] === Vault.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessPolicy"] = state?.accessPolicy; resourceInputs["arn"] = state?.arn; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["notification"] = state?.notification; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; resourceInputs["accessPolicy"] = args?.accessPolicy; resourceInputs["name"] = args?.name; resourceInputs["notification"] = args?.notification; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["location"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Vault.__pulumiType, name, resourceInputs, opts); } } exports.Vault = Vault; /** @internal */ Vault.__pulumiType = 'aws:glacier/vault:Vault'; //# sourceMappingURL=vault.js.map