OutboundConnection class

Manages an AWS Opensearch Outbound Connection.

Example Usage

Basic Usage

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", {
    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,
    },
    connectionAlias: "outbound_connection",
    connectionMode: "DIRECT",
});
import pulumi
import pulumi_aws as aws

current = aws.get_caller_identity()
current_get_region = aws.get_region()
foo = aws.opensearch.OutboundConnection("foo",
    local_domain_info={
        "owner_id": current.account_id,
        "region": current_get_region.region,
        "domain_name": local_domain["domainName"],
    },
    remote_domain_info={
        "owner_id": current.account_id,
        "region": current_get_region.region,
        "domain_name": remote_domain["domainName"],
    },
    connection_alias="outbound_connection",
    connection_mode="DIRECT")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var current = Aws.GetCallerIdentity.Invoke();

    var currentGetRegion = Aws.GetRegion.Invoke();

    var foo = new Aws.OpenSearch.OutboundConnection("foo", new()
    {
        LocalDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionLocalDomainInfoArgs
        {
            OwnerId = current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
            Region = currentGetRegion.Apply(getRegionResult => getRegionResult.Region),
            DomainName = localDomain.DomainName,
        },
        RemoteDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionRemoteDomainInfoArgs
        {
            OwnerId = current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
            Region = currentGetRegion.Apply(getRegionResult => getRegionResult.Region),
            DomainName = remoteDomain.DomainName,
        },
        ConnectionAlias = "outbound_connection",
        ConnectionMode = "DIRECT",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/opensearch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil)
		if err != nil {
			return err
		}
		currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = opensearch.NewOutboundConnection(ctx, "foo", &opensearch.OutboundConnectionArgs{
			LocalDomainInfo: &opensearch.OutboundConnectionLocalDomainInfoArgs{
				OwnerId:    pulumi.String(current.AccountId),
				Region:     pulumi.String(currentGetRegion.Region),
				DomainName: pulumi.Any(localDomain.DomainName),
			},
			RemoteDomainInfo: &opensearch.OutboundConnectionRemoteDomainInfoArgs{
				OwnerId:    pulumi.String(current.AccountId),
				Region:     pulumi.String(currentGetRegion.Region),
				DomainName: pulumi.Any(remoteDomain.DomainName),
			},
			ConnectionAlias: pulumi.String("outbound_connection"),
			ConnectionMode:  pulumi.String("DIRECT"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_getcalleridentity" "current" {
}
data "aws_getregion" "currentGetRegion" {
}

resource "aws_opensearch_outboundconnection" "foo" {
  local_domain_info = {
    owner_id    = data.aws_getcalleridentity.current.account_id
    region      = data.aws_getregion.currentGetRegion.region
    domain_name = localDomain.domainName
  }
  remote_domain_info = {
    owner_id    = data.aws_getcalleridentity.current.account_id
    region      = data.aws_getregion.currentGetRegion.region
    domain_name = remoteDomain.domainName
  }
  connection_alias = "outbound_connection"
  connection_mode  = "DIRECT"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetCallerIdentityArgs;
import com.pulumi.aws.inputs.GetRegionArgs;
import com.pulumi.aws.opensearch.OutboundConnection;
import com.pulumi.aws.opensearch.OutboundConnectionArgs;
import com.pulumi.aws.opensearch.inputs.OutboundConnectionLocalDomainInfoArgs;
import com.pulumi.aws.opensearch.inputs.OutboundConnectionRemoteDomainInfoArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var current = AwsFunctions.getCallerIdentity(GetCallerIdentityArgs.builder()
            .build());

        final var currentGetRegion = AwsFunctions.getRegion(GetRegionArgs.builder()
            .build());

        var foo = new OutboundConnection("foo", OutboundConnectionArgs.builder()
            .localDomainInfo(OutboundConnectionLocalDomainInfoArgs.builder()
                .ownerId(current.accountId())
                .region(currentGetRegion.region())
                .domainName(localDomain.domainName())
                .build())
            .remoteDomainInfo(OutboundConnectionRemoteDomainInfoArgs.builder()
                .ownerId(current.accountId())
                .region(currentGetRegion.region())
                .domainName(remoteDomain.domainName())
                .build())
            .connectionAlias("outbound_connection")
            .connectionMode("DIRECT")
            .build());

    }
}
resources:
  foo:
    type: aws:opensearch:OutboundConnection
    properties:
      localDomainInfo:
        ownerId: ${current.accountId}
        region: ${currentGetRegion.region}
        domainName: ${localDomain.domainName}
      remoteDomainInfo:
        ownerId: ${current.accountId}
        region: ${currentGetRegion.region}
        domainName: ${remoteDomain.domainName}
      connectionAlias: outbound_connection
      connectionMode: DIRECT
variables:
  current:
    fn::invoke:
      function: aws:getCallerIdentity
      arguments: {}
  currentGetRegion:
    fn::invoke:
      function: aws:getRegion
      arguments: {}

Import

Using pulumi import, import AWS Opensearch Outbound Connections using the Outbound Connection ID. For example:

$ pulumi import aws:opensearch/outboundConnection:OutboundConnection foo connection-id

Constructors

OutboundConnection(String name, {OutboundConnectionArgs? args, CustomResourceOptions? options})
Creates a new OutboundConnection. name The Pulumi resource name. args Arguments used to configure this OutboundConnection. The set of arguments for OutboundConnection. options Resource options controlling this resource's behavior.
OutboundConnection.reference(String urn)
Creates a typed reference to an existing OutboundConnection resource.

Properties

acceptConnection ↔ Output<bool?>
Accepts the connection.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
connectionAlias ↔ Output<String>
Specifies the connection alias that will be used by the customer for this connection.
latefinal
connectionMode ↔ Output<String>
Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
latefinal
connectionProperties ↔ Output<OutboundConnectionConnectionProperties>
Configuration block for the outbound connection.
latefinal
connectionStatus ↔ Output<String>
Status of the connection request.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
localDomainInfo ↔ Output<OutboundConnectionLocalDomainInfo>
Configuration block for the local Opensearch domain.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
remoteDomainInfo ↔ Output<OutboundConnectionRemoteDomainInfo>
Configuration block for the remote Opensearch domain.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {OutboundConnectionState? state, CustomResourceOptions? options}) → OutboundConnection
Gets an existing OutboundConnection resource's state with the given name and id.