UNPKG

@pulumi/aws

Version:

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

105 lines 4.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.ProxyEndpoint = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an RDS DB proxy endpoint resource. For additional information, see the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy-endpoints.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.ProxyEndpoint("example", { * dbProxyName: test.name, * dbProxyEndpointName: "example", * vpcSubnetIds: testAwsSubnet.map(__item => __item.id), * targetRole: "READ_ONLY", * }); * ``` * * ## Import * * Using `pulumi import`, import DB proxy endpoints using the `DB-PROXY-NAME/DB-PROXY-ENDPOINT-NAME`. For example: * * ```sh * $ pulumi import aws:rds/proxyEndpoint:ProxyEndpoint example example/example * ``` */ class ProxyEndpoint extends pulumi.CustomResource { /** * Get an existing ProxyEndpoint 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 ProxyEndpoint(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ProxyEndpoint. 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'] === ProxyEndpoint.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["dbProxyEndpointName"] = state?.dbProxyEndpointName; resourceInputs["dbProxyName"] = state?.dbProxyName; resourceInputs["endpoint"] = state?.endpoint; resourceInputs["isDefault"] = state?.isDefault; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["targetRole"] = state?.targetRole; resourceInputs["vpcId"] = state?.vpcId; resourceInputs["vpcSecurityGroupIds"] = state?.vpcSecurityGroupIds; resourceInputs["vpcSubnetIds"] = state?.vpcSubnetIds; } else { const args = argsOrState; if (args?.dbProxyEndpointName === undefined && !opts.urn) { throw new Error("Missing required property 'dbProxyEndpointName'"); } if (args?.dbProxyName === undefined && !opts.urn) { throw new Error("Missing required property 'dbProxyName'"); } if (args?.vpcSubnetIds === undefined && !opts.urn) { throw new Error("Missing required property 'vpcSubnetIds'"); } resourceInputs["dbProxyEndpointName"] = args?.dbProxyEndpointName; resourceInputs["dbProxyName"] = args?.dbProxyName; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["targetRole"] = args?.targetRole; resourceInputs["vpcSecurityGroupIds"] = args?.vpcSecurityGroupIds; resourceInputs["vpcSubnetIds"] = args?.vpcSubnetIds; resourceInputs["arn"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["isDefault"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ProxyEndpoint.__pulumiType, name, resourceInputs, opts); } } exports.ProxyEndpoint = ProxyEndpoint; /** @internal */ ProxyEndpoint.__pulumiType = 'aws:rds/proxyEndpoint:ProxyEndpoint'; //# sourceMappingURL=proxyEndpoint.js.map