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

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

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.relay.kotlin

import com.pulumi.azure.relay.NamespaceAuthorizationRuleArgs.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 Namespace 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 exampleNamespaceAuthorizationRule = new azure.relay.NamespaceAuthorizationRule("example", {
 *     name: "example",
 *     resourceGroupName: example.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_namespace_authorization_rule = azure.relay.NamespaceAuthorizationRule("example",
 *     name="example",
 *     resource_group_name=example.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 exampleNamespaceAuthorizationRule = new Azure.Relay.NamespaceAuthorizationRule("example", new()
 *     {
 *         Name = "example",
 *         ResourceGroupName = example.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
 * 		}
 * 		_, err = relay.NewNamespaceAuthorizationRule(ctx, "example", &relay.NamespaceAuthorizationRuleArgs{
 * 			Name:              pulumi.String("example"),
 * 			ResourceGroupName: example.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.NamespaceAuthorizationRule;
 * import com.pulumi.azure.relay.NamespaceAuthorizationRuleArgs;
 * 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 exampleNamespaceAuthorizationRule = new NamespaceAuthorizationRule("exampleNamespaceAuthorizationRule", NamespaceAuthorizationRuleArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.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
 *   exampleNamespaceAuthorizationRule:
 *     type: azure:relay:NamespaceAuthorizationRule
 *     name: example
 *     properties:
 *       name: example
 *       resourceGroupName: ${example.name}
 *       namespaceName: ${exampleNamespace.name}
 *       listen: true
 *       send: true
 *       manage: false
 * ```
 * 
 * ## Import
 * Azure Relay Namespace Authorization Rules can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:relay/namespaceAuthorizationRule:NamespaceAuthorizationRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Relay/namespaces/namespace1/authorizationRules/rule1
 * ```
 * @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 Namespace Authorization Rule. Changing this forces a new Azure Relay Namespace Authorization Rule to be created.
 * @property namespaceName Name of the Azure Relay Namespace for which this Azure Relay Namespace Authorization Rule will be created. Changing this forces a new Azure Relay Namespace Authorization Rule to be created.
 * @property resourceGroupName The name of the Resource Group where the Azure Relay Namespace Authorization Rule should exist. Changing this forces a new Azure Relay Namespace Authorization Rule to be created.
 * @property send Grants send access to this Authorization Rule. Defaults to `false`.
 */
public data class NamespaceAuthorizationRuleArgs(
    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.NamespaceAuthorizationRuleArgs =
        com.pulumi.azure.relay.NamespaceAuthorizationRuleArgs.builder()
            .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 [NamespaceAuthorizationRuleArgs].
 */
@PulumiTagMarker
public class NamespaceAuthorizationRuleArgsBuilder internal constructor() {
    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 Grants listen access to this Authorization Rule. Defaults to `false`.
     */
    @JvmName("diuqyahfjakonodl")
    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("lktevqjkgaxudqep")
    public suspend fun manage(`value`: Output) {
        this.manage = value
    }

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

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

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

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

    /**
     * @param value Grants listen access to this Authorization Rule. Defaults to `false`.
     */
    @JvmName("plsrepdssgfxkoht")
    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("tstvquuxjdxcvxrq")
    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 Namespace Authorization Rule. Changing this forces a new Azure Relay Namespace Authorization Rule to be created.
     */
    @JvmName("wjhridlxrdybgksk")
    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 Namespace Authorization Rule will be created. Changing this forces a new Azure Relay Namespace Authorization Rule to be created.
     */
    @JvmName("ykvbcpjuruwkfbif")
    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 Namespace Authorization Rule should exist. Changing this forces a new Azure Relay Namespace Authorization Rule to be created.
     */
    @JvmName("mhktywvfcqfmvnop")
    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("hgxvlpjrmpddefds")
    public suspend fun send(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.send = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy