InboundConnectionAccepter class
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", {
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",
});
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",
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")
foo_inbound_connection_accepter = aws.opensearch.InboundConnectionAccepter("foo", connection_id=foo.id)
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",
});
var fooInboundConnectionAccepter = new Aws.OpenSearch.InboundConnectionAccepter("foo", new()
{
ConnectionId = foo.Id,
});
});
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
}
foo, 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"),
})
if err != nil {
return err
}
_, err = opensearch.NewInboundConnectionAccepter(ctx, "foo", &opensearch.InboundConnectionAccepterArgs{
ConnectionId: foo.ID().ToIDOutput().ToStringOutput(),
})
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"
}
resource "aws_opensearch_inboundconnectionaccepter" "foo" {
connection_id = aws_opensearch_outboundconnection.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.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")
.build());
var fooInboundConnectionAccepter = new InboundConnectionAccepter("fooInboundConnectionAccepter", InboundConnectionAccepterArgs.builder()
.connectionId(foo.id())
.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
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: {}
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
Constructors
- InboundConnectionAccepter(String name, {InboundConnectionAccepterArgs? args, CustomResourceOptions? options})
-
Creates a new InboundConnectionAccepter.
nameThe Pulumi resource name.argsArguments used to configure this InboundConnectionAccepter. The set of arguments for InboundConnectionAccepter.optionsResource options controlling this resource's behavior. - InboundConnectionAccepter.reference(String urn)
- Creates a typed reference to an existing InboundConnectionAccepter resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
connectionId
↔ Output<
String> -
Specifies the ID of the connection to accept.
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
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
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, {InboundConnectionAccepterState? state, CustomResourceOptions? options}) → InboundConnectionAccepter -
Gets an existing InboundConnectionAccepter resource's state with the given
nameandid.