
com.pulumi.aws.opensearch.OutboundConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.opensearch;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.opensearch.OutboundConnectionArgs;
import com.pulumi.aws.opensearch.inputs.OutboundConnectionState;
import com.pulumi.aws.opensearch.outputs.OutboundConnectionConnectionProperties;
import com.pulumi.aws.opensearch.outputs.OutboundConnectionLocalDomainInfo;
import com.pulumi.aws.opensearch.outputs.OutboundConnectionRemoteDomainInfo;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages an AWS Opensearch Outbound Connection.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import AWS Opensearch Outbound Connections using the Outbound Connection ID. For example:
*
* ```sh
* $ pulumi import aws:opensearch/outboundConnection:OutboundConnection foo connection-id
* ```
*
*/
@ResourceType(type="aws:opensearch/outboundConnection:OutboundConnection")
public class OutboundConnection extends com.pulumi.resources.CustomResource {
/**
* Accepts the connection.
*
*/
@Export(name="acceptConnection", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> acceptConnection;
/**
* @return Accepts the connection.
*
*/
public Output> acceptConnection() {
return Codegen.optional(this.acceptConnection);
}
/**
* Specifies the connection alias that will be used by the customer for this connection.
*
*/
@Export(name="connectionAlias", refs={String.class}, tree="[0]")
private Output connectionAlias;
/**
* @return Specifies the connection alias that will be used by the customer for this connection.
*
*/
public Output connectionAlias() {
return this.connectionAlias;
}
/**
* Specifies the connection mode. Accepted values are `DIRECT` or `VPC_ENDPOINT`.
*
*/
@Export(name="connectionMode", refs={String.class}, tree="[0]")
private Output connectionMode;
/**
* @return Specifies the connection mode. Accepted values are `DIRECT` or `VPC_ENDPOINT`.
*
*/
public Output connectionMode() {
return this.connectionMode;
}
/**
* Configuration block for the outbound connection.
*
*/
@Export(name="connectionProperties", refs={OutboundConnectionConnectionProperties.class}, tree="[0]")
private Output connectionProperties;
/**
* @return Configuration block for the outbound connection.
*
*/
public Output connectionProperties() {
return this.connectionProperties;
}
/**
* Status of the connection request.
*
*/
@Export(name="connectionStatus", refs={String.class}, tree="[0]")
private Output connectionStatus;
/**
* @return Status of the connection request.
*
*/
public Output connectionStatus() {
return this.connectionStatus;
}
/**
* Configuration block for the local Opensearch domain.
*
*/
@Export(name="localDomainInfo", refs={OutboundConnectionLocalDomainInfo.class}, tree="[0]")
private Output localDomainInfo;
/**
* @return Configuration block for the local Opensearch domain.
*
*/
public Output localDomainInfo() {
return this.localDomainInfo;
}
/**
* Configuration block for the remote Opensearch domain.
*
*/
@Export(name="remoteDomainInfo", refs={OutboundConnectionRemoteDomainInfo.class}, tree="[0]")
private Output remoteDomainInfo;
/**
* @return Configuration block for the remote Opensearch domain.
*
*/
public Output remoteDomainInfo() {
return this.remoteDomainInfo;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public OutboundConnection(java.lang.String name) {
this(name, OutboundConnectionArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public OutboundConnection(java.lang.String name, OutboundConnectionArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public OutboundConnection(java.lang.String name, OutboundConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:opensearch/outboundConnection:OutboundConnection", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private OutboundConnection(java.lang.String name, Output id, @Nullable OutboundConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:opensearch/outboundConnection:OutboundConnection", name, state, makeResourceOptions(options, id), false);
}
private static OutboundConnectionArgs makeArgs(OutboundConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? OutboundConnectionArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static OutboundConnection get(java.lang.String name, Output id, @Nullable OutboundConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new OutboundConnection(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy