services
Creates, updates, deletes, gets or lists a services
resource.
Overview
Name | services |
Type | Resource |
Id | azure.api_management.services |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
Successfully got the API Management Service Resource.
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
etag | string | ETag of the resource. |
identity | object | Managed service identity of the Api Management service. |
location | string | Resource location. |
properties | object | Properties of the API Management service. |
sku | object | SKU properties of the API Management service. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
type | string | Resource type for API Management resource is set to Microsoft.ApiManagement. |
zones | array | A list of availability zones denoting where the resource needs to come from. |
The API Management service list.
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
etag | string | ETag of the resource. |
identity | object | Managed service identity of the Api Management service. |
location | string | Resource location. |
properties | object | Properties of the API Management service. |
sku | object | SKU properties of the API Management service. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
type | string | Resource type for API Management resource is set to Microsoft.ApiManagement. |
zones | array | A list of availability zones denoting where the resource needs to come from. |
The API Management service list.
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
etag | string | ETag of the resource. |
identity | object | Managed service identity of the Api Management service. |
location | string | Resource location. |
properties | object | Properties of the API Management service. |
sku | object | SKU properties of the API Management service. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
type | string | Resource type for API Management resource is set to Microsoft.ApiManagement. |
zones | array | A list of availability zones denoting where the resource needs to come from. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , serviceName , subscriptionId | Gets an API Management service resource description. | |
list_by_resource_group | select | resourceGroupName , subscriptionId | List all API Management services within a resource group. | |
list | select | subscriptionId | Lists all API Management services within an Azure subscription. | |
create_or_update | insert | resourceGroupName , serviceName , subscriptionId , data__location , data__sku , data__properties | Creates or updates an API Management service. This is long running operation and could take several minutes to complete. | |
update | update | resourceGroupName , serviceName , subscriptionId | Updates an existing API Management service. | |
delete | delete | resourceGroupName , serviceName , subscriptionId | Deletes an existing API Management service. | |
restore | exec | resourceGroupName , serviceName , subscriptionId , storageAccount , containerName , backupName | Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. | |
backup | exec | resourceGroupName , serviceName , subscriptionId , storageAccount , containerName , backupName | Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. | |
migrate_to_stv2 | exec | resourceGroupName , serviceName , subscriptionId | Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. | |
check_name_availability | exec | subscriptionId , name | Checks availability and correctness of a name for an API Management service. | |
apply_network_configuration_updates | exec | resourceGroupName , serviceName , subscriptionId | Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. |
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.
Name | Datatype | Description |
---|---|---|
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
serviceName | string | The name of the API Management service. |
subscriptionId | string | The ID of the target subscription. |
SELECT
examples
- get
- list_by_resource_group
- list
Gets an API Management service resource description.
SELECT
id,
name,
etag,
identity,
location,
properties,
sku,
systemData,
tags,
type,
zones
FROM azure.api_management.services
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
List all API Management services within a resource group.
SELECT
id,
name,
etag,
identity,
location,
properties,
sku,
systemData,
tags,
type,
zones
FROM azure.api_management.services
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Lists all API Management services within an Azure subscription.
SELECT
id,
name,
etag,
identity,
location,
properties,
sku,
systemData,
tags,
type,
zones
FROM azure.api_management.services
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates an API Management service. This is long running operation and could take several minutes to complete.
INSERT INTO azure.api_management.services (
data__properties,
data__sku,
data__identity,
data__location,
data__zones,
data__tags,
resourceGroupName,
serviceName,
subscriptionId
)
SELECT
'{{ properties }}' /* required */,
'{{ sku }}' /* required */,
'{{ identity }}',
'{{ location }}' /* required */,
'{{ zones }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
identity,
location,
properties,
sku,
systemData,
tags,
type,
zones
;
# Description fields are for documentation purposes
- name: services
props:
- name: resourceGroupName
value: string
description: Required parameter for the services resource.
- name: serviceName
value: string
description: Required parameter for the services resource.
- name: subscriptionId
value: string
description: Required parameter for the services resource.
- name: properties
value: object
description: |
Properties of the API Management service.
- name: sku
value: object
description: |
SKU properties of the API Management service.
- name: identity
value: object
description: |
Managed service identity of the Api Management service.
- name: location
value: string
description: |
Resource location.
- name: zones
value: array
description: |
A list of availability zones denoting where the resource needs to come from.
- name: tags
value: object
description: |
Resource tags.
UPDATE
examples
- update
Updates an existing API Management service.
UPDATE azure.api_management.services
SET
data__properties = '{{ properties }}',
data__sku = '{{ sku }}',
data__identity = '{{ identity }}',
data__zones = '{{ zones }}',
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
etag,
identity,
location,
properties,
sku,
systemData,
tags,
type,
zones;
DELETE
examples
- delete
Deletes an existing API Management service.
DELETE FROM azure.api_management.services
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;
Lifecycle Methods
- restore
- backup
- migrate_to_stv2
- check_name_availability
- apply_network_configuration_updates
Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.
EXEC azure.api_management.services.restore
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"storageAccount": "{{ storageAccount }}",
"containerName": "{{ containerName }}",
"backupName": "{{ backupName }}",
"accessType": "{{ accessType }}",
"accessKey": "{{ accessKey }}",
"clientId": "{{ clientId }}"
}'
;
Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.
EXEC azure.api_management.services.backup
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"storageAccount": "{{ storageAccount }}",
"containerName": "{{ containerName }}",
"backupName": "{{ backupName }}",
"accessType": "{{ accessType }}",
"accessKey": "{{ accessKey }}",
"clientId": "{{ clientId }}"
}'
;
Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete.
EXEC azure.api_management.services.migrate_to_stv2
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"mode": "{{ mode }}"
}'
;
Checks availability and correctness of a name for an API Management service.
EXEC azure.api_management.services.check_name_availability
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"name": "{{ name }}"
}'
;
Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes.
EXEC azure.api_management.services.apply_network_configuration_updates
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"location": "{{ location }}"
}'
;