All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.relay.kotlin.HybridConnectionAuthorizationRuleArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.relay.kotlin

import com.pulumi.azure.relay.HybridConnectionAuthorizationRuleArgs.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 Authorization Rule.
 * ## 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: "terraform",
 *     },
 * });
 * const exampleHybridConnection = new azure.relay.HybridConnection("example", {
 *     name: "acctestrnhc-%d",
 *     resourceGroupName: example.name,
 *     relayNamespaceName: exampleNamespace.name,
 *     requiresClientAuthorization: false,
 *     userMetadata: "testmetadata",
 * });
 * const exampleHybridConnectionAuthorizationRule = new azure.relay.HybridConnectionAuthorizationRule("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     hybridConnectionName: exampleHybridConnection.name,
 *     namespaceName: exampleNamespace.name,
 *     listen: true,
 *     send: true,
 *     manage: false,
 * });
 * ```
 * ```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": "terraform",
 *     })
 * 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")
 * example_hybrid_connection_authorization_rule = azure.relay.HybridConnectionAuthorizationRule("example",
 *     name="example",
 *     resource_group_name=example.name,
 *     hybrid_connection_name=example_hybrid_connection.name,
 *     namespace_name=example_namespace.name,
 *     listen=True,
 *     send=True,
 *     manage=False)
 * ```
 * ```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", "terraform" },
 *         },
 *     });
 *     var exampleHybridConnection = new Azure.Relay.HybridConnection("example", new()
 *     {
 *         Name = "acctestrnhc-%d",
 *         ResourceGroupName = example.Name,
 *         RelayNamespaceName = exampleNamespace.Name,
 *         RequiresClientAuthorization = false,
 *         UserMetadata = "testmetadata",
 *     });
 *     var exampleHybridConnectionAuthorizationRule = new Azure.Relay.HybridConnectionAuthorizationRule("example", new()
 *     {
 *         Name = "example",
 *         ResourceGroupName = example.Name,
 *         HybridConnectionName = exampleHybridConnection.Name,
 *         NamespaceName = exampleNamespace.Name,
 *         Listen = true,
 *         Send = true,
 *         Manage = false,
 *     });
 * });
 * ```
 * ```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("terraform"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleHybridConnection, 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
 * 		}
 * 		_, err = relay.NewHybridConnectionAuthorizationRule(ctx, "example", &relay.HybridConnectionAuthorizationRuleArgs{
 * 			Name:                 pulumi.String("example"),
 * 			ResourceGroupName:    example.Name,
 * 			HybridConnectionName: exampleHybridConnection.Name,
 * 			NamespaceName:        exampleNamespace.Name,
 * 			Listen:               pulumi.Bool(true),
 * 			Send:                 pulumi.Bool(true),
 * 			Manage:               pulumi.Bool(false),
 * 		})
 * 		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 com.pulumi.azure.relay.HybridConnectionAuthorizationRule;
 * import com.pulumi.azure.relay.HybridConnectionAuthorizationRuleArgs;
 * 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", "terraform"))
 *             .build());
 *         var exampleHybridConnection = new HybridConnection("exampleHybridConnection", HybridConnectionArgs.builder()
 *             .name("acctestrnhc-%d")
 *             .resourceGroupName(example.name())
 *             .relayNamespaceName(exampleNamespace.name())
 *             .requiresClientAuthorization(false)
 *             .userMetadata("testmetadata")
 *             .build());
 *         var exampleHybridConnectionAuthorizationRule = new HybridConnectionAuthorizationRule("exampleHybridConnectionAuthorizationRule", HybridConnectionAuthorizationRuleArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .hybridConnectionName(exampleHybridConnection.name())
 *             .namespaceName(exampleNamespace.name())
 *             .listen(true)
 *             .send(true)
 *             .manage(false)
 *             .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: terraform
 *   exampleHybridConnection:
 *     type: azure:relay:HybridConnection
 *     name: example
 *     properties:
 *       name: acctestrnhc-%d
 *       resourceGroupName: ${example.name}
 *       relayNamespaceName: ${exampleNamespace.name}
 *       requiresClientAuthorization: false
 *       userMetadata: testmetadata
 *   exampleHybridConnectionAuthorizationRule:
 *     type: azure:relay:HybridConnectionAuthorizationRule
 *     name: example
 *     properties:
 *       name: example
 *       resourceGroupName: ${example.name}
 *       hybridConnectionName: ${exampleHybridConnection.name}
 *       namespaceName: ${exampleNamespace.name}
 *       listen: true
 *       send: true
 *       manage: false
 * ```
 * 
 * ## Import
 * Azure Relay Hybrid Connection Authorization Rules can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:relay/hybridConnectionAuthorizationRule:HybridConnectionAuthorizationRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Relay/namespaces/namespace1/hybridConnections/connection1/authorizationRules/rule1
 * ```
 * @property hybridConnectionName Name of the Azure Relay Hybrid Connection for which this Azure Relay Hybrid Connection Authorization Rule will be created. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
 * @property listen Grants listen access to this Authorization Rule. Defaults to `false`.
 * @property manage Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be set to `true` too. Defaults to `false`.
 * @property name The name which should be used for this Azure Relay Hybrid Connection Authorization Rule. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
 * @property namespaceName Name of the Azure Relay Namespace for which this Azure Relay Hybrid Connection Authorization Rule will be created. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
 * @property resourceGroupName The name of the Resource Group where the Azure Relay Hybrid Connection Authorization Rule should exist. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
 * @property send Grants send access to this Authorization Rule. Defaults to `false`.
 */
public data class HybridConnectionAuthorizationRuleArgs(
    public val hybridConnectionName: Output? = null,
    public val listen: Output? = null,
    public val manage: Output? = null,
    public val name: Output? = null,
    public val namespaceName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val send: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.relay.HybridConnectionAuthorizationRuleArgs =
        com.pulumi.azure.relay.HybridConnectionAuthorizationRuleArgs.builder()
            .hybridConnectionName(hybridConnectionName?.applyValue({ args0 -> args0 }))
            .listen(listen?.applyValue({ args0 -> args0 }))
            .manage(manage?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespaceName(namespaceName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .send(send?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HybridConnectionAuthorizationRuleArgs].
 */
@PulumiTagMarker
public class HybridConnectionAuthorizationRuleArgsBuilder internal constructor() {
    private var hybridConnectionName: Output? = null

    private var listen: Output? = null

    private var manage: Output? = null

    private var name: Output? = null

    private var namespaceName: Output? = null

    private var resourceGroupName: Output? = null

    private var send: Output? = null

    /**
     * @param value Name of the Azure Relay Hybrid Connection for which this Azure Relay Hybrid Connection Authorization Rule will be created. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
     */
    @JvmName("bbinlnuvnphhfdoc")
    public suspend fun hybridConnectionName(`value`: Output) {
        this.hybridConnectionName = value
    }

    /**
     * @param value Grants listen access to this Authorization Rule. Defaults to `false`.
     */
    @JvmName("invyfpajmxldyupm")
    public suspend fun listen(`value`: Output) {
        this.listen = value
    }

    /**
     * @param value Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be set to `true` too. Defaults to `false`.
     */
    @JvmName("wgiwlfnpmrfbdnji")
    public suspend fun manage(`value`: Output) {
        this.manage = value
    }

    /**
     * @param value The name which should be used for this Azure Relay Hybrid Connection Authorization Rule. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
     */
    @JvmName("ktqelorepydxkfje")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Name of the Azure Relay Namespace for which this Azure Relay Hybrid Connection Authorization Rule will be created. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
     */
    @JvmName("appxdlpihsosvipt")
    public suspend fun namespaceName(`value`: Output) {
        this.namespaceName = value
    }

    /**
     * @param value The name of the Resource Group where the Azure Relay Hybrid Connection Authorization Rule should exist. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
     */
    @JvmName("shgryyibijefowto")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Grants send access to this Authorization Rule. Defaults to `false`.
     */
    @JvmName("jxwdtpxnlmlkfgag")
    public suspend fun send(`value`: Output) {
        this.send = value
    }

    /**
     * @param value Name of the Azure Relay Hybrid Connection for which this Azure Relay Hybrid Connection Authorization Rule will be created. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
     */
    @JvmName("xvcupunigpdajfjd")
    public suspend fun hybridConnectionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hybridConnectionName = mapped
    }

    /**
     * @param value Grants listen access to this Authorization Rule. Defaults to `false`.
     */
    @JvmName("itudxbebylcvdfwu")
    public suspend fun listen(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.listen = mapped
    }

    /**
     * @param value Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be set to `true` too. Defaults to `false`.
     */
    @JvmName("kghfcfscmacnmnss")
    public suspend fun manage(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.manage = mapped
    }

    /**
     * @param value The name which should be used for this Azure Relay Hybrid Connection Authorization Rule. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
     */
    @JvmName("fjsnxxxsauinehgb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Name of the Azure Relay Namespace for which this Azure Relay Hybrid Connection Authorization Rule will be created. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
     */
    @JvmName("bpcyqgkochocpjmk")
    public suspend fun namespaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespaceName = mapped
    }

    /**
     * @param value The name of the Resource Group where the Azure Relay Hybrid Connection Authorization Rule should exist. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.
     */
    @JvmName("npwaeebtxycynfaw")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Grants send access to this Authorization Rule. Defaults to `false`.
     */
    @JvmName("ufcbhitctkwnciwo")
    public suspend fun send(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.send = mapped
    }

    internal fun build(): HybridConnectionAuthorizationRuleArgs =
        HybridConnectionAuthorizationRuleArgs(
            hybridConnectionName = hybridConnectionName,
            listen = listen,
            manage = manage,
            name = name,
            namespaceName = namespaceName,
            resourceGroupName = resourceGroupName,
            send = send,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy