Vault

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

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var awsSnsTopic = new Aws.Sns.Topic("awsSnsTopic", new Aws.Sns.TopicArgs
        {
        });
        var myArchive = new Aws.Glacier.Vault("myArchive", new Aws.Glacier.VaultArgs
        {
            AccessPolicy = @"{
    ""Version"":""2012-10-17"",
    ""Statement"":[
       {
          ""Sid"": ""add-read-only-perm"",
          ""Principal"": ""*"",
          ""Effect"": ""Allow"",
          ""Action"": [
             ""glacier:InitiateJob"",
             ""glacier:GetJobOutput""
          ],
          ""Resource"": ""arn:aws:glacier:eu-west-1:432981146916:vaults/MyArchive""
       }
    ]
}

",
            Notifications = 
            {
                new Aws.Glacier.Inputs.VaultNotificationArgs
                {
                    Events = 
                    {
                        "ArchiveRetrievalCompleted",
                        "InventoryRetrievalCompleted",
                    },
                    SnsTopic = awsSnsTopic.Arn,
                },
            },
            Tags = 
            {
                { "Test", "MyArchive" },
            },
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/glacier"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/sns"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        awsSnsTopic, err := sns.NewTopic(ctx, "awsSnsTopic", nil)
        if err != nil {
            return err
        }
        _, err = glacier.NewVault(ctx, "myArchive", &glacier.VaultArgs{
            AccessPolicy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "    \"Version\":\"2012-10-17\",\n", "    \"Statement\":[\n", "       {\n", "          \"Sid\": \"add-read-only-perm\",\n", "          \"Principal\": \"*\",\n", "          \"Effect\": \"Allow\",\n", "          \"Action\": [\n", "             \"glacier:InitiateJob\",\n", "             \"glacier:GetJobOutput\"\n", "          ],\n", "          \"Resource\": \"arn:aws:glacier:eu-west-1:432981146916:vaults/MyArchive\"\n", "       }\n", "    ]\n", "}\n", "\n")),
            Notifications: glacier.VaultNotificationArray{
                &glacier.VaultNotificationArgs{
                    Events: pulumi.StringArray{
                        pulumi.String("ArchiveRetrievalCompleted"),
                        pulumi.String("InventoryRetrievalCompleted"),
                    },
                    SnsTopic: awsSnsTopic.Arn,
                },
            },
            Tags: pulumi.StringMap{
                "Test": pulumi.String("MyArchive"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

aws_sns_topic = aws.sns.Topic("awsSnsTopic")
my_archive = aws.glacier.Vault("myArchive",
    access_policy="""{
    "Version":"2012-10-17",
    "Statement":[
       {
          "Sid": "add-read-only-perm",
          "Principal": "*",
          "Effect": "Allow",
          "Action": [
             "glacier:InitiateJob",
             "glacier:GetJobOutput"
          ],
          "Resource": "arn:aws:glacier:eu-west-1:432981146916:vaults/MyArchive"
       }
    ]
}

""",
    notifications=[{
        "events": [
            "ArchiveRetrievalCompleted",
            "InventoryRetrievalCompleted",
        ],
        "sns_topic": aws_sns_topic.arn,
    }],
    tags={
        "Test": "MyArchive",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const awsSnsTopic = new aws.sns.Topic("aws_sns_topic", {});
const myArchive = new aws.glacier.Vault("my_archive", {
    accessPolicy: `{
    "Version":"2012-10-17",
    "Statement":[
       {
          "Sid": "add-read-only-perm",
          "Principal": "*",
          "Effect": "Allow",
          "Action": [
             "glacier:InitiateJob",
             "glacier:GetJobOutput"
          ],
          "Resource": "arn:aws:glacier:eu-west-1:432981146916:vaults/MyArchive"
       }
    ]
}
`,
    notifications: [{
        events: [
            "ArchiveRetrievalCompleted",
            "InventoryRetrievalCompleted",
        ],
        snsTopic: awsSnsTopic.arn,
    }],
    tags: {
        Test: "MyArchive",
    },
});

Create a Vault Resource

new Vault(name: string, args?: VaultArgs, opts?: CustomResourceOptions);
def Vault(resource_name, opts=None, access_policy=None, name=None, notifications=None, tags=None, __props__=None);
func NewVault(ctx *Context, name string, args *VaultArgs, opts ...ResourceOption) (*Vault, error)
public Vault(string name, VaultArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VaultArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VaultArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VaultArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Vault Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Vault resource accepts the following input properties:

AccessPolicy string

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

Name string

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).

Notifications List<VaultNotificationArgs>

The notifications for the Vault. Fields documented below.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

AccessPolicy string

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

Name string

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).

Notifications []VaultNotification

The notifications for the Vault. Fields documented below.

Tags map[string]string

A map of tags to assign to the resource.

accessPolicy string

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

name string

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).

notifications VaultNotification[]

The notifications for the Vault. Fields documented below.

tags {[key: string]: string}

A map of tags to assign to the resource.

access_policy str

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

name str

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).

notifications List[VaultNotification]

The notifications for the Vault. Fields documented below.

tags Dict[str, str]

A map of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Vault resource produces the following output properties:

Arn string

The ARN of the vault.

Id string
The provider-assigned unique ID for this managed resource.
Location string

The URI of the vault that was created.

Arn string

The ARN of the vault.

Id string
The provider-assigned unique ID for this managed resource.
Location string

The URI of the vault that was created.

arn string

The ARN of the vault.

id string
The provider-assigned unique ID for this managed resource.
location string

The URI of the vault that was created.

arn str

The ARN of the vault.

id str
The provider-assigned unique ID for this managed resource.
location str

The URI of the vault that was created.

Look up an Existing Vault Resource

Get an existing Vault resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VaultState, opts?: CustomResourceOptions): Vault
static get(resource_name, id, opts=None, access_policy=None, arn=None, location=None, name=None, notifications=None, tags=None, __props__=None);
func GetVault(ctx *Context, name string, id IDInput, state *VaultState, opts ...ResourceOption) (*Vault, error)
public static Vault Get(string name, Input<string> id, VaultState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AccessPolicy string

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

Arn string

The ARN of the vault.

Location string

The URI of the vault that was created.

Name string

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).

Notifications List<VaultNotificationArgs>

The notifications for the Vault. Fields documented below.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

AccessPolicy string

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

Arn string

The ARN of the vault.

Location string

The URI of the vault that was created.

Name string

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).

Notifications []VaultNotification

The notifications for the Vault. Fields documented below.

Tags map[string]string

A map of tags to assign to the resource.

accessPolicy string

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

arn string

The ARN of the vault.

location string

The URI of the vault that was created.

name string

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).

notifications VaultNotification[]

The notifications for the Vault. Fields documented below.

tags {[key: string]: string}

A map of tags to assign to the resource.

access_policy str

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

arn str

The ARN of the vault.

location str

The URI of the vault that was created.

name str

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).

notifications List[VaultNotification]

The notifications for the Vault. Fields documented below.

tags Dict[str, str]

A map of tags to assign to the resource.

Supporting Types

VaultNotification

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Events List<string>

You can configure a vault to publish a notification for ArchiveRetrievalCompleted and InventoryRetrievalCompleted events.

SnsTopic string

The SNS Topic ARN.

Events []string

You can configure a vault to publish a notification for ArchiveRetrievalCompleted and InventoryRetrievalCompleted events.

SnsTopic string

The SNS Topic ARN.

events string[]

You can configure a vault to publish a notification for ArchiveRetrievalCompleted and InventoryRetrievalCompleted events.

snsTopic string

The SNS Topic ARN.

events List[str]

You can configure a vault to publish a notification for ArchiveRetrievalCompleted and InventoryRetrievalCompleted events.

sns_topic str

The SNS Topic ARN.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.