UNPKG

@pulumi/aws

Version:

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

150 lines 7.41 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.Endpoint = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a DMS (Data Migration Service) endpoint resource. DMS endpoints can be created, updated, deleted, and imported. * * > **Note:** All arguments including the password will be stored in the raw state as plain-text. ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.dms.Endpoint("test", { * certificateArn: "arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012", * databaseName: "test", * endpointId: "test-dms-endpoint-tf", * endpointType: "source", * engineName: "aurora", * extraConnectionAttributes: "", * kmsKeyArn: "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012", * password: "test", * port: 3306, * serverName: "test", * sslMode: "none", * tags: { * Name: "test", * }, * username: "test", * }); * ``` * * ## Import * * Using `pulumi import`, import endpoints using the `endpoint_id`. For example: * * ```sh * $ pulumi import aws:dms/endpoint:Endpoint test test-dms-endpoint-tf * ``` */ class Endpoint extends pulumi.CustomResource { /** * Get an existing Endpoint 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 Endpoint(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Endpoint. 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'] === Endpoint.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["certificateArn"] = state?.certificateArn; resourceInputs["databaseName"] = state?.databaseName; resourceInputs["elasticsearchSettings"] = state?.elasticsearchSettings; resourceInputs["endpointArn"] = state?.endpointArn; resourceInputs["endpointId"] = state?.endpointId; resourceInputs["endpointType"] = state?.endpointType; resourceInputs["engineName"] = state?.engineName; resourceInputs["extraConnectionAttributes"] = state?.extraConnectionAttributes; resourceInputs["kafkaSettings"] = state?.kafkaSettings; resourceInputs["kinesisSettings"] = state?.kinesisSettings; resourceInputs["kmsKeyArn"] = state?.kmsKeyArn; resourceInputs["mongodbSettings"] = state?.mongodbSettings; resourceInputs["oracleSettings"] = state?.oracleSettings; resourceInputs["password"] = state?.password; resourceInputs["pauseReplicationTasks"] = state?.pauseReplicationTasks; resourceInputs["port"] = state?.port; resourceInputs["postgresSettings"] = state?.postgresSettings; resourceInputs["redisSettings"] = state?.redisSettings; resourceInputs["redshiftSettings"] = state?.redshiftSettings; resourceInputs["region"] = state?.region; resourceInputs["secretsManagerAccessRoleArn"] = state?.secretsManagerAccessRoleArn; resourceInputs["secretsManagerArn"] = state?.secretsManagerArn; resourceInputs["serverName"] = state?.serverName; resourceInputs["serviceAccessRole"] = state?.serviceAccessRole; resourceInputs["sslMode"] = state?.sslMode; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["username"] = state?.username; } else { const args = argsOrState; if (args?.endpointId === undefined && !opts.urn) { throw new Error("Missing required property 'endpointId'"); } if (args?.endpointType === undefined && !opts.urn) { throw new Error("Missing required property 'endpointType'"); } if (args?.engineName === undefined && !opts.urn) { throw new Error("Missing required property 'engineName'"); } resourceInputs["certificateArn"] = args?.certificateArn; resourceInputs["databaseName"] = args?.databaseName; resourceInputs["elasticsearchSettings"] = args?.elasticsearchSettings; resourceInputs["endpointId"] = args?.endpointId; resourceInputs["endpointType"] = args?.endpointType; resourceInputs["engineName"] = args?.engineName; resourceInputs["extraConnectionAttributes"] = args?.extraConnectionAttributes; resourceInputs["kafkaSettings"] = args?.kafkaSettings; resourceInputs["kinesisSettings"] = args?.kinesisSettings; resourceInputs["kmsKeyArn"] = args?.kmsKeyArn; resourceInputs["mongodbSettings"] = args?.mongodbSettings; resourceInputs["oracleSettings"] = args?.oracleSettings; resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined; resourceInputs["pauseReplicationTasks"] = args?.pauseReplicationTasks; resourceInputs["port"] = args?.port; resourceInputs["postgresSettings"] = args?.postgresSettings; resourceInputs["redisSettings"] = args?.redisSettings; resourceInputs["redshiftSettings"] = args?.redshiftSettings; resourceInputs["region"] = args?.region; resourceInputs["secretsManagerAccessRoleArn"] = args?.secretsManagerAccessRoleArn; resourceInputs["secretsManagerArn"] = args?.secretsManagerArn; resourceInputs["serverName"] = args?.serverName; resourceInputs["serviceAccessRole"] = args?.serviceAccessRole; resourceInputs["sslMode"] = args?.sslMode; resourceInputs["tags"] = args?.tags; resourceInputs["username"] = args?.username; resourceInputs["endpointArn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Endpoint.__pulumiType, name, resourceInputs, opts); } } exports.Endpoint = Endpoint; /** @internal */ Endpoint.__pulumiType = 'aws:dms/endpoint:Endpoint'; //# sourceMappingURL=endpoint.js.map