Skip to main content

api_gateway_hostname_binding

Creates, updates, deletes, gets or lists an api_gateway_hostname_binding resource.

Overview

Nameapi_gateway_hostname_binding
TypeResource
Idazure.api_management.api_gateway_hostname_binding

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
certificateobjectThe hostnames of the data-plane gateway to which requests can be sent.
etagstringIf 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.
hostnamestringThe default hostname of the data-plane gateway. Required.
keyVaultobjectThe link to the API Management service workspace. Required.
provisioningStatestringThe current provisioning state of the API Management gateway hostname binding.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, gateway_name, hostname_binding_name, subscription_idGets an API Management gateway hostname binding resource description.
list_by_gatewayselectresource_group_name, gateway_name, subscription_idList all API Management gateway hostname bindings within a gateway.
create_or_updateinsertresource_group_name, gateway_name, hostname_binding_name, subscription_id, propertiesCreates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete.
create_or_updatereplaceresource_group_name, gateway_name, hostname_binding_name, subscription_id, propertiesCreates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete.
deletedeleteresource_group_name, gateway_name, hostname_binding_name, subscription_idDeletes an existing API Management gateway hostname binding.
refresh_secretexecresource_group_name, gateway_name, hostname_binding_name, subscription_idRefresh 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.

NameDatatypeDescription
gateway_namestringThe name of the API Management gateway. Required.
hostname_binding_namestringGateway hostname binding identifier. Must be unique in the scope of parent Gateway entity. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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
;

INSERT examples

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
;

REPLACE examples

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

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 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
;