api_versions
Creates, updates, deletes, gets or lists a api_versions
resource.
Overview
Name | api_versions |
Type | Resource |
Id | azure.api_center.api_versions |
Fields
- vw_api_versions
- api_versions
Name | Datatype | Description |
---|---|---|
apiName | text | field from the properties object |
lifecycle_stage | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
title | text | field from the properties object |
versionName | text | field from the properties object |
workspaceName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | API version properties entity. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | apiName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Returns details of the API version. |
list | SELECT | apiName, resourceGroupName, serviceName, subscriptionId, workspaceName | Returns a collection of API versions. |
create_or_update | INSERT | apiName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Creates new or updates existing API version. |
delete | DELETE | apiName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Deletes specified API version |
SELECT
examples
Returns a collection of API versions.
- vw_api_versions
- api_versions
SELECT
apiName,
lifecycle_stage,
resourceGroupName,
serviceName,
subscriptionId,
title,
versionName,
workspaceName
FROM azure.api_center.vw_api_versions
WHERE apiName = '{{ apiName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';
SELECT
properties
FROM azure.api_center.api_versions
WHERE apiName = '{{ apiName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new api_versions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_center.api_versions (
apiName,
resourceGroupName,
serviceName,
subscriptionId,
versionName,
workspaceName,
properties
)
SELECT
'{{ apiName }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ versionName }}',
'{{ workspaceName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: title
value: string
- name: lifecycleStage
value: []
DELETE
example
Deletes the specified api_versions
resource.
/*+ delete */
DELETE FROM azure.api_center.api_versions
WHERE apiName = '{{ apiName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND versionName = '{{ versionName }}'
AND workspaceName = '{{ workspaceName }}';