1. Packages
  2. Azure Native v2
  3. API Docs
  4. apicenter
  5. MetadataSchema
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.apicenter.MetadataSchema

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

Metadata schema entity. Used to define metadata for the entities in API catalog. Azure REST API version: 2024-03-01.

Other available API versions: 2024-03-15-preview, 2024-06-01-preview.

Example Usage

MetadataSchemas_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var metadataSchema = new AzureNative.ApiCenter.MetadataSchema("metadataSchema", new()
    {
        AssignedTo = new[]
        {
            new AzureNative.ApiCenter.Inputs.MetadataAssignmentArgs
            {
                Deprecated = true,
                Entity = AzureNative.ApiCenter.MetadataAssignmentEntity.Api,
            },
        },
        MetadataSchemaName = "author",
        ResourceGroupName = "contoso-resources",
        Schema = "{\"type\":\"string\", \"title\":\"Author\", pattern: \"^[a-zA-Z]+$\"}",
        ServiceName = "contoso",
    });

});
Copy
package main

import (
	apicenter "github.com/pulumi/pulumi-azure-native-sdk/apicenter/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apicenter.NewMetadataSchema(ctx, "metadataSchema", &apicenter.MetadataSchemaArgs{
			AssignedTo: apicenter.MetadataAssignmentArray{
				&apicenter.MetadataAssignmentArgs{
					Deprecated: pulumi.Bool(true),
					Entity:     pulumi.String(apicenter.MetadataAssignmentEntityApi),
				},
			},
			MetadataSchemaName: pulumi.String("author"),
			ResourceGroupName:  pulumi.String("contoso-resources"),
			Schema:             pulumi.String("{\"type\":\"string\", \"title\":\"Author\", pattern: \"^[a-zA-Z]+$\"}"),
			ServiceName:        pulumi.String("contoso"),
		})
		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.apicenter.MetadataSchema;
import com.pulumi.azurenative.apicenter.MetadataSchemaArgs;
import com.pulumi.azurenative.apicenter.inputs.MetadataAssignmentArgs;
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 metadataSchema = new MetadataSchema("metadataSchema", MetadataSchemaArgs.builder()
            .assignedTo(MetadataAssignmentArgs.builder()
                .deprecated(true)
                .entity("api")
                .build())
            .metadataSchemaName("author")
            .resourceGroupName("contoso-resources")
            .schema("{\"type\":\"string\", \"title\":\"Author\", pattern: \"^[a-zA-Z]+$\"}")
            .serviceName("contoso")
            .build());

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

const metadataSchema = new azure_native.apicenter.MetadataSchema("metadataSchema", {
    assignedTo: [{
        deprecated: true,
        entity: azure_native.apicenter.MetadataAssignmentEntity.Api,
    }],
    metadataSchemaName: "author",
    resourceGroupName: "contoso-resources",
    schema: "{\"type\":\"string\", \"title\":\"Author\", pattern: \"^[a-zA-Z]+$\"}",
    serviceName: "contoso",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

metadata_schema = azure_native.apicenter.MetadataSchema("metadataSchema",
    assigned_to=[{
        "deprecated": True,
        "entity": azure_native.apicenter.MetadataAssignmentEntity.API,
    }],
    metadata_schema_name="author",
    resource_group_name="contoso-resources",
    schema="{\"type\":\"string\", \"title\":\"Author\", pattern: \"^[a-zA-Z]+$\"}",
    service_name="contoso")
Copy
resources:
  metadataSchema:
    type: azure-native:apicenter:MetadataSchema
    properties:
      assignedTo:
        - deprecated: true
          entity: api
      metadataSchemaName: author
      resourceGroupName: contoso-resources
      schema: '{"type":"string", "title":"Author", pattern: "^[a-zA-Z]+$"}'
      serviceName: contoso
Copy

Create MetadataSchema Resource

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

Constructor syntax

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

@overload
def MetadataSchema(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   resource_group_name: Optional[str] = None,
                   schema: Optional[str] = None,
                   service_name: Optional[str] = None,
                   assigned_to: Optional[Sequence[MetadataAssignmentArgs]] = None,
                   metadata_schema_name: Optional[str] = None)
func NewMetadataSchema(ctx *Context, name string, args MetadataSchemaArgs, opts ...ResourceOption) (*MetadataSchema, error)
public MetadataSchema(string name, MetadataSchemaArgs args, CustomResourceOptions? opts = null)
public MetadataSchema(String name, MetadataSchemaArgs args)
public MetadataSchema(String name, MetadataSchemaArgs args, CustomResourceOptions options)
type: azure-native:apicenter:MetadataSchema
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. MetadataSchemaArgs
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. MetadataSchemaArgs
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. MetadataSchemaArgs
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. MetadataSchemaArgs
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. MetadataSchemaArgs
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 metadataSchemaResource = new AzureNative.Apicenter.MetadataSchema("metadataSchemaResource", new()
{
    ResourceGroupName = "string",
    Schema = "string",
    ServiceName = "string",
    AssignedTo = new[]
    {
        
        {
            { "deprecated", false },
            { "entity", "string" },
            { "required", false },
        },
    },
    MetadataSchemaName = "string",
});
Copy
example, err := apicenter.NewMetadataSchema(ctx, "metadataSchemaResource", &apicenter.MetadataSchemaArgs{
	ResourceGroupName: "string",
	Schema:            "string",
	ServiceName:       "string",
	AssignedTo: []map[string]interface{}{
		map[string]interface{}{
			"deprecated": false,
			"entity":     "string",
			"required":   false,
		},
	},
	MetadataSchemaName: "string",
})
Copy
var metadataSchemaResource = new MetadataSchema("metadataSchemaResource", MetadataSchemaArgs.builder()
    .resourceGroupName("string")
    .schema("string")
    .serviceName("string")
    .assignedTo(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .metadataSchemaName("string")
    .build());
Copy
metadata_schema_resource = azure_native.apicenter.MetadataSchema("metadataSchemaResource",
    resource_group_name=string,
    schema=string,
    service_name=string,
    assigned_to=[{
        deprecated: False,
        entity: string,
        required: False,
    }],
    metadata_schema_name=string)
Copy
const metadataSchemaResource = new azure_native.apicenter.MetadataSchema("metadataSchemaResource", {
    resourceGroupName: "string",
    schema: "string",
    serviceName: "string",
    assignedTo: [{
        deprecated: false,
        entity: "string",
        required: false,
    }],
    metadataSchemaName: "string",
});
Copy
type: azure-native:apicenter:MetadataSchema
properties:
    assignedTo:
        - deprecated: false
          entity: string
          required: false
    metadataSchemaName: string
    resourceGroupName: string
    schema: string
    serviceName: string
Copy

MetadataSchema 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 MetadataSchema resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
Schema This property is required. string
The schema defining the type.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of Azure API Center service.
AssignedTo List<Pulumi.AzureNative.ApiCenter.Inputs.MetadataAssignment>
The assignees
MetadataSchemaName Changes to this property will trigger replacement. string
The name of the metadata 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.
Schema This property is required. string
The schema defining the type.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of Azure API Center service.
AssignedTo []MetadataAssignmentArgs
The assignees
MetadataSchemaName Changes to this property will trigger replacement. string
The name of the metadata 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.
schema This property is required. String
The schema defining the type.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of Azure API Center service.
assignedTo List<MetadataAssignment>
The assignees
metadataSchemaName Changes to this property will trigger replacement. String
The name of the metadata 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.
schema This property is required. string
The schema defining the type.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The name of Azure API Center service.
assignedTo MetadataAssignment[]
The assignees
metadataSchemaName Changes to this property will trigger replacement. string
The name of the metadata 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 This property is required. str
The schema defining the type.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The name of Azure API Center service.
assigned_to Sequence[MetadataAssignmentArgs]
The assignees
metadata_schema_name Changes to this property will trigger replacement. str
The name of the metadata 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.
schema This property is required. String
The schema defining the type.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of Azure API Center service.
assignedTo List<Property Map>
The assignees
metadataSchemaName Changes to this property will trigger replacement. String
The name of the metadata schema.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
SystemData Pulumi.AzureNative.ApiCenter.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"
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name 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"
id String
The provider-assigned unique ID for this managed resource.
name String
The name 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"
id string
The provider-assigned unique ID for this managed resource.
name string
The name 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"
id str
The provider-assigned unique ID for this managed resource.
name str
The name 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"
id String
The provider-assigned unique ID for this managed resource.
name String
The name 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"

Supporting Types

MetadataAssignment
, MetadataAssignmentArgs

Deprecated bool
Deprecated assignment
Entity string | Pulumi.AzureNative.ApiCenter.MetadataAssignmentEntity
The entities this metadata schema component gets applied to.
Required bool
Required assignment
Deprecated bool
Deprecated assignment
Entity string | MetadataAssignmentEntity
The entities this metadata schema component gets applied to.
Required bool
Required assignment
deprecated Boolean
Deprecated assignment
entity String | MetadataAssignmentEntity
The entities this metadata schema component gets applied to.
required Boolean
Required assignment
deprecated boolean
Deprecated assignment
entity string | MetadataAssignmentEntity
The entities this metadata schema component gets applied to.
required boolean
Required assignment
deprecated bool
Deprecated assignment
entity str | MetadataAssignmentEntity
The entities this metadata schema component gets applied to.
required bool
Required assignment
deprecated Boolean
Deprecated assignment
entity String | "api" | "environment" | "deployment"
The entities this metadata schema component gets applied to.
required Boolean
Required assignment

MetadataAssignmentEntity
, MetadataAssignmentEntityArgs

Api
apiAssigned to API
Environment
environmentAssigned to Environment
Deployment
deploymentAssigned to Deployment
MetadataAssignmentEntityApi
apiAssigned to API
MetadataAssignmentEntityEnvironment
environmentAssigned to Environment
MetadataAssignmentEntityDeployment
deploymentAssigned to Deployment
Api
apiAssigned to API
Environment
environmentAssigned to Environment
Deployment
deploymentAssigned to Deployment
Api
apiAssigned to API
Environment
environmentAssigned to Environment
Deployment
deploymentAssigned to Deployment
API
apiAssigned to API
ENVIRONMENT
environmentAssigned to Environment
DEPLOYMENT
deploymentAssigned to Deployment
"api"
apiAssigned to API
"environment"
environmentAssigned to Environment
"deployment"
deploymentAssigned to Deployment

MetadataAssignmentResponse
, MetadataAssignmentResponseArgs

Deprecated bool
Deprecated assignment
Entity string
The entities this metadata schema component gets applied to.
Required bool
Required assignment
Deprecated bool
Deprecated assignment
Entity string
The entities this metadata schema component gets applied to.
Required bool
Required assignment
deprecated Boolean
Deprecated assignment
entity String
The entities this metadata schema component gets applied to.
required Boolean
Required assignment
deprecated boolean
Deprecated assignment
entity string
The entities this metadata schema component gets applied to.
required boolean
Required assignment
deprecated bool
Deprecated assignment
entity str
The entities this metadata schema component gets applied to.
required bool
Required assignment
deprecated Boolean
Deprecated assignment
entity String
The entities this metadata schema component gets applied to.
required Boolean
Required assignment

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:apicenter:MetadataSchema author /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/metadataSchemas/{metadataSchemaName} 
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