@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
98 lines • 4.56 kB
JavaScript
;
// *** 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, Object.assign(Object.assign({}, 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 ? state.address : undefined;
resourceInputs["clusterIdentifier"] = state ? state.clusterIdentifier : undefined;
resourceInputs["endpointName"] = state ? state.endpointName : undefined;
resourceInputs["port"] = state ? state.port : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["resourceOwner"] = state ? state.resourceOwner : undefined;
resourceInputs["subnetGroupName"] = state ? state.subnetGroupName : undefined;
resourceInputs["vpcEndpoints"] = state ? state.vpcEndpoints : undefined;
resourceInputs["vpcSecurityGroupIds"] = state ? state.vpcSecurityGroupIds : undefined;
}
else {
const args = argsOrState;
if ((!args || args.clusterIdentifier === undefined) && !opts.urn) {
throw new Error("Missing required property 'clusterIdentifier'");
}
if ((!args || args.endpointName === undefined) && !opts.urn) {
throw new Error("Missing required property 'endpointName'");
}
if ((!args || args.subnetGroupName === undefined) && !opts.urn) {
throw new Error("Missing required property 'subnetGroupName'");
}
resourceInputs["clusterIdentifier"] = args ? args.clusterIdentifier : undefined;
resourceInputs["endpointName"] = args ? args.endpointName : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["resourceOwner"] = args ? args.resourceOwner : undefined;
resourceInputs["subnetGroupName"] = args ? args.subnetGroupName : undefined;
resourceInputs["vpcSecurityGroupIds"] = args ? args.vpcSecurityGroupIds : undefined;
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