Skip to main content

api_versions

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

Overview

Nameapi_versions
TypeResource
Idazure.api_center.api_versions

Fields

NameDatatypeDescription
apiNametextfield from the properties object
lifecycle_stagetextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
titletextfield from the properties object
versionNametextfield from the properties object
workspaceNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTapiName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameReturns details of the API version.
listSELECTapiName, resourceGroupName, serviceName, subscriptionId, workspaceNameReturns a collection of API versions.
create_or_updateINSERTapiName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameCreates new or updates existing API version.
deleteDELETEapiName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameDeletes specified API version

SELECT examples

Returns a collection of 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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new api_versions resource.

/*+ create */
INSERT INTO azure.api_center.api_versions (
apiName,
resourceGroupName,
serviceName,
subscriptionId,
versionName,
workspaceName,
properties
)
SELECT
'{{ apiName }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ versionName }}',
'{{ workspaceName }}',
'{{ properties }}'
;

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 }}';