SchemaArgs

data class SchemaArgs(val description: Output<String>? = null, val displayName: Output<String>? = null, val format: Output<Either<String, Format>>? = null, val resourceGroupName: Output<String>? = null, val schemaName: Output<String>? = null, val schemaRegistryName: Output<String>? = null, val schemaType: Output<Either<String, SchemaType>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<SchemaArgs>

Schema definition. Uses Azure REST API version 2024-09-01-preview. In version 2.x of the Azure Native provider, it used API version 2024-09-01-preview.

Example Usage

Create_Schema

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var schema = new AzureNative.DeviceRegistry.Schema("schema", new()
{
Description = "This is a sample Schema",
DisplayName = "My Schema",
Format = AzureNative.DeviceRegistry.Format.JsonSchema_draft7,
ResourceGroupName = "myResourceGroup",
SchemaName = "my-schema",
SchemaRegistryName = "my-schema-registry",
SchemaType = AzureNative.DeviceRegistry.SchemaType.MessageSchema,
Tags =
{
{ "sampleKey", "sampleValue" },
},
});
});
package main
import (
deviceregistry "github.com/pulumi/pulumi-azure-native-sdk/deviceregistry/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := deviceregistry.NewSchema(ctx, "schema", &deviceregistry.SchemaArgs{
Description: pulumi.String("This is a sample Schema"),
DisplayName: pulumi.String("My Schema"),
Format: pulumi.String(deviceregistry.Format_JsonSchema_draft7),
ResourceGroupName: pulumi.String("myResourceGroup"),
SchemaName: pulumi.String("my-schema"),
SchemaRegistryName: pulumi.String("my-schema-registry"),
SchemaType: pulumi.String(deviceregistry.SchemaTypeMessageSchema),
Tags: pulumi.StringMap{
"sampleKey": pulumi.String("sampleValue"),
},
})
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.deviceregistry.Schema;
import com.pulumi.azurenative.deviceregistry.SchemaArgs;
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 schema = new Schema("schema", SchemaArgs.builder()
.description("This is a sample Schema")
.displayName("My Schema")
.format("JsonSchema/draft-07")
.resourceGroupName("myResourceGroup")
.schemaName("my-schema")
.schemaRegistryName("my-schema-registry")
.schemaType("MessageSchema")
.tags(Map.of("sampleKey", "sampleValue"))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:deviceregistry:Schema my-schema /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas/{schemaName}

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, displayName: Output<String>? = null, format: Output<Either<String, Format>>? = null, resourceGroupName: Output<String>? = null, schemaName: Output<String>? = null, schemaRegistryName: Output<String>? = null, schemaType: Output<Either<String, SchemaType>>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

Human-readable description of the schema.

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

Human-readable display name.

Link copied to clipboard
val format: Output<Either<String, Format>>? = null

Format of the schema.

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

The name of the resource group. The name is case insensitive.

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

Schema name parameter.

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

Schema registry name parameter.

Link copied to clipboard
val schemaType: Output<Either<String, SchemaType>>? = null

Type of the schema.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Schema tags.

Functions

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