SnapshotCreateVolumePermission

Adds permission to create volumes off of a given EBS Snapshot.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ebs.Volume("example", new Aws.Ebs.VolumeArgs
        {
            AvailabilityZone = "us-west-2a",
            Size = 40,
        });
        var exampleSnapshot = new Aws.Ebs.Snapshot("exampleSnapshot", new Aws.Ebs.SnapshotArgs
        {
            VolumeId = example.Id,
        });
        var examplePerm = new Aws.Ec2.SnapshotCreateVolumePermission("examplePerm", new Aws.Ec2.SnapshotCreateVolumePermissionArgs
        {
            AccountId = "12345678",
            SnapshotId = exampleSnapshot.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ebs"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := ebs.NewVolume(ctx, "example", &ebs.VolumeArgs{
            AvailabilityZone: pulumi.String("us-west-2a"),
            Size:             pulumi.Int(40),
        })
        if err != nil {
            return err
        }
        exampleSnapshot, err := ebs.NewSnapshot(ctx, "exampleSnapshot", &ebs.SnapshotArgs{
            VolumeId: example.ID(),
        })
        if err != nil {
            return err
        }
        _, err = ec2.NewSnapshotCreateVolumePermission(ctx, "examplePerm", &ec2.SnapshotCreateVolumePermissionArgs{
            AccountId:  pulumi.String("12345678"),
            SnapshotId: exampleSnapshot.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ebs.Volume("example",
    availability_zone="us-west-2a",
    size=40)
example_snapshot = aws.ebs.Snapshot("exampleSnapshot", volume_id=example.id)
example_perm = aws.ec2.SnapshotCreateVolumePermission("examplePerm",
    account_id="12345678",
    snapshot_id=example_snapshot.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ebs.Volume("example", {
    availabilityZone: "us-west-2a",
    size: 40,
});
const exampleSnapshot = new aws.ebs.Snapshot("example_snapshot", {
    volumeId: example.id,
});
const examplePerm = new aws.ec2.SnapshotCreateVolumePermission("example_perm", {
    accountId: "12345678",
    snapshotId: exampleSnapshot.id,
});

Create a SnapshotCreateVolumePermission Resource

def SnapshotCreateVolumePermission(resource_name, opts=None, account_id=None, snapshot_id=None, __props__=None);
name string
The unique name of the resource.
args SnapshotCreateVolumePermissionArgs
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 SnapshotCreateVolumePermissionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SnapshotCreateVolumePermissionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

SnapshotCreateVolumePermission Resource Properties

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

Inputs

The SnapshotCreateVolumePermission resource accepts the following input properties:

AccountId string

An AWS Account ID to add create volume permissions

SnapshotId string

A snapshot ID

AccountId string

An AWS Account ID to add create volume permissions

SnapshotId string

A snapshot ID

accountId string

An AWS Account ID to add create volume permissions

snapshotId string

A snapshot ID

account_id str

An AWS Account ID to add create volume permissions

snapshot_id str

A snapshot ID

Outputs

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

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

Look up an Existing SnapshotCreateVolumePermission Resource

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

static get(resource_name, id, opts=None, account_id=None, snapshot_id=None, __props__=None);
func GetSnapshotCreateVolumePermission(ctx *Context, name string, id IDInput, state *SnapshotCreateVolumePermissionState, opts ...ResourceOption) (*SnapshotCreateVolumePermission, error)
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:

AccountId string

An AWS Account ID to add create volume permissions

SnapshotId string

A snapshot ID

AccountId string

An AWS Account ID to add create volume permissions

SnapshotId string

A snapshot ID

accountId string

An AWS Account ID to add create volume permissions

snapshotId string

A snapshot ID

account_id str

An AWS Account ID to add create volume permissions

snapshot_id str

A snapshot ID

Package Details

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