UNPKG

@pulumi/aws

Version:

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

194 lines • 12.1 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Cluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshift.Cluster("example", { * clusterIdentifier: "tf-redshift-cluster", * databaseName: "mydb", * masterUsername: "exampleuser", * masterPassword: "Mustbe8characters", * nodeType: "dc1.large", * clusterType: "single-node", * }); * ``` * * ### With Managed Credentials * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshift.Cluster("example", { * clusterIdentifier: "tf-redshift-cluster", * databaseName: "mydb", * masterUsername: "exampleuser", * nodeType: "dc1.large", * clusterType: "single-node", * manageMasterPassword: true, * }); * ``` * * ## Import * * Using `pulumi import`, import Redshift Clusters using the `cluster_identifier`. For example: * * ```sh * $ pulumi import aws:redshift/cluster:Cluster myprodcluster tf-redshift-cluster-12345 * ``` */ class Cluster extends pulumi.CustomResource { /** * Get an existing Cluster 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 Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Cluster(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Cluster. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Cluster.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowVersionUpgrade"] = state ? state.allowVersionUpgrade : undefined; resourceInputs["applyImmediately"] = state ? state.applyImmediately : undefined; resourceInputs["aquaConfigurationStatus"] = state ? state.aquaConfigurationStatus : undefined; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["automatedSnapshotRetentionPeriod"] = state ? state.automatedSnapshotRetentionPeriod : undefined; resourceInputs["availabilityZone"] = state ? state.availabilityZone : undefined; resourceInputs["availabilityZoneRelocationEnabled"] = state ? state.availabilityZoneRelocationEnabled : undefined; resourceInputs["clusterIdentifier"] = state ? state.clusterIdentifier : undefined; resourceInputs["clusterNamespaceArn"] = state ? state.clusterNamespaceArn : undefined; resourceInputs["clusterNodes"] = state ? state.clusterNodes : undefined; resourceInputs["clusterParameterGroupName"] = state ? state.clusterParameterGroupName : undefined; resourceInputs["clusterPublicKey"] = state ? state.clusterPublicKey : undefined; resourceInputs["clusterRevisionNumber"] = state ? state.clusterRevisionNumber : undefined; resourceInputs["clusterSubnetGroupName"] = state ? state.clusterSubnetGroupName : undefined; resourceInputs["clusterType"] = state ? state.clusterType : undefined; resourceInputs["clusterVersion"] = state ? state.clusterVersion : undefined; resourceInputs["databaseName"] = state ? state.databaseName : undefined; resourceInputs["defaultIamRoleArn"] = state ? state.defaultIamRoleArn : undefined; resourceInputs["dnsName"] = state ? state.dnsName : undefined; resourceInputs["elasticIp"] = state ? state.elasticIp : undefined; resourceInputs["encrypted"] = state ? state.encrypted : undefined; resourceInputs["endpoint"] = state ? state.endpoint : undefined; resourceInputs["enhancedVpcRouting"] = state ? state.enhancedVpcRouting : undefined; resourceInputs["finalSnapshotIdentifier"] = state ? state.finalSnapshotIdentifier : undefined; resourceInputs["iamRoles"] = state ? state.iamRoles : undefined; resourceInputs["kmsKeyId"] = state ? state.kmsKeyId : undefined; resourceInputs["maintenanceTrackName"] = state ? state.maintenanceTrackName : undefined; resourceInputs["manageMasterPassword"] = state ? state.manageMasterPassword : undefined; resourceInputs["manualSnapshotRetentionPeriod"] = state ? state.manualSnapshotRetentionPeriod : undefined; resourceInputs["masterPassword"] = state ? state.masterPassword : undefined; resourceInputs["masterPasswordSecretArn"] = state ? state.masterPasswordSecretArn : undefined; resourceInputs["masterPasswordSecretKmsKeyId"] = state ? state.masterPasswordSecretKmsKeyId : undefined; resourceInputs["masterUsername"] = state ? state.masterUsername : undefined; resourceInputs["multiAz"] = state ? state.multiAz : undefined; resourceInputs["nodeType"] = state ? state.nodeType : undefined; resourceInputs["numberOfNodes"] = state ? state.numberOfNodes : undefined; resourceInputs["ownerAccount"] = state ? state.ownerAccount : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["preferredMaintenanceWindow"] = state ? state.preferredMaintenanceWindow : undefined; resourceInputs["publiclyAccessible"] = state ? state.publiclyAccessible : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["skipFinalSnapshot"] = state ? state.skipFinalSnapshot : undefined; resourceInputs["snapshotArn"] = state ? state.snapshotArn : undefined; resourceInputs["snapshotClusterIdentifier"] = state ? state.snapshotClusterIdentifier : undefined; resourceInputs["snapshotIdentifier"] = state ? state.snapshotIdentifier : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["vpcSecurityGroupIds"] = state ? state.vpcSecurityGroupIds : undefined; } else { const args = argsOrState; if ((!args || args.clusterIdentifier === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterIdentifier'"); } if ((!args || args.nodeType === undefined) && !opts.urn) { throw new Error("Missing required property 'nodeType'"); } resourceInputs["allowVersionUpgrade"] = args ? args.allowVersionUpgrade : undefined; resourceInputs["applyImmediately"] = args ? args.applyImmediately : undefined; resourceInputs["aquaConfigurationStatus"] = args ? args.aquaConfigurationStatus : undefined; resourceInputs["automatedSnapshotRetentionPeriod"] = args ? args.automatedSnapshotRetentionPeriod : undefined; resourceInputs["availabilityZone"] = args ? args.availabilityZone : undefined; resourceInputs["availabilityZoneRelocationEnabled"] = args ? args.availabilityZoneRelocationEnabled : undefined; resourceInputs["clusterIdentifier"] = args ? args.clusterIdentifier : undefined; resourceInputs["clusterParameterGroupName"] = args ? args.clusterParameterGroupName : undefined; resourceInputs["clusterSubnetGroupName"] = args ? args.clusterSubnetGroupName : undefined; resourceInputs["clusterType"] = args ? args.clusterType : undefined; resourceInputs["clusterVersion"] = args ? args.clusterVersion : undefined; resourceInputs["databaseName"] = args ? args.databaseName : undefined; resourceInputs["defaultIamRoleArn"] = args ? args.defaultIamRoleArn : undefined; resourceInputs["elasticIp"] = args ? args.elasticIp : undefined; resourceInputs["encrypted"] = args ? args.encrypted : undefined; resourceInputs["enhancedVpcRouting"] = args ? args.enhancedVpcRouting : undefined; resourceInputs["finalSnapshotIdentifier"] = args ? args.finalSnapshotIdentifier : undefined; resourceInputs["iamRoles"] = args ? args.iamRoles : undefined; resourceInputs["kmsKeyId"] = args ? args.kmsKeyId : undefined; resourceInputs["maintenanceTrackName"] = args ? args.maintenanceTrackName : undefined; resourceInputs["manageMasterPassword"] = args ? args.manageMasterPassword : undefined; resourceInputs["manualSnapshotRetentionPeriod"] = args ? args.manualSnapshotRetentionPeriod : undefined; resourceInputs["masterPassword"] = (args === null || args === void 0 ? void 0 : args.masterPassword) ? pulumi.secret(args.masterPassword) : undefined; resourceInputs["masterPasswordSecretKmsKeyId"] = args ? args.masterPasswordSecretKmsKeyId : undefined; resourceInputs["masterUsername"] = args ? args.masterUsername : undefined; resourceInputs["multiAz"] = args ? args.multiAz : undefined; resourceInputs["nodeType"] = args ? args.nodeType : undefined; resourceInputs["numberOfNodes"] = args ? args.numberOfNodes : undefined; resourceInputs["ownerAccount"] = args ? args.ownerAccount : undefined; resourceInputs["port"] = args ? args.port : undefined; resourceInputs["preferredMaintenanceWindow"] = args ? args.preferredMaintenanceWindow : undefined; resourceInputs["publiclyAccessible"] = args ? args.publiclyAccessible : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["skipFinalSnapshot"] = args ? args.skipFinalSnapshot : undefined; resourceInputs["snapshotArn"] = args ? args.snapshotArn : undefined; resourceInputs["snapshotClusterIdentifier"] = args ? args.snapshotClusterIdentifier : undefined; resourceInputs["snapshotIdentifier"] = args ? args.snapshotIdentifier : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["vpcSecurityGroupIds"] = args ? args.vpcSecurityGroupIds : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["clusterNamespaceArn"] = undefined /*out*/; resourceInputs["clusterNodes"] = undefined /*out*/; resourceInputs["clusterPublicKey"] = undefined /*out*/; resourceInputs["clusterRevisionNumber"] = undefined /*out*/; resourceInputs["dnsName"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["masterPasswordSecretArn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["masterPassword"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Cluster.__pulumiType, name, resourceInputs, opts); } } exports.Cluster = Cluster; /** @internal */ Cluster.__pulumiType = 'aws:redshift/cluster:Cluster'; //# sourceMappingURL=cluster.js.map