VaultArgs

data class VaultArgs(val accessPolicy: Output<String>? = null, val name: Output<String>? = null, val notification: Output<VaultNotificationArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<VaultArgs>

Provides a Glacier Vault Resource. You can refer to the Glacier Developer Guide for a full explanation of the Glacier Vault functionality

NOTE: When removing a Glacier Vault, the Vault must be empty.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.glacier.Vault;
import com.pulumi.aws.glacier.VaultArgs;
import com.pulumi.aws.glacier.inputs.VaultNotificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var awsSnsTopic = new Topic("awsSnsTopic");
final var myArchivePolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.sid("add-read-only-perm")
.effect("Allow")
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("*")
.identifiers("*")
.build())
.actions(
"glacier:InitiateJob",
"glacier:GetJobOutput")
.resources("arn:aws:glacier:eu-west-1:432981146916:vaults/MyArchive")
.build())
.build());
var myArchiveVault = new Vault("myArchiveVault", VaultArgs.builder()
.notification(VaultNotificationArgs.builder()
.snsTopic(awsSnsTopic.arn())
.events(
"ArchiveRetrievalCompleted",
"InventoryRetrievalCompleted")
.build())
.accessPolicy(myArchivePolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
.tags(Map.of("Test", "MyArchive"))
.build());
}
}

Import

Glacier Vaults can be imported using the name, e.g.,

$ pulumi import aws:glacier/vault:Vault archive my_archive

Constructors

Link copied to clipboard
constructor(accessPolicy: Output<String>? = null, name: Output<String>? = null, notification: Output<VaultNotificationArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val accessPolicy: Output<String>? = null

The policy document. This is a JSON formatted string. The heredoc syntax or file function is helpful here. Use the Glacier Developer Guide for more information on Glacier Vault Policy

Link copied to clipboard
val name: Output<String>? = null

The name of the Vault. Names can be between 1 and 255 characters long and the valid characters are a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), and '.' (period).

Link copied to clipboard
val notification: Output<VaultNotificationArgs>? = null

The notifications for the Vault. Fields documented below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): VaultArgs