api_gateway_hostname_binding
Creates, updates, deletes, gets or lists an api_gateway_hostname_binding resource.
Overview
| Name | api_gateway_hostname_binding |
| Type | Resource |
| Id | azure.api_management.api_gateway_hostname_binding |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_gateway
| 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. |
certificate | object | The hostnames of the data-plane gateway to which requests can be sent. |
etag | string | If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
hostname | string | The default hostname of the data-plane gateway. Required. |
keyVault | object | The link to the API Management service workspace. Required. |
provisioningState | string | The current provisioning state of the API Management gateway hostname binding. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| 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. |
certificate | object | The hostnames of the data-plane gateway to which requests can be sent. |
etag | string | If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
hostname | string | The default hostname of the data-plane gateway. Required. |
keyVault | object | The link to the API Management service workspace. Required. |
provisioningState | string | The current provisioning state of the API Management gateway hostname binding. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 |
|---|---|---|---|---|
get | select | resource_group_name, gateway_name, hostname_binding_name, subscription_id | Gets an API Management gateway hostname binding resource description. | |
list_by_gateway | select | resource_group_name, gateway_name, subscription_id | List all API Management gateway hostname bindings within a gateway. | |
create_or_update | insert | resource_group_name, gateway_name, hostname_binding_name, subscription_id, properties | Creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. | |
create_or_update | replace | resource_group_name, gateway_name, hostname_binding_name, subscription_id, properties | Creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. | |
delete | delete | resource_group_name, gateway_name, hostname_binding_name, subscription_id | Deletes an existing API Management gateway hostname binding. | |
refresh_secret | exec | resource_group_name, gateway_name, hostname_binding_name, subscription_id | Refresh the secret for an API Management gateway hostname binding. |
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 |
|---|---|---|
gateway_name | string | The name of the API Management gateway. Required. |
hostname_binding_name | string | Gateway hostname binding identifier. Must be unique in the scope of parent Gateway entity. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_gateway
Gets an API Management gateway hostname binding resource description.
SELECT
id,
name,
certificate,
etag,
hostname,
keyVault,
provisioningState,
systemData,
type
FROM azure.api_management.api_gateway_hostname_binding
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND gateway_name = '{{ gateway_name }}' -- required
AND hostname_binding_name = '{{ hostname_binding_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all API Management gateway hostname bindings within a gateway.
SELECT
id,
name,
certificate,
etag,
hostname,
keyVault,
provisioningState,
systemData,
type
FROM azure.api_management.api_gateway_hostname_binding
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND gateway_name = '{{ gateway_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete.
INSERT INTO azure.api_management.api_gateway_hostname_binding (
properties,
resource_group_name,
gateway_name,
hostname_binding_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ gateway_name }}',
'{{ hostname_binding_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: api_gateway_hostname_binding
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the api_gateway_hostname_binding resource.
- name: gateway_name
value: "{{ gateway_name }}"
description: Required parameter for the api_gateway_hostname_binding resource.
- name: hostname_binding_name
value: "{{ hostname_binding_name }}"
description: Required parameter for the api_gateway_hostname_binding resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the api_gateway_hostname_binding resource.
- name: properties
description: |
Properties of the API Management gateway hostname binding. Required.
value:
provisioningState: "{{ provisioningState }}"
hostname: "{{ hostname }}"
keyVault:
secretId: "{{ secretId }}"
identityClientId: "{{ identityClientId }}"
lastStatus:
code: "{{ code }}"
timeStampUtc: "{{ timeStampUtc }}"
lastSuccessTimeStampUtc: "{{ lastSuccessTimeStampUtc }}"
certificate:
thumbprint: "{{ thumbprint }}"
subject: "{{ subject }}"
expiry: "{{ expiry }}"
REPLACE examples
- create_or_update
Creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete.
REPLACE azure.api_management.api_gateway_hostname_binding
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND gateway_name = '{{ gateway_name }}' --required
AND hostname_binding_name = '{{ hostname_binding_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
etag,
properties,
systemData,
type;
DELETE examples
- delete
Deletes an existing API Management gateway hostname binding.
DELETE FROM azure.api_management.api_gateway_hostname_binding
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND gateway_name = '{{ gateway_name }}' --required
AND hostname_binding_name = '{{ hostname_binding_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- refresh_secret
Refresh the secret for an API Management gateway hostname binding.
EXEC azure.api_management.api_gateway_hostname_binding.refresh_secret
@resource_group_name='{{ resource_group_name }}' --required,
@gateway_name='{{ gateway_name }}' --required,
@hostname_binding_name='{{ hostname_binding_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;