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

com.pulumi.azure.notificationhub.kotlin.NamespaceArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.notificationhub.kotlin

import com.pulumi.azure.notificationhub.NamespaceArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Notification Hub Namespace.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "notificationhub-resources",
 *     location: "West Europe",
 * });
 * const exampleNamespace = new azure.notificationhub.Namespace("example", {
 *     name: "myappnamespace",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     namespaceType: "NotificationHub",
 *     skuName: "Free",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="notificationhub-resources",
 *     location="West Europe")
 * example_namespace = azure.notificationhub.Namespace("example",
 *     name="myappnamespace",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     namespace_type="NotificationHub",
 *     sku_name="Free")
 * ```
 * ```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 = "notificationhub-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleNamespace = new Azure.NotificationHub.Namespace("example", new()
 *     {
 *         Name = "myappnamespace",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         NamespaceType = "NotificationHub",
 *         SkuName = "Free",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/notificationhub"
 * 	"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("notificationhub-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = notificationhub.NewNamespace(ctx, "example", ¬ificationhub.NamespaceArgs{
 * 			Name:              pulumi.String("myappnamespace"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			NamespaceType:     pulumi.String("NotificationHub"),
 * 			SkuName:           pulumi.String("Free"),
 * 		})
 * 		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.notificationhub.Namespace;
 * import com.pulumi.azure.notificationhub.NamespaceArgs;
 * 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("notificationhub-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
 *             .name("myappnamespace")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .namespaceType("NotificationHub")
 *             .skuName("Free")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: notificationhub-resources
 *       location: West Europe
 *   exampleNamespace:
 *     type: azure:notificationhub:Namespace
 *     name: example
 *     properties:
 *       name: myappnamespace
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       namespaceType: NotificationHub
 *       skuName: Free
 * ```
 * 
 * ## Import
 * Notification Hub Namespaces can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:notificationhub/namespace:Namespace namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.NotificationHubs/namespaces/namespace1
 * ```
 * @property enabled Is this Notification Hub Namespace enabled? Defaults to `true`.
 * @property location The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
 * @property name The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
 * @property namespaceType The Type of Namespace - possible values are `Messaging` or `NotificationHub`.
 * @property resourceGroupName The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
 * @property skuName The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class NamespaceArgs(
    public val enabled: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val namespaceType: Output? = null,
    public val resourceGroupName: Output? = null,
    public val skuName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.notificationhub.NamespaceArgs =
        com.pulumi.azure.notificationhub.NamespaceArgs.builder()
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespaceType(namespaceType?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .skuName(skuName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [NamespaceArgs].
 */
@PulumiTagMarker
public class NamespaceArgsBuilder internal constructor() {
    private var enabled: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var namespaceType: Output? = null

    private var resourceGroupName: Output? = null

    private var skuName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Is this Notification Hub Namespace enabled? Defaults to `true`.
     */
    @JvmName("tasepcbpmfsdurtd")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
     */
    @JvmName("xlqodfeirdilcfly")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
     */
    @JvmName("mhdogxrbmiiqatvd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The Type of Namespace - possible values are `Messaging` or `NotificationHub`.
     */
    @JvmName("dgdawncmvesparva")
    public suspend fun namespaceType(`value`: Output) {
        this.namespaceType = value
    }

    /**
     * @param value The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
     */
    @JvmName("sjmmqhtpemblxisy")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`.
     */
    @JvmName("yymjdptroodkqpiu")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("yvcormmuqtqomusl")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Is this Notification Hub Namespace enabled? Defaults to `true`.
     */
    @JvmName("mhfmqldtpqmshyrq")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
     */
    @JvmName("minwhppfdhofabko")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
     */
    @JvmName("ycrpqeqvgendaeex")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The Type of Namespace - possible values are `Messaging` or `NotificationHub`.
     */
    @JvmName("brfgvduikvwcymya")
    public suspend fun namespaceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespaceType = mapped
    }

    /**
     * @param value The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
     */
    @JvmName("xikqspgsaksddbgk")
    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 SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`.
     */
    @JvmName("vkscskasavndvynl")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("tukndgulquesnsih")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("qkswjrwfpouuxckr")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): NamespaceArgs = NamespaceArgs(
        enabled = enabled,
        location = location,
        name = name,
        namespaceType = namespaceType,
        resourceGroupName = resourceGroupName,
        skuName = skuName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy