azure-native.apicenter.MetadataSchema
Explore with Pulumi AI
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 (
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
})
}
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.
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[]
{
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:
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Schema string
- The schema defining the type.
- Service
Name string - The name of Azure API Center service.
- Assigned
To List<Pulumi.Azure Native. Api Center. Inputs. Metadata Assignment> - The assignees
- Metadata
Schema stringName - The name of the metadata schema.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Schema string
- The schema defining the type.
- Service
Name string - The name of Azure API Center service.
- Assigned
To []MetadataAssignment Args - The assignees
- Metadata
Schema stringName - The name of the metadata schema.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- schema String
- The schema defining the type.
- service
Name String - The name of Azure API Center service.
- assigned
To List<MetadataAssignment> - The assignees
- metadata
Schema StringName - The name of the metadata schema.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- schema string
- The schema defining the type.
- service
Name string - The name of Azure API Center service.
- assigned
To MetadataAssignment[] - The assignees
- metadata
Schema stringName - The name of the metadata schema.
- resource_
group_ strname - 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[MetadataAssignment Args] - The assignees
- metadata_
schema_ strname - The name of the metadata schema.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- schema String
- The schema defining the type.
- service
Name String - The name of Azure API Center service.
- assigned
To List<Property Map> - The assignees
- metadata
Schema StringName - 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
- System
Data Pulumi.Azure Native. Api Center. Outputs. System Data Response - 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
- System
Data SystemData Response - 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
- system
Data SystemData Response - 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
- system
Data SystemData Response - 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 SystemData Response - 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
- system
Data 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.
Azure Native. Api Center. Metadata Assignment Entity - The entities this metadata schema component gets applied to.
- Required bool
- Required assignment
- Deprecated bool
- Deprecated assignment
- Entity
string | Metadata
Assignment Entity - The entities this metadata schema component gets applied to.
- Required bool
- Required assignment
- deprecated Boolean
- Deprecated assignment
- entity
String | Metadata
Assignment Entity - The entities this metadata schema component gets applied to.
- required Boolean
- Required assignment
- deprecated boolean
- Deprecated assignment
- entity
string | Metadata
Assignment Entity - The entities this metadata schema component gets applied to.
- required boolean
- Required assignment
- deprecated bool
- Deprecated assignment
- entity
str | Metadata
Assignment Entity - 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
- Metadata
Assignment Entity Api - apiAssigned to API
- Metadata
Assignment Entity Environment - environmentAssigned to Environment
- Metadata
Assignment Entity 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
- "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
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - 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_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - 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