gateways
Creates, updates, deletes, gets or lists a gateways
resource.
Overview
Name | gateways |
Type | Resource |
Id | azure.api_management.gateways |
Fields
- vw_gateways
- gateways
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
gatewayId | text | field from the properties object |
location_data | 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 |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of the Gateway contract. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | gatewayId, resourceGroupName, serviceName, subscriptionId | Gets the details of the Gateway specified by its identifier. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists a collection of gateways registered with service instance. |
create_or_update | INSERT | gatewayId, resourceGroupName, serviceName, subscriptionId | Creates or updates a Gateway to be used in Api Management instance. |
delete | DELETE | If-Match, gatewayId, resourceGroupName, serviceName, subscriptionId | Deletes specific Gateway. |
update | UPDATE | If-Match, gatewayId, resourceGroupName, serviceName, subscriptionId | Updates the details of the gateway specified by its identifier. |
generate_token | EXEC | gatewayId, resourceGroupName, serviceName, subscriptionId, data__expiry, data__keyType | Gets the Shared Access Authorization Token for the gateway. |
invalidate_debug_credentials | EXEC | gatewayId, resourceGroupName, serviceName, subscriptionId | Action is invalidating all debug credentials issued for gateway. |
regenerate_key | EXEC | gatewayId, resourceGroupName, serviceName, subscriptionId, data__keyType | Regenerates specified gateway key invalidating any tokens created with it. |
SELECT
examples
Lists a collection of gateways registered with service instance.
- vw_gateways
- gateways
SELECT
description,
gatewayId,
location_data,
resourceGroupName,
serviceName,
subscriptionId
FROM azure.api_management.vw_gateways
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.gateways
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new gateways
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.gateways (
gatewayId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ gatewayId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: locationData
value:
- name: name
value: string
- name: city
value: string
- name: district
value: string
- name: countryOrRegion
value: string
- name: description
value: string
UPDATE
example
Updates a gateways
resource.
/*+ update */
UPDATE azure.api_management.gateways
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND gatewayId = '{{ gatewayId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified gateways
resource.
/*+ delete */
DELETE FROM azure.api_management.gateways
WHERE If-Match = '{{ If-Match }}'
AND gatewayId = '{{ gatewayId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';