AppConnectionArgs

data class AppConnectionArgs(val authentication: Output<AppConnectionAuthenticationArgs>? = null, val clientType: Output<String>? = null, val functionAppId: Output<String>? = null, val name: Output<String>? = null, val secretStore: Output<AppConnectionSecretStoreArgs>? = null, val targetResourceId: Output<String>? = null, val vnetSolution: Output<String>? = null) : ConvertibleToJava<AppConnectionArgs>

Manages a service connector for function app.

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.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.appservice.ServicePlan;
import com.pulumi.azure.appservice.ServicePlanArgs;
import com.pulumi.azure.appservice.FunctionApp;
import com.pulumi.azure.appservice.FunctionAppArgs;
import com.pulumi.azure.appservice.AppConnection;
import com.pulumi.azure.appservice.AppConnectionArgs;
import com.pulumi.azure.appservice.inputs.AppConnectionAuthenticationArgs;
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 exampleStorage_accountAccount = new Account("exampleStorage/accountAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.skuName("P1v2")
.osType("Linux")
.build());
var test = new FunctionApp("test", FunctionAppArgs.builder()
.location(azurerm_resource_group.test().location())
.resourceGroupName(azurerm_resource_group.test().name())
.appServicePlanId(azurerm_app_service_plan.test().id())
.storageAccountName(azurerm_storage_account.test().name())
.storageAccountAccessKey(azurerm_storage_account.test().primary_access_key())
.build());
var exampleAppConnection = new AppConnection("exampleAppConnection", AppConnectionArgs.builder()
.functionAppId(azurerm_function_app.example().id())
.targetResourceId(azurerm_cosmosdb_account.test().id())
.authentication(AppConnectionAuthenticationArgs.builder()
.type("systemAssignedIdentity")
.build())
.build());
}
}

Import

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

$ pulumi import azure:appservice/appConnection:AppConnection 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 AppConnectionArgs(authentication: Output<AppConnectionAuthenticationArgs>? = null, clientType: Output<String>? = null, functionAppId: Output<String>? = null, name: Output<String>? = null, secretStore: Output<AppConnectionSecretStoreArgs>? = null, targetResourceId: Output<String>? = null, vnetSolution: Output<String>? = null)

Functions

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

Properties

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 functionAppId: Output<String>? = null

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

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.