com.pulumi.azure.appservice.kotlin.HybridConnectionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.appservice.kotlin
import com.pulumi.azure.appservice.HybridConnectionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages an App Service Hybrid Connection for an existing App Service, Relay and Service Bus.
* !> **NOTE:** This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use `azure.appservice.FunctionAppHybridConnection` resources instead.
* ## Example Usage
* This example provisions an App Service, a Relay Hybrid Connection, and a Service Bus using their outputs to create the App Service Hybrid Connection.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "exampleResourceGroup1",
* location: "West Europe",
* });
* const examplePlan = new azure.appservice.Plan("example", {
* name: "exampleAppServicePlan1",
* location: example.location,
* resourceGroupName: example.name,
* sku: {
* tier: "Standard",
* size: "S1",
* },
* });
* const exampleAppService = new azure.appservice.AppService("example", {
* name: "exampleAppService1",
* location: example.location,
* resourceGroupName: example.name,
* appServicePlanId: examplePlan.id,
* });
* const exampleNamespace = new azure.relay.Namespace("example", {
* name: "exampleRN1",
* location: example.location,
* resourceGroupName: example.name,
* skuName: "Standard",
* });
* const exampleHybridConnection = new azure.relay.HybridConnection("example", {
* name: "exampleRHC1",
* resourceGroupName: example.name,
* relayNamespaceName: exampleNamespace.name,
* userMetadata: "examplemetadata",
* });
* const exampleHybridConnection2 = new azure.appservice.HybridConnection("example", {
* appServiceName: exampleAppService.name,
* resourceGroupName: example.name,
* relayId: exampleHybridConnection.id,
* hostname: "testhostname.example",
* port: 8080,
* sendKeyName: "exampleSharedAccessKey",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="exampleResourceGroup1",
* location="West Europe")
* example_plan = azure.appservice.Plan("example",
* name="exampleAppServicePlan1",
* location=example.location,
* resource_group_name=example.name,
* sku=azure.appservice.PlanSkuArgs(
* tier="Standard",
* size="S1",
* ))
* example_app_service = azure.appservice.AppService("example",
* name="exampleAppService1",
* location=example.location,
* resource_group_name=example.name,
* app_service_plan_id=example_plan.id)
* example_namespace = azure.relay.Namespace("example",
* name="exampleRN1",
* location=example.location,
* resource_group_name=example.name,
* sku_name="Standard")
* example_hybrid_connection = azure.relay.HybridConnection("example",
* name="exampleRHC1",
* resource_group_name=example.name,
* relay_namespace_name=example_namespace.name,
* user_metadata="examplemetadata")
* example_hybrid_connection2 = azure.appservice.HybridConnection("example",
* app_service_name=example_app_service.name,
* resource_group_name=example.name,
* relay_id=example_hybrid_connection.id,
* hostname="testhostname.example",
* port=8080,
* send_key_name="exampleSharedAccessKey")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "exampleResourceGroup1",
* Location = "West Europe",
* });
* var examplePlan = new Azure.AppService.Plan("example", new()
* {
* Name = "exampleAppServicePlan1",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = new Azure.AppService.Inputs.PlanSkuArgs
* {
* Tier = "Standard",
* Size = "S1",
* },
* });
* var exampleAppService = new Azure.AppService.AppService("example", new()
* {
* Name = "exampleAppService1",
* Location = example.Location,
* ResourceGroupName = example.Name,
* AppServicePlanId = examplePlan.Id,
* });
* var exampleNamespace = new Azure.Relay.Namespace("example", new()
* {
* Name = "exampleRN1",
* Location = example.Location,
* ResourceGroupName = example.Name,
* SkuName = "Standard",
* });
* var exampleHybridConnection = new Azure.Relay.HybridConnection("example", new()
* {
* Name = "exampleRHC1",
* ResourceGroupName = example.Name,
* RelayNamespaceName = exampleNamespace.Name,
* UserMetadata = "examplemetadata",
* });
* var exampleHybridConnection2 = new Azure.AppService.HybridConnection("example", new()
* {
* AppServiceName = exampleAppService.Name,
* ResourceGroupName = example.Name,
* RelayId = exampleHybridConnection.Id,
* Hostname = "testhostname.example",
* Port = 8080,
* SendKeyName = "exampleSharedAccessKey",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/relay"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("exampleResourceGroup1"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* examplePlan, err := appservice.NewPlan(ctx, "example", &appservice.PlanArgs{
* Name: pulumi.String("exampleAppServicePlan1"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: &appservice.PlanSkuArgs{
* Tier: pulumi.String("Standard"),
* Size: pulumi.String("S1"),
* },
* })
* if err != nil {
* return err
* }
* exampleAppService, err := appservice.NewAppService(ctx, "example", &appservice.AppServiceArgs{
* Name: pulumi.String("exampleAppService1"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* AppServicePlanId: examplePlan.ID(),
* })
* if err != nil {
* return err
* }
* exampleNamespace, err := relay.NewNamespace(ctx, "example", &relay.NamespaceArgs{
* Name: pulumi.String("exampleRN1"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* SkuName: pulumi.String("Standard"),
* })
* if err != nil {
* return err
* }
* exampleHybridConnection, err := relay.NewHybridConnection(ctx, "example", &relay.HybridConnectionArgs{
* Name: pulumi.String("exampleRHC1"),
* ResourceGroupName: example.Name,
* RelayNamespaceName: exampleNamespace.Name,
* UserMetadata: pulumi.String("examplemetadata"),
* })
* if err != nil {
* return err
* }
* _, err = appservice.NewHybridConnection(ctx, "example", &appservice.HybridConnectionArgs{
* AppServiceName: exampleAppService.Name,
* ResourceGroupName: example.Name,
* RelayId: exampleHybridConnection.ID(),
* Hostname: pulumi.String("testhostname.example"),
* Port: pulumi.Int(8080),
* SendKeyName: pulumi.String("exampleSharedAccessKey"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.appservice.Plan;
* import com.pulumi.azure.appservice.PlanArgs;
* import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
* import com.pulumi.azure.appservice.AppService;
* import com.pulumi.azure.appservice.AppServiceArgs;
* import com.pulumi.azure.relay.Namespace;
* import com.pulumi.azure.relay.NamespaceArgs;
* import com.pulumi.azure.relay.HybridConnection;
* import com.pulumi.azure.relay.HybridConnectionArgs;
* import com.pulumi.azure.appservice.HybridConnection;
* import com.pulumi.azure.appservice.HybridConnectionArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("exampleResourceGroup1")
* .location("West Europe")
* .build());
* var examplePlan = new Plan("examplePlan", PlanArgs.builder()
* .name("exampleAppServicePlan1")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku(PlanSkuArgs.builder()
* .tier("Standard")
* .size("S1")
* .build())
* .build());
* var exampleAppService = new AppService("exampleAppService", AppServiceArgs.builder()
* .name("exampleAppService1")
* .location(example.location())
* .resourceGroupName(example.name())
* .appServicePlanId(examplePlan.id())
* .build());
* var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
* .name("exampleRN1")
* .location(example.location())
* .resourceGroupName(example.name())
* .skuName("Standard")
* .build());
* var exampleHybridConnection = new HybridConnection("exampleHybridConnection", HybridConnectionArgs.builder()
* .name("exampleRHC1")
* .resourceGroupName(example.name())
* .relayNamespaceName(exampleNamespace.name())
* .userMetadata("examplemetadata")
* .build());
* var exampleHybridConnection2 = new HybridConnection("exampleHybridConnection2", HybridConnectionArgs.builder()
* .appServiceName(exampleAppService.name())
* .resourceGroupName(example.name())
* .relayId(exampleHybridConnection.id())
* .hostname("testhostname.example")
* .port(8080)
* .sendKeyName("exampleSharedAccessKey")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: exampleResourceGroup1
* location: West Europe
* examplePlan:
* type: azure:appservice:Plan
* name: example
* properties:
* name: exampleAppServicePlan1
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku:
* tier: Standard
* size: S1
* exampleAppService:
* type: azure:appservice:AppService
* name: example
* properties:
* name: exampleAppService1
* location: ${example.location}
* resourceGroupName: ${example.name}
* appServicePlanId: ${examplePlan.id}
* exampleNamespace:
* type: azure:relay:Namespace
* name: example
* properties:
* name: exampleRN1
* location: ${example.location}
* resourceGroupName: ${example.name}
* skuName: Standard
* exampleHybridConnection:
* type: azure:relay:HybridConnection
* name: example
* properties:
* name: exampleRHC1
* resourceGroupName: ${example.name}
* relayNamespaceName: ${exampleNamespace.name}
* userMetadata: examplemetadata
* exampleHybridConnection2:
* type: azure:appservice:HybridConnection
* name: example
* properties:
* appServiceName: ${exampleAppService.name}
* resourceGroupName: ${example.name}
* relayId: ${exampleHybridConnection.id}
* hostname: testhostname.example
* port: 8080
* sendKeyName: exampleSharedAccessKey
* ```
*
* ## Import
* App Service Hybrid Connections can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:appservice/hybridConnection:HybridConnection example /subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/exampleResourceGroup1/providers/Microsoft.Web/sites/exampleAppService1/hybridConnectionNamespaces/exampleRN1/relays/exampleRHC1
* ```
* @property appServiceName Specifies the name of the App Service. Changing this forces a new resource to be created.
* @property hostname The hostname of the endpoint.
* @property port The port of the endpoint.
* @property relayId The ID of the Service Bus Relay. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
* @property sendKeyName The name of the Service Bus key which has Send permissions. Defaults to `RootManageSharedAccessKey`.
*/
public data class HybridConnectionArgs(
public val appServiceName: Output? = null,
public val hostname: Output? = null,
public val port: Output? = null,
public val relayId: Output? = null,
public val resourceGroupName: Output? = null,
public val sendKeyName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.appservice.HybridConnectionArgs =
com.pulumi.azure.appservice.HybridConnectionArgs.builder()
.appServiceName(appServiceName?.applyValue({ args0 -> args0 }))
.hostname(hostname?.applyValue({ args0 -> args0 }))
.port(port?.applyValue({ args0 -> args0 }))
.relayId(relayId?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sendKeyName(sendKeyName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [HybridConnectionArgs].
*/
@PulumiTagMarker
public class HybridConnectionArgsBuilder internal constructor() {
private var appServiceName: Output? = null
private var hostname: Output? = null
private var port: Output? = null
private var relayId: Output? = null
private var resourceGroupName: Output? = null
private var sendKeyName: Output? = null
/**
* @param value Specifies the name of the App Service. Changing this forces a new resource to be created.
*/
@JvmName("dqekvphlpunbeaue")
public suspend fun appServiceName(`value`: Output) {
this.appServiceName = value
}
/**
* @param value The hostname of the endpoint.
*/
@JvmName("hdhfblqyboinrcco")
public suspend fun hostname(`value`: Output) {
this.hostname = value
}
/**
* @param value The port of the endpoint.
*/
@JvmName("adqgfougwanxyfoi")
public suspend fun port(`value`: Output) {
this.port = value
}
/**
* @param value The ID of the Service Bus Relay. Changing this forces a new resource to be created.
*/
@JvmName("nhpjdibpmsygsenx")
public suspend fun relayId(`value`: Output) {
this.relayId = value
}
/**
* @param value The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
*/
@JvmName("epyqaoemcinkjfeh")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the Service Bus key which has Send permissions. Defaults to `RootManageSharedAccessKey`.
*/
@JvmName("nmwhsxrxjynvsltj")
public suspend fun sendKeyName(`value`: Output) {
this.sendKeyName = value
}
/**
* @param value Specifies the name of the App Service. Changing this forces a new resource to be created.
*/
@JvmName("ogxwbtsrnycdsflq")
public suspend fun appServiceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.appServiceName = mapped
}
/**
* @param value The hostname of the endpoint.
*/
@JvmName("tbukgrouvqetjkwy")
public suspend fun hostname(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hostname = mapped
}
/**
* @param value The port of the endpoint.
*/
@JvmName("dsnbjtqkyygsinai")
public suspend fun port(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.port = mapped
}
/**
* @param value The ID of the Service Bus Relay. Changing this forces a new resource to be created.
*/
@JvmName("uuclfrmioxsdhflm")
public suspend fun relayId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.relayId = mapped
}
/**
* @param value The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
*/
@JvmName("gtyldederpcedwhe")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name of the Service Bus key which has Send permissions. Defaults to `RootManageSharedAccessKey`.
*/
@JvmName("vawitvgsixoxxqcj")
public suspend fun sendKeyName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sendKeyName = mapped
}
internal fun build(): HybridConnectionArgs = HybridConnectionArgs(
appServiceName = appServiceName,
hostname = hostname,
port = port,
relayId = relayId,
resourceGroupName = resourceGroupName,
sendKeyName = sendKeyName,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy