Client

class Client : KotlinCustomResource

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}

Properties

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

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

Link copied to clipboard

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

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

The client certificate authentication information.

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

Description for the Client resource.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Name of the resource.

Link copied to clipboard

Provisioning state of the Client resource.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Output<String>?

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

Link copied to clipboard

The system metadata relating to the Event Grid resource.

Link copied to clipboard
val type: Output<String>

Type of the resource.

Link copied to clipboard
val urn: Output<String>