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

com.pulumi.azurenative.iotoperations.kotlin.BrokerAuthenticationArgs.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.iotoperations.kotlin

import com.pulumi.azurenative.iotoperations.BrokerAuthenticationArgs.builder
import com.pulumi.azurenative.iotoperations.kotlin.inputs.BrokerAuthenticationPropertiesArgs
import com.pulumi.azurenative.iotoperations.kotlin.inputs.BrokerAuthenticationPropertiesArgsBuilder
import com.pulumi.azurenative.iotoperations.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.iotoperations.kotlin.inputs.ExtendedLocationArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Instance broker authentication resource
 * Azure REST API version: 2024-07-01-preview.
 * Other available API versions: 2024-08-15-preview.
 * ## Example Usage
 * ### BrokerAuthentication_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var brokerAuthentication = new AzureNative.IoTOperations.BrokerAuthentication("brokerAuthentication", new()
 *     {
 *         AuthenticationName = "resource-name123",
 *         BrokerName = "aio-broker",
 *         ExtendedLocation = new AzureNative.IoTOperations.Inputs.ExtendedLocationArgs
 *         {
 *             Name = "ycsyubcxttlusbhfdqaynmkaatnbyv",
 *             Type = AzureNative.IoTOperations.ExtendedLocationType.CustomLocation,
 *         },
 *         InstanceName = "aio-instance",
 *         Properties = new AzureNative.IoTOperations.Inputs.BrokerAuthenticationPropertiesArgs
 *         {
 *             AuthenticationMethods = new[]
 *             {
 *                 new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodsArgs
 *                 {
 *                     Method = AzureNative.IoTOperations.BrokerAuthenticationMethod.ServiceAccountToken,
 *                     ServiceAccountToken = new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodSatArgs
 *                     {
 *                         Audiences = new[]
 *                         {
 *                             "aio-mq",
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *         ResourceGroupName = "rgiotoperations",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	iotoperations "github.com/pulumi/pulumi-azure-native-sdk/iotoperations/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := iotoperations.NewBrokerAuthentication(ctx, "brokerAuthentication", &iotoperations.BrokerAuthenticationArgs{
 * 			AuthenticationName: pulumi.String("resource-name123"),
 * 			BrokerName:         pulumi.String("aio-broker"),
 * 			ExtendedLocation: &iotoperations.ExtendedLocationArgs{
 * 				Name: pulumi.String("ycsyubcxttlusbhfdqaynmkaatnbyv"),
 * 				Type: pulumi.String(iotoperations.ExtendedLocationTypeCustomLocation),
 * 			},
 * 			InstanceName: pulumi.String("aio-instance"),
 * 			Properties: &iotoperations.BrokerAuthenticationPropertiesArgs{
 * 				AuthenticationMethods: iotoperations.BrokerAuthenticatorMethodsArray{
 * 					&iotoperations.BrokerAuthenticatorMethodsArgs{
 * 						Method: pulumi.String(iotoperations.BrokerAuthenticationMethodServiceAccountToken),
 * 						ServiceAccountToken: &iotoperations.BrokerAuthenticatorMethodSatArgs{
 * 							Audiences: pulumi.StringArray{
 * 								pulumi.String("aio-mq"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 			ResourceGroupName: pulumi.String("rgiotoperations"),
 * 		})
 * 		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.iotoperations.BrokerAuthentication;
 * import com.pulumi.azurenative.iotoperations.BrokerAuthenticationArgs;
 * import com.pulumi.azurenative.iotoperations.inputs.ExtendedLocationArgs;
 * import com.pulumi.azurenative.iotoperations.inputs.BrokerAuthenticationPropertiesArgs;
 * 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 brokerAuthentication = new BrokerAuthentication("brokerAuthentication", BrokerAuthenticationArgs.builder()
 *             .authenticationName("resource-name123")
 *             .brokerName("aio-broker")
 *             .extendedLocation(ExtendedLocationArgs.builder()
 *                 .name("ycsyubcxttlusbhfdqaynmkaatnbyv")
 *                 .type("CustomLocation")
 *                 .build())
 *             .instanceName("aio-instance")
 *             .properties(BrokerAuthenticationPropertiesArgs.builder()
 *                 .authenticationMethods(BrokerAuthenticatorMethodsArgs.builder()
 *                     .method("ServiceAccountToken")
 *                     .serviceAccountToken(BrokerAuthenticatorMethodSatArgs.builder()
 *                         .audiences("aio-mq")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .resourceGroupName("rgiotoperations")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:iotoperations:BrokerAuthentication gjfyvwhgwouiqfxml /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}
 * ```
 * @property authenticationName Name of Instance broker authentication resource
 * @property brokerName Name of broker.
 * @property extendedLocation Edge location of the resource.
 * @property instanceName Name of instance.
 * @property properties The resource-specific properties for this resource.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 */
public data class BrokerAuthenticationArgs(
    public val authenticationName: Output? = null,
    public val brokerName: Output? = null,
    public val extendedLocation: Output? = null,
    public val instanceName: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.iotoperations.BrokerAuthenticationArgs =
        com.pulumi.azurenative.iotoperations.BrokerAuthenticationArgs.builder()
            .authenticationName(authenticationName?.applyValue({ args0 -> args0 }))
            .brokerName(brokerName?.applyValue({ args0 -> args0 }))
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .instanceName(instanceName?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BrokerAuthenticationArgs].
 */
@PulumiTagMarker
public class BrokerAuthenticationArgsBuilder internal constructor() {
    private var authenticationName: Output? = null

    private var brokerName: Output? = null

    private var extendedLocation: Output? = null

    private var instanceName: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value Name of Instance broker authentication resource
     */
    @JvmName("qclyhmcdaymfqena")
    public suspend fun authenticationName(`value`: Output) {
        this.authenticationName = value
    }

    /**
     * @param value Name of broker.
     */
    @JvmName("yqnbwdjogvphxtnb")
    public suspend fun brokerName(`value`: Output) {
        this.brokerName = value
    }

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

    /**
     * @param value Name of instance.
     */
    @JvmName("yxkfslxueetkdbvu")
    public suspend fun instanceName(`value`: Output) {
        this.instanceName = value
    }

    /**
     * @param value The resource-specific properties for this resource.
     */
    @JvmName("flxcplohubucklft")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("fnkmfyayvykwnsvp")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Name of Instance broker authentication resource
     */
    @JvmName("kscxsdtfeqosugre")
    public suspend fun authenticationName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authenticationName = mapped
    }

    /**
     * @param value Name of broker.
     */
    @JvmName("hkkqxhxdqxbvfchv")
    public suspend fun brokerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.brokerName = mapped
    }

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

    /**
     * @param argument Edge location of the resource.
     */
    @JvmName("ujrnaaowrdcbyvet")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

    /**
     * @param value Name of instance.
     */
    @JvmName("imbxksodwmeukcqf")
    public suspend fun instanceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceName = mapped
    }

    /**
     * @param value The resource-specific properties for this resource.
     */
    @JvmName("aytkdkphgqtjbvyx")
    public suspend fun properties(`value`: BrokerAuthenticationPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument The resource-specific properties for this resource.
     */
    @JvmName("riwdksikdgubyivq")
    public suspend fun properties(argument: suspend BrokerAuthenticationPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = BrokerAuthenticationPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("bxbunqtdxcawoegj")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): BrokerAuthenticationArgs = BrokerAuthenticationArgs(
        authenticationName = authenticationName,
        brokerName = brokerName,
        extendedLocation = extendedLocation,
        instanceName = instanceName,
        properties = properties,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy