ApiConnection

class ApiConnection : KotlinCustomResource

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

Properties

Link copied to clipboard
val displayName: Output<String>

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val managedApiId: Output<String>

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>

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

Link copied to clipboard
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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>>?

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

Link copied to clipboard
val urn: Output<String>