@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
123 lines • 5.28 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.ShardGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an Amazon Aurora Limitless Database DB shard group
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.rds.Cluster("example", {
* clusterIdentifier: "example-limitless-cluster",
* engine: aws.rds.EngineType.AuroraPostgresql,
* engineVersion: "16.6-limitless",
* engineMode: "",
* storageType: "aurora-iopt1",
* clusterScalabilityType: "limitless",
* masterUsername: "foo",
* masterPassword: "must_be_eight_characters",
* performanceInsightsEnabled: true,
* performanceInsightsRetentionPeriod: 31,
* enabledCloudwatchLogsExports: ["postgresql"],
* monitoringInterval: 5,
* monitoringRoleArn: exampleAwsIamRole.arn,
* });
* const exampleShardGroup = new aws.rds.ShardGroup("example", {
* dbShardGroupIdentifier: "example-shard-group",
* dbClusterIdentifier: example.id,
* maxAcu: 1200,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import shard group using the `db_shard_group_identifier`. For example:
*
* ```sh
* $ pulumi import aws:rds/shardGroup:ShardGroup example example-shard-group
* ```
*/
class ShardGroup extends pulumi.CustomResource {
/**
* Get an existing ShardGroup 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 ShardGroup(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ShardGroup. 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'] === ShardGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["computeRedundancy"] = state?.computeRedundancy;
resourceInputs["dbClusterIdentifier"] = state?.dbClusterIdentifier;
resourceInputs["dbShardGroupIdentifier"] = state?.dbShardGroupIdentifier;
resourceInputs["dbShardGroupResourceId"] = state?.dbShardGroupResourceId;
resourceInputs["endpoint"] = state?.endpoint;
resourceInputs["maxAcu"] = state?.maxAcu;
resourceInputs["minAcu"] = state?.minAcu;
resourceInputs["publiclyAccessible"] = state?.publiclyAccessible;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
if (args?.dbClusterIdentifier === undefined && !opts.urn) {
throw new Error("Missing required property 'dbClusterIdentifier'");
}
if (args?.dbShardGroupIdentifier === undefined && !opts.urn) {
throw new Error("Missing required property 'dbShardGroupIdentifier'");
}
if (args?.maxAcu === undefined && !opts.urn) {
throw new Error("Missing required property 'maxAcu'");
}
resourceInputs["computeRedundancy"] = args?.computeRedundancy;
resourceInputs["dbClusterIdentifier"] = args?.dbClusterIdentifier;
resourceInputs["dbShardGroupIdentifier"] = args?.dbShardGroupIdentifier;
resourceInputs["maxAcu"] = args?.maxAcu;
resourceInputs["minAcu"] = args?.minAcu;
resourceInputs["publiclyAccessible"] = args?.publiclyAccessible;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["dbShardGroupResourceId"] = undefined /*out*/;
resourceInputs["endpoint"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ShardGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.ShardGroup = ShardGroup;
/** @internal */
ShardGroup.__pulumiType = 'aws:rds/shardGroup:ShardGroup';
//# sourceMappingURL=shardGroup.js.map
;