@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
126 lines • 5.85 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, { ...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?.arn;
resourceInputs["availabilityZones"] = state?.availabilityZones;
resourceInputs["clusterAddress"] = state?.clusterAddress;
resourceInputs["clusterEndpointEncryptionType"] = state?.clusterEndpointEncryptionType;
resourceInputs["clusterName"] = state?.clusterName;
resourceInputs["configurationEndpoint"] = state?.configurationEndpoint;
resourceInputs["description"] = state?.description;
resourceInputs["iamRoleArn"] = state?.iamRoleArn;
resourceInputs["maintenanceWindow"] = state?.maintenanceWindow;
resourceInputs["nodeType"] = state?.nodeType;
resourceInputs["nodes"] = state?.nodes;
resourceInputs["notificationTopicArn"] = state?.notificationTopicArn;
resourceInputs["parameterGroupName"] = state?.parameterGroupName;
resourceInputs["port"] = state?.port;
resourceInputs["region"] = state?.region;
resourceInputs["replicationFactor"] = state?.replicationFactor;
resourceInputs["securityGroupIds"] = state?.securityGroupIds;
resourceInputs["serverSideEncryption"] = state?.serverSideEncryption;
resourceInputs["subnetGroupName"] = state?.subnetGroupName;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.clusterName === undefined && !opts.urn) {
throw new Error("Missing required property 'clusterName'");
}
if (args?.iamRoleArn === undefined && !opts.urn) {
throw new Error("Missing required property 'iamRoleArn'");
}
if (args?.nodeType === undefined && !opts.urn) {
throw new Error("Missing required property 'nodeType'");
}
if (args?.replicationFactor === undefined && !opts.urn) {
throw new Error("Missing required property 'replicationFactor'");
}
resourceInputs["availabilityZones"] = args?.availabilityZones;
resourceInputs["clusterEndpointEncryptionType"] = args?.clusterEndpointEncryptionType;
resourceInputs["clusterName"] = args?.clusterName;
resourceInputs["description"] = args?.description;
resourceInputs["iamRoleArn"] = args?.iamRoleArn;
resourceInputs["maintenanceWindow"] = args?.maintenanceWindow;
resourceInputs["nodeType"] = args?.nodeType;
resourceInputs["notificationTopicArn"] = args?.notificationTopicArn;
resourceInputs["parameterGroupName"] = args?.parameterGroupName;
resourceInputs["region"] = args?.region;
resourceInputs["replicationFactor"] = args?.replicationFactor;
resourceInputs["securityGroupIds"] = args?.securityGroupIds;
resourceInputs["serverSideEncryption"] = args?.serverSideEncryption;
resourceInputs["subnetGroupName"] = args?.subnetGroupName;
resourceInputs["tags"] = args?.tags;
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