aws.redshiftserverless.Snapshot
Explore with Pulumi AI
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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Snapshot resource accepts the following input properties:
- Namespace
Name string - The namespace to create a snapshot for.
- Snapshot
Name string - The name of the snapshot.
- Retention
Period int - How long to retain the created snapshot. Default value is
-1
.
- Namespace
Name string - The namespace to create a snapshot for.
- Snapshot
Name string - The name of the snapshot.
- Retention
Period int - How long to retain the created snapshot. Default value is
-1
.
- namespace
Name String - The namespace to create a snapshot for.
- snapshot
Name String - The name of the snapshot.
- retention
Period Integer - How long to retain the created snapshot. Default value is
-1
.
- namespace
Name string - The namespace to create a snapshot for.
- snapshot
Name string - The name of the snapshot.
- retention
Period 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
.
- namespace
Name String - The namespace to create a snapshot for.
- snapshot
Name String - The name of the snapshot.
- retention
Period 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:
- Accounts
With List<string>Provisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- Accounts
With List<string>Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- Admin
Username 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.
- Kms
Key stringId - The unique identifier of the KMS key used to encrypt the snapshot.
- Namespace
Arn string - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- Owner
Account string - The owner Amazon Web Services; account of the snapshot.
- Accounts
With []stringProvisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- Accounts
With []stringRestore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- Admin
Username 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.
- Kms
Key stringId - The unique identifier of the KMS key used to encrypt the snapshot.
- Namespace
Arn string - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- Owner
Account string - The owner Amazon Web Services; account of the snapshot.
- accounts
With List<String>Provisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- accounts
With List<String>Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- admin
Username 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.
- kms
Key StringId - The unique identifier of the KMS key used to encrypt the snapshot.
- namespace
Arn String - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- owner
Account String - The owner Amazon Web Services; account of the snapshot.
- accounts
With string[]Provisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- accounts
With string[]Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- admin
Username 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.
- kms
Key stringId - The unique identifier of the KMS key used to encrypt the snapshot.
- namespace
Arn string - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- owner
Account string - The owner Amazon Web Services; account of the snapshot.
- accounts_
with_ Sequence[str]provisioned_ restore_ accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- accounts_
with_ Sequence[str]restore_ accesses - 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_ strid - 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.
- accounts
With List<String>Provisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- accounts
With List<String>Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- admin
Username 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.
- kms
Key StringId - The unique identifier of the KMS key used to encrypt the snapshot.
- namespace
Arn String - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- owner
Account 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.
- Accounts
With List<string>Provisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- Accounts
With List<string>Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- Admin
Username string - The username of the database within a snapshot.
- Arn string
- The Amazon Resource Name (ARN) of the snapshot.
- Kms
Key stringId - The unique identifier of the KMS key used to encrypt the snapshot.
- Namespace
Arn string - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- Namespace
Name string - The namespace to create a snapshot for.
- Owner
Account string - 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 string - The name of the snapshot.
- Accounts
With []stringProvisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- Accounts
With []stringRestore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- Admin
Username string - The username of the database within a snapshot.
- Arn string
- The Amazon Resource Name (ARN) of the snapshot.
- Kms
Key stringId - The unique identifier of the KMS key used to encrypt the snapshot.
- Namespace
Arn string - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- Namespace
Name string - The namespace to create a snapshot for.
- Owner
Account string - 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 string - The name of the snapshot.
- accounts
With List<String>Provisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- accounts
With List<String>Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- admin
Username String - The username of the database within a snapshot.
- arn String
- The Amazon Resource Name (ARN) of the snapshot.
- kms
Key StringId - The unique identifier of the KMS key used to encrypt the snapshot.
- namespace
Arn String - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- namespace
Name String - The namespace to create a snapshot for.
- owner
Account String - The owner Amazon Web Services; account of the snapshot.
- retention
Period Integer - How long to retain the created snapshot. Default value is
-1
. - snapshot
Name String - The name of the snapshot.
- accounts
With string[]Provisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- accounts
With string[]Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- admin
Username string - The username of the database within a snapshot.
- arn string
- The Amazon Resource Name (ARN) of the snapshot.
- kms
Key stringId - The unique identifier of the KMS key used to encrypt the snapshot.
- namespace
Arn string - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- namespace
Name string - The namespace to create a snapshot for.
- owner
Account string - The owner Amazon Web Services; account of the snapshot.
- retention
Period number - How long to retain the created snapshot. Default value is
-1
. - snapshot
Name string - The name of the snapshot.
- accounts_
with_ Sequence[str]provisioned_ restore_ accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- accounts_
with_ Sequence[str]restore_ accesses - 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_ strid - 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.
- accounts
With List<String>Provisioned Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
- accounts
With List<String>Restore Accesses - All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
- admin
Username String - The username of the database within a snapshot.
- arn String
- The Amazon Resource Name (ARN) of the snapshot.
- kms
Key StringId - The unique identifier of the KMS key used to encrypt the snapshot.
- namespace
Arn String - The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
- namespace
Name String - The namespace to create a snapshot for.
- owner
Account String - The owner Amazon Web Services; account of the snapshot.
- retention
Period Number - How long to retain the created snapshot. Default value is
-1
. - snapshot
Name 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.