Skip to main content

workspace_global_schema

Creates, updates, deletes, gets or lists a workspace_global_schema resource.

Overview​

Nameworkspace_global_schema
TypeResource
Idazure.api_management.workspace_global_schema

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
descriptionstringFree-form schema entity description.
documentobjectGlobal Schema document object for json-based schema formats(e.g. json schema).
provisioningStatestringThe provisioning state.
schemaTypestringSchema Type. Immutable. Required. Known values are: "xml" and "json". (xml, json)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
valueobjectJson-encoded string for non json-based schema.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, service_name, workspace_id, schema_id, subscription_idGets the details of the Schema specified by its identifier.
list_by_serviceselectresource_group_name, service_name, workspace_id, subscription_id$filter, $top, $skipLists a collection of schemas registered with workspace in a service instance.
create_or_updateinsertresource_group_name, service_name, workspace_id, schema_id, subscription_idCreates new or updates existing specified Schema of the workspace in an API Management service instance.
create_or_updatereplaceresource_group_name, service_name, workspace_id, schema_id, subscription_idCreates new or updates existing specified Schema of the workspace in an API Management service instance.
deletedeleteresource_group_name, service_name, workspace_id, schema_id, subscription_idDeletes specific Schema.
get_entity_tagexecresource_group_name, service_name, workspace_id, schema_id, subscription_idGets the entity state (Etag) version of the Schema specified by its identifier.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
schema_idstringSchema id identifier. Must be unique in the current API Management service instance. Required.
service_namestringThe name of the API Management service. Required.
subscription_idstring
workspace_idstringWorkspace identifier. Must be unique in the current API Management service instance. Required.
$filterstring| Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |. Default value is None.
$skipintegerNumber of records to skip. Default value is None.
$topintegerNumber of records to return. Default value is None.

SELECT examples​

Gets the details of the Schema specified by its identifier.

SELECT
id,
name,
description,
document,
provisioningState,
schemaType,
systemData,
type,
value
FROM azure.api_management.workspace_global_schema
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
AND schema_id = '{{ schema_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples​

Creates new or updates existing specified Schema of the workspace in an API Management service instance.

INSERT INTO azure.api_management.workspace_global_schema (
properties,
resource_group_name,
service_name,
workspace_id,
schema_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ workspace_id }}',
'{{ schema_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples​

Creates new or updates existing specified Schema of the workspace in an API Management service instance.

REPLACE azure.api_management.workspace_global_schema
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND schema_id = '{{ schema_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples​

Deletes specific Schema.

DELETE FROM azure.api_management.workspace_global_schema
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND schema_id = '{{ schema_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods​

Gets the entity state (Etag) version of the Schema specified by its identifier.

EXEC azure.api_management.workspace_global_schema.get_entity_tag
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@workspace_id='{{ workspace_id }}' --required,
@schema_id='{{ schema_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;