bastion_hosts
Creates, updates, deletes, gets or lists a bastion_hosts resource.
Overview
| Name | bastion_hosts |
| Type | Resource |
| Id | azure.network.bastion_hosts |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list
Request successful. The operation returns an BastionHost resource.
| Name | Datatype | Description |
|---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Represents the bastion host resource. |
sku | object | The sku of this Bastion Host. |
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" |
zones | array | A list of availability zones denoting where the resource needs to come from. |
Success. The operation returns a list of BastionHost resources.
| Name | Datatype | Description |
|---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Represents the bastion host resource. |
sku | object | The sku of this Bastion Host. |
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" |
zones | array | A list of availability zones denoting where the resource needs to come from. |
Success. The operation returns a list of Bastion Host resources.
| Name | Datatype | Description |
|---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Represents the bastion host resource. |
sku | object | The sku of this Bastion Host. |
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" |
zones | array | A list of availability zones denoting where the resource needs to come from. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resourceGroupName, bastionHostName, subscriptionId | Gets the specified Bastion Host. | |
list_by_resource_group | select | resourceGroupName, subscriptionId | Lists all Bastion Hosts in a resource group. | |
list | select | subscriptionId | Lists all Bastion Hosts in a subscription. | |
create_or_update | insert | resourceGroupName, bastionHostName, subscriptionId | Creates or updates the specified Bastion Host. | |
delete | delete | resourceGroupName, bastionHostName, subscriptionId | Deletes the specified Bastion Host. | |
update_tags | exec | subscriptionId, resourceGroupName, bastionHostName | Updates 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.
| Name | Datatype | Description |
|---|---|---|
bastionHostName | string | The name of the Bastion Host. |
resourceGroupName | string | The name of the resource group. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
SELECT examples
- get
- list_by_resource_group
- list
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
;
Lists all Bastion Hosts in a resource group.
SELECT
id,
name,
etag,
properties,
sku,
systemData,
type,
zones
FROM azure.network.bastion_hosts
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Lists all Bastion Hosts in a subscription.
SELECT
id,
name,
etag,
properties,
sku,
systemData,
type,
zones
FROM azure.network.bastion_hosts
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: bastion_hosts
props:
- name: resourceGroupName
value: string
description: Required parameter for the bastion_hosts resource.
- name: bastionHostName
value: string
description: Required parameter for the bastion_hosts resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the bastion_hosts resource.
- name: properties
value: object
description: |
Represents the bastion host resource.
- name: zones
value: array
description: |
A list of availability zones denoting where the resource needs to come from.
- name: sku
value: object
description: |
The sku of this Bastion Host.
DELETE examples
- delete
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
- update_tags
Updates Tags for BastionHost resource
EXEC azure.network.bastion_hosts.update_tags
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@bastionHostName='{{ bastionHostName }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;