@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
121 lines • 6.13 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.MultiRegionCluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a MemoryDB Multi Region Cluster.
*
* More information about MemoryDB can be found in the [Developer Guide](https://docs.aws.amazon.com/memorydb/latest/devguide/what-is-memorydb-for-redis.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.memorydb.MultiRegionCluster("example", {
* multiRegionClusterNameSuffix: "example",
* nodeType: "db.r7g.xlarge",
* });
* const exampleCluster = new aws.memorydb.Cluster("example", {
* aclName: exampleAwsMemorydbAcl.id,
* autoMinorVersionUpgrade: false,
* name: "example",
* nodeType: "db.t4g.small",
* numShards: 2,
* securityGroupIds: [exampleAwsSecurityGroup.id],
* snapshotRetentionLimit: 7,
* subnetGroupName: exampleAwsMemorydbSubnetGroup.id,
* multiRegionClusterName: example.multiRegionClusterName,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import a cluster using the `multi_region_cluster_name`. For example:
*
* ```sh
* $ pulumi import aws:memorydb/multiRegionCluster:MultiRegionCluster example virxk-example
* ```
*/
class MultiRegionCluster extends pulumi.CustomResource {
/**
* Get an existing MultiRegionCluster 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 MultiRegionCluster(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of MultiRegionCluster. 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'] === MultiRegionCluster.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["engine"] = state ? state.engine : undefined;
resourceInputs["engineVersion"] = state ? state.engineVersion : undefined;
resourceInputs["multiRegionClusterName"] = state ? state.multiRegionClusterName : undefined;
resourceInputs["multiRegionClusterNameSuffix"] = state ? state.multiRegionClusterNameSuffix : undefined;
resourceInputs["multiRegionParameterGroupName"] = state ? state.multiRegionParameterGroupName : undefined;
resourceInputs["nodeType"] = state ? state.nodeType : undefined;
resourceInputs["numShards"] = state ? state.numShards : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
resourceInputs["tlsEnabled"] = state ? state.tlsEnabled : undefined;
resourceInputs["updateStrategy"] = state ? state.updateStrategy : undefined;
}
else {
const args = argsOrState;
if ((!args || args.multiRegionClusterNameSuffix === undefined) && !opts.urn) {
throw new Error("Missing required property 'multiRegionClusterNameSuffix'");
}
if ((!args || args.nodeType === undefined) && !opts.urn) {
throw new Error("Missing required property 'nodeType'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["engine"] = args ? args.engine : undefined;
resourceInputs["engineVersion"] = args ? args.engineVersion : undefined;
resourceInputs["multiRegionClusterNameSuffix"] = args ? args.multiRegionClusterNameSuffix : undefined;
resourceInputs["multiRegionParameterGroupName"] = args ? args.multiRegionParameterGroupName : undefined;
resourceInputs["nodeType"] = args ? args.nodeType : undefined;
resourceInputs["numShards"] = args ? args.numShards : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
resourceInputs["tlsEnabled"] = args ? args.tlsEnabled : undefined;
resourceInputs["updateStrategy"] = args ? args.updateStrategy : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["multiRegionClusterName"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(MultiRegionCluster.__pulumiType, name, resourceInputs, opts);
}
}
exports.MultiRegionCluster = MultiRegionCluster;
/** @internal */
MultiRegionCluster.__pulumiType = 'aws:memorydb/multiRegionCluster:MultiRegionCluster';
//# sourceMappingURL=multiRegionCluster.js.map