ApiConnectionArgs

data class ApiConnectionArgs(val displayName: Output<String>? = null, val managedApiId: Output<String>? = null, val name: Output<String>? = null, val parameterValues: Output<Map<String, String>>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ApiConnectionArgs>

Manages an API Connection.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.connections.ConnectionsFunctions;
import com.pulumi.azure.connections.inputs.GetManagedApiArgs;
import com.pulumi.azure.servicebus.Namespace;
import com.pulumi.azure.servicebus.NamespaceArgs;
import com.pulumi.azure.connections.ApiConnection;
import com.pulumi.azure.connections.ApiConnectionArgs;
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) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
final var exampleManagedApi = ConnectionsFunctions.getManagedApi(GetManagedApiArgs.builder()
.name("servicebus")
.location(exampleResourceGroup.location())
.build());
var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("Basic")
.build());
var exampleApiConnection = new ApiConnection("exampleApiConnection", ApiConnectionArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.managedApiId(exampleManagedApi.applyValue(getManagedApiResult -> getManagedApiResult).applyValue(exampleManagedApi -> exampleManagedApi.applyValue(getManagedApiResult -> getManagedApiResult.id())))
.displayName("Example 1")
.parameterValues(Map.of("connectionString", exampleNamespace.defaultPrimaryConnectionString()))
.tags(Map.of("Hello", "World"))
.build());
}
}

Import

API Connections can be imported using the resource id, e.g.

$ pulumi import azure:connections/apiConnection:ApiConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.Web/connections/example-connection

Constructors

Link copied to clipboard
fun ApiConnectionArgs(displayName: Output<String>? = null, managedApiId: Output<String>? = null, name: Output<String>? = null, parameterValues: Output<Map<String, String>>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ApiConnectionArgs

Properties

Link copied to clipboard
val displayName: Output<String>? = null

A display name for this API Connection. Changing this forces a new API Connection to be created.

Link copied to clipboard
val managedApiId: Output<String>? = null

The ID of the Managed API which this API Connection is linked to. Changing this forces a new API Connection to be created.

Link copied to clipboard
val name: Output<String>? = null

The Name which should be used for this API Connection. Changing this forces a new API Connection to be created.

Link copied to clipboard
val parameterValues: Output<Map<String, String>>? = null
Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the Resource Group where this API Connection should exist. Changing this forces a new API Connection to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags which should be assigned to the API Connection.