@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
109 lines • 4.78 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, { ...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?.acceptConnection;
resourceInputs["connectionAlias"] = state?.connectionAlias;
resourceInputs["connectionMode"] = state?.connectionMode;
resourceInputs["connectionProperties"] = state?.connectionProperties;
resourceInputs["connectionStatus"] = state?.connectionStatus;
resourceInputs["localDomainInfo"] = state?.localDomainInfo;
resourceInputs["region"] = state?.region;
resourceInputs["remoteDomainInfo"] = state?.remoteDomainInfo;
}
else {
const args = argsOrState;
if (args?.connectionAlias === undefined && !opts.urn) {
throw new Error("Missing required property 'connectionAlias'");
}
if (args?.localDomainInfo === undefined && !opts.urn) {
throw new Error("Missing required property 'localDomainInfo'");
}
if (args?.remoteDomainInfo === undefined && !opts.urn) {
throw new Error("Missing required property 'remoteDomainInfo'");
}
resourceInputs["acceptConnection"] = args?.acceptConnection;
resourceInputs["connectionAlias"] = args?.connectionAlias;
resourceInputs["connectionMode"] = args?.connectionMode;
resourceInputs["connectionProperties"] = args?.connectionProperties;
resourceInputs["localDomainInfo"] = args?.localDomainInfo;
resourceInputs["region"] = args?.region;
resourceInputs["remoteDomainInfo"] = args?.remoteDomainInfo;
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