api_schemata
Creates, updates, deletes, gets or lists a api_schemata
resource.
Overview
Name | api_schemata |
Type | Resource |
Id | azure.api_management.api_schemata |
Fields
- vw_api_schemata
- api_schemata
Name | Datatype | Description |
---|---|---|
apiId | text | field from the properties object |
content_type | text | field from the properties object |
document | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
schemaId | 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 | API Schema create or update contract Properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | apiId, resourceGroupName, schemaId, serviceName, subscriptionId | Get the schema configuration at the API level. |
list_by_api | SELECT | apiId, resourceGroupName, serviceName, subscriptionId | Get the schema configuration at the API level. |
create_or_update | INSERT | apiId, resourceGroupName, schemaId, serviceName, subscriptionId | Creates or updates schema configuration for the API. |
delete | DELETE | If-Match, apiId, resourceGroupName, schemaId, serviceName, subscriptionId | Deletes the schema configuration at the Api. |
SELECT
examples
Get the schema configuration at the API level.
- vw_api_schemata
- api_schemata
SELECT
apiId,
content_type,
document,
provisioning_state,
resourceGroupName,
schemaId,
serviceName,
subscriptionId
FROM azure.api_management.vw_api_schemata
WHERE apiId = '{{ apiId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.api_schemata
WHERE apiId = '{{ apiId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new api_schemata
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.api_schemata (
apiId,
resourceGroupName,
schemaId,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ apiId }}',
'{{ resourceGroupName }}',
'{{ schemaId }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: contentType
value: string
- name: document
value:
- name: value
value: string
- name: definitions
value: object
- name: components
value: object
- name: provisioningState
value: string
DELETE
example
Deletes the specified api_schemata
resource.
/*+ delete */
DELETE FROM azure.api_management.api_schemata
WHERE If-Match = '{{ If-Match }}'
AND apiId = '{{ apiId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND schemaId = '{{ schemaId }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';