metadata_schemas
Creates, updates, deletes, gets or lists a metadata_schemas
resource.
Overview
Name | metadata_schemas |
Type | Resource |
Id | azure.api_center.metadata_schemas |
Fields
- vw_metadata_schemas
- metadata_schemas
Name | Datatype | Description |
---|---|---|
assigned_to | text | field from the properties object |
metadataSchemaName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
schema | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Metadata schema properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | metadataSchemaName, resourceGroupName, serviceName, subscriptionId | Returns details of the metadata schema. |
list | SELECT | resourceGroupName, serviceName, subscriptionId | Returns a collection of metadata schemas. |
create_or_update | INSERT | metadataSchemaName, resourceGroupName, serviceName, subscriptionId | Creates new or updates existing metadata schema. |
delete | DELETE | metadataSchemaName, resourceGroupName, serviceName, subscriptionId | Deletes specified metadata schema. |
SELECT
examples
Returns a collection of metadata schemas.
- vw_metadata_schemas
- metadata_schemas
SELECT
assigned_to,
metadataSchemaName,
resourceGroupName,
schema,
serviceName,
subscriptionId
FROM azure.api_center.vw_metadata_schemas
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_center.metadata_schemas
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new metadata_schemas
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_center.metadata_schemas (
metadataSchemaName,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ metadataSchemaName }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: schema
value: string
- name: assignedTo
value:
- - name: entity
value: []
- name: required
value: boolean
- name: deprecated
value: boolean
DELETE
example
Deletes the specified metadata_schemas
resource.
/*+ delete */
DELETE FROM azure.api_center.metadata_schemas
WHERE metadataSchemaName = '{{ metadataSchemaName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';