com.pulumi.aws.ebs.kotlin.SnapshotCopyArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.ebs.kotlin
import com.pulumi.aws.ebs.SnapshotCopyArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Creates a Snapshot of a snapshot.
* ## Example Usage
*
* ```typescript
* 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,
* tags: {
* Name: "HelloWorld",
* },
* });
* const exampleSnapshot = new aws.ebs.Snapshot("example_snapshot", {
* volumeId: example.id,
* tags: {
* Name: "HelloWorld_snap",
* },
* });
* const exampleCopy = new aws.ebs.SnapshotCopy("example_copy", {
* sourceSnapshotId: exampleSnapshot.id,
* sourceRegion: "us-west-2",
* tags: {
* Name: "HelloWorld_copy_snap",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ebs.Volume("example",
* availability_zone="us-west-2a",
* size=40,
* tags={
* "Name": "HelloWorld",
* })
* example_snapshot = aws.ebs.Snapshot("example_snapshot",
* volume_id=example.id,
* tags={
* "Name": "HelloWorld_snap",
* })
* example_copy = aws.ebs.SnapshotCopy("example_copy",
* source_snapshot_id=example_snapshot.id,
* source_region="us-west-2",
* tags={
* "Name": "HelloWorld_copy_snap",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ebs.Volume("example", new()
* {
* AvailabilityZone = "us-west-2a",
* Size = 40,
* Tags =
* {
* { "Name", "HelloWorld" },
* },
* });
* var exampleSnapshot = new Aws.Ebs.Snapshot("example_snapshot", new()
* {
* VolumeId = example.Id,
* Tags =
* {
* { "Name", "HelloWorld_snap" },
* },
* });
* var exampleCopy = new Aws.Ebs.SnapshotCopy("example_copy", new()
* {
* SourceSnapshotId = exampleSnapshot.Id,
* SourceRegion = "us-west-2",
* Tags =
* {
* { "Name", "HelloWorld_copy_snap" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ebs"
* "github.com/pulumi/pulumi/sdk/v3/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),
* Tags: pulumi.StringMap{
* "Name": pulumi.String("HelloWorld"),
* },
* })
* if err != nil {
* return err
* }
* exampleSnapshot, err := ebs.NewSnapshot(ctx, "example_snapshot", &ebs.SnapshotArgs{
* VolumeId: example.ID(),
* Tags: pulumi.StringMap{
* "Name": pulumi.String("HelloWorld_snap"),
* },
* })
* if err != nil {
* return err
* }
* _, err = ebs.NewSnapshotCopy(ctx, "example_copy", &ebs.SnapshotCopyArgs{
* SourceSnapshotId: exampleSnapshot.ID(),
* SourceRegion: pulumi.String("us-west-2"),
* Tags: pulumi.StringMap{
* "Name": pulumi.String("HelloWorld_copy_snap"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.ebs.Volume;
* import com.pulumi.aws.ebs.VolumeArgs;
* import com.pulumi.aws.ebs.Snapshot;
* import com.pulumi.aws.ebs.SnapshotArgs;
* import com.pulumi.aws.ebs.SnapshotCopy;
* import com.pulumi.aws.ebs.SnapshotCopyArgs;
* 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 example = new Volume("example", VolumeArgs.builder()
* .availabilityZone("us-west-2a")
* .size(40)
* .tags(Map.of("Name", "HelloWorld"))
* .build());
* var exampleSnapshot = new Snapshot("exampleSnapshot", SnapshotArgs.builder()
* .volumeId(example.id())
* .tags(Map.of("Name", "HelloWorld_snap"))
* .build());
* var exampleCopy = new SnapshotCopy("exampleCopy", SnapshotCopyArgs.builder()
* .sourceSnapshotId(exampleSnapshot.id())
* .sourceRegion("us-west-2")
* .tags(Map.of("Name", "HelloWorld_copy_snap"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ebs:Volume
* properties:
* availabilityZone: us-west-2a
* size: 40
* tags:
* Name: HelloWorld
* exampleSnapshot:
* type: aws:ebs:Snapshot
* name: example_snapshot
* properties:
* volumeId: ${example.id}
* tags:
* Name: HelloWorld_snap
* exampleCopy:
* type: aws:ebs:SnapshotCopy
* name: example_copy
* properties:
* sourceSnapshotId: ${exampleSnapshot.id}
* sourceRegion: us-west-2
* tags:
* Name: HelloWorld_copy_snap
* ```
*
* @property description A description of what the snapshot is.
* @property encrypted Whether the snapshot is encrypted.
* @property kmsKeyId The ARN for the KMS encryption key.
* @property permanentRestore Indicates whether to permanently restore an archived snapshot.
* @property sourceRegion The region of the source snapshot.
* @property sourceSnapshotId The ARN for the snapshot to be copied.
* @property storageTier The name of the storage tier. Valid values are `archive` and `standard`. Default value is `standard`.
* @property tags A map of tags for the snapshot.
* @property temporaryRestoreDays Specifies the number of days for which to temporarily restore an archived snapshot. Required for temporary restores only. The snapshot will be automatically re-archived after this period.
*/
public data class SnapshotCopyArgs(
public val description: Output? = null,
public val encrypted: Output? = null,
public val kmsKeyId: Output? = null,
public val permanentRestore: Output? = null,
public val sourceRegion: Output? = null,
public val sourceSnapshotId: Output? = null,
public val storageTier: Output? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy