published on Tuesday, Mar 10, 2026 by Pulumi
published on Tuesday, Mar 10, 2026 by Pulumi
Manages an AWS Opensearch Outbound Connection.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var currentCallerIdentity = Aws.GetCallerIdentity.Invoke();
var currentRegion = Aws.GetRegion.Invoke();
var foo = new Aws.OpenSearch.OutboundConnection("foo", new()
{
ConnectionAlias = "outbound_connection",
LocalDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionLocalDomainInfoArgs
{
OwnerId = currentCallerIdentity.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
Region = currentRegion.Apply(getRegionResult => getRegionResult.Name),
DomainName = aws_opensearch_domain.Local_domain.Domain_name,
},
RemoteDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionRemoteDomainInfoArgs
{
OwnerId = currentCallerIdentity.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
Region = currentRegion.Apply(getRegionResult => getRegionResult.Name),
DomainName = aws_opensearch_domain.Remote_domain.Domain_name,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/opensearch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
currentCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)
if err != nil {
return err
}
currentRegion, err := aws.GetRegion(ctx, nil, nil)
if err != nil {
return err
}
_, err = opensearch.NewOutboundConnection(ctx, "foo", &opensearch.OutboundConnectionArgs{
ConnectionAlias: pulumi.String("outbound_connection"),
LocalDomainInfo: &opensearch.OutboundConnectionLocalDomainInfoArgs{
OwnerId: *pulumi.String(currentCallerIdentity.AccountId),
Region: *pulumi.String(currentRegion.Name),
DomainName: pulumi.Any(aws_opensearch_domain.Local_domain.Domain_name),
},
RemoteDomainInfo: &opensearch.OutboundConnectionRemoteDomainInfoArgs{
OwnerId: *pulumi.String(currentCallerIdentity.AccountId),
Region: *pulumi.String(currentRegion.Name),
DomainName: pulumi.Any(aws_opensearch_domain.Remote_domain.Domain_name),
},
})
if err != nil {
return err
}
return nil
})
}
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.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.List;
import java.util.ArrayList;
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 currentCallerIdentity = AwsFunctions.getCallerIdentity();
final var currentRegion = AwsFunctions.getRegion();
var foo = new OutboundConnection("foo", OutboundConnectionArgs.builder()
.connectionAlias("outbound_connection")
.localDomainInfo(OutboundConnectionLocalDomainInfoArgs.builder()
.ownerId(currentCallerIdentity.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
.region(currentRegion.applyValue(getRegionResult -> getRegionResult.name()))
.domainName(aws_opensearch_domain.local_domain().domain_name())
.build())
.remoteDomainInfo(OutboundConnectionRemoteDomainInfoArgs.builder()
.ownerId(currentCallerIdentity.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
.region(currentRegion.applyValue(getRegionResult -> getRegionResult.name()))
.domainName(aws_opensearch_domain.remote_domain().domain_name())
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const currentCallerIdentity = aws.getCallerIdentity({});
const currentRegion = aws.getRegion({});
const foo = new aws.opensearch.OutboundConnection("foo", {
connectionAlias: "outbound_connection",
localDomainInfo: {
ownerId: currentCallerIdentity.then(currentCallerIdentity => currentCallerIdentity.accountId),
region: currentRegion.then(currentRegion => currentRegion.name),
domainName: aws_opensearch_domain.local_domain.domain_name,
},
remoteDomainInfo: {
ownerId: currentCallerIdentity.then(currentCallerIdentity => currentCallerIdentity.accountId),
region: currentRegion.then(currentRegion => currentRegion.name),
domainName: aws_opensearch_domain.remote_domain.domain_name,
},
});
import pulumi
import pulumi_aws as aws
current_caller_identity = aws.get_caller_identity()
current_region = aws.get_region()
foo = aws.opensearch.OutboundConnection("foo",
connection_alias="outbound_connection",
local_domain_info=aws.opensearch.OutboundConnectionLocalDomainInfoArgs(
owner_id=current_caller_identity.account_id,
region=current_region.name,
domain_name=aws_opensearch_domain["local_domain"]["domain_name"],
),
remote_domain_info=aws.opensearch.OutboundConnectionRemoteDomainInfoArgs(
owner_id=current_caller_identity.account_id,
region=current_region.name,
domain_name=aws_opensearch_domain["remote_domain"]["domain_name"],
))
resources:
foo:
type: aws:opensearch:OutboundConnection
properties:
connectionAlias: outbound_connection
localDomainInfo:
ownerId: ${currentCallerIdentity.accountId}
region: ${currentRegion.name}
domainName: ${aws_opensearch_domain.local_domain.domain_name}
remoteDomainInfo:
ownerId: ${currentCallerIdentity.accountId}
region: ${currentRegion.name}
domainName: ${aws_opensearch_domain.remote_domain.domain_name}
variables:
currentCallerIdentity:
fn::invoke:
Function: aws:getCallerIdentity
Arguments: {}
currentRegion:
fn::invoke:
Function: aws:getRegion
Arguments: {}
Create OutboundConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OutboundConnection(name: string, args: OutboundConnectionArgs, opts?: CustomResourceOptions);@overload
def OutboundConnection(resource_name: str,
args: OutboundConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OutboundConnection(resource_name: str,
opts: Optional[ResourceOptions] = None,
connection_alias: Optional[str] = None,
local_domain_info: Optional[OutboundConnectionLocalDomainInfoArgs] = None,
remote_domain_info: Optional[OutboundConnectionRemoteDomainInfoArgs] = None)func NewOutboundConnection(ctx *Context, name string, args OutboundConnectionArgs, opts ...ResourceOption) (*OutboundConnection, error)public OutboundConnection(string name, OutboundConnectionArgs args, CustomResourceOptions? opts = null)
public OutboundConnection(String name, OutboundConnectionArgs args)
public OutboundConnection(String name, OutboundConnectionArgs args, CustomResourceOptions options)
type: aws:opensearch:OutboundConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args OutboundConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args OutboundConnectionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args OutboundConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OutboundConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OutboundConnectionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var outboundConnectionResource = new Aws.OpenSearch.OutboundConnection("outboundConnectionResource", new()
{
ConnectionAlias = "string",
LocalDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionLocalDomainInfoArgs
{
DomainName = "string",
OwnerId = "string",
Region = "string",
},
RemoteDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionRemoteDomainInfoArgs
{
DomainName = "string",
OwnerId = "string",
Region = "string",
},
});
example, err := opensearch.NewOutboundConnection(ctx, "outboundConnectionResource", &opensearch.OutboundConnectionArgs{
ConnectionAlias: pulumi.String("string"),
LocalDomainInfo: &opensearch.OutboundConnectionLocalDomainInfoArgs{
DomainName: pulumi.String("string"),
OwnerId: pulumi.String("string"),
Region: pulumi.String("string"),
},
RemoteDomainInfo: &opensearch.OutboundConnectionRemoteDomainInfoArgs{
DomainName: pulumi.String("string"),
OwnerId: pulumi.String("string"),
Region: pulumi.String("string"),
},
})
var outboundConnectionResource = new OutboundConnection("outboundConnectionResource", OutboundConnectionArgs.builder()
.connectionAlias("string")
.localDomainInfo(OutboundConnectionLocalDomainInfoArgs.builder()
.domainName("string")
.ownerId("string")
.region("string")
.build())
.remoteDomainInfo(OutboundConnectionRemoteDomainInfoArgs.builder()
.domainName("string")
.ownerId("string")
.region("string")
.build())
.build());
outbound_connection_resource = aws.opensearch.OutboundConnection("outboundConnectionResource",
connection_alias="string",
local_domain_info={
"domain_name": "string",
"owner_id": "string",
"region": "string",
},
remote_domain_info={
"domain_name": "string",
"owner_id": "string",
"region": "string",
})
const outboundConnectionResource = new aws.opensearch.OutboundConnection("outboundConnectionResource", {
connectionAlias: "string",
localDomainInfo: {
domainName: "string",
ownerId: "string",
region: "string",
},
remoteDomainInfo: {
domainName: "string",
ownerId: "string",
region: "string",
},
});
type: aws:opensearch:OutboundConnection
properties:
connectionAlias: string
localDomainInfo:
domainName: string
ownerId: string
region: string
remoteDomainInfo:
domainName: string
ownerId: string
region: string
OutboundConnection Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The OutboundConnection resource accepts the following input properties:
- Connection
Alias string - Specifies the connection alias that will be used by the customer for this connection.
- Local
Domain OutboundInfo Connection Local Domain Info - Configuration block for the local Opensearch domain.
- Remote
Domain OutboundInfo Connection Remote Domain Info - Configuration block for the remote Opensearch domain.
- Connection
Alias string - Specifies the connection alias that will be used by the customer for this connection.
- Local
Domain OutboundInfo Connection Local Domain Info Args - Configuration block for the local Opensearch domain.
- Remote
Domain OutboundInfo Connection Remote Domain Info Args - Configuration block for the remote Opensearch domain.
- connection
Alias String - Specifies the connection alias that will be used by the customer for this connection.
- local
Domain OutboundInfo Connection Local Domain Info - Configuration block for the local Opensearch domain.
- remote
Domain OutboundInfo Connection Remote Domain Info - Configuration block for the remote Opensearch domain.
- connection
Alias string - Specifies the connection alias that will be used by the customer for this connection.
- local
Domain OutboundInfo Connection Local Domain Info - Configuration block for the local Opensearch domain.
- remote
Domain OutboundInfo Connection Remote Domain Info - Configuration block for the remote Opensearch domain.
- connection_
alias str - Specifies the connection alias that will be used by the customer for this connection.
- local_
domain_ Outboundinfo Connection Local Domain Info Args - Configuration block for the local Opensearch domain.
- remote_
domain_ Outboundinfo Connection Remote Domain Info Args - Configuration block for the remote Opensearch domain.
- connection
Alias String - Specifies the connection alias that will be used by the customer for this connection.
- local
Domain Property MapInfo - Configuration block for the local Opensearch domain.
- remote
Domain Property MapInfo - Configuration block for the remote Opensearch domain.
Outputs
All input properties are implicitly available as output properties. Additionally, the OutboundConnection resource produces the following output properties:
- Connection
Status string - Status of the connection request.
- Id string
- The provider-assigned unique ID for this managed resource.
- Connection
Status string - Status of the connection request.
- Id string
- The provider-assigned unique ID for this managed resource.
- connection
Status String - Status of the connection request.
- id String
- The provider-assigned unique ID for this managed resource.
- connection
Status string - Status of the connection request.
- id string
- The provider-assigned unique ID for this managed resource.
- connection_
status str - Status of the connection request.
- id str
- The provider-assigned unique ID for this managed resource.
- connection
Status String - Status of the connection request.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing OutboundConnection Resource
Get an existing OutboundConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: OutboundConnectionState, opts?: CustomResourceOptions): OutboundConnection@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
connection_alias: Optional[str] = None,
connection_status: Optional[str] = None,
local_domain_info: Optional[OutboundConnectionLocalDomainInfoArgs] = None,
remote_domain_info: Optional[OutboundConnectionRemoteDomainInfoArgs] = None) -> OutboundConnectionfunc GetOutboundConnection(ctx *Context, name string, id IDInput, state *OutboundConnectionState, opts ...ResourceOption) (*OutboundConnection, error)public static OutboundConnection Get(string name, Input<string> id, OutboundConnectionState? state, CustomResourceOptions? opts = null)public static OutboundConnection get(String name, Output<String> id, OutboundConnectionState state, CustomResourceOptions options)resources: _: type: aws:opensearch:OutboundConnection get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Connection
Alias string - Specifies the connection alias that will be used by the customer for this connection.
- Connection
Status string - Status of the connection request.
- Local
Domain OutboundInfo Connection Local Domain Info - Configuration block for the local Opensearch domain.
- Remote
Domain OutboundInfo Connection Remote Domain Info - Configuration block for the remote Opensearch domain.
- Connection
Alias string - Specifies the connection alias that will be used by the customer for this connection.
- Connection
Status string - Status of the connection request.
- Local
Domain OutboundInfo Connection Local Domain Info Args - Configuration block for the local Opensearch domain.
- Remote
Domain OutboundInfo Connection Remote Domain Info Args - Configuration block for the remote Opensearch domain.
- connection
Alias String - Specifies the connection alias that will be used by the customer for this connection.
- connection
Status String - Status of the connection request.
- local
Domain OutboundInfo Connection Local Domain Info - Configuration block for the local Opensearch domain.
- remote
Domain OutboundInfo Connection Remote Domain Info - Configuration block for the remote Opensearch domain.
- connection
Alias string - Specifies the connection alias that will be used by the customer for this connection.
- connection
Status string - Status of the connection request.
- local
Domain OutboundInfo Connection Local Domain Info - Configuration block for the local Opensearch domain.
- remote
Domain OutboundInfo Connection Remote Domain Info - Configuration block for the remote Opensearch domain.
- connection_
alias str - Specifies the connection alias that will be used by the customer for this connection.
- connection_
status str - Status of the connection request.
- local_
domain_ Outboundinfo Connection Local Domain Info Args - Configuration block for the local Opensearch domain.
- remote_
domain_ Outboundinfo Connection Remote Domain Info Args - Configuration block for the remote Opensearch domain.
- connection
Alias String - Specifies the connection alias that will be used by the customer for this connection.
- connection
Status String - Status of the connection request.
- local
Domain Property MapInfo - Configuration block for the local Opensearch domain.
- remote
Domain Property MapInfo - Configuration block for the remote Opensearch domain.
Supporting Types
OutboundConnectionLocalDomainInfo, OutboundConnectionLocalDomainInfoArgs
- Domain
Name string - The name of the local domain.
- Owner
Id string - The Account ID of the owner of the local domain.
- Region string
- The region of the local domain.
- Domain
Name string - The name of the local domain.
- Owner
Id string - The Account ID of the owner of the local domain.
- Region string
- The region of the local domain.
- domain
Name String - The name of the local domain.
- owner
Id String - The Account ID of the owner of the local domain.
- region String
- The region of the local domain.
- domain
Name string - The name of the local domain.
- owner
Id string - The Account ID of the owner of the local domain.
- region string
- The region of the local domain.
- domain_
name str - The name of the local domain.
- owner_
id str - The Account ID of the owner of the local domain.
- region str
- The region of the local domain.
- domain
Name String - The name of the local domain.
- owner
Id String - The Account ID of the owner of the local domain.
- region String
- The region of the local domain.
OutboundConnectionRemoteDomainInfo, OutboundConnectionRemoteDomainInfoArgs
- Domain
Name string - The name of the remote domain.
- Owner
Id string - The Account ID of the owner of the remote domain.
- Region string
- The region of the remote domain.
- Domain
Name string - The name of the remote domain.
- Owner
Id string - The Account ID of the owner of the remote domain.
- Region string
- The region of the remote domain.
- domain
Name String - The name of the remote domain.
- owner
Id String - The Account ID of the owner of the remote domain.
- region String
- The region of the remote domain.
- domain
Name string - The name of the remote domain.
- owner
Id string - The Account ID of the owner of the remote domain.
- region string
- The region of the remote domain.
- domain_
name str - The name of the remote domain.
- owner_
id str - The Account ID of the owner of the remote domain.
- region str
- The region of the remote domain.
- domain
Name String - The name of the remote domain.
- owner
Id String - The Account ID of the owner of the remote domain.
- region String
- The region of the remote domain.
Import
AWS Opensearch Outbound Connections can be imported by using the Outbound Connection ID, e.g.,
$ pulumi import aws:opensearch/outboundConnection:OutboundConnection foo connection-id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Tuesday, Mar 10, 2026 by Pulumi
