SnapshotScheduleAssociation

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultCluster = new Aws.RedShift.Cluster("defaultCluster", new Aws.RedShift.ClusterArgs
        {
            ClusterIdentifier = "tf-redshift-cluster",
            ClusterType = "single-node",
            DatabaseName = "mydb",
            MasterPassword = "Mustbe8characters",
            MasterUsername = "foo",
            NodeType = "dc1.large",
        });
        var defaultSnapshotSchedule = new Aws.RedShift.SnapshotSchedule("defaultSnapshotSchedule", new Aws.RedShift.SnapshotScheduleArgs
        {
            Definitions = 
            {
                "rate(12 hours)",
            },
            Identifier = "tf-redshift-snapshot-schedule",
        });
        var defaultSnapshotScheduleAssociation = new Aws.RedShift.SnapshotScheduleAssociation("defaultSnapshotScheduleAssociation", new Aws.RedShift.SnapshotScheduleAssociationArgs
        {
            ClusterIdentifier = defaultCluster.Id,
            ScheduleIdentifier = defaultSnapshotSchedule.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/redshift"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        defaultCluster, err := redshift.NewCluster(ctx, "defaultCluster", &redshift.ClusterArgs{
            ClusterIdentifier: pulumi.String("tf-redshift-cluster"),
            ClusterType:       pulumi.String("single-node"),
            DatabaseName:      pulumi.String("mydb"),
            MasterPassword:    pulumi.String("Mustbe8characters"),
            MasterUsername:    pulumi.String("foo"),
            NodeType:          pulumi.String("dc1.large"),
        })
        if err != nil {
            return err
        }
        defaultSnapshotSchedule, err := redshift.NewSnapshotSchedule(ctx, "defaultSnapshotSchedule", &redshift.SnapshotScheduleArgs{
            Definitions: pulumi.StringArray{
                pulumi.String("rate(12 hours)"),
            },
            Identifier: pulumi.String("tf-redshift-snapshot-schedule"),
        })
        if err != nil {
            return err
        }
        _, err = redshift.NewSnapshotScheduleAssociation(ctx, "defaultSnapshotScheduleAssociation", &redshift.SnapshotScheduleAssociationArgs{
            ClusterIdentifier:  defaultCluster.ID(),
            ScheduleIdentifier: defaultSnapshotSchedule.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

default_cluster = aws.redshift.Cluster("defaultCluster",
    cluster_identifier="tf-redshift-cluster",
    cluster_type="single-node",
    database_name="mydb",
    master_password="Mustbe8characters",
    master_username="foo",
    node_type="dc1.large")
default_snapshot_schedule = aws.redshift.SnapshotSchedule("defaultSnapshotSchedule",
    definitions=["rate(12 hours)"],
    identifier="tf-redshift-snapshot-schedule")
default_snapshot_schedule_association = aws.redshift.SnapshotScheduleAssociation("defaultSnapshotScheduleAssociation",
    cluster_identifier=default_cluster.id,
    schedule_identifier=default_snapshot_schedule.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const defaultCluster = new aws.redshift.Cluster("default", {
    clusterIdentifier: "tf-redshift-cluster",
    clusterType: "single-node",
    databaseName: "mydb",
    masterPassword: "Mustbe8characters",
    masterUsername: "foo",
    nodeType: "dc1.large",
});
const defaultSnapshotSchedule = new aws.redshift.SnapshotSchedule("default", {
    definitions: ["rate(12 hours)"],
    identifier: "tf-redshift-snapshot-schedule",
});
const defaultSnapshotScheduleAssociation = new aws.redshift.SnapshotScheduleAssociation("default", {
    clusterIdentifier: defaultCluster.id,
    scheduleIdentifier: defaultSnapshotSchedule.id,
});

Create a SnapshotScheduleAssociation Resource

def SnapshotScheduleAssociation(resource_name, opts=None, cluster_identifier=None, schedule_identifier=None, __props__=None);
name string
The unique name of the resource.
args SnapshotScheduleAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args SnapshotScheduleAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SnapshotScheduleAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

SnapshotScheduleAssociation Resource Properties

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

Inputs

The SnapshotScheduleAssociation resource accepts the following input properties:

ClusterIdentifier string

The cluster identifier.

ScheduleIdentifier string

The snapshot schedule identifier.

ClusterIdentifier string

The cluster identifier.

ScheduleIdentifier string

The snapshot schedule identifier.

clusterIdentifier string

The cluster identifier.

scheduleIdentifier string

The snapshot schedule identifier.

cluster_identifier str

The cluster identifier.

schedule_identifier str

The snapshot schedule identifier.

Outputs

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

Look up an Existing SnapshotScheduleAssociation Resource

Get an existing SnapshotScheduleAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, cluster_identifier=None, schedule_identifier=None, __props__=None);
func GetSnapshotScheduleAssociation(ctx *Context, name string, id IDInput, state *SnapshotScheduleAssociationState, opts ...ResourceOption) (*SnapshotScheduleAssociation, error)
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.

The following state arguments are supported:

ClusterIdentifier string

The cluster identifier.

ScheduleIdentifier string

The snapshot schedule identifier.

ClusterIdentifier string

The cluster identifier.

ScheduleIdentifier string

The snapshot schedule identifier.

clusterIdentifier string

The cluster identifier.

scheduleIdentifier string

The snapshot schedule identifier.

cluster_identifier str

The cluster identifier.

schedule_identifier str

The snapshot schedule identifier.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.