com.pulumi.azure.relay.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.relay.kotlin
import com.pulumi.azure.relay.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages an Azure Relay Hybrid Connection.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleNamespace = new azure.relay.Namespace("example", {
* name: "example-relay",
* location: example.location,
* resourceGroupName: example.name,
* skuName: "Standard",
* tags: {
* source: "managed",
* },
* });
* const exampleHybridConnection = new azure.relay.HybridConnection("example", {
* name: "acctestrnhc-%d",
* resourceGroupName: example.name,
* relayNamespaceName: exampleNamespace.name,
* requiresClientAuthorization: false,
* userMetadata: "testmetadata",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_namespace = azure.relay.Namespace("example",
* name="example-relay",
* location=example.location,
* resource_group_name=example.name,
* sku_name="Standard",
* tags={
* "source": "managed",
* })
* example_hybrid_connection = azure.relay.HybridConnection("example",
* name="acctestrnhc-%d",
* resource_group_name=example.name,
* relay_namespace_name=example_namespace.name,
* requires_client_authorization=False,
* user_metadata="testmetadata")
* ```
* ```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 = "example-resources",
* Location = "West Europe",
* });
* var exampleNamespace = new Azure.Relay.Namespace("example", new()
* {
* Name = "example-relay",
* Location = example.Location,
* ResourceGroupName = example.Name,
* SkuName = "Standard",
* Tags =
* {
* { "source", "managed" },
* },
* });
* var exampleHybridConnection = new Azure.Relay.HybridConnection("example", new()
* {
* Name = "acctestrnhc-%d",
* ResourceGroupName = example.Name,
* RelayNamespaceName = exampleNamespace.Name,
* RequiresClientAuthorization = false,
* UserMetadata = "testmetadata",
* });
* });
* ```
* ```go
* package main
* import (
* "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("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleNamespace, err := relay.NewNamespace(ctx, "example", &relay.NamespaceArgs{
* Name: pulumi.String("example-relay"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* SkuName: pulumi.String("Standard"),
* Tags: pulumi.StringMap{
* "source": pulumi.String("managed"),
* },
* })
* if err != nil {
* return err
* }
* _, err = relay.NewHybridConnection(ctx, "example", &relay.HybridConnectionArgs{
* Name: pulumi.String("acctestrnhc-%d"),
* ResourceGroupName: example.Name,
* RelayNamespaceName: exampleNamespace.Name,
* RequiresClientAuthorization: pulumi.Bool(false),
* UserMetadata: pulumi.String("testmetadata"),
* })
* 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.relay.Namespace;
* import com.pulumi.azure.relay.NamespaceArgs;
* import com.pulumi.azure.relay.HybridConnection;
* import com.pulumi.azure.relay.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("example-resources")
* .location("West Europe")
* .build());
* var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
* .name("example-relay")
* .location(example.location())
* .resourceGroupName(example.name())
* .skuName("Standard")
* .tags(Map.of("source", "managed"))
* .build());
* var exampleHybridConnection = new HybridConnection("exampleHybridConnection", HybridConnectionArgs.builder()
* .name("acctestrnhc-%d")
* .resourceGroupName(example.name())
* .relayNamespaceName(exampleNamespace.name())
* .requiresClientAuthorization(false)
* .userMetadata("testmetadata")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleNamespace:
* type: azure:relay:Namespace
* name: example
* properties:
* name: example-relay
* location: ${example.location}
* resourceGroupName: ${example.name}
* skuName: Standard
* tags:
* source: managed
* exampleHybridConnection:
* type: azure:relay:HybridConnection
* name: example
* properties:
* name: acctestrnhc-%d
* resourceGroupName: ${example.name}
* relayNamespaceName: ${exampleNamespace.name}
* requiresClientAuthorization: false
* userMetadata: testmetadata
* ```
*
* ## Import
* Relay Hybrid Connection's can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:relay/hybridConnection:HybridConnection relay1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Relay/namespaces/relay1/hybridConnections/hconn1
* ```
* @property name Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
* @property relayNamespaceName The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
* @property requiresClientAuthorization Specify if client authorization is needed for this hybrid connection. Changing this forces a new resource to be created. Defaults to `true`.
* @property resourceGroupName The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
* @property userMetadata The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
*/
public data class HybridConnectionArgs(
public val name: Output? = null,
public val relayNamespaceName: Output? = null,
public val requiresClientAuthorization: Output? = null,
public val resourceGroupName: Output? = null,
public val userMetadata: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.relay.HybridConnectionArgs =
com.pulumi.azure.relay.HybridConnectionArgs.builder()
.name(name?.applyValue({ args0 -> args0 }))
.relayNamespaceName(relayNamespaceName?.applyValue({ args0 -> args0 }))
.requiresClientAuthorization(requiresClientAuthorization?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.userMetadata(userMetadata?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [HybridConnectionArgs].
*/
@PulumiTagMarker
public class HybridConnectionArgsBuilder internal constructor() {
private var name: Output? = null
private var relayNamespaceName: Output? = null
private var requiresClientAuthorization: Output? = null
private var resourceGroupName: Output? = null
private var userMetadata: Output? = null
/**
* @param value Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
*/
@JvmName("imojcgvbijphbidi")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
*/
@JvmName("mybgbdmcjkymqpvs")
public suspend fun relayNamespaceName(`value`: Output) {
this.relayNamespaceName = value
}
/**
* @param value Specify if client authorization is needed for this hybrid connection. Changing this forces a new resource to be created. Defaults to `true`.
*/
@JvmName("guuoevpdbdpvrfjh")
public suspend fun requiresClientAuthorization(`value`: Output) {
this.requiresClientAuthorization = value
}
/**
* @param value The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
*/
@JvmName("vyvdnyknrvukmlwb")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
*/
@JvmName("fcahxbyrfkkaopmc")
public suspend fun userMetadata(`value`: Output) {
this.userMetadata = value
}
/**
* @param value Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
*/
@JvmName("iqwefabogymrvjkg")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
*/
@JvmName("wnnxposmncimrqwl")
public suspend fun relayNamespaceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.relayNamespaceName = mapped
}
/**
* @param value Specify if client authorization is needed for this hybrid connection. Changing this forces a new resource to be created. Defaults to `true`.
*/
@JvmName("vxkxdwiafinoichb")
public suspend fun requiresClientAuthorization(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.requiresClientAuthorization = mapped
}
/**
* @param value The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
*/
@JvmName("ueivhthdxvhtyjgw")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
*/
@JvmName("dilapcexafmpeojl")
public suspend fun userMetadata(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.userMetadata = mapped
}
internal fun build(): HybridConnectionArgs = HybridConnectionArgs(
name = name,
relayNamespaceName = relayNamespaceName,
requiresClientAuthorization = requiresClientAuthorization,
resourceGroupName = resourceGroupName,
userMetadata = userMetadata,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy