1. Packages
  2. AWS Classic
  3. API Docs
  4. opensearch
  5. OutboundConnection

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.opensearch.OutboundConnection

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    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", {
        connectionAlias: "outbound_connection",
        connectionMode: "DIRECT",
        localDomainInfo: {
            ownerId: current.then(current => current.accountId),
            region: currentGetRegion.then(currentGetRegion => currentGetRegion.name),
            domainName: localDomain.domainName,
        },
        remoteDomainInfo: {
            ownerId: current.then(current => current.accountId),
            region: currentGetRegion.then(currentGetRegion => currentGetRegion.name),
            domainName: remoteDomain.domainName,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    current = aws.get_caller_identity()
    current_get_region = aws.get_region()
    foo = aws.opensearch.OutboundConnection("foo",
        connection_alias="outbound_connection",
        connection_mode="DIRECT",
        local_domain_info=aws.opensearch.OutboundConnectionLocalDomainInfoArgs(
            owner_id=current.account_id,
            region=current_get_region.name,
            domain_name=local_domain["domainName"],
        ),
        remote_domain_info=aws.opensearch.OutboundConnectionRemoteDomainInfoArgs(
            owner_id=current.account_id,
            region=current_get_region.name,
            domain_name=remote_domain["domainName"],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/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, nil, nil)
    		if err != nil {
    			return err
    		}
    		currentGetRegion, err := aws.GetRegion(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = opensearch.NewOutboundConnection(ctx, "foo", &opensearch.OutboundConnectionArgs{
    			ConnectionAlias: pulumi.String("outbound_connection"),
    			ConnectionMode:  pulumi.String("DIRECT"),
    			LocalDomainInfo: &opensearch.OutboundConnectionLocalDomainInfoArgs{
    				OwnerId:    pulumi.String(current.AccountId),
    				Region:     pulumi.String(currentGetRegion.Name),
    				DomainName: pulumi.Any(localDomain.DomainName),
    			},
    			RemoteDomainInfo: &opensearch.OutboundConnectionRemoteDomainInfoArgs{
    				OwnerId:    pulumi.String(current.AccountId),
    				Region:     pulumi.String(currentGetRegion.Name),
    				DomainName: pulumi.Any(remoteDomain.DomainName),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()
        {
            ConnectionAlias = "outbound_connection",
            ConnectionMode = "DIRECT",
            LocalDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionLocalDomainInfoArgs
            {
                OwnerId = current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
                Region = currentGetRegion.Apply(getRegionResult => getRegionResult.Name),
                DomainName = localDomain.DomainName,
            },
            RemoteDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionRemoteDomainInfoArgs
            {
                OwnerId = current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
                Region = currentGetRegion.Apply(getRegionResult => getRegionResult.Name),
                DomainName = remoteDomain.DomainName,
            },
        });
    
    });
    
    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.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 current = AwsFunctions.getCallerIdentity();
    
            final var currentGetRegion = AwsFunctions.getRegion();
    
            var foo = new OutboundConnection("foo", OutboundConnectionArgs.builder()        
                .connectionAlias("outbound_connection")
                .connectionMode("DIRECT")
                .localDomainInfo(OutboundConnectionLocalDomainInfoArgs.builder()
                    .ownerId(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
                    .region(currentGetRegion.applyValue(getRegionResult -> getRegionResult.name()))
                    .domainName(localDomain.domainName())
                    .build())
                .remoteDomainInfo(OutboundConnectionRemoteDomainInfoArgs.builder()
                    .ownerId(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
                    .region(currentGetRegion.applyValue(getRegionResult -> getRegionResult.name()))
                    .domainName(remoteDomain.domainName())
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: aws:opensearch:OutboundConnection
        properties:
          connectionAlias: outbound_connection
          connectionMode: DIRECT
          localDomainInfo:
            ownerId: ${current.accountId}
            region: ${currentGetRegion.name}
            domainName: ${localDomain.domainName}
          remoteDomainInfo:
            ownerId: ${current.accountId}
            region: ${currentGetRegion.name}
            domainName: ${remoteDomain.domainName}
    variables:
      current:
        fn::invoke:
          Function: aws:getCallerIdentity
          Arguments: {}
      currentGetRegion:
        fn::invoke:
          Function: aws:getRegion
          Arguments: {}
    

    Create OutboundConnection Resource

    new OutboundConnection(name: string, args: OutboundConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def OutboundConnection(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           accept_connection: Optional[bool] = None,
                           connection_alias: Optional[str] = None,
                           connection_mode: Optional[str] = None,
                           connection_properties: Optional[OutboundConnectionConnectionPropertiesArgs] = None,
                           local_domain_info: Optional[OutboundConnectionLocalDomainInfoArgs] = None,
                           remote_domain_info: Optional[OutboundConnectionRemoteDomainInfoArgs] = None)
    @overload
    def OutboundConnection(resource_name: str,
                           args: OutboundConnectionArgs,
                           opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The OutboundConnection resource accepts the following input properties:

    ConnectionAlias string
    Specifies the connection alias that will be used by the customer for this connection.
    LocalDomainInfo OutboundConnectionLocalDomainInfo
    Configuration block for the local Opensearch domain.
    RemoteDomainInfo OutboundConnectionRemoteDomainInfo
    Configuration block for the remote Opensearch domain.
    AcceptConnection bool
    Accepts the connection.
    ConnectionMode string
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    ConnectionProperties OutboundConnectionConnectionProperties
    Configuration block for the outbound connection.
    ConnectionAlias string
    Specifies the connection alias that will be used by the customer for this connection.
    LocalDomainInfo OutboundConnectionLocalDomainInfoArgs
    Configuration block for the local Opensearch domain.
    RemoteDomainInfo OutboundConnectionRemoteDomainInfoArgs
    Configuration block for the remote Opensearch domain.
    AcceptConnection bool
    Accepts the connection.
    ConnectionMode string
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    ConnectionProperties OutboundConnectionConnectionPropertiesArgs
    Configuration block for the outbound connection.
    connectionAlias String
    Specifies the connection alias that will be used by the customer for this connection.
    localDomainInfo OutboundConnectionLocalDomainInfo
    Configuration block for the local Opensearch domain.
    remoteDomainInfo OutboundConnectionRemoteDomainInfo
    Configuration block for the remote Opensearch domain.
    acceptConnection Boolean
    Accepts the connection.
    connectionMode String
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    connectionProperties OutboundConnectionConnectionProperties
    Configuration block for the outbound connection.
    connectionAlias string
    Specifies the connection alias that will be used by the customer for this connection.
    localDomainInfo OutboundConnectionLocalDomainInfo
    Configuration block for the local Opensearch domain.
    remoteDomainInfo OutboundConnectionRemoteDomainInfo
    Configuration block for the remote Opensearch domain.
    acceptConnection boolean
    Accepts the connection.
    connectionMode string
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    connectionProperties OutboundConnectionConnectionProperties
    Configuration block for the outbound connection.
    connection_alias str
    Specifies the connection alias that will be used by the customer for this connection.
    local_domain_info OutboundConnectionLocalDomainInfoArgs
    Configuration block for the local Opensearch domain.
    remote_domain_info OutboundConnectionRemoteDomainInfoArgs
    Configuration block for the remote Opensearch domain.
    accept_connection bool
    Accepts the connection.
    connection_mode str
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    connection_properties OutboundConnectionConnectionPropertiesArgs
    Configuration block for the outbound connection.
    connectionAlias String
    Specifies the connection alias that will be used by the customer for this connection.
    localDomainInfo Property Map
    Configuration block for the local Opensearch domain.
    remoteDomainInfo Property Map
    Configuration block for the remote Opensearch domain.
    acceptConnection Boolean
    Accepts the connection.
    connectionMode String
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    connectionProperties Property Map
    Configuration block for the outbound connection.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OutboundConnection resource produces the following output properties:

    ConnectionStatus string
    Status of the connection request.
    Id string
    The provider-assigned unique ID for this managed resource.
    ConnectionStatus string
    Status of the connection request.
    Id string
    The provider-assigned unique ID for this managed resource.
    connectionStatus String
    Status of the connection request.
    id String
    The provider-assigned unique ID for this managed resource.
    connectionStatus 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.
    connectionStatus 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,
            accept_connection: Optional[bool] = None,
            connection_alias: Optional[str] = None,
            connection_mode: Optional[str] = None,
            connection_properties: Optional[OutboundConnectionConnectionPropertiesArgs] = None,
            connection_status: Optional[str] = None,
            local_domain_info: Optional[OutboundConnectionLocalDomainInfoArgs] = None,
            remote_domain_info: Optional[OutboundConnectionRemoteDomainInfoArgs] = None) -> OutboundConnection
    func 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AcceptConnection bool
    Accepts the connection.
    ConnectionAlias string
    Specifies the connection alias that will be used by the customer for this connection.
    ConnectionMode string
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    ConnectionProperties OutboundConnectionConnectionProperties
    Configuration block for the outbound connection.
    ConnectionStatus string
    Status of the connection request.
    LocalDomainInfo OutboundConnectionLocalDomainInfo
    Configuration block for the local Opensearch domain.
    RemoteDomainInfo OutboundConnectionRemoteDomainInfo
    Configuration block for the remote Opensearch domain.
    AcceptConnection bool
    Accepts the connection.
    ConnectionAlias string
    Specifies the connection alias that will be used by the customer for this connection.
    ConnectionMode string
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    ConnectionProperties OutboundConnectionConnectionPropertiesArgs
    Configuration block for the outbound connection.
    ConnectionStatus string
    Status of the connection request.
    LocalDomainInfo OutboundConnectionLocalDomainInfoArgs
    Configuration block for the local Opensearch domain.
    RemoteDomainInfo OutboundConnectionRemoteDomainInfoArgs
    Configuration block for the remote Opensearch domain.
    acceptConnection Boolean
    Accepts the connection.
    connectionAlias String
    Specifies the connection alias that will be used by the customer for this connection.
    connectionMode String
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    connectionProperties OutboundConnectionConnectionProperties
    Configuration block for the outbound connection.
    connectionStatus String
    Status of the connection request.
    localDomainInfo OutboundConnectionLocalDomainInfo
    Configuration block for the local Opensearch domain.
    remoteDomainInfo OutboundConnectionRemoteDomainInfo
    Configuration block for the remote Opensearch domain.
    acceptConnection boolean
    Accepts the connection.
    connectionAlias string
    Specifies the connection alias that will be used by the customer for this connection.
    connectionMode string
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    connectionProperties OutboundConnectionConnectionProperties
    Configuration block for the outbound connection.
    connectionStatus string
    Status of the connection request.
    localDomainInfo OutboundConnectionLocalDomainInfo
    Configuration block for the local Opensearch domain.
    remoteDomainInfo OutboundConnectionRemoteDomainInfo
    Configuration block for the remote Opensearch domain.
    accept_connection bool
    Accepts the connection.
    connection_alias str
    Specifies the connection alias that will be used by the customer for this connection.
    connection_mode str
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    connection_properties OutboundConnectionConnectionPropertiesArgs
    Configuration block for the outbound connection.
    connection_status str
    Status of the connection request.
    local_domain_info OutboundConnectionLocalDomainInfoArgs
    Configuration block for the local Opensearch domain.
    remote_domain_info OutboundConnectionRemoteDomainInfoArgs
    Configuration block for the remote Opensearch domain.
    acceptConnection Boolean
    Accepts the connection.
    connectionAlias String
    Specifies the connection alias that will be used by the customer for this connection.
    connectionMode String
    Specifies the connection mode. Accepted values are DIRECT or VPC_ENDPOINT.
    connectionProperties Property Map
    Configuration block for the outbound connection.
    connectionStatus String
    Status of the connection request.
    localDomainInfo Property Map
    Configuration block for the local Opensearch domain.
    remoteDomainInfo Property Map
    Configuration block for the remote Opensearch domain.

    Supporting Types

    OutboundConnectionConnectionProperties, OutboundConnectionConnectionPropertiesArgs

    CrossClusterSearch OutboundConnectionConnectionPropertiesCrossClusterSearch
    Configuration block for cross cluster search.
    Endpoint string
    The endpoint of the remote domain, is only set when connection_mode is VPC_ENDPOINT and accept_connection is TRUE.
    CrossClusterSearch OutboundConnectionConnectionPropertiesCrossClusterSearch
    Configuration block for cross cluster search.
    Endpoint string
    The endpoint of the remote domain, is only set when connection_mode is VPC_ENDPOINT and accept_connection is TRUE.
    crossClusterSearch OutboundConnectionConnectionPropertiesCrossClusterSearch
    Configuration block for cross cluster search.
    endpoint String
    The endpoint of the remote domain, is only set when connection_mode is VPC_ENDPOINT and accept_connection is TRUE.
    crossClusterSearch OutboundConnectionConnectionPropertiesCrossClusterSearch
    Configuration block for cross cluster search.
    endpoint string
    The endpoint of the remote domain, is only set when connection_mode is VPC_ENDPOINT and accept_connection is TRUE.
    cross_cluster_search OutboundConnectionConnectionPropertiesCrossClusterSearch
    Configuration block for cross cluster search.
    endpoint str
    The endpoint of the remote domain, is only set when connection_mode is VPC_ENDPOINT and accept_connection is TRUE.
    crossClusterSearch Property Map
    Configuration block for cross cluster search.
    endpoint String
    The endpoint of the remote domain, is only set when connection_mode is VPC_ENDPOINT and accept_connection is TRUE.

    OutboundConnectionConnectionPropertiesCrossClusterSearch, OutboundConnectionConnectionPropertiesCrossClusterSearchArgs

    SkipUnavailable string
    Skips unavailable clusters and can only be used for cross-cluster searches. Accepted values are ENABLED or DISABLED.
    SkipUnavailable string
    Skips unavailable clusters and can only be used for cross-cluster searches. Accepted values are ENABLED or DISABLED.
    skipUnavailable String
    Skips unavailable clusters and can only be used for cross-cluster searches. Accepted values are ENABLED or DISABLED.
    skipUnavailable string
    Skips unavailable clusters and can only be used for cross-cluster searches. Accepted values are ENABLED or DISABLED.
    skip_unavailable str
    Skips unavailable clusters and can only be used for cross-cluster searches. Accepted values are ENABLED or DISABLED.
    skipUnavailable String
    Skips unavailable clusters and can only be used for cross-cluster searches. Accepted values are ENABLED or DISABLED.

    OutboundConnectionLocalDomainInfo, OutboundConnectionLocalDomainInfoArgs

    DomainName string
    The name of the local domain.
    OwnerId string
    The Account ID of the owner of the local domain.
    Region string
    The region of the local domain.
    DomainName string
    The name of the local domain.
    OwnerId string
    The Account ID of the owner of the local domain.
    Region string
    The region of the local domain.
    domainName String
    The name of the local domain.
    ownerId String
    The Account ID of the owner of the local domain.
    region String
    The region of the local domain.
    domainName string
    The name of the local domain.
    ownerId 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.
    domainName String
    The name of the local domain.
    ownerId String
    The Account ID of the owner of the local domain.
    region String
    The region of the local domain.

    OutboundConnectionRemoteDomainInfo, OutboundConnectionRemoteDomainInfoArgs

    DomainName string
    The name of the remote domain.
    OwnerId string
    The Account ID of the owner of the remote domain.
    Region string
    The region of the remote domain.
    DomainName string
    The name of the remote domain.
    OwnerId string
    The Account ID of the owner of the remote domain.
    Region string
    The region of the remote domain.
    domainName String
    The name of the remote domain.
    ownerId String
    The Account ID of the owner of the remote domain.
    region String
    The region of the remote domain.
    domainName string
    The name of the remote domain.
    ownerId 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.
    domainName String
    The name of the remote domain.
    ownerId String
    The Account ID of the owner of the remote domain.
    region String
    The region of the remote domain.

    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
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi