Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.eventgrid.kotlin
import com.pulumi.azurenative.eventgrid.ClientArgs.builder
import com.pulumi.azurenative.eventgrid.kotlin.enums.ClientState
import com.pulumi.azurenative.eventgrid.kotlin.inputs.ClientAuthenticationArgs
import com.pulumi.azurenative.eventgrid.kotlin.inputs.ClientAuthenticationArgsBuilder
import com.pulumi.azurenative.eventgrid.kotlin.inputs.ClientCertificateAuthenticationArgs
import com.pulumi.azurenative.eventgrid.kotlin.inputs.ClientCertificateAuthenticationArgsBuilder
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.Any
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* The Client resource.
* Azure REST API version: 2023-06-01-preview.
* Other available API versions: 2023-12-15-preview, 2024-06-01-preview.
* ## Example Usage
* ### Clients_CreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var client = new AzureNative.EventGrid.Client("client", new()
* {
* Attributes = new Dictionary
* {
* ["deviceTypes"] = new[]
* {
* "Fan",
* "Light",
* "AC",
* },
* ["floor"] = 3,
* ["room"] = "345",
* },
* ClientCertificateAuthentication = new AzureNative.EventGrid.Inputs.ClientCertificateAuthenticationArgs
* {
* ValidationScheme = AzureNative.EventGrid.ClientCertificateValidationScheme.SubjectMatchesAuthenticationName,
* },
* ClientName = "exampleClientName1",
* Description = "This is a test client",
* NamespaceName = "exampleNamespaceName1",
* ResourceGroupName = "examplerg",
* State = AzureNative.EventGrid.ClientState.Enabled,
* });
* });
* ```
* ```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.NewClient(ctx, "client", &eventgrid.ClientArgs{
* Attributes: pulumi.Any(map[string]interface{}{
* "deviceTypes": []string{
* "Fan",
* "Light",
* "AC",
* },
* "floor": 3,
* "room": "345",
* }),
* ClientCertificateAuthentication: &eventgrid.ClientCertificateAuthenticationArgs{
* ValidationScheme: pulumi.String(eventgrid.ClientCertificateValidationSchemeSubjectMatchesAuthenticationName),
* },
* ClientName: pulumi.String("exampleClientName1"),
* Description: pulumi.String("This is a test client"),
* NamespaceName: pulumi.String("exampleNamespaceName1"),
* ResourceGroupName: pulumi.String("examplerg"),
* State: pulumi.String(eventgrid.ClientStateEnabled),
* })
* 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.Client;
* import com.pulumi.azurenative.eventgrid.ClientArgs;
* import com.pulumi.azurenative.eventgrid.inputs.ClientCertificateAuthenticationArgs;
* 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 client = new Client("client", ClientArgs.builder()
* .attributes(Map.ofEntries(
* Map.entry("deviceTypes",
* "Fan",
* "Light",
* "AC"),
* Map.entry("floor", 3),
* Map.entry("room", "345")
* ))
* .clientCertificateAuthentication(ClientCertificateAuthenticationArgs.builder()
* .validationScheme("SubjectMatchesAuthenticationName")
* .build())
* .clientName("exampleClientName1")
* .description("This is a test client")
* .namespaceName("exampleNamespaceName1")
* .resourceGroupName("examplerg")
* .state("Enabled")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:eventgrid:Client exampleClientName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
* ```
* @property attributes Attributes for the client. Supported values are int, bool, string, string[].
* Example:
* "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }
* @property authentication Authentication information for the client.
* @property authenticationName The name presented by the client for authentication. The default value is the name of the resource.
* @property clientCertificateAuthentication The client certificate authentication information.
* @property clientName The client name.
* @property description Description for the Client resource.
* @property namespaceName Name of the namespace.
* @property resourceGroupName The name of the resource group within the user's subscription.
* @property state Indicates if the client is enabled or not. Default value is Enabled.
*/
public data class ClientArgs(
public val attributes: Output? = null,
public val authentication: Output? = null,
public val authenticationName: Output? = null,
public val clientCertificateAuthentication: Output? = null,
public val clientName: Output? = null,
public val description: Output? = null,
public val namespaceName: Output? = null,
public val resourceGroupName: Output? = null,
public val state: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.eventgrid.ClientArgs =
com.pulumi.azurenative.eventgrid.ClientArgs.builder()
.attributes(attributes?.applyValue({ args0 -> args0 }))
.authentication(authentication?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.authenticationName(authenticationName?.applyValue({ args0 -> args0 }))
.clientCertificateAuthentication(
clientCertificateAuthentication?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
)
.clientName(clientName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.namespaceName(namespaceName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.state(
state?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [ClientArgs].
*/
@PulumiTagMarker
public class ClientArgsBuilder internal constructor() {
private var attributes: Output? = null
private var authentication: Output? = null
private var authenticationName: Output? = null
private var clientCertificateAuthentication: Output? = null
private var clientName: Output? = null
private var description: Output? = null
private var namespaceName: Output? = null
private var resourceGroupName: Output? = null
private var state: Output>? = null
/**
* @param value Attributes for the client. Supported values are int, bool, string, string[].
* Example:
* "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }
*/
@JvmName("uvijqwsqvijynaot")
public suspend fun attributes(`value`: Output) {
this.attributes = value
}
/**
* @param value Authentication information for the client.
*/
@JvmName("fbkiprfsousfucxu")
public suspend fun authentication(`value`: Output) {
this.authentication = value
}
/**
* @param value The name presented by the client for authentication. The default value is the name of the resource.
*/
@JvmName("tcasbuiwednkjadj")
public suspend fun authenticationName(`value`: Output) {
this.authenticationName = value
}
/**
* @param value The client certificate authentication information.
*/
@JvmName("uvulaujcerfftgvw")
public suspend fun clientCertificateAuthentication(`value`: Output) {
this.clientCertificateAuthentication = value
}
/**
* @param value The client name.
*/
@JvmName("jrbtbdcphfeklybv")
public suspend fun clientName(`value`: Output) {
this.clientName = value
}
/**
* @param value Description for the Client resource.
*/
@JvmName("secsumcedfwibego")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Name of the namespace.
*/
@JvmName("waptdohdxdaijlsx")
public suspend fun namespaceName(`value`: Output) {
this.namespaceName = value
}
/**
* @param value The name of the resource group within the user's subscription.
*/
@JvmName("tqdwtccqoesuopyf")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Indicates if the client is enabled or not. Default value is Enabled.
*/
@JvmName("mxwdnjxenfvapjox")
public suspend fun state(`value`: Output>) {
this.state = value
}
/**
* @param value Attributes for the client. Supported values are int, bool, string, string[].
* Example:
* "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }
*/
@JvmName("ttcobffjuyfxmgbu")
public suspend fun attributes(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.attributes = mapped
}
/**
* @param value Authentication information for the client.
*/
@JvmName("oqseofdibrfnmqev")
public suspend fun authentication(`value`: ClientAuthenticationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.authentication = mapped
}
/**
* @param argument Authentication information for the client.
*/
@JvmName("houljfkuajtrexti")
public suspend fun authentication(argument: suspend ClientAuthenticationArgsBuilder.() -> Unit) {
val toBeMapped = ClientAuthenticationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.authentication = mapped
}
/**
* @param value The name presented by the client for authentication. The default value is the name of the resource.
*/
@JvmName("idrjnaselalwpbev")
public suspend fun authenticationName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.authenticationName = mapped
}
/**
* @param value The client certificate authentication information.
*/
@JvmName("hhnuuhlyeoqcrrey")
public suspend fun clientCertificateAuthentication(`value`: ClientCertificateAuthenticationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clientCertificateAuthentication = mapped
}
/**
* @param argument The client certificate authentication information.
*/
@JvmName("thhfcvlcbrihojkd")
public suspend fun clientCertificateAuthentication(argument: suspend ClientCertificateAuthenticationArgsBuilder.() -> Unit) {
val toBeMapped = ClientCertificateAuthenticationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.clientCertificateAuthentication = mapped
}
/**
* @param value The client name.
*/
@JvmName("chwnkevtqsdocpag")
public suspend fun clientName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clientName = mapped
}
/**
* @param value Description for the Client resource.
*/
@JvmName("vqukhackpdhbjisq")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Name of the namespace.
*/
@JvmName("rjciqjfwmygqrubs")
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 within the user's subscription.
*/
@JvmName("wnphybtqpmfdpbcm")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Indicates if the client is enabled or not. Default value is Enabled.
*/
@JvmName("wxymkfiyhuqspwax")
public suspend fun state(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value Indicates if the client is enabled or not. Default value is Enabled.
*/
@JvmName("lqytmnqaiysimagj")
public fun state(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value Indicates if the client is enabled or not. Default value is Enabled.
*/
@JvmName("ivcbwdmsirilqypv")
public fun state(`value`: ClientState) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
internal fun build(): ClientArgs = ClientArgs(
attributes = attributes,
authentication = authentication,
authenticationName = authenticationName,
clientCertificateAuthentication = clientCertificateAuthentication,
clientName = clientName,
description = description,
namespaceName = namespaceName,
resourceGroupName = resourceGroupName,
state = state,
)
}