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:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
disableCopyPastebooleanEnable/Disable Copy/Paste feature of the Bastion Host resource.
dnsNamestringFQDN for the endpoint on which bastion host is accessible.
enableFileCopybooleanEnable/Disable File Copy feature of the Bastion Host resource.
enableIpConnectbooleanEnable/Disable IP Connect feature of the Bastion Host resource.
enableKerberosbooleanEnable/Disable Kerberos feature of the Bastion Host resource.
enablePrivateOnlyBastionbooleanEnable/Disable Private Only feature of the Bastion Host resource.
enableSessionRecordingbooleanEnable/Disable Session Recording feature of the Bastion Host resource.
enableShareableLinkbooleanEnable/Disable Shareable Link of the Bastion Host resource.
enableTunnelingbooleanEnable/Disable Tunneling feature of the Bastion Host resource.
etagstringA unique read-only string that changes whenever the resource is updated.
ipConfigurationsarrayIP configuration of the Bastion Host resource.
locationstringResource location.
networkAclsobject:vartype network_acls: ~azure.mgmt.network.models.BastionHostPropertiesFormatNetworkAcls
provisioningStatestringThe provisioning state of the bastion host resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
scaleUnitsintegerThe scale units for the Bastion Host resource.
skuobjectThe sku of this Bastion Host.
tagsobjectResource tags.
typestringResource type.
virtualNetworkobjectReference to another subresource.
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
getselectresource_group_name, bastion_host_name, subscription_idGets the specified Bastion Host.
list_by_resource_groupselectresource_group_name, subscription_idLists all Bastion Hosts in a resource group.
listselectsubscription_idLists all Bastion Hosts in a subscription.
create_or_updateinsertresource_group_name, bastion_host_name, subscription_idCreates or updates the specified Bastion Host.
update_tagsupdateresource_group_name, bastion_host_name, subscription_idUpdates Tags for BastionHost resource.
create_or_updatereplaceresource_group_name, bastion_host_name, subscription_idCreates or updates the specified Bastion Host.
deletedeleteresource_group_name, bastion_host_name, subscription_idDeletes the specified Bastion Host.

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
bastion_host_namestringThe name of the Bastion Host. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets the specified Bastion Host.

SELECT
id,
name,
disableCopyPaste,
dnsName,
enableFileCopy,
enableIpConnect,
enableKerberos,
enablePrivateOnlyBastion,
enableSessionRecording,
enableShareableLink,
enableTunneling,
etag,
ipConfigurations,
location,
networkAcls,
provisioningState,
scaleUnits,
sku,
tags,
type,
virtualNetwork,
zones
FROM azure.network.bastion_hosts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND bastion_host_name = '{{ bastion_host_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates the specified Bastion Host.

INSERT INTO azure.network.bastion_hosts (
id,
location,
tags,
properties,
zones,
sku,
resource_group_name,
bastion_host_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ zones }}',
'{{ sku }}',
'{{ resource_group_name }}',
'{{ bastion_host_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type,
zones
;

UPDATE examples

Updates Tags for BastionHost resource.

UPDATE azure.network.bastion_hosts
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND bastion_host_name = '{{ bastion_host_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type,
zones;

REPLACE examples

Creates or updates the specified Bastion Host.

REPLACE azure.network.bastion_hosts
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}',
zones = '{{ zones }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND bastion_host_name = '{{ bastion_host_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type,
zones;

DELETE examples

Deletes the specified Bastion Host.

DELETE FROM azure.network.bastion_hosts
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND bastion_host_name = '{{ bastion_host_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;