@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
126 lines • 6.59 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");
/**
* Provides a DAX Cluster resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const bar = new aws.dax.Cluster("bar", {
* clusterName: "cluster-example",
* iamRoleArn: example.arn,
* nodeType: "dax.r4.large",
* replicationFactor: 1,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import DAX Clusters using the `cluster_name`. For example:
*
* ```sh
* $ pulumi import aws:dax/cluster:Cluster my_cluster my_cluster
* ```
*/
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["arn"] = state ? state.arn : undefined;
resourceInputs["availabilityZones"] = state ? state.availabilityZones : undefined;
resourceInputs["clusterAddress"] = state ? state.clusterAddress : undefined;
resourceInputs["clusterEndpointEncryptionType"] = state ? state.clusterEndpointEncryptionType : undefined;
resourceInputs["clusterName"] = state ? state.clusterName : undefined;
resourceInputs["configurationEndpoint"] = state ? state.configurationEndpoint : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["iamRoleArn"] = state ? state.iamRoleArn : undefined;
resourceInputs["maintenanceWindow"] = state ? state.maintenanceWindow : undefined;
resourceInputs["nodeType"] = state ? state.nodeType : undefined;
resourceInputs["nodes"] = state ? state.nodes : undefined;
resourceInputs["notificationTopicArn"] = state ? state.notificationTopicArn : undefined;
resourceInputs["parameterGroupName"] = state ? state.parameterGroupName : undefined;
resourceInputs["port"] = state ? state.port : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["replicationFactor"] = state ? state.replicationFactor : undefined;
resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined;
resourceInputs["serverSideEncryption"] = state ? state.serverSideEncryption : undefined;
resourceInputs["subnetGroupName"] = state ? state.subnetGroupName : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
}
else {
const args = argsOrState;
if ((!args || args.clusterName === undefined) && !opts.urn) {
throw new Error("Missing required property 'clusterName'");
}
if ((!args || args.iamRoleArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'iamRoleArn'");
}
if ((!args || args.nodeType === undefined) && !opts.urn) {
throw new Error("Missing required property 'nodeType'");
}
if ((!args || args.replicationFactor === undefined) && !opts.urn) {
throw new Error("Missing required property 'replicationFactor'");
}
resourceInputs["availabilityZones"] = args ? args.availabilityZones : undefined;
resourceInputs["clusterEndpointEncryptionType"] = args ? args.clusterEndpointEncryptionType : undefined;
resourceInputs["clusterName"] = args ? args.clusterName : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["iamRoleArn"] = args ? args.iamRoleArn : undefined;
resourceInputs["maintenanceWindow"] = args ? args.maintenanceWindow : undefined;
resourceInputs["nodeType"] = args ? args.nodeType : undefined;
resourceInputs["notificationTopicArn"] = args ? args.notificationTopicArn : undefined;
resourceInputs["parameterGroupName"] = args ? args.parameterGroupName : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["replicationFactor"] = args ? args.replicationFactor : undefined;
resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined;
resourceInputs["serverSideEncryption"] = args ? args.serverSideEncryption : undefined;
resourceInputs["subnetGroupName"] = args ? args.subnetGroupName : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["clusterAddress"] = undefined /*out*/;
resourceInputs["configurationEndpoint"] = undefined /*out*/;
resourceInputs["nodes"] = undefined /*out*/;
resourceInputs["port"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Cluster.__pulumiType, name, resourceInputs, opts);
}
}
exports.Cluster = Cluster;
/** @internal */
Cluster.__pulumiType = 'aws:dax/cluster:Cluster';
//# sourceMappingURL=cluster.js.map