aws.opensearch.InboundConnectionAccepter
Explore with Pulumi AI
Manages an AWS Opensearch Inbound Connection Accepter. If connecting domains from different AWS accounts, ensure that the accepter is configured to use the AWS account where the remote opensearch domain exists.
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",
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,
},
});
const fooInboundConnectionAccepter = new aws.opensearch.InboundConnectionAccepter("foo", {connectionId: foo.id});
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",
local_domain_info={
"owner_id": current.account_id,
"region": current_get_region.name,
"domain_name": local_domain["domainName"],
},
remote_domain_info={
"owner_id": current.account_id,
"region": current_get_region.name,
"domain_name": remote_domain["domainName"],
})
foo_inbound_connection_accepter = aws.opensearch.InboundConnectionAccepter("foo", connection_id=foo.id)
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, &aws.GetCallerIdentityArgs{}, nil)
if err != nil {
return err
}
currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
if err != nil {
return err
}
foo, err := opensearch.NewOutboundConnection(ctx, "foo", &opensearch.OutboundConnectionArgs{
ConnectionAlias: pulumi.String("outbound_connection"),
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
}
_, err = opensearch.NewInboundConnectionAccepter(ctx, "foo", &opensearch.InboundConnectionAccepterArgs{
ConnectionId: foo.ID(),
})
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",
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,
},
});
var fooInboundConnectionAccepter = new Aws.OpenSearch.InboundConnectionAccepter("foo", new()
{
ConnectionId = foo.Id,
});
});
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 com.pulumi.aws.opensearch.InboundConnectionAccepter;
import com.pulumi.aws.opensearch.InboundConnectionAccepterArgs;
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")
.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());
var fooInboundConnectionAccepter = new InboundConnectionAccepter("fooInboundConnectionAccepter", InboundConnectionAccepterArgs.builder()
.connectionId(foo.id())
.build());
}
}
resources:
foo:
type: aws:opensearch:OutboundConnection
properties:
connectionAlias: outbound_connection
localDomainInfo:
ownerId: ${current.accountId}
region: ${currentGetRegion.name}
domainName: ${localDomain.domainName}
remoteDomainInfo:
ownerId: ${current.accountId}
region: ${currentGetRegion.name}
domainName: ${remoteDomain.domainName}
fooInboundConnectionAccepter:
type: aws:opensearch:InboundConnectionAccepter
name: foo
properties:
connectionId: ${foo.id}
variables:
current:
fn::invoke:
Function: aws:getCallerIdentity
Arguments: {}
currentGetRegion:
fn::invoke:
Function: aws:getRegion
Arguments: {}
Create InboundConnectionAccepter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InboundConnectionAccepter(name: string, args: InboundConnectionAccepterArgs, opts?: CustomResourceOptions);
@overload
def InboundConnectionAccepter(resource_name: str,
args: InboundConnectionAccepterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InboundConnectionAccepter(resource_name: str,
opts: Optional[ResourceOptions] = None,
connection_id: Optional[str] = None)
func NewInboundConnectionAccepter(ctx *Context, name string, args InboundConnectionAccepterArgs, opts ...ResourceOption) (*InboundConnectionAccepter, error)
public InboundConnectionAccepter(string name, InboundConnectionAccepterArgs args, CustomResourceOptions? opts = null)
public InboundConnectionAccepter(String name, InboundConnectionAccepterArgs args)
public InboundConnectionAccepter(String name, InboundConnectionAccepterArgs args, CustomResourceOptions options)
type: aws:opensearch:InboundConnectionAccepter
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 InboundConnectionAccepterArgs
- 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 InboundConnectionAccepterArgs
- 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 InboundConnectionAccepterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InboundConnectionAccepterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InboundConnectionAccepterArgs
- 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 inboundConnectionAccepterResource = new Aws.OpenSearch.InboundConnectionAccepter("inboundConnectionAccepterResource", new()
{
ConnectionId = "string",
});
example, err := opensearch.NewInboundConnectionAccepter(ctx, "inboundConnectionAccepterResource", &opensearch.InboundConnectionAccepterArgs{
ConnectionId: pulumi.String("string"),
})
var inboundConnectionAccepterResource = new InboundConnectionAccepter("inboundConnectionAccepterResource", InboundConnectionAccepterArgs.builder()
.connectionId("string")
.build());
inbound_connection_accepter_resource = aws.opensearch.InboundConnectionAccepter("inboundConnectionAccepterResource", connection_id="string")
const inboundConnectionAccepterResource = new aws.opensearch.InboundConnectionAccepter("inboundConnectionAccepterResource", {connectionId: "string"});
type: aws:opensearch:InboundConnectionAccepter
properties:
connectionId: string
InboundConnectionAccepter 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 InboundConnectionAccepter resource accepts the following input properties:
- Connection
Id string - Specifies the ID of the connection to accept.
- Connection
Id string - Specifies the ID of the connection to accept.
- connection
Id String - Specifies the ID of the connection to accept.
- connection
Id string - Specifies the ID of the connection to accept.
- connection_
id str - Specifies the ID of the connection to accept.
- connection
Id String - Specifies the ID of the connection to accept.
Outputs
All input properties are implicitly available as output properties. Additionally, the InboundConnectionAccepter 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 InboundConnectionAccepter Resource
Get an existing InboundConnectionAccepter 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?: InboundConnectionAccepterState, opts?: CustomResourceOptions): InboundConnectionAccepter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
connection_id: Optional[str] = None,
connection_status: Optional[str] = None) -> InboundConnectionAccepter
func GetInboundConnectionAccepter(ctx *Context, name string, id IDInput, state *InboundConnectionAccepterState, opts ...ResourceOption) (*InboundConnectionAccepter, error)
public static InboundConnectionAccepter Get(string name, Input<string> id, InboundConnectionAccepterState? state, CustomResourceOptions? opts = null)
public static InboundConnectionAccepter get(String name, Output<String> id, InboundConnectionAccepterState 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.
- Connection
Id string - Specifies the ID of the connection to accept.
- Connection
Status string - Status of the connection request.
- Connection
Id string - Specifies the ID of the connection to accept.
- Connection
Status string - Status of the connection request.
- connection
Id String - Specifies the ID of the connection to accept.
- connection
Status String - Status of the connection request.
- connection
Id string - Specifies the ID of the connection to accept.
- connection
Status string - Status of the connection request.
- connection_
id str - Specifies the ID of the connection to accept.
- connection_
status str - Status of the connection request.
- connection
Id String - Specifies the ID of the connection to accept.
- connection
Status String - Status of the connection request.
Import
Using pulumi import
, import AWS Opensearch Inbound Connection Accepters using the Inbound Connection ID. For example:
$ pulumi import aws:opensearch/inboundConnectionAccepter:InboundConnectionAccepter 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
aws
Terraform Provider.