UNPKG

@pulumi/aws

Version:

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

99 lines 4.23 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.EndpointAccess = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Creates a new Amazon Redshift Serverless Endpoint Access. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshiftserverless.EndpointAccess("example", { * endpointName: "example", * workgroupName: "example", * }); * ``` * * ## Import * * Using `pulumi import`, import Redshift Serverless Endpoint Access using the `endpoint_name`. For example: * * ```sh * $ pulumi import aws:redshiftserverless/endpointAccess:EndpointAccess example example * ``` */ class EndpointAccess extends pulumi.CustomResource { /** * Get an existing EndpointAccess 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 EndpointAccess(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of EndpointAccess. 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'] === EndpointAccess.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state?.address; resourceInputs["arn"] = state?.arn; resourceInputs["endpointName"] = state?.endpointName; resourceInputs["ownerAccount"] = state?.ownerAccount; resourceInputs["port"] = state?.port; resourceInputs["region"] = state?.region; resourceInputs["subnetIds"] = state?.subnetIds; resourceInputs["vpcEndpoints"] = state?.vpcEndpoints; resourceInputs["vpcSecurityGroupIds"] = state?.vpcSecurityGroupIds; resourceInputs["workgroupName"] = state?.workgroupName; } else { const args = argsOrState; if (args?.endpointName === undefined && !opts.urn) { throw new Error("Missing required property 'endpointName'"); } if (args?.subnetIds === undefined && !opts.urn) { throw new Error("Missing required property 'subnetIds'"); } if (args?.workgroupName === undefined && !opts.urn) { throw new Error("Missing required property 'workgroupName'"); } resourceInputs["endpointName"] = args?.endpointName; resourceInputs["ownerAccount"] = args?.ownerAccount; resourceInputs["region"] = args?.region; resourceInputs["subnetIds"] = args?.subnetIds; resourceInputs["vpcSecurityGroupIds"] = args?.vpcSecurityGroupIds; resourceInputs["workgroupName"] = args?.workgroupName; resourceInputs["address"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["port"] = undefined /*out*/; resourceInputs["vpcEndpoints"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EndpointAccess.__pulumiType, name, resourceInputs, opts); } } exports.EndpointAccess = EndpointAccess; /** @internal */ EndpointAccess.__pulumiType = 'aws:redshiftserverless/endpointAccess:EndpointAccess'; //# sourceMappingURL=endpointAccess.js.map