Skip to main content

gateways

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

Overview

Namegateways
TypeResource
Idazure.api_management.gateways

Fields

The following fields are returned by SELECT queries:

The response body contains the specified Gateway entity.

NameDatatypeDescription
propertiesobjectGateway details.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, gatewayId, subscriptionIdGets the details of the Gateway specified by its identifier.
list_by_serviceselectresourceGroupName, serviceName, subscriptionId$filter, $top, $skipLists a collection of gateways registered with service instance.
create_or_updateinsertresourceGroupName, serviceName, gatewayId, subscriptionIdIf-MatchCreates or updates a Gateway to be used in Api Management instance.
updateupdateresourceGroupName, serviceName, gatewayId, If-Match, subscriptionIdUpdates the details of the gateway specified by its identifier.
deletedeleteresourceGroupName, serviceName, gatewayId, If-Match, subscriptionIdDeletes specific Gateway.
regenerate_keyexecresourceGroupName, serviceName, gatewayId, subscriptionId, keyTypeRegenerates specified gateway key invalidating any tokens created with it.
generate_tokenexecresourceGroupName, serviceName, gatewayId, subscriptionId, keyType, expiryGets the Shared Access Authorization Token for the gateway.
invalidate_debug_credentialsexecsubscriptionId, resourceGroupName, serviceName, gatewayIdAction is invalidating all debug credentials issued for gateway.

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.

NameDatatypeDescription
If-MatchstringETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
gatewayIdstringGateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
$filterstring| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>
$skipinteger (int32)Number of records to skip.
$topinteger (int32)Number of records to return.
If-MatchstringETag of the Entity. Not required when creating an entity, but required when updating an entity.

SELECT examples

Gets the details of the Gateway specified by its identifier.

SELECT
properties
FROM azure.api_management.gateways
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND gatewayId = '{{ gatewayId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates a Gateway to be used in Api Management instance.

INSERT INTO azure.api_management.gateways (
data__properties,
resourceGroupName,
serviceName,
gatewayId,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ gatewayId }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;

UPDATE examples

Updates the details of the gateway specified by its identifier.

UPDATE azure.api_management.gateways
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND gatewayId = '{{ gatewayId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;

DELETE examples

Deletes specific Gateway.

DELETE FROM azure.api_management.gateways
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND gatewayId = '{{ gatewayId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Regenerates specified gateway key invalidating any tokens created with it.

EXEC azure.api_management.gateways.regenerate_key 
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@gatewayId='{{ gatewayId }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"keyType": "{{ keyType }}"
}'
;