UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

123 lines 5.75 kB
"use strict"; // *** 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, Object.assign(Object.assign({}, 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 ? state.arn : undefined; resourceInputs["computeRedundancy"] = state ? state.computeRedundancy : undefined; resourceInputs["dbClusterIdentifier"] = state ? state.dbClusterIdentifier : undefined; resourceInputs["dbShardGroupIdentifier"] = state ? state.dbShardGroupIdentifier : undefined; resourceInputs["dbShardGroupResourceId"] = state ? state.dbShardGroupResourceId : undefined; resourceInputs["endpoint"] = state ? state.endpoint : undefined; resourceInputs["maxAcu"] = state ? state.maxAcu : undefined; resourceInputs["minAcu"] = state ? state.minAcu : undefined; resourceInputs["publiclyAccessible"] = state ? state.publiclyAccessible : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["timeouts"] = state ? state.timeouts : undefined; } else { const args = argsOrState; if ((!args || args.dbClusterIdentifier === undefined) && !opts.urn) { throw new Error("Missing required property 'dbClusterIdentifier'"); } if ((!args || args.dbShardGroupIdentifier === undefined) && !opts.urn) { throw new Error("Missing required property 'dbShardGroupIdentifier'"); } if ((!args || args.maxAcu === undefined) && !opts.urn) { throw new Error("Missing required property 'maxAcu'"); } resourceInputs["computeRedundancy"] = args ? args.computeRedundancy : undefined; resourceInputs["dbClusterIdentifier"] = args ? args.dbClusterIdentifier : undefined; resourceInputs["dbShardGroupIdentifier"] = args ? args.dbShardGroupIdentifier : undefined; resourceInputs["maxAcu"] = args ? args.maxAcu : undefined; resourceInputs["minAcu"] = args ? args.minAcu : undefined; resourceInputs["publiclyAccessible"] = args ? args.publiclyAccessible : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timeouts"] = args ? args.timeouts : undefined; 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