Skip to main content

services

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

Overview

Nameservices
TypeResource
Idazure.api_management.services

Fields

NameDatatypeDescription
idtextResource ID.
nametextResource name.
additional_locationstextfield from the properties object
api_version_constrainttextfield from the properties object
certificatestextfield from the properties object
configuration_apitextfield from the properties object
created_at_utctextfield from the properties object
custom_propertiestextfield from the properties object
developer_portal_statustextfield from the properties object
developer_portal_urltextfield from the properties object
disable_gatewaytextfield from the properties object
enable_client_certificatetextfield from the properties object
etagtextETag of the resource.
gateway_regional_urltextfield from the properties object
gateway_urltextfield from the properties object
hostname_configurationstextfield from the properties object
identitytextIdentity properties of the Api Management service resource.
legacy_portal_statustextfield from the properties object
locationtextResource location.
management_api_urltextfield from the properties object
nat_gateway_statetextfield from the properties object
notification_sender_emailtextfield from the properties object
outbound_public_ip_addressestextfield from the properties object
platform_versiontextfield from the properties object
portal_urltextfield from the properties object
private_endpoint_connectionstextfield from the properties object
private_ip_addressestextfield from the properties object
provisioning_statetextfield from the properties object
public_ip_address_idtextfield from the properties object
public_ip_addressestextfield from the properties object
public_network_accesstextfield from the properties object
publisher_emailtextfield from the properties object
publisher_nametextfield from the properties object
resourceGroupNametextfield from the properties object
restoretextfield from the properties object
scm_urltextfield from the properties object
serviceNametextfield from the properties object
skutextAPI Management service resource SKU properties.
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.
target_provisioning_statetextfield from the properties object
typetextResource type for API Management resource is set to Microsoft.ApiManagement.
virtual_network_configurationtextfield from the properties object
virtual_network_typetextfield from the properties object
zonestextA list of availability zones denoting where the resource needs to come from.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serviceName, subscriptionIdGets an API Management service resource description.
listSELECTsubscriptionIdLists all API Management services within an Azure subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList all API Management services within a resource group.
create_or_updateINSERTresourceGroupName, serviceName, subscriptionId, data__location, data__properties, data__skuCreates or updates an API Management service. This is long running operation and could take several minutes to complete.
deleteDELETEresourceGroupName, serviceName, subscriptionIdDeletes an existing API Management service.
updateUPDATEresourceGroupName, serviceName, subscriptionIdUpdates an existing API Management service.
apply_network_configuration_updatesEXECresourceGroupName, serviceName, subscriptionIdUpdates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes.
backupEXECresourceGroupName, serviceName, subscriptionId, data__backupName, data__containerName, data__storageAccountCreates 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.
check_name_availabilityEXECsubscriptionId, data__nameChecks availability and correctness of a name for an API Management service.
migrate_to_stv2EXECresourceGroupName, serviceName, subscriptionIdUpgrades 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.
restoreEXECresourceGroupName, serviceName, subscriptionId, data__backupName, data__containerName, data__storageAccountRestores 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.

SELECT examples

Lists all API Management services within an Azure subscription.

SELECT
id,
name,
additional_locations,
api_version_constraint,
certificates,
configuration_api,
created_at_utc,
custom_properties,
developer_portal_status,
developer_portal_url,
disable_gateway,
enable_client_certificate,
etag,
gateway_regional_url,
gateway_url,
hostname_configurations,
identity,
legacy_portal_status,
location,
management_api_url,
nat_gateway_state,
notification_sender_email,
outbound_public_ip_addresses,
platform_version,
portal_url,
private_endpoint_connections,
private_ip_addresses,
provisioning_state,
public_ip_address_id,
public_ip_addresses,
public_network_access,
publisher_email,
publisher_name,
resourceGroupName,
restore,
scm_url,
serviceName,
sku,
subscriptionId,
system_data,
tags,
target_provisioning_state,
type,
virtual_network_configuration,
virtual_network_type,
zones
FROM azure.api_management.vw_services
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.api_management.services (
resourceGroupName,
serviceName,
subscriptionId,
data__location,
data__properties,
data__sku,
properties,
sku,
identity,
location,
zones,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ data__properties }}',
'{{ data__sku }}',
'{{ properties }}',
'{{ sku }}',
'{{ identity }}',
'{{ location }}',
'{{ zones }}',
'{{ tags }}'
;

UPDATE example

Updates a services resource.

/*+ update */
UPDATE azure.api_management.services
SET
properties = '{{ properties }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
zones = '{{ zones }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified services resource.

/*+ delete */
DELETE FROM azure.api_management.services
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';