ConnectionArgs

data class ConnectionArgs(val appServiceId: Output<String>? = null, val authentication: Output<ConnectionAuthenticationArgs>? = null, val clientType: Output<String>? = null, val name: Output<String>? = null, val secretStore: Output<ConnectionSecretStoreArgs>? = null, val targetResourceId: Output<String>? = null, val vnetSolution: Output<String>? = null) : ConvertibleToJava<ConnectionArgs>

Manages a service connector for app service.

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.cosmosdb.Account;
import com.pulumi.azure.cosmosdb.AccountArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
import com.pulumi.azure.cosmosdb.SqlDatabase;
import com.pulumi.azure.cosmosdb.SqlDatabaseArgs;
import com.pulumi.azure.cosmosdb.SqlContainer;
import com.pulumi.azure.cosmosdb.SqlContainerArgs;
import com.pulumi.azure.appservice.ServicePlan;
import com.pulumi.azure.appservice.ServicePlanArgs;
import com.pulumi.azure.appservice.LinuxWebApp;
import com.pulumi.azure.appservice.LinuxWebAppArgs;
import com.pulumi.azure.appservice.inputs.LinuxWebAppSiteConfigArgs;
import com.pulumi.azure.appservice.Connection;
import com.pulumi.azure.appservice.ConnectionArgs;
import com.pulumi.azure.appservice.inputs.ConnectionAuthenticationArgs;
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());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.offerType("Standard")
.kind("GlobalDocumentDB")
.consistencyPolicy(AccountConsistencyPolicyArgs.builder()
.consistencyLevel("BoundedStaleness")
.maxIntervalInSeconds(10)
.maxStalenessPrefix(200)
.build())
.geoLocations(AccountGeoLocationArgs.builder()
.location(exampleResourceGroup.location())
.failoverPriority(0)
.build())
.build());
var exampleSqlDatabase = new SqlDatabase("exampleSqlDatabase", SqlDatabaseArgs.builder()
.resourceGroupName(exampleAccount.resourceGroupName())
.accountName(exampleAccount.name())
.throughput(400)
.build());
var exampleSqlContainer = new SqlContainer("exampleSqlContainer", SqlContainerArgs.builder()
.resourceGroupName(exampleAccount.resourceGroupName())
.accountName(exampleAccount.name())
.databaseName(exampleSqlDatabase.name())
.partitionKeyPath("/definition")
.build());
var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.skuName("P1v2")
.osType("Linux")
.build());
var exampleLinuxWebApp = new LinuxWebApp("exampleLinuxWebApp", LinuxWebAppArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.servicePlanId(exampleServicePlan.id())
.siteConfig()
.build());
var exampleConnection = new Connection("exampleConnection", ConnectionArgs.builder()
.appServiceId(exampleLinuxWebApp.id())
.targetResourceId(exampleSqlDatabase.id())
.authentication(ConnectionAuthenticationArgs.builder()
.type("systemAssignedIdentity")
.build())
.build());
}
}

Import

Service Connector for app service can be imported using the resource id, e.g.

$ pulumi import azure:appservice/connection:Connection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Web/sites/webapp/providers/Microsoft.ServiceLinker/linkers/serviceconnector1

Constructors

Link copied to clipboard
fun ConnectionArgs(appServiceId: Output<String>? = null, authentication: Output<ConnectionAuthenticationArgs>? = null, clientType: Output<String>? = null, name: Output<String>? = null, secretStore: Output<ConnectionSecretStoreArgs>? = null, targetResourceId: Output<String>? = null, vnetSolution: Output<String>? = null)

Functions

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

Properties

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

The ID of the data source web app. Changing this forces a new resource to be created.

Link copied to clipboard

The authentication info. An authentication block as defined below.

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

The application client type. Possible values are none, dotnet, java, python, go, php, ruby, django, nodejs and springBoot.

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

The name of the service connection. Changing this forces a new resource to be created.

Link copied to clipboard

An option to store secret value in secure place. An secret_store block as defined below.

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

The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.

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

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.