@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
109 lines • 5.12 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.OutboundConnection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an AWS Opensearch Outbound Connection.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.getCallerIdentity({});
* const currentGetRegion = aws.getRegion({});
* const foo = new aws.opensearch.OutboundConnection("foo", {
* connectionAlias: "outbound_connection",
* connectionMode: "DIRECT",
* localDomainInfo: {
* ownerId: current.then(current => current.accountId),
* region: currentGetRegion.then(currentGetRegion => currentGetRegion.region),
* domainName: localDomain.domainName,
* },
* remoteDomainInfo: {
* ownerId: current.then(current => current.accountId),
* region: currentGetRegion.then(currentGetRegion => currentGetRegion.region),
* domainName: remoteDomain.domainName,
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import AWS Opensearch Outbound Connections using the Outbound Connection ID. For example:
*
* ```sh
* $ pulumi import aws:opensearch/outboundConnection:OutboundConnection foo connection-id
* ```
*/
class OutboundConnection extends pulumi.CustomResource {
/**
* Get an existing OutboundConnection 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 OutboundConnection(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of OutboundConnection. 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'] === OutboundConnection.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["acceptConnection"] = state ? state.acceptConnection : undefined;
resourceInputs["connectionAlias"] = state ? state.connectionAlias : undefined;
resourceInputs["connectionMode"] = state ? state.connectionMode : undefined;
resourceInputs["connectionProperties"] = state ? state.connectionProperties : undefined;
resourceInputs["connectionStatus"] = state ? state.connectionStatus : undefined;
resourceInputs["localDomainInfo"] = state ? state.localDomainInfo : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["remoteDomainInfo"] = state ? state.remoteDomainInfo : undefined;
}
else {
const args = argsOrState;
if ((!args || args.connectionAlias === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectionAlias'");
}
if ((!args || args.localDomainInfo === undefined) && !opts.urn) {
throw new Error("Missing required property 'localDomainInfo'");
}
if ((!args || args.remoteDomainInfo === undefined) && !opts.urn) {
throw new Error("Missing required property 'remoteDomainInfo'");
}
resourceInputs["acceptConnection"] = args ? args.acceptConnection : undefined;
resourceInputs["connectionAlias"] = args ? args.connectionAlias : undefined;
resourceInputs["connectionMode"] = args ? args.connectionMode : undefined;
resourceInputs["connectionProperties"] = args ? args.connectionProperties : undefined;
resourceInputs["localDomainInfo"] = args ? args.localDomainInfo : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["remoteDomainInfo"] = args ? args.remoteDomainInfo : undefined;
resourceInputs["connectionStatus"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(OutboundConnection.__pulumiType, name, resourceInputs, opts);
}
}
exports.OutboundConnection = OutboundConnection;
/** @internal */
OutboundConnection.__pulumiType = 'aws:opensearch/outboundConnection:OutboundConnection';
//# sourceMappingURL=outboundConnection.js.map