All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.redshift.SnapshotScheduleAssociation Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.redshift;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.redshift.SnapshotScheduleAssociationArgs;
import com.pulumi.aws.redshift.inputs.SnapshotScheduleAssociationState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.redshift.Cluster;
 * import com.pulumi.aws.redshift.ClusterArgs;
 * import com.pulumi.aws.redshift.SnapshotSchedule;
 * import com.pulumi.aws.redshift.SnapshotScheduleArgs;
 * import com.pulumi.aws.redshift.SnapshotScheduleAssociation;
 * import com.pulumi.aws.redshift.SnapshotScheduleAssociationArgs;
 * 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 default_ = new Cluster("default", ClusterArgs.builder()
 *             .clusterIdentifier("tf-redshift-cluster")
 *             .databaseName("mydb")
 *             .masterUsername("foo")
 *             .masterPassword("Mustbe8characters")
 *             .nodeType("dc1.large")
 *             .clusterType("single-node")
 *             .build());
 * 
 *         var defaultSnapshotSchedule = new SnapshotSchedule("defaultSnapshotSchedule", SnapshotScheduleArgs.builder()
 *             .identifier("tf-redshift-snapshot-schedule")
 *             .definitions("rate(12 hours)")
 *             .build());
 * 
 *         var defaultSnapshotScheduleAssociation = new SnapshotScheduleAssociation("defaultSnapshotScheduleAssociation", SnapshotScheduleAssociationArgs.builder()
 *             .clusterIdentifier(default_.id())
 *             .scheduleIdentifier(defaultSnapshotSchedule.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import Redshift Snapshot Schedule Association using the `<cluster-identifier>/<schedule-identifier>`. For example: * * ```sh * $ pulumi import aws:redshift/snapshotScheduleAssociation:SnapshotScheduleAssociation default tf-redshift-cluster/tf-redshift-snapshot-schedule * ``` * */ @ResourceType(type="aws:redshift/snapshotScheduleAssociation:SnapshotScheduleAssociation") public class SnapshotScheduleAssociation extends com.pulumi.resources.CustomResource { /** * The cluster identifier. * */ @Export(name="clusterIdentifier", refs={String.class}, tree="[0]") private Output clusterIdentifier; /** * @return The cluster identifier. * */ public Output clusterIdentifier() { return this.clusterIdentifier; } /** * The snapshot schedule identifier. * */ @Export(name="scheduleIdentifier", refs={String.class}, tree="[0]") private Output scheduleIdentifier; /** * @return The snapshot schedule identifier. * */ public Output scheduleIdentifier() { return this.scheduleIdentifier; } /** * * @param name The _unique_ name of the resulting resource. */ public SnapshotScheduleAssociation(java.lang.String name) { this(name, SnapshotScheduleAssociationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public SnapshotScheduleAssociation(java.lang.String name, SnapshotScheduleAssociationArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public SnapshotScheduleAssociation(java.lang.String name, SnapshotScheduleAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:redshift/snapshotScheduleAssociation:SnapshotScheduleAssociation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private SnapshotScheduleAssociation(java.lang.String name, Output id, @Nullable SnapshotScheduleAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:redshift/snapshotScheduleAssociation:SnapshotScheduleAssociation", name, state, makeResourceOptions(options, id), false); } private static SnapshotScheduleAssociationArgs makeArgs(SnapshotScheduleAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? SnapshotScheduleAssociationArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static SnapshotScheduleAssociation get(java.lang.String name, Output id, @Nullable SnapshotScheduleAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new SnapshotScheduleAssociation(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy