UNPKG

@pulumi/aws

Version:

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

98 lines 4.22 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 endpoint access. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshift.EndpointAccess("example", { * endpointName: "example", * subnetGroupName: exampleAwsRedshiftSubnetGroup.id, * clusterIdentifier: exampleAwsRedshiftCluster.clusterIdentifier, * }); * ``` * * ## Import * * Using `pulumi import`, import Redshift endpoint access using the `name`. For example: * * ```sh * $ pulumi import aws:redshift/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["clusterIdentifier"] = state?.clusterIdentifier; resourceInputs["endpointName"] = state?.endpointName; resourceInputs["port"] = state?.port; resourceInputs["region"] = state?.region; resourceInputs["resourceOwner"] = state?.resourceOwner; resourceInputs["subnetGroupName"] = state?.subnetGroupName; resourceInputs["vpcEndpoints"] = state?.vpcEndpoints; resourceInputs["vpcSecurityGroupIds"] = state?.vpcSecurityGroupIds; } else { const args = argsOrState; if (args?.clusterIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'clusterIdentifier'"); } if (args?.endpointName === undefined && !opts.urn) { throw new Error("Missing required property 'endpointName'"); } if (args?.subnetGroupName === undefined && !opts.urn) { throw new Error("Missing required property 'subnetGroupName'"); } resourceInputs["clusterIdentifier"] = args?.clusterIdentifier; resourceInputs["endpointName"] = args?.endpointName; resourceInputs["region"] = args?.region; resourceInputs["resourceOwner"] = args?.resourceOwner; resourceInputs["subnetGroupName"] = args?.subnetGroupName; resourceInputs["vpcSecurityGroupIds"] = args?.vpcSecurityGroupIds; resourceInputs["address"] = 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:redshift/endpointAccess:EndpointAccess'; //# sourceMappingURL=endpointAccess.js.map