1. Packages
  2. AWS Classic
  3. API Docs
  4. redshiftserverless
  5. Snapshot

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.redshiftserverless.Snapshot

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Creates a new Amazon Redshift Serverless Snapshot.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.redshiftserverless.Snapshot("example", {
        namespaceName: exampleAwsRedshiftserverlessWorkgroup.namespaceName,
        snapshotName: "example",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.redshiftserverless.Snapshot("example",
        namespace_name=example_aws_redshiftserverless_workgroup["namespaceName"],
        snapshot_name="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshiftserverless"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redshiftserverless.NewSnapshot(ctx, "example", &redshiftserverless.SnapshotArgs{
    			NamespaceName: pulumi.Any(exampleAwsRedshiftserverlessWorkgroup.NamespaceName),
    			SnapshotName:  pulumi.String("example"),
    		})
    		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.RedshiftServerless.Snapshot("example", new()
        {
            NamespaceName = exampleAwsRedshiftserverlessWorkgroup.NamespaceName,
            SnapshotName = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshiftserverless.Snapshot;
    import com.pulumi.aws.redshiftserverless.SnapshotArgs;
    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 Snapshot("example", SnapshotArgs.builder()        
                .namespaceName(exampleAwsRedshiftserverlessWorkgroup.namespaceName())
                .snapshotName("example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:redshiftserverless:Snapshot
        properties:
          namespaceName: ${exampleAwsRedshiftserverlessWorkgroup.namespaceName}
          snapshotName: example
    

    Create Snapshot Resource

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

    Constructor syntax

    new Snapshot(name: string, args: SnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def Snapshot(resource_name: str,
                 args: SnapshotArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Snapshot(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 namespace_name: Optional[str] = None,
                 snapshot_name: Optional[str] = None,
                 retention_period: Optional[int] = None)
    func NewSnapshot(ctx *Context, name string, args SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)
    public Snapshot(string name, SnapshotArgs args, CustomResourceOptions? opts = null)
    public Snapshot(String name, SnapshotArgs args)
    public Snapshot(String name, SnapshotArgs args, CustomResourceOptions options)
    
    type: aws:redshiftserverless:Snapshot
    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 SnapshotArgs
    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 SnapshotArgs
    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 SnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var examplesnapshotResourceResourceFromRedshiftserverlesssnapshot = new Aws.RedshiftServerless.Snapshot("examplesnapshotResourceResourceFromRedshiftserverlesssnapshot", new()
    {
        NamespaceName = "string",
        SnapshotName = "string",
        RetentionPeriod = 0,
    });
    
    example, err := redshiftserverless.NewSnapshot(ctx, "examplesnapshotResourceResourceFromRedshiftserverlesssnapshot", &redshiftserverless.SnapshotArgs{
    	NamespaceName:   pulumi.String("string"),
    	SnapshotName:    pulumi.String("string"),
    	RetentionPeriod: pulumi.Int(0),
    })
    
    var examplesnapshotResourceResourceFromRedshiftserverlesssnapshot = new Snapshot("examplesnapshotResourceResourceFromRedshiftserverlesssnapshot", SnapshotArgs.builder()        
        .namespaceName("string")
        .snapshotName("string")
        .retentionPeriod(0)
        .build());
    
    examplesnapshot_resource_resource_from_redshiftserverlesssnapshot = aws.redshiftserverless.Snapshot("examplesnapshotResourceResourceFromRedshiftserverlesssnapshot",
        namespace_name="string",
        snapshot_name="string",
        retention_period=0)
    
    const examplesnapshotResourceResourceFromRedshiftserverlesssnapshot = new aws.redshiftserverless.Snapshot("examplesnapshotResourceResourceFromRedshiftserverlesssnapshot", {
        namespaceName: "string",
        snapshotName: "string",
        retentionPeriod: 0,
    });
    
    type: aws:redshiftserverless:Snapshot
    properties:
        namespaceName: string
        retentionPeriod: 0
        snapshotName: string
    

    Snapshot 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 Snapshot resource accepts the following input properties:

    NamespaceName string
    The namespace to create a snapshot for.
    SnapshotName string
    The name of the snapshot.
    RetentionPeriod int
    How long to retain the created snapshot. Default value is -1.
    NamespaceName string
    The namespace to create a snapshot for.
    SnapshotName string
    The name of the snapshot.
    RetentionPeriod int
    How long to retain the created snapshot. Default value is -1.
    namespaceName String
    The namespace to create a snapshot for.
    snapshotName String
    The name of the snapshot.
    retentionPeriod Integer
    How long to retain the created snapshot. Default value is -1.
    namespaceName string
    The namespace to create a snapshot for.
    snapshotName string
    The name of the snapshot.
    retentionPeriod number
    How long to retain the created snapshot. Default value is -1.
    namespace_name str
    The namespace to create a snapshot for.
    snapshot_name str
    The name of the snapshot.
    retention_period int
    How long to retain the created snapshot. Default value is -1.
    namespaceName String
    The namespace to create a snapshot for.
    snapshotName String
    The name of the snapshot.
    retentionPeriod Number
    How long to retain the created snapshot. Default value is -1.

    Outputs

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

    AccountsWithProvisionedRestoreAccesses List<string>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    AccountsWithRestoreAccesses List<string>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    AdminUsername string
    The username of the database within a snapshot.
    Arn string
    The Amazon Resource Name (ARN) of the snapshot.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyId string
    The unique identifier of the KMS key used to encrypt the snapshot.
    NamespaceArn string
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    OwnerAccount string
    The owner Amazon Web Services; account of the snapshot.
    AccountsWithProvisionedRestoreAccesses []string
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    AccountsWithRestoreAccesses []string
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    AdminUsername string
    The username of the database within a snapshot.
    Arn string
    The Amazon Resource Name (ARN) of the snapshot.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyId string
    The unique identifier of the KMS key used to encrypt the snapshot.
    NamespaceArn string
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    OwnerAccount string
    The owner Amazon Web Services; account of the snapshot.
    accountsWithProvisionedRestoreAccesses List<String>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    accountsWithRestoreAccesses List<String>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    adminUsername String
    The username of the database within a snapshot.
    arn String
    The Amazon Resource Name (ARN) of the snapshot.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyId String
    The unique identifier of the KMS key used to encrypt the snapshot.
    namespaceArn String
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    ownerAccount String
    The owner Amazon Web Services; account of the snapshot.
    accountsWithProvisionedRestoreAccesses string[]
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    accountsWithRestoreAccesses string[]
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    adminUsername string
    The username of the database within a snapshot.
    arn string
    The Amazon Resource Name (ARN) of the snapshot.
    id string
    The provider-assigned unique ID for this managed resource.
    kmsKeyId string
    The unique identifier of the KMS key used to encrypt the snapshot.
    namespaceArn string
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    ownerAccount string
    The owner Amazon Web Services; account of the snapshot.
    accounts_with_provisioned_restore_accesses Sequence[str]
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    accounts_with_restore_accesses Sequence[str]
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    admin_username str
    The username of the database within a snapshot.
    arn str
    The Amazon Resource Name (ARN) of the snapshot.
    id str
    The provider-assigned unique ID for this managed resource.
    kms_key_id str
    The unique identifier of the KMS key used to encrypt the snapshot.
    namespace_arn str
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    owner_account str
    The owner Amazon Web Services; account of the snapshot.
    accountsWithProvisionedRestoreAccesses List<String>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    accountsWithRestoreAccesses List<String>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    adminUsername String
    The username of the database within a snapshot.
    arn String
    The Amazon Resource Name (ARN) of the snapshot.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyId String
    The unique identifier of the KMS key used to encrypt the snapshot.
    namespaceArn String
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    ownerAccount String
    The owner Amazon Web Services; account of the snapshot.

    Look up Existing Snapshot Resource

    Get an existing Snapshot 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?: SnapshotState, opts?: CustomResourceOptions): Snapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accounts_with_provisioned_restore_accesses: Optional[Sequence[str]] = None,
            accounts_with_restore_accesses: Optional[Sequence[str]] = None,
            admin_username: Optional[str] = None,
            arn: Optional[str] = None,
            kms_key_id: Optional[str] = None,
            namespace_arn: Optional[str] = None,
            namespace_name: Optional[str] = None,
            owner_account: Optional[str] = None,
            retention_period: Optional[int] = None,
            snapshot_name: Optional[str] = None) -> Snapshot
    func GetSnapshot(ctx *Context, name string, id IDInput, state *SnapshotState, opts ...ResourceOption) (*Snapshot, error)
    public static Snapshot Get(string name, Input<string> id, SnapshotState? state, CustomResourceOptions? opts = null)
    public static Snapshot get(String name, Output<String> id, SnapshotState 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:
    AccountsWithProvisionedRestoreAccesses List<string>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    AccountsWithRestoreAccesses List<string>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    AdminUsername string
    The username of the database within a snapshot.
    Arn string
    The Amazon Resource Name (ARN) of the snapshot.
    KmsKeyId string
    The unique identifier of the KMS key used to encrypt the snapshot.
    NamespaceArn string
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    NamespaceName string
    The namespace to create a snapshot for.
    OwnerAccount string
    The owner Amazon Web Services; account of the snapshot.
    RetentionPeriod int
    How long to retain the created snapshot. Default value is -1.
    SnapshotName string
    The name of the snapshot.
    AccountsWithProvisionedRestoreAccesses []string
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    AccountsWithRestoreAccesses []string
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    AdminUsername string
    The username of the database within a snapshot.
    Arn string
    The Amazon Resource Name (ARN) of the snapshot.
    KmsKeyId string
    The unique identifier of the KMS key used to encrypt the snapshot.
    NamespaceArn string
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    NamespaceName string
    The namespace to create a snapshot for.
    OwnerAccount string
    The owner Amazon Web Services; account of the snapshot.
    RetentionPeriod int
    How long to retain the created snapshot. Default value is -1.
    SnapshotName string
    The name of the snapshot.
    accountsWithProvisionedRestoreAccesses List<String>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    accountsWithRestoreAccesses List<String>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    adminUsername String
    The username of the database within a snapshot.
    arn String
    The Amazon Resource Name (ARN) of the snapshot.
    kmsKeyId String
    The unique identifier of the KMS key used to encrypt the snapshot.
    namespaceArn String
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    namespaceName String
    The namespace to create a snapshot for.
    ownerAccount String
    The owner Amazon Web Services; account of the snapshot.
    retentionPeriod Integer
    How long to retain the created snapshot. Default value is -1.
    snapshotName String
    The name of the snapshot.
    accountsWithProvisionedRestoreAccesses string[]
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    accountsWithRestoreAccesses string[]
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    adminUsername string
    The username of the database within a snapshot.
    arn string
    The Amazon Resource Name (ARN) of the snapshot.
    kmsKeyId string
    The unique identifier of the KMS key used to encrypt the snapshot.
    namespaceArn string
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    namespaceName string
    The namespace to create a snapshot for.
    ownerAccount string
    The owner Amazon Web Services; account of the snapshot.
    retentionPeriod number
    How long to retain the created snapshot. Default value is -1.
    snapshotName string
    The name of the snapshot.
    accounts_with_provisioned_restore_accesses Sequence[str]
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    accounts_with_restore_accesses Sequence[str]
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    admin_username str
    The username of the database within a snapshot.
    arn str
    The Amazon Resource Name (ARN) of the snapshot.
    kms_key_id str
    The unique identifier of the KMS key used to encrypt the snapshot.
    namespace_arn str
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    namespace_name str
    The namespace to create a snapshot for.
    owner_account str
    The owner Amazon Web Services; account of the snapshot.
    retention_period int
    How long to retain the created snapshot. Default value is -1.
    snapshot_name str
    The name of the snapshot.
    accountsWithProvisionedRestoreAccesses List<String>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
    accountsWithRestoreAccesses List<String>
    All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
    adminUsername String
    The username of the database within a snapshot.
    arn String
    The Amazon Resource Name (ARN) of the snapshot.
    kmsKeyId String
    The unique identifier of the KMS key used to encrypt the snapshot.
    namespaceArn String
    The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
    namespaceName String
    The namespace to create a snapshot for.
    ownerAccount String
    The owner Amazon Web Services; account of the snapshot.
    retentionPeriod Number
    How long to retain the created snapshot. Default value is -1.
    snapshotName String
    The name of the snapshot.

    Import

    Using pulumi import, import Redshift Serverless Snapshots using the snapshot_name. For example:

    $ pulumi import aws:redshiftserverless/snapshot:Snapshot example example
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi