gateway_api
Creates, updates, deletes, gets or lists a gateway_api resource.
Overview
| Name | gateway_api |
| Type | Resource |
| Id | azure.api_management.gateway_api |
Fields
The following fields are returned by SELECT queries:
- list_by_service
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
apiRevision | string | Describes the revision of the API. If no value is provided, default revision 1 is created. |
apiRevisionDescription | string | Description of the API Revision. |
apiVersion | string | Indicates the version identifier of the API if the API is versioned. |
apiVersionDescription | string | Description of the API Version. |
apiVersionSet | object | Version set details. |
apiVersionSetId | string | A resource identifier for the related ApiVersionSet. |
authenticationSettings | object | Collection of authentication settings included into this API. |
contact | object | Contact information for the API. |
description | string | Description of the API. May include HTML formatting tags. |
displayName | string | API name. Must be 1 to 300 characters long. |
isCurrent | boolean | Indicates if API revision is current api revision. |
isOnline | boolean | Indicates if API revision is accessible via the gateway. |
license | object | License information for the API. |
path | string | Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. Required. |
protocols | array | Describes on which protocols the operations in this API can be invoked. |
provisioningState | string | The provisioning state. |
serviceUrl | string | Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. |
sourceApiId | string | API identifier of the source API. |
subscriptionKeyParameterNames | object | Protocols over which API is made available. |
subscriptionRequired | boolean | Specifies whether an API or Product subscription is required for accessing the API. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
termsOfServiceUrl | string | A URL to the Terms of Service for the API. MUST be in the format of a URL. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_service | select | resource_group_name, service_name, gateway_id, subscription_id | $filter, $top, $skip | Lists a collection of the APIs associated with a gateway. |
create_or_update | insert | resource_group_name, service_name, gateway_id, api_id, subscription_id | Adds an API to the specified Gateway. | |
create_or_update | replace | resource_group_name, service_name, gateway_id, api_id, subscription_id | Adds an API to the specified Gateway. | |
delete | delete | resource_group_name, service_name, gateway_id, api_id, subscription_id | Deletes the specified API from the specified Gateway. | |
get_entity_tag | exec | resource_group_name, service_name, gateway_id, api_id, subscription_id | Checks that API entity specified by identifier is associated with the Gateway entity. |
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 |
|---|---|---|
api_id | string | API identifier. Must be unique in the current API Management service instance. Required. |
gateway_id | string | Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of the API Management service. Required. |
subscription_id | string | |
$filter | string | | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |. Default value is None. |
$skip | integer | Number of records to skip. Default value is None. |
$top | integer | Number of records to return. Default value is None. |
SELECT examples
- list_by_service
Lists a collection of the APIs associated with a gateway.
SELECT
id,
name,
apiRevision,
apiRevisionDescription,
apiVersion,
apiVersionDescription,
apiVersionSet,
apiVersionSetId,
authenticationSettings,
contact,
description,
displayName,
isCurrent,
isOnline,
license,
path,
protocols,
provisioningState,
serviceUrl,
sourceApiId,
subscriptionKeyParameterNames,
subscriptionRequired,
systemData,
termsOfServiceUrl,
type
FROM azure.api_management.gateway_api
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND gateway_id = '{{ gateway_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
INSERT examples
- create_or_update
- Manifest
Adds an API to the specified Gateway.
INSERT INTO azure.api_management.gateway_api (
properties,
resource_group_name,
service_name,
gateway_id,
api_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ gateway_id }}',
'{{ api_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: gateway_api
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the gateway_api resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the gateway_api resource.
- name: gateway_id
value: "{{ gateway_id }}"
description: Required parameter for the gateway_api resource.
- name: api_id
value: "{{ api_id }}"
description: Required parameter for the gateway_api resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the gateway_api resource.
- name: properties
description: |
Association entity contract properties.
value:
provisioningState: "{{ provisioningState }}"
REPLACE examples
- create_or_update
Adds an API to the specified Gateway.
REPLACE azure.api_management.gateway_api
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND gateway_id = '{{ gateway_id }}' --required
AND api_id = '{{ api_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes the specified API from the specified Gateway.
DELETE FROM azure.api_management.gateway_api
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND gateway_id = '{{ gateway_id }}' --required
AND api_id = '{{ api_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_entity_tag
Checks that API entity specified by identifier is associated with the Gateway entity.
EXEC azure.api_management.gateway_api.get_entity_tag
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@gateway_id='{{ gateway_id }}' --required,
@api_id='{{ api_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;