1. Packages
  2. Azure Native v2
  3. API Docs
  4. deviceregistry
  5. Schema
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.deviceregistry.Schema

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

Schema definition. Azure REST 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" },
        },
    });

});
Copy
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
	})
}
Copy
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());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const schema = new azure_native.deviceregistry.Schema("schema", {
    description: "This is a sample Schema",
    displayName: "My Schema",
    format: azure_native.deviceregistry.Format.JsonSchema_draft7,
    resourceGroupName: "myResourceGroup",
    schemaName: "my-schema",
    schemaRegistryName: "my-schema-registry",
    schemaType: azure_native.deviceregistry.SchemaType.MessageSchema,
    tags: {
        sampleKey: "sampleValue",
    },
});
Copy
import pulumi
import pulumi_azure_native as azure_native

schema = azure_native.deviceregistry.Schema("schema",
    description="This is a sample Schema",
    display_name="My Schema",
    format=azure_native.deviceregistry.Format.JSON_SCHEMA_DRAFT7,
    resource_group_name="myResourceGroup",
    schema_name="my-schema",
    schema_registry_name="my-schema-registry",
    schema_type=azure_native.deviceregistry.SchemaType.MESSAGE_SCHEMA,
    tags={
        "sampleKey": "sampleValue",
    })
Copy
resources:
  schema:
    type: azure-native:deviceregistry:Schema
    properties:
      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:
        sampleKey: sampleValue
Copy

Create Schema Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Schema(name: string, args: SchemaArgs, opts?: CustomResourceOptions);
@overload
def Schema(resource_name: str,
           args: SchemaArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Schema(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           format: Optional[Union[str, Format]] = None,
           resource_group_name: Optional[str] = None,
           schema_registry_name: Optional[str] = None,
           schema_type: Optional[Union[str, SchemaType]] = None,
           description: Optional[str] = None,
           display_name: Optional[str] = None,
           schema_name: Optional[str] = None,
           tags: Optional[Mapping[str, str]] = None)
func NewSchema(ctx *Context, name string, args SchemaArgs, opts ...ResourceOption) (*Schema, error)
public Schema(string name, SchemaArgs args, CustomResourceOptions? opts = null)
public Schema(String name, SchemaArgs args)
public Schema(String name, SchemaArgs args, CustomResourceOptions options)
type: azure-native:deviceregistry:Schema
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SchemaArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SchemaArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SchemaArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SchemaArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SchemaArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var azure_nativeSchemaResource = new AzureNative.Deviceregistry.Schema("azure-nativeSchemaResource", new()
{
    Format = "string",
    ResourceGroupName = "string",
    SchemaRegistryName = "string",
    SchemaType = "string",
    Description = "string",
    DisplayName = "string",
    SchemaName = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := deviceregistry.NewSchema(ctx, "azure-nativeSchemaResource", &deviceregistry.SchemaArgs{
	Format:             "string",
	ResourceGroupName:  "string",
	SchemaRegistryName: "string",
	SchemaType:         "string",
	Description:        "string",
	DisplayName:        "string",
	SchemaName:         "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
})
Copy
var azure_nativeSchemaResource = new Schema("azure-nativeSchemaResource", SchemaArgs.builder()
    .format("string")
    .resourceGroupName("string")
    .schemaRegistryName("string")
    .schemaType("string")
    .description("string")
    .displayName("string")
    .schemaName("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
azure_native_schema_resource = azure_native.deviceregistry.Schema("azure-nativeSchemaResource",
    format=string,
    resource_group_name=string,
    schema_registry_name=string,
    schema_type=string,
    description=string,
    display_name=string,
    schema_name=string,
    tags={
        string: string,
    })
Copy
const azure_nativeSchemaResource = new azure_native.deviceregistry.Schema("azure-nativeSchemaResource", {
    format: "string",
    resourceGroupName: "string",
    schemaRegistryName: "string",
    schemaType: "string",
    description: "string",
    displayName: "string",
    schemaName: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure-native:deviceregistry:Schema
properties:
    description: string
    displayName: string
    format: string
    resourceGroupName: string
    schemaName: string
    schemaRegistryName: string
    schemaType: string
    tags:
        string: string
Copy

Schema Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Schema resource accepts the following input properties:

Format
This property is required.
Changes to this property will trigger replacement.
string | Pulumi.AzureNative.DeviceRegistry.Format
Format of the schema.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
SchemaRegistryName
This property is required.
Changes to this property will trigger replacement.
string
Schema registry name parameter.
SchemaType
This property is required.
Changes to this property will trigger replacement.
string | Pulumi.AzureNative.DeviceRegistry.SchemaType
Type of the schema.
Description string
Human-readable description of the schema.
DisplayName string
Human-readable display name.
SchemaName Changes to this property will trigger replacement. string
Schema name parameter.
Tags Dictionary<string, string>
Schema tags.
Format
This property is required.
Changes to this property will trigger replacement.
string | Format
Format of the schema.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
SchemaRegistryName
This property is required.
Changes to this property will trigger replacement.
string
Schema registry name parameter.
SchemaType
This property is required.
Changes to this property will trigger replacement.
string | SchemaType
Type of the schema.
Description string
Human-readable description of the schema.
DisplayName string
Human-readable display name.
SchemaName Changes to this property will trigger replacement. string
Schema name parameter.
Tags map[string]string
Schema tags.
format
This property is required.
Changes to this property will trigger replacement.
String | Format
Format of the schema.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
schemaRegistryName
This property is required.
Changes to this property will trigger replacement.
String
Schema registry name parameter.
schemaType
This property is required.
Changes to this property will trigger replacement.
String | SchemaType
Type of the schema.
description String
Human-readable description of the schema.
displayName String
Human-readable display name.
schemaName Changes to this property will trigger replacement. String
Schema name parameter.
tags Map<String,String>
Schema tags.
format
This property is required.
Changes to this property will trigger replacement.
string | Format
Format of the schema.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
schemaRegistryName
This property is required.
Changes to this property will trigger replacement.
string
Schema registry name parameter.
schemaType
This property is required.
Changes to this property will trigger replacement.
string | SchemaType
Type of the schema.
description string
Human-readable description of the schema.
displayName string
Human-readable display name.
schemaName Changes to this property will trigger replacement. string
Schema name parameter.
tags {[key: string]: string}
Schema tags.
format
This property is required.
Changes to this property will trigger replacement.
str | Format
Format of the schema.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
schema_registry_name
This property is required.
Changes to this property will trigger replacement.
str
Schema registry name parameter.
schema_type
This property is required.
Changes to this property will trigger replacement.
str | SchemaType
Type of the schema.
description str
Human-readable description of the schema.
display_name str
Human-readable display name.
schema_name Changes to this property will trigger replacement. str
Schema name parameter.
tags Mapping[str, str]
Schema tags.
format
This property is required.
Changes to this property will trigger replacement.
String | "JsonSchema/draft-07" | "Delta/1.0"
Format of the schema.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
schemaRegistryName
This property is required.
Changes to this property will trigger replacement.
String
Schema registry name parameter.
schemaType
This property is required.
Changes to this property will trigger replacement.
String | "MessageSchema"
Type of the schema.
description String
Human-readable description of the schema.
displayName String
Human-readable display name.
schemaName Changes to this property will trigger replacement. String
Schema name parameter.
tags Map<String>
Schema tags.

Outputs

All input properties are implicitly available as output properties. Additionally, the Schema resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
Provisioning state of the resource.
SystemData Pulumi.AzureNative.DeviceRegistry.Outputs.SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Uuid string
Globally unique, immutable, non-reusable id.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
Provisioning state of the resource.
SystemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Uuid string
Globally unique, immutable, non-reusable id.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
Provisioning state of the resource.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
uuid String
Globally unique, immutable, non-reusable id.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
provisioningState string
Provisioning state of the resource.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
uuid string
Globally unique, immutable, non-reusable id.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
provisioning_state str
Provisioning state of the resource.
system_data SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
uuid str
Globally unique, immutable, non-reusable id.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
Provisioning state of the resource.
systemData Property Map
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
uuid String
Globally unique, immutable, non-reusable id.

Supporting Types

Format
, FormatArgs

JsonSchema_draft7
JsonSchema/draft-07JSON Schema version draft 7 format
Delta_1_0
Delta/1.0Delta format
Format_JsonSchema_draft7
JsonSchema/draft-07JSON Schema version draft 7 format
Format_Delta_1_0
Delta/1.0Delta format
JsonSchema_draft7
JsonSchema/draft-07JSON Schema version draft 7 format
Delta_1_0
Delta/1.0Delta format
JsonSchema_draft7
JsonSchema/draft-07JSON Schema version draft 7 format
Delta_1_0
Delta/1.0Delta format
JSON_SCHEMA_DRAFT7
JsonSchema/draft-07JSON Schema version draft 7 format
DELTA_1_0
Delta/1.0Delta format
"JsonSchema/draft-07"
JsonSchema/draft-07JSON Schema version draft 7 format
"Delta/1.0"
Delta/1.0Delta format

SchemaType
, SchemaTypeArgs

MessageSchema
MessageSchemaMessage Schema schema type
SchemaTypeMessageSchema
MessageSchemaMessage Schema schema type
MessageSchema
MessageSchemaMessage Schema schema type
MessageSchema
MessageSchemaMessage Schema schema type
MESSAGE_SCHEMA
MessageSchemaMessage Schema schema type
"MessageSchema"
MessageSchemaMessage Schema schema type

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

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} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi