UNPKG

@pulumi/aws

Version:

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

151 lines 7.65 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.ClusterInstance = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A Cluster Instance Resource defines attributes that are specific to a single instance in a Neptune Cluster. * * You can simply add neptune instances and Neptune manages the replication. You can use the count * meta-parameter to make multiple instances and join them all to the same Neptune Cluster, or you may specify different Cluster Instance resources with various `instanceClass` sizes. * * ## Example Usage * * The following example will create a neptune cluster with two neptune instances(one writer and one reader). * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const _default = new aws.neptune.Cluster("default", { * clusterIdentifier: "neptune-cluster-demo", * engine: "neptune", * backupRetentionPeriod: 5, * preferredBackupWindow: "07:00-09:00", * skipFinalSnapshot: true, * iamDatabaseAuthenticationEnabled: true, * applyImmediately: true, * }); * const example: aws.neptune.ClusterInstance[] = []; * for (const range = {value: 0}; range.value < 2; range.value++) { * example.push(new aws.neptune.ClusterInstance(`example-${range.value}`, { * clusterIdentifier: _default.id, * engine: "neptune", * instanceClass: "db.r4.large", * applyImmediately: true, * })); * } * ``` * * ## Import * * Using `pulumi import`, import `aws_neptune_cluster_instance` using the instance identifier. For example: * * ```sh * $ pulumi import aws:neptune/clusterInstance:ClusterInstance example my-instance * ``` */ class ClusterInstance extends pulumi.CustomResource { /** * Get an existing ClusterInstance 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 ClusterInstance(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ClusterInstance. 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'] === ClusterInstance.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state?.address; resourceInputs["applyImmediately"] = state?.applyImmediately; resourceInputs["arn"] = state?.arn; resourceInputs["autoMinorVersionUpgrade"] = state?.autoMinorVersionUpgrade; resourceInputs["availabilityZone"] = state?.availabilityZone; resourceInputs["clusterIdentifier"] = state?.clusterIdentifier; resourceInputs["dbiResourceId"] = state?.dbiResourceId; resourceInputs["endpoint"] = state?.endpoint; resourceInputs["engine"] = state?.engine; resourceInputs["engineVersion"] = state?.engineVersion; resourceInputs["identifier"] = state?.identifier; resourceInputs["identifierPrefix"] = state?.identifierPrefix; resourceInputs["instanceClass"] = state?.instanceClass; resourceInputs["kmsKeyArn"] = state?.kmsKeyArn; resourceInputs["neptuneParameterGroupName"] = state?.neptuneParameterGroupName; resourceInputs["neptuneSubnetGroupName"] = state?.neptuneSubnetGroupName; resourceInputs["port"] = state?.port; resourceInputs["preferredBackupWindow"] = state?.preferredBackupWindow; resourceInputs["preferredMaintenanceWindow"] = state?.preferredMaintenanceWindow; resourceInputs["promotionTier"] = state?.promotionTier; resourceInputs["publiclyAccessible"] = state?.publiclyAccessible; resourceInputs["region"] = state?.region; resourceInputs["skipFinalSnapshot"] = state?.skipFinalSnapshot; resourceInputs["storageEncrypted"] = state?.storageEncrypted; resourceInputs["storageType"] = state?.storageType; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["writer"] = state?.writer; } else { const args = argsOrState; if (args?.clusterIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'clusterIdentifier'"); } if (args?.instanceClass === undefined && !opts.urn) { throw new Error("Missing required property 'instanceClass'"); } resourceInputs["applyImmediately"] = args?.applyImmediately; resourceInputs["autoMinorVersionUpgrade"] = args?.autoMinorVersionUpgrade; resourceInputs["availabilityZone"] = args?.availabilityZone; resourceInputs["clusterIdentifier"] = args?.clusterIdentifier; resourceInputs["engine"] = args?.engine; resourceInputs["engineVersion"] = args?.engineVersion; resourceInputs["identifier"] = args?.identifier; resourceInputs["identifierPrefix"] = args?.identifierPrefix; resourceInputs["instanceClass"] = args?.instanceClass; resourceInputs["neptuneParameterGroupName"] = args?.neptuneParameterGroupName; resourceInputs["neptuneSubnetGroupName"] = args?.neptuneSubnetGroupName; resourceInputs["port"] = args?.port; resourceInputs["preferredBackupWindow"] = args?.preferredBackupWindow; resourceInputs["preferredMaintenanceWindow"] = args?.preferredMaintenanceWindow; resourceInputs["promotionTier"] = args?.promotionTier; resourceInputs["publiclyAccessible"] = args?.publiclyAccessible; resourceInputs["region"] = args?.region; resourceInputs["skipFinalSnapshot"] = args?.skipFinalSnapshot; resourceInputs["tags"] = args?.tags; resourceInputs["address"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["dbiResourceId"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["kmsKeyArn"] = undefined /*out*/; resourceInputs["storageEncrypted"] = undefined /*out*/; resourceInputs["storageType"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["writer"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ClusterInstance.__pulumiType, name, resourceInputs, opts); } } exports.ClusterInstance = ClusterInstance; /** @internal */ ClusterInstance.__pulumiType = 'aws:neptune/clusterInstance:ClusterInstance'; //# sourceMappingURL=clusterInstance.js.map