ClientArgs

data class ClientArgs(val attributes: Output<Any>? = null, val authenticationName: Output<String>? = null, val clientCertificateAuthentication: Output<ClientCertificateAuthenticationArgs>? = null, val clientName: Output<String>? = null, val description: Output<String>? = null, val namespaceName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val state: Output<Either<String, ClientState>>? = null) : ConvertibleToJava<ClientArgs>

The Client resource. Uses Azure REST API version 2025-02-15. In version 2.x of the Azure Native provider, it used API version 2023-06-01-preview. Other available API versions: 2023-06-01-preview, 2023-12-15-preview, 2024-06-01-preview, 2024-12-15-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native eventgrid [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Clients_CreateOrUpdate

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<string, object?>
{
["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,
});
});
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
})
}
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.

$ pulumi import azure-native:eventgrid:Client exampleClientName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}

Constructors

Link copied to clipboard
constructor(attributes: Output<Any>? = null, authenticationName: Output<String>? = null, clientCertificateAuthentication: Output<ClientCertificateAuthenticationArgs>? = null, clientName: Output<String>? = null, description: Output<String>? = null, namespaceName: Output<String>? = null, resourceGroupName: Output<String>? = null, state: Output<Either<String, ClientState>>? = null)

Properties

Link copied to clipboard
val attributes: Output<Any>? = null

Attributes for the client. Supported values are int, bool, string, string[]. Example: "attributes": { "room": "345", "floor": 12, "deviceTypes": "Fan", "Light" }

Link copied to clipboard
val authenticationName: Output<String>? = null

The name presented by the client for authentication. The default value is the name of the resource.

Link copied to clipboard

The client certificate authentication information.

Link copied to clipboard
val clientName: Output<String>? = null

The client name.

Link copied to clipboard
val description: Output<String>? = null

Description for the Client resource.

Link copied to clipboard
val namespaceName: Output<String>? = null

Name of the namespace.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group within the user's subscription.

Link copied to clipboard
val state: Output<Either<String, ClientState>>? = null

Indicates if the client is enabled or not. Default value is Enabled.

Functions

Link copied to clipboard
open override fun toJava(): ClientArgs