Skip to main content

bastion_hosts

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

Overview

Namebastion_hosts
TypeResource
Idazure.network.bastion_hosts

Fields

The following fields are returned by SELECT queries:

Request successful. The operation returns an BastionHost resource.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
etagstringA unique read-only string that changes whenever the resource is updated.
propertiesobjectRepresents the bastion host resource.
skuobjectThe sku of this Bastion Host.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
zonesarrayA list of availability zones denoting where the resource needs to come from.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, bastionHostName, subscriptionIdGets the specified Bastion Host.
list_by_resource_groupselectresourceGroupName, subscriptionIdLists all Bastion Hosts in a resource group.
listselectsubscriptionIdLists all Bastion Hosts in a subscription.
create_or_updateinsertresourceGroupName, bastionHostName, subscriptionIdCreates or updates the specified Bastion Host.
deletedeleteresourceGroupName, bastionHostName, subscriptionIdDeletes the specified Bastion Host.
update_tagsexecsubscriptionId, resourceGroupName, bastionHostNameUpdates Tags for BastionHost resource

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
bastionHostNamestringThe name of the Bastion Host.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Gets the specified Bastion Host.

SELECT
id,
name,
etag,
properties,
sku,
systemData,
type,
zones
FROM azure.network.bastion_hosts
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND bastionHostName = '{{ bastionHostName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates the specified Bastion Host.

INSERT INTO azure.network.bastion_hosts (
data__properties,
data__zones,
data__sku,
resourceGroupName,
bastionHostName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ zones }}',
'{{ sku }}',
'{{ resourceGroupName }}',
'{{ bastionHostName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
properties,
sku,
systemData,
type,
zones
;

DELETE examples

Deletes the specified Bastion Host.

DELETE FROM azure.network.bastion_hosts
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND bastionHostName = '{{ bastionHostName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Updates Tags for BastionHost resource

EXEC azure.network.bastion_hosts.update_tags 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@bastionHostName='{{ bastionHostName }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;