1. Packages
  2. Azure Native
  3. API Docs
  4. apicenter
  5. MetadataSchema
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.41.0 published on Tuesday, May 14, 2024 by Pulumi

azure-native.apicenter.MetadataSchema

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.41.0 published on Tuesday, May 14, 2024 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.

    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",
        });
    
    });
    
    package main
    
    import (
    	"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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    metadata_schema = azure_native.apicenter.MetadataSchema("metadataSchema",
        assigned_to=[azure_native.apicenter.MetadataAssignmentArgs(
            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")
    
    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",
    });
    
    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
    

    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 string
    The unique name of the resource.
    args MetadataSchemaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args MetadataSchemaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetadataSchemaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetadataSchemaArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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[]
        {
            new AzureNative.ApiCenter.Inputs.MetadataAssignmentArgs
            {
                Deprecated = false,
                Entity = "string",
                Required = false,
            },
        },
        MetadataSchemaName = "string",
    });
    
    example, err := apicenter.NewMetadataSchema(ctx, "metadataSchemaResource", &apicenter.MetadataSchemaArgs{
    ResourceGroupName: pulumi.String("string"),
    Schema: pulumi.String("string"),
    ServiceName: pulumi.String("string"),
    AssignedTo: apicenter.MetadataAssignmentArray{
    &apicenter.MetadataAssignmentArgs{
    Deprecated: pulumi.Bool(false),
    Entity: pulumi.String("string"),
    Required: pulumi.Bool(false),
    },
    },
    MetadataSchemaName: pulumi.String("string"),
    })
    
    var metadataSchemaResource = new MetadataSchema("metadataSchemaResource", MetadataSchemaArgs.builder()        
        .resourceGroupName("string")
        .schema("string")
        .serviceName("string")
        .assignedTo(MetadataAssignmentArgs.builder()
            .deprecated(false)
            .entity("string")
            .required(false)
            .build())
        .metadataSchemaName("string")
        .build());
    
    metadata_schema_resource = azure_native.apicenter.MetadataSchema("metadataSchemaResource",
        resource_group_name="string",
        schema="string",
        service_name="string",
        assigned_to=[azure_native.apicenter.MetadataAssignmentArgs(
            deprecated=False,
            entity="string",
            required=False,
        )],
        metadata_schema_name="string")
    
    const metadataSchemaResource = new azure_native.apicenter.MetadataSchema("metadataSchemaResource", {
        resourceGroupName: "string",
        schema: "string",
        serviceName: "string",
        assignedTo: [{
            deprecated: false,
            entity: "string",
            required: false,
        }],
        metadataSchemaName: "string",
    });
    
    type: azure-native:apicenter:MetadataSchema
    properties:
        assignedTo:
            - deprecated: false
              entity: string
              required: false
        metadataSchemaName: string
        resourceGroupName: string
        schema: string
        serviceName: string
    

    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

    The MetadataSchema resource accepts the following input properties:

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

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.41.0 published on Tuesday, May 14, 2024 by Pulumi