aws.redshift.SnapshotCopy
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SnapshotCopy resource accepts the following input properties:
- Cluster
Identifier string - Identifier of the source cluster.
- Destination
Region string AWS Region to copy snapshots to.
The following arguments are optional:
- Manual
Snapshot intRetention Period - 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 stringGrant Name - Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
- Cluster
Identifier string - Identifier of the source cluster.
- Destination
Region string AWS Region to copy snapshots to.
The following arguments are optional:
- Manual
Snapshot intRetention Period - 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 stringGrant Name - Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
- cluster
Identifier String - Identifier of the source cluster.
- destination
Region String AWS Region to copy snapshots to.
The following arguments are optional:
- manual
Snapshot IntegerRetention Period - 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 Integer - Number of days to retain automated snapshots in the destination region after they are copied from the source region.
- snapshot
Copy StringGrant Name - Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
- cluster
Identifier string - Identifier of the source cluster.
- destination
Region string AWS Region to copy snapshots to.
The following arguments are optional:
- manual
Snapshot numberRetention Period - 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 number - Number of days to retain automated snapshots in the destination region after they are copied from the source region.
- snapshot
Copy stringGrant Name - 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_ intretention_ period - 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_ strgrant_ name - Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
- cluster
Identifier String - Identifier of the source cluster.
- destination
Region String AWS Region to copy snapshots to.
The following arguments are optional:
- manual
Snapshot NumberRetention Period - 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 Number - Number of days to retain automated snapshots in the destination region after they are copied from the source region.
- snapshot
Copy StringGrant Name - 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.
- Cluster
Identifier string - Identifier of the source cluster.
- Destination
Region string AWS Region to copy snapshots to.
The following arguments are optional:
- Manual
Snapshot intRetention Period - 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 stringGrant Name - Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
- Cluster
Identifier string - Identifier of the source cluster.
- Destination
Region string AWS Region to copy snapshots to.
The following arguments are optional:
- Manual
Snapshot intRetention Period - 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 stringGrant Name - Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
- cluster
Identifier String - Identifier of the source cluster.
- destination
Region String AWS Region to copy snapshots to.
The following arguments are optional:
- manual
Snapshot IntegerRetention Period - 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 Integer - Number of days to retain automated snapshots in the destination region after they are copied from the source region.
- snapshot
Copy StringGrant Name - Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
- cluster
Identifier string - Identifier of the source cluster.
- destination
Region string AWS Region to copy snapshots to.
The following arguments are optional:
- manual
Snapshot numberRetention Period - 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 number - Number of days to retain automated snapshots in the destination region after they are copied from the source region.
- snapshot
Copy stringGrant Name - 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_ intretention_ period - 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_ strgrant_ name - Name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
- cluster
Identifier String - Identifier of the source cluster.
- destination
Region String AWS Region to copy snapshots to.
The following arguments are optional:
- manual
Snapshot NumberRetention Period - 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 Number - Number of days to retain automated snapshots in the destination region after they are copied from the source region.
- snapshot
Copy StringGrant Name - 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.