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

com.pulumi.azurenative.eventgrid.kotlin.PartnerNamespaceArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.eventgrid.kotlin

import com.pulumi.azurenative.eventgrid.PartnerNamespaceArgs.builder
import com.pulumi.azurenative.eventgrid.kotlin.enums.PartnerTopicRoutingMode
import com.pulumi.azurenative.eventgrid.kotlin.enums.PublicNetworkAccess
import com.pulumi.azurenative.eventgrid.kotlin.inputs.InboundIpRuleArgs
import com.pulumi.azurenative.eventgrid.kotlin.inputs.InboundIpRuleArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * EventGrid Partner Namespace.
 * Azure REST API version: 2022-06-15. Prior API version in Azure Native 1.x: 2021-06-01-preview.
 * Other available API versions: 2023-06-01-preview, 2023-12-15-preview, 2024-06-01-preview.
 * ## Example Usage
 * ### PartnerNamespaces_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var partnerNamespace = new AzureNative.EventGrid.PartnerNamespace("partnerNamespace", new()
 *     {
 *         Location = "westus",
 *         PartnerNamespaceName = "examplePartnerNamespaceName1",
 *         PartnerRegistrationFullyQualifiedId = "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1",
 *         ResourceGroupName = "examplerg",
 *         Tags =
 *         {
 *             { "tag1", "value1" },
 *             { "tag2", "value2" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	eventgrid "github.com/pulumi/pulumi-azure-native-sdk/eventgrid/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := eventgrid.NewPartnerNamespace(ctx, "partnerNamespace", &eventgrid.PartnerNamespaceArgs{
 * 			Location:                            pulumi.String("westus"),
 * 			PartnerNamespaceName:                pulumi.String("examplePartnerNamespaceName1"),
 * 			PartnerRegistrationFullyQualifiedId: pulumi.String("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1"),
 * 			ResourceGroupName:                   pulumi.String("examplerg"),
 * 			Tags: pulumi.StringMap{
 * 				"tag1": pulumi.String("value1"),
 * 				"tag2": pulumi.String("value2"),
 * 			},
 * 		})
 * 		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.azurenative.eventgrid.PartnerNamespace;
 * import com.pulumi.azurenative.eventgrid.PartnerNamespaceArgs;
 * 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 partnerNamespace = new PartnerNamespace("partnerNamespace", PartnerNamespaceArgs.builder()
 *             .location("westus")
 *             .partnerNamespaceName("examplePartnerNamespaceName1")
 *             .partnerRegistrationFullyQualifiedId("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1")
 *             .resourceGroupName("examplerg")
 *             .tags(Map.ofEntries(
 *                 Map.entry("tag1", "value1"),
 *                 Map.entry("tag2", "value2")
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:eventgrid:PartnerNamespace examplePartnerNamespaceName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}
 * ```
 * @property disableLocalAuth This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the partner namespace.
 * @property inboundIpRules This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
 * @property location Location of the resource.
 * @property partnerNamespaceName Name of the partner namespace.
 * @property partnerRegistrationFullyQualifiedId The fully qualified ARM Id of the partner registration that should be associated with this partner namespace. This takes the following format:
 * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}.
 * @property partnerTopicRoutingMode This determines if events published to this partner namespace should use the source attribute in the event payload
 * or use the channel name in the header when matching to the partner topic. If none is specified, source attribute routing will be used to match the partner topic.
 * @property publicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled.
 * You can further restrict to specific IPs by configuring 
 * @property resourceGroupName The name of the resource group within the user's subscription.
 * @property tags Tags of the resource.
 */
public data class PartnerNamespaceArgs(
    public val disableLocalAuth: Output? = null,
    public val inboundIpRules: Output>? = null,
    public val location: Output? = null,
    public val partnerNamespaceName: Output? = null,
    public val partnerRegistrationFullyQualifiedId: Output? = null,
    public val partnerTopicRoutingMode: Output>? = null,
    public val publicNetworkAccess: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.eventgrid.PartnerNamespaceArgs =
        com.pulumi.azurenative.eventgrid.PartnerNamespaceArgs.builder()
            .disableLocalAuth(disableLocalAuth?.applyValue({ args0 -> args0 }))
            .inboundIpRules(
                inboundIpRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .partnerNamespaceName(partnerNamespaceName?.applyValue({ args0 -> args0 }))
            .partnerRegistrationFullyQualifiedId(
                partnerRegistrationFullyQualifiedId?.applyValue({ args0 ->
                    args0
                }),
            )
            .partnerTopicRoutingMode(
                partnerTopicRoutingMode?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .publicNetworkAccess(
                publicNetworkAccess?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [PartnerNamespaceArgs].
 */
@PulumiTagMarker
public class PartnerNamespaceArgsBuilder internal constructor() {
    private var disableLocalAuth: Output? = null

    private var inboundIpRules: Output>? = null

    private var location: Output? = null

    private var partnerNamespaceName: Output? = null

    private var partnerRegistrationFullyQualifiedId: Output? = null

    private var partnerTopicRoutingMode: Output>? = null

    private var publicNetworkAccess: Output>? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the partner namespace.
     */
    @JvmName("jftmyctairdvbsqs")
    public suspend fun disableLocalAuth(`value`: Output) {
        this.disableLocalAuth = value
    }

    /**
     * @param value This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     */
    @JvmName("lrlkoeghnodbkbcs")
    public suspend fun inboundIpRules(`value`: Output>) {
        this.inboundIpRules = value
    }

    @JvmName("irudojlorvnfwdxj")
    public suspend fun inboundIpRules(vararg values: Output) {
        this.inboundIpRules = Output.all(values.asList())
    }

    /**
     * @param values This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     */
    @JvmName("dwevuykgwltdvigt")
    public suspend fun inboundIpRules(values: List>) {
        this.inboundIpRules = Output.all(values)
    }

    /**
     * @param value Location of the resource.
     */
    @JvmName("lbeehmfbptpxgawk")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Name of the partner namespace.
     */
    @JvmName("cqbbndvrkqfjfgjd")
    public suspend fun partnerNamespaceName(`value`: Output) {
        this.partnerNamespaceName = value
    }

    /**
     * @param value The fully qualified ARM Id of the partner registration that should be associated with this partner namespace. This takes the following format:
     * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}.
     */
    @JvmName("utqfgnpteuwpkrpw")
    public suspend fun partnerRegistrationFullyQualifiedId(`value`: Output) {
        this.partnerRegistrationFullyQualifiedId = value
    }

    /**
     * @param value This determines if events published to this partner namespace should use the source attribute in the event payload
     * or use the channel name in the header when matching to the partner topic. If none is specified, source attribute routing will be used to match the partner topic.
     */
    @JvmName("gdbeayxccpnhjtxn")
    public suspend fun partnerTopicRoutingMode(`value`: Output>) {
        this.partnerTopicRoutingMode = value
    }

    /**
     * @param value This determines if traffic is allowed over public network. By default it is enabled.
     * You can further restrict to specific IPs by configuring 
     */
    @JvmName("csilqlxjnlewsgor")
    public suspend fun publicNetworkAccess(`value`: Output>) {
        this.publicNetworkAccess = value
    }

    /**
     * @param value The name of the resource group within the user's subscription.
     */
    @JvmName("bohkmdtalmewewal")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Tags of the resource.
     */
    @JvmName("njednuobvjnlvdmc")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the partner namespace.
     */
    @JvmName("bpqcaxpaaaupbjgw")
    public suspend fun disableLocalAuth(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disableLocalAuth = mapped
    }

    /**
     * @param value This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     */
    @JvmName("cikeiaaymdcwhskg")
    public suspend fun inboundIpRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inboundIpRules = mapped
    }

    /**
     * @param argument This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     */
    @JvmName("dqbvlmurchxqtgkd")
    public suspend fun inboundIpRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InboundIpRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.inboundIpRules = mapped
    }

    /**
     * @param argument This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     */
    @JvmName("qolrtllheitmpluw")
    public suspend fun inboundIpRules(vararg argument: suspend InboundIpRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InboundIpRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.inboundIpRules = mapped
    }

    /**
     * @param argument This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     */
    @JvmName("vefnkjhldxapiofw")
    public suspend fun inboundIpRules(argument: suspend InboundIpRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(InboundIpRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.inboundIpRules = mapped
    }

    /**
     * @param values This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     */
    @JvmName("nbslfyfhufyqqnfl")
    public suspend fun inboundIpRules(vararg values: InboundIpRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inboundIpRules = mapped
    }

    /**
     * @param value Location of the resource.
     */
    @JvmName("qiucjamwyoqujwwh")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Name of the partner namespace.
     */
    @JvmName("flpjgkehnsvvnwbc")
    public suspend fun partnerNamespaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.partnerNamespaceName = mapped
    }

    /**
     * @param value The fully qualified ARM Id of the partner registration that should be associated with this partner namespace. This takes the following format:
     * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}.
     */
    @JvmName("vipwfjrjgokqoatl")
    public suspend fun partnerRegistrationFullyQualifiedId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.partnerRegistrationFullyQualifiedId = mapped
    }

    /**
     * @param value This determines if events published to this partner namespace should use the source attribute in the event payload
     * or use the channel name in the header when matching to the partner topic. If none is specified, source attribute routing will be used to match the partner topic.
     */
    @JvmName("mqjncgjanyalvben")
    public suspend fun partnerTopicRoutingMode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.partnerTopicRoutingMode = mapped
    }

    /**
     * @param value This determines if events published to this partner namespace should use the source attribute in the event payload
     * or use the channel name in the header when matching to the partner topic. If none is specified, source attribute routing will be used to match the partner topic.
     */
    @JvmName("hswfdlywosumunlp")
    public fun partnerTopicRoutingMode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.partnerTopicRoutingMode = mapped
    }

    /**
     * @param value This determines if events published to this partner namespace should use the source attribute in the event payload
     * or use the channel name in the header when matching to the partner topic. If none is specified, source attribute routing will be used to match the partner topic.
     */
    @JvmName("dnpvolprpllmeagf")
    public fun partnerTopicRoutingMode(`value`: PartnerTopicRoutingMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.partnerTopicRoutingMode = mapped
    }

    /**
     * @param value This determines if traffic is allowed over public network. By default it is enabled.
     * You can further restrict to specific IPs by configuring 
     */
    @JvmName("suiadwjrycebamxs")
    public suspend fun publicNetworkAccess(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccess = mapped
    }

    /**
     * @param value This determines if traffic is allowed over public network. By default it is enabled.
     * You can further restrict to specific IPs by configuring 
     */
    @JvmName("mdkdjfgtreqjcrud")
    public fun publicNetworkAccess(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicNetworkAccess = mapped
    }

    /**
     * @param value This determines if traffic is allowed over public network. By default it is enabled.
     * You can further restrict to specific IPs by configuring 
     */
    @JvmName("kdwujmbvnrbtevya")
    public fun publicNetworkAccess(`value`: PublicNetworkAccess) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicNetworkAccess = mapped
    }

    /**
     * @param value The name of the resource group within the user's subscription.
     */
    @JvmName("kkwlqfhlgobtefxt")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

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

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

    internal fun build(): PartnerNamespaceArgs = PartnerNamespaceArgs(
        disableLocalAuth = disableLocalAuth,
        inboundIpRules = inboundIpRules,
        location = location,
        partnerNamespaceName = partnerNamespaceName,
        partnerRegistrationFullyQualifiedId = partnerRegistrationFullyQualifiedId,
        partnerTopicRoutingMode = partnerTopicRoutingMode,
        publicNetworkAccess = publicNetworkAccess,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy