1. Packages
  2. AWS
  3. API Docs
  4. redshift
  5. SnapshotCopy
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.redshift.SnapshotCopy

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Resource for managing an AWS Redshift Snapshot Copy.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.redshift.SnapshotCopy("example", {
        clusterIdentifier: exampleAwsRedshiftCluster.id,
        destinationRegion: "us-east-1",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.redshift.SnapshotCopy("example",
        cluster_identifier=example_aws_redshift_cluster["id"],
        destination_region="us-east-1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redshift.NewSnapshotCopy(ctx, "example", &redshift.SnapshotCopyArgs{
    			ClusterIdentifier: pulumi.Any(exampleAwsRedshiftCluster.Id),
    			DestinationRegion: pulumi.String("us-east-1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.RedShift.SnapshotCopy("example", new()
        {
            ClusterIdentifier = exampleAwsRedshiftCluster.Id,
            DestinationRegion = "us-east-1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshift.SnapshotCopy;
    import com.pulumi.aws.redshift.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 SnapshotCopy("example", SnapshotCopyArgs.builder()
                .clusterIdentifier(exampleAwsRedshiftCluster.id())
                .destinationRegion("us-east-1")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:redshift:SnapshotCopy
        properties:
          clusterIdentifier: ${exampleAwsRedshiftCluster.id}
          destinationRegion: us-east-1
    

    Create SnapshotCopy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SnapshotCopy(name: string, args: SnapshotCopyArgs, opts?: CustomResourceOptions);
    @overload
    def SnapshotCopy(resource_name: str,
                     args: SnapshotCopyArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def SnapshotCopy(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     cluster_identifier: Optional[str] = None,
                     destination_region: Optional[str] = None,
                     manual_snapshot_retention_period: Optional[int] = None,
                     retention_period: Optional[int] = None,
                     snapshot_copy_grant_name: Optional[str] = None)
    func NewSnapshotCopy(ctx *Context, name string, args SnapshotCopyArgs, opts ...ResourceOption) (*SnapshotCopy, error)
    public SnapshotCopy(string name, SnapshotCopyArgs args, CustomResourceOptions? opts = null)
    public SnapshotCopy(String name, SnapshotCopyArgs args)
    public SnapshotCopy(String name, SnapshotCopyArgs args, CustomResourceOptions options)
    
    type: aws:redshift:SnapshotCopy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SnapshotCopyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SnapshotCopyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SnapshotCopyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnapshotCopyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SnapshotCopyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var examplesnapshotCopyResourceResourceFromRedshiftsnapshotCopy = new Aws.RedShift.SnapshotCopy("examplesnapshotCopyResourceResourceFromRedshiftsnapshotCopy", new()
    {
        ClusterIdentifier = "string",
        DestinationRegion = "string",
        ManualSnapshotRetentionPeriod = 0,
        RetentionPeriod = 0,
        SnapshotCopyGrantName = "string",
    });
    
    example, err := redshift.NewSnapshotCopy(ctx, "examplesnapshotCopyResourceResourceFromRedshiftsnapshotCopy", &redshift.SnapshotCopyArgs{
    	ClusterIdentifier:             pulumi.String("string"),
    	DestinationRegion:             pulumi.String("string"),
    	ManualSnapshotRetentionPeriod: pulumi.Int(0),
    	RetentionPeriod:               pulumi.Int(0),
    	SnapshotCopyGrantName:         pulumi.String("string"),
    })
    
    var examplesnapshotCopyResourceResourceFromRedshiftsnapshotCopy = new SnapshotCopy("examplesnapshotCopyResourceResourceFromRedshiftsnapshotCopy", SnapshotCopyArgs.builder()
        .clusterIdentifier("string")
        .destinationRegion("string")
        .manualSnapshotRetentionPeriod(0)
        .retentionPeriod(0)
        .snapshotCopyGrantName("string")
        .build());
    
    examplesnapshot_copy_resource_resource_from_redshiftsnapshot_copy = aws.redshift.SnapshotCopy("examplesnapshotCopyResourceResourceFromRedshiftsnapshotCopy",
        cluster_identifier="string",
        destination_region="string",
        manual_snapshot_retention_period=0,
        retention_period=0,
        snapshot_copy_grant_name="string")
    
    const examplesnapshotCopyResourceResourceFromRedshiftsnapshotCopy = new aws.redshift.SnapshotCopy("examplesnapshotCopyResourceResourceFromRedshiftsnapshotCopy", {
        clusterIdentifier: "string",
        destinationRegion: "string",
        manualSnapshotRetentionPeriod: 0,
        retentionPeriod: 0,
        snapshotCopyGrantName: "string",
    });
    
    type: aws:redshift:SnapshotCopy
    properties:
        clusterIdentifier: string
        destinationRegion: string
        manualSnapshotRetentionPeriod: 0
        retentionPeriod: 0
        snapshotCopyGrantName: string
    

    SnapshotCopy Resource Properties

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

    Inputs

    The SnapshotCopy resource accepts the following input properties:

    ClusterIdentifier string
    Identifier of the source cluster.
    DestinationRegion string

    AWS Region to copy snapshots to.

    The following arguments are optional:

    ManualSnapshotRetentionPeriod int
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    RetentionPeriod int
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    SnapshotCopyGrantName string
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    ClusterIdentifier string
    Identifier of the source cluster.
    DestinationRegion string

    AWS Region to copy snapshots to.

    The following arguments are optional:

    ManualSnapshotRetentionPeriod int
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    RetentionPeriod int
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    SnapshotCopyGrantName string
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    clusterIdentifier String
    Identifier of the source cluster.
    destinationRegion String

    AWS Region to copy snapshots to.

    The following arguments are optional:

    manualSnapshotRetentionPeriod Integer
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    retentionPeriod Integer
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    snapshotCopyGrantName String
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    clusterIdentifier string
    Identifier of the source cluster.
    destinationRegion string

    AWS Region to copy snapshots to.

    The following arguments are optional:

    manualSnapshotRetentionPeriod number
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    retentionPeriod number
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    snapshotCopyGrantName string
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    cluster_identifier str
    Identifier of the source cluster.
    destination_region str

    AWS Region to copy snapshots to.

    The following arguments are optional:

    manual_snapshot_retention_period int
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    retention_period int
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    snapshot_copy_grant_name str
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    clusterIdentifier String
    Identifier of the source cluster.
    destinationRegion String

    AWS Region to copy snapshots to.

    The following arguments are optional:

    manualSnapshotRetentionPeriod Number
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    retentionPeriod Number
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    snapshotCopyGrantName String
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SnapshotCopy 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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SnapshotCopy Resource

    Get an existing SnapshotCopy 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?: SnapshotCopyState, opts?: CustomResourceOptions): SnapshotCopy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_identifier: Optional[str] = None,
            destination_region: Optional[str] = None,
            manual_snapshot_retention_period: Optional[int] = None,
            retention_period: Optional[int] = None,
            snapshot_copy_grant_name: Optional[str] = None) -> SnapshotCopy
    func GetSnapshotCopy(ctx *Context, name string, id IDInput, state *SnapshotCopyState, opts ...ResourceOption) (*SnapshotCopy, error)
    public static SnapshotCopy Get(string name, Input<string> id, SnapshotCopyState? state, CustomResourceOptions? opts = null)
    public static SnapshotCopy get(String name, Output<String> id, SnapshotCopyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    ClusterIdentifier string
    Identifier of the source cluster.
    DestinationRegion string

    AWS Region to copy snapshots to.

    The following arguments are optional:

    ManualSnapshotRetentionPeriod int
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    RetentionPeriod int
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    SnapshotCopyGrantName string
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    ClusterIdentifier string
    Identifier of the source cluster.
    DestinationRegion string

    AWS Region to copy snapshots to.

    The following arguments are optional:

    ManualSnapshotRetentionPeriod int
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    RetentionPeriod int
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    SnapshotCopyGrantName string
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    clusterIdentifier String
    Identifier of the source cluster.
    destinationRegion String

    AWS Region to copy snapshots to.

    The following arguments are optional:

    manualSnapshotRetentionPeriod Integer
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    retentionPeriod Integer
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    snapshotCopyGrantName String
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    clusterIdentifier string
    Identifier of the source cluster.
    destinationRegion string

    AWS Region to copy snapshots to.

    The following arguments are optional:

    manualSnapshotRetentionPeriod number
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    retentionPeriod number
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    snapshotCopyGrantName string
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    cluster_identifier str
    Identifier of the source cluster.
    destination_region str

    AWS Region to copy snapshots to.

    The following arguments are optional:

    manual_snapshot_retention_period int
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    retention_period int
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    snapshot_copy_grant_name str
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
    clusterIdentifier String
    Identifier of the source cluster.
    destinationRegion String

    AWS Region to copy snapshots to.

    The following arguments are optional:

    manualSnapshotRetentionPeriod Number
    Number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.
    retentionPeriod Number
    Number of days to retain automated snapshots in the destination region after they are copied from the source region.
    snapshotCopyGrantName String
    Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.

    Import

    Using pulumi import, import Redshift Snapshot Copy using the id. For example:

    $ pulumi import aws:redshift/snapshotCopy:SnapshotCopy example cluster-id-12345678
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi