SnapshotArgs

data class SnapshotArgs(val namespaceName: Output<String>? = null, val retentionPeriod: Output<Int>? = null, val snapshotName: Output<String>? = null) : ConvertibleToJava<SnapshotArgs>

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")
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 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
})
}
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

Import

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

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

Constructors

Link copied to clipboard
constructor(namespaceName: Output<String>? = null, retentionPeriod: Output<Int>? = null, snapshotName: Output<String>? = null)

Properties

Link copied to clipboard
val namespaceName: Output<String>? = null

The namespace to create a snapshot for.

Link copied to clipboard
val retentionPeriod: Output<Int>? = null

How long to retain the created snapshot. Default value is -1.

Link copied to clipboard
val snapshotName: Output<String>? = null

The name of the snapshot.

Functions

Link copied to clipboard
open override fun toJava(): SnapshotArgs