@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
178 lines • 11 kB
JavaScript
;
// *** 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");
/**
* An example resource schema demonstrating some basic constructs and validation rules.
*/
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 opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, opts) {
return new Cluster(name, undefined, { ...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;
}
/**
* Create a Cluster resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if (args?.clusterType === undefined && !opts.urn) {
throw new Error("Missing required property 'clusterType'");
}
if (args?.dbName === undefined && !opts.urn) {
throw new Error("Missing required property 'dbName'");
}
if (args?.masterUsername === undefined && !opts.urn) {
throw new Error("Missing required property 'masterUsername'");
}
if (args?.nodeType === undefined && !opts.urn) {
throw new Error("Missing required property 'nodeType'");
}
resourceInputs["allowVersionUpgrade"] = args?.allowVersionUpgrade;
resourceInputs["aquaConfigurationStatus"] = args?.aquaConfigurationStatus;
resourceInputs["automatedSnapshotRetentionPeriod"] = args?.automatedSnapshotRetentionPeriod;
resourceInputs["availabilityZone"] = args?.availabilityZone;
resourceInputs["availabilityZoneRelocation"] = args?.availabilityZoneRelocation;
resourceInputs["availabilityZoneRelocationStatus"] = args?.availabilityZoneRelocationStatus;
resourceInputs["classic"] = args?.classic;
resourceInputs["clusterIdentifier"] = args?.clusterIdentifier;
resourceInputs["clusterParameterGroupName"] = args?.clusterParameterGroupName;
resourceInputs["clusterSecurityGroups"] = args?.clusterSecurityGroups;
resourceInputs["clusterSubnetGroupName"] = args?.clusterSubnetGroupName;
resourceInputs["clusterType"] = args?.clusterType;
resourceInputs["clusterVersion"] = args?.clusterVersion;
resourceInputs["dbName"] = args?.dbName;
resourceInputs["deferMaintenance"] = args?.deferMaintenance;
resourceInputs["deferMaintenanceDuration"] = args?.deferMaintenanceDuration;
resourceInputs["deferMaintenanceEndTime"] = args?.deferMaintenanceEndTime;
resourceInputs["deferMaintenanceStartTime"] = args?.deferMaintenanceStartTime;
resourceInputs["destinationRegion"] = args?.destinationRegion;
resourceInputs["elasticIp"] = args?.elasticIp;
resourceInputs["encrypted"] = args?.encrypted;
resourceInputs["endpoint"] = args?.endpoint;
resourceInputs["enhancedVpcRouting"] = args?.enhancedVpcRouting;
resourceInputs["hsmClientCertificateIdentifier"] = args?.hsmClientCertificateIdentifier;
resourceInputs["hsmConfigurationIdentifier"] = args?.hsmConfigurationIdentifier;
resourceInputs["iamRoles"] = args?.iamRoles;
resourceInputs["kmsKeyId"] = args?.kmsKeyId;
resourceInputs["loggingProperties"] = args?.loggingProperties;
resourceInputs["maintenanceTrackName"] = args?.maintenanceTrackName;
resourceInputs["manageMasterPassword"] = args?.manageMasterPassword;
resourceInputs["manualSnapshotRetentionPeriod"] = args?.manualSnapshotRetentionPeriod;
resourceInputs["masterPasswordSecretKmsKeyId"] = args?.masterPasswordSecretKmsKeyId;
resourceInputs["masterUserPassword"] = args?.masterUserPassword;
resourceInputs["masterUsername"] = args?.masterUsername;
resourceInputs["multiAz"] = args?.multiAz;
resourceInputs["namespaceResourcePolicy"] = args?.namespaceResourcePolicy;
resourceInputs["nodeType"] = args?.nodeType;
resourceInputs["numberOfNodes"] = args?.numberOfNodes;
resourceInputs["ownerAccount"] = args?.ownerAccount;
resourceInputs["port"] = args?.port;
resourceInputs["preferredMaintenanceWindow"] = args?.preferredMaintenanceWindow;
resourceInputs["publiclyAccessible"] = args?.publiclyAccessible;
resourceInputs["resourceAction"] = args?.resourceAction;
resourceInputs["revisionTarget"] = args?.revisionTarget;
resourceInputs["rotateEncryptionKey"] = args?.rotateEncryptionKey;
resourceInputs["snapshotClusterIdentifier"] = args?.snapshotClusterIdentifier;
resourceInputs["snapshotCopyGrantName"] = args?.snapshotCopyGrantName;
resourceInputs["snapshotCopyManual"] = args?.snapshotCopyManual;
resourceInputs["snapshotCopyRetentionPeriod"] = args?.snapshotCopyRetentionPeriod;
resourceInputs["snapshotIdentifier"] = args?.snapshotIdentifier;
resourceInputs["tags"] = args?.tags;
resourceInputs["vpcSecurityGroupIds"] = args?.vpcSecurityGroupIds;
resourceInputs["clusterNamespaceArn"] = undefined /*out*/;
resourceInputs["deferMaintenanceIdentifier"] = undefined /*out*/;
resourceInputs["masterPasswordSecretArn"] = undefined /*out*/;
}
else {
resourceInputs["allowVersionUpgrade"] = undefined /*out*/;
resourceInputs["aquaConfigurationStatus"] = undefined /*out*/;
resourceInputs["automatedSnapshotRetentionPeriod"] = undefined /*out*/;
resourceInputs["availabilityZone"] = undefined /*out*/;
resourceInputs["availabilityZoneRelocation"] = undefined /*out*/;
resourceInputs["availabilityZoneRelocationStatus"] = undefined /*out*/;
resourceInputs["classic"] = undefined /*out*/;
resourceInputs["clusterIdentifier"] = undefined /*out*/;
resourceInputs["clusterNamespaceArn"] = undefined /*out*/;
resourceInputs["clusterParameterGroupName"] = undefined /*out*/;
resourceInputs["clusterSecurityGroups"] = undefined /*out*/;
resourceInputs["clusterSubnetGroupName"] = undefined /*out*/;
resourceInputs["clusterType"] = undefined /*out*/;
resourceInputs["clusterVersion"] = undefined /*out*/;
resourceInputs["dbName"] = undefined /*out*/;
resourceInputs["deferMaintenance"] = undefined /*out*/;
resourceInputs["deferMaintenanceDuration"] = undefined /*out*/;
resourceInputs["deferMaintenanceEndTime"] = undefined /*out*/;
resourceInputs["deferMaintenanceIdentifier"] = undefined /*out*/;
resourceInputs["deferMaintenanceStartTime"] = undefined /*out*/;
resourceInputs["destinationRegion"] = undefined /*out*/;
resourceInputs["elasticIp"] = undefined /*out*/;
resourceInputs["encrypted"] = undefined /*out*/;
resourceInputs["endpoint"] = undefined /*out*/;
resourceInputs["enhancedVpcRouting"] = undefined /*out*/;
resourceInputs["hsmClientCertificateIdentifier"] = undefined /*out*/;
resourceInputs["hsmConfigurationIdentifier"] = undefined /*out*/;
resourceInputs["iamRoles"] = undefined /*out*/;
resourceInputs["kmsKeyId"] = undefined /*out*/;
resourceInputs["loggingProperties"] = undefined /*out*/;
resourceInputs["maintenanceTrackName"] = undefined /*out*/;
resourceInputs["manageMasterPassword"] = undefined /*out*/;
resourceInputs["manualSnapshotRetentionPeriod"] = undefined /*out*/;
resourceInputs["masterPasswordSecretArn"] = undefined /*out*/;
resourceInputs["masterPasswordSecretKmsKeyId"] = undefined /*out*/;
resourceInputs["masterUserPassword"] = undefined /*out*/;
resourceInputs["masterUsername"] = undefined /*out*/;
resourceInputs["multiAz"] = undefined /*out*/;
resourceInputs["namespaceResourcePolicy"] = undefined /*out*/;
resourceInputs["nodeType"] = undefined /*out*/;
resourceInputs["numberOfNodes"] = undefined /*out*/;
resourceInputs["ownerAccount"] = undefined /*out*/;
resourceInputs["port"] = undefined /*out*/;
resourceInputs["preferredMaintenanceWindow"] = undefined /*out*/;
resourceInputs["publiclyAccessible"] = undefined /*out*/;
resourceInputs["resourceAction"] = undefined /*out*/;
resourceInputs["revisionTarget"] = undefined /*out*/;
resourceInputs["rotateEncryptionKey"] = undefined /*out*/;
resourceInputs["snapshotClusterIdentifier"] = undefined /*out*/;
resourceInputs["snapshotCopyGrantName"] = undefined /*out*/;
resourceInputs["snapshotCopyManual"] = undefined /*out*/;
resourceInputs["snapshotCopyRetentionPeriod"] = undefined /*out*/;
resourceInputs["snapshotIdentifier"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
resourceInputs["vpcSecurityGroupIds"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["clusterIdentifier", "clusterSubnetGroupName", "dbName", "masterUsername", "ownerAccount", "snapshotClusterIdentifier", "snapshotIdentifier"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(Cluster.__pulumiType, name, resourceInputs, opts);
}
}
exports.Cluster = Cluster;
/** @internal */
Cluster.__pulumiType = 'aws-native:redshift:Cluster';
//# sourceMappingURL=cluster.js.map