UNPKG

@pulumi/aws

Version:

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

162 lines • 8.86 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.Cluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a DocumentDB Cluster. * * Changes to a DocumentDB Cluster can occur when you manually change a * parameter, such as `port`, and are reflected in the next maintenance * window. Because of this, this provider may report a difference in its planning * phase because a modification has not yet taken place. You can use the * `applyImmediately` flag to instruct the service to apply the change immediately * (see documentation below). * * > **Note:** using `applyImmediately` can result in a brief downtime as the server reboots. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const docdb = new aws.docdb.Cluster("docdb", { * clusterIdentifier: "my-docdb-cluster", * engine: "docdb", * masterUsername: "foo", * masterPassword: "mustbeeightchars", * backupRetentionPeriod: 5, * preferredBackupWindow: "07:00-09:00", * skipFinalSnapshot: true, * }); * ``` * * ## Import * * Using `pulumi import`, import DocumentDB Clusters using the `cluster_identifier`. For example: * * ```sh * $ pulumi import aws:docdb/cluster:Cluster docdb_cluster docdb-prod-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["allowMajorVersionUpgrade"] = state?.allowMajorVersionUpgrade; resourceInputs["applyImmediately"] = state?.applyImmediately; resourceInputs["arn"] = state?.arn; resourceInputs["availabilityZones"] = state?.availabilityZones; resourceInputs["backupRetentionPeriod"] = state?.backupRetentionPeriod; resourceInputs["clusterIdentifier"] = state?.clusterIdentifier; resourceInputs["clusterIdentifierPrefix"] = state?.clusterIdentifierPrefix; resourceInputs["clusterMembers"] = state?.clusterMembers; resourceInputs["clusterResourceId"] = state?.clusterResourceId; resourceInputs["dbClusterParameterGroupName"] = state?.dbClusterParameterGroupName; resourceInputs["dbSubnetGroupName"] = state?.dbSubnetGroupName; resourceInputs["deletionProtection"] = state?.deletionProtection; resourceInputs["enabledCloudwatchLogsExports"] = state?.enabledCloudwatchLogsExports; resourceInputs["endpoint"] = state?.endpoint; resourceInputs["engine"] = state?.engine; resourceInputs["engineVersion"] = state?.engineVersion; resourceInputs["finalSnapshotIdentifier"] = state?.finalSnapshotIdentifier; resourceInputs["globalClusterIdentifier"] = state?.globalClusterIdentifier; resourceInputs["hostedZoneId"] = state?.hostedZoneId; resourceInputs["kmsKeyId"] = state?.kmsKeyId; resourceInputs["manageMasterUserPassword"] = state?.manageMasterUserPassword; resourceInputs["masterPassword"] = state?.masterPassword; resourceInputs["masterUserSecrets"] = state?.masterUserSecrets; resourceInputs["masterUsername"] = state?.masterUsername; resourceInputs["port"] = state?.port; resourceInputs["preferredBackupWindow"] = state?.preferredBackupWindow; resourceInputs["preferredMaintenanceWindow"] = state?.preferredMaintenanceWindow; resourceInputs["readerEndpoint"] = state?.readerEndpoint; resourceInputs["region"] = state?.region; resourceInputs["restoreToPointInTime"] = state?.restoreToPointInTime; resourceInputs["serverlessV2ScalingConfiguration"] = state?.serverlessV2ScalingConfiguration; resourceInputs["skipFinalSnapshot"] = state?.skipFinalSnapshot; resourceInputs["snapshotIdentifier"] = state?.snapshotIdentifier; resourceInputs["storageEncrypted"] = state?.storageEncrypted; resourceInputs["storageType"] = state?.storageType; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["vpcSecurityGroupIds"] = state?.vpcSecurityGroupIds; } else { const args = argsOrState; resourceInputs["allowMajorVersionUpgrade"] = args?.allowMajorVersionUpgrade; resourceInputs["applyImmediately"] = args?.applyImmediately; resourceInputs["availabilityZones"] = args?.availabilityZones; resourceInputs["backupRetentionPeriod"] = args?.backupRetentionPeriod; resourceInputs["clusterIdentifier"] = args?.clusterIdentifier; resourceInputs["clusterIdentifierPrefix"] = args?.clusterIdentifierPrefix; resourceInputs["clusterMembers"] = args?.clusterMembers; resourceInputs["dbClusterParameterGroupName"] = args?.dbClusterParameterGroupName; resourceInputs["dbSubnetGroupName"] = args?.dbSubnetGroupName; resourceInputs["deletionProtection"] = args?.deletionProtection; resourceInputs["enabledCloudwatchLogsExports"] = args?.enabledCloudwatchLogsExports; resourceInputs["engine"] = args?.engine; resourceInputs["engineVersion"] = args?.engineVersion; resourceInputs["finalSnapshotIdentifier"] = args?.finalSnapshotIdentifier; resourceInputs["globalClusterIdentifier"] = args?.globalClusterIdentifier; resourceInputs["kmsKeyId"] = args?.kmsKeyId; resourceInputs["manageMasterUserPassword"] = args?.manageMasterUserPassword; resourceInputs["masterPassword"] = args?.masterPassword ? pulumi.secret(args.masterPassword) : undefined; resourceInputs["masterUsername"] = args?.masterUsername; resourceInputs["port"] = args?.port; resourceInputs["preferredBackupWindow"] = args?.preferredBackupWindow; resourceInputs["preferredMaintenanceWindow"] = args?.preferredMaintenanceWindow; resourceInputs["region"] = args?.region; resourceInputs["restoreToPointInTime"] = args?.restoreToPointInTime; resourceInputs["serverlessV2ScalingConfiguration"] = args?.serverlessV2ScalingConfiguration; resourceInputs["skipFinalSnapshot"] = args?.skipFinalSnapshot; resourceInputs["snapshotIdentifier"] = args?.snapshotIdentifier; resourceInputs["storageEncrypted"] = args?.storageEncrypted; resourceInputs["storageType"] = args?.storageType; resourceInputs["tags"] = args?.tags; resourceInputs["vpcSecurityGroupIds"] = args?.vpcSecurityGroupIds; resourceInputs["arn"] = undefined /*out*/; resourceInputs["clusterResourceId"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["hostedZoneId"] = undefined /*out*/; resourceInputs["masterUserSecrets"] = undefined /*out*/; resourceInputs["readerEndpoint"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["masterPassword"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Cluster.__pulumiType, name, resourceInputs, opts); } } exports.Cluster = Cluster; /** @internal */ Cluster.__pulumiType = 'aws:docdb/cluster:Cluster'; //# sourceMappingURL=cluster.js.map