UNPKG

@pulumi/aws

Version:

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

95 lines 4.25 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.ProxyTarget = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ## Import * * Provisioned Clusters: * * __Using `pulumi import` to import__ RDS DB Proxy Targets using the `db_proxy_name`, `target_group_name`, target type (such as `RDS_INSTANCE` or `TRACKED_CLUSTER`), and resource identifier separated by forward slashes (`/`). For example: * * Instances: * * ```sh * $ pulumi import aws:rds/proxyTarget:ProxyTarget example example-proxy/default/RDS_INSTANCE/example-instance * ``` * Provisioned Clusters: * * ```sh * $ pulumi import aws:rds/proxyTarget:ProxyTarget example example-proxy/default/TRACKED_CLUSTER/example-cluster * ``` */ class ProxyTarget extends pulumi.CustomResource { /** * Get an existing ProxyTarget 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 ProxyTarget(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ProxyTarget. 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'] === ProxyTarget.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dbClusterIdentifier"] = state?.dbClusterIdentifier; resourceInputs["dbInstanceIdentifier"] = state?.dbInstanceIdentifier; resourceInputs["dbProxyName"] = state?.dbProxyName; resourceInputs["endpoint"] = state?.endpoint; resourceInputs["port"] = state?.port; resourceInputs["rdsResourceId"] = state?.rdsResourceId; resourceInputs["region"] = state?.region; resourceInputs["targetArn"] = state?.targetArn; resourceInputs["targetGroupName"] = state?.targetGroupName; resourceInputs["trackedClusterId"] = state?.trackedClusterId; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.dbProxyName === undefined && !opts.urn) { throw new Error("Missing required property 'dbProxyName'"); } if (args?.targetGroupName === undefined && !opts.urn) { throw new Error("Missing required property 'targetGroupName'"); } resourceInputs["dbClusterIdentifier"] = args?.dbClusterIdentifier; resourceInputs["dbInstanceIdentifier"] = args?.dbInstanceIdentifier; resourceInputs["dbProxyName"] = args?.dbProxyName; resourceInputs["region"] = args?.region; resourceInputs["targetGroupName"] = args?.targetGroupName; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["port"] = undefined /*out*/; resourceInputs["rdsResourceId"] = undefined /*out*/; resourceInputs["targetArn"] = undefined /*out*/; resourceInputs["trackedClusterId"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ProxyTarget.__pulumiType, name, resourceInputs, opts); } } exports.ProxyTarget = ProxyTarget; /** @internal */ ProxyTarget.__pulumiType = 'aws:rds/proxyTarget:ProxyTarget'; //# sourceMappingURL=proxyTarget.js.map