az network bastion

注意

このリファレンスは、Azure CLI (バージョン 2.43.0 以降) の bastion 拡張機能の一部です。 拡張機能は、 az network bastion コマンドを初めて実行すると自動的にインストールされます。 拡張機能の詳細を参照してください

Azure Bastion ホスト マシンを管理します。

コマンド

az network bastion create

Create a Azure Bastion host machine.

az network bastion delete

Delete a Azure Bastion host machine.

az network bastion list

List all Azure Bastion host machines.

az network bastion rdp

RDP to target Virtual Machine using Tunneling from Azure Bastion.

az network bastion show

Show a Azure Bastion host machine.

az network bastion ssh

SSH to a virtual machine using Tunneling from Azure Bastion.

az network bastion tunnel

Open a tunnel through Azure Bastion to a target virtual machine.

az network bastion update

Update a Azure Bastion host machine.

az network bastion wait

Place the CLI in a waiting state until a condition is met.

az network bastion create

Create a Azure Bastion host machine.

az network bastion create --name
                          --public-ip-address
                          --resource-group
                          --vnet-name
                          [--disable-copy-paste {0, 1, f, false, n, no, t, true, y, yes}]
                          [--enable-ip-connect {0, 1, f, false, n, no, t, true, y, yes}]
                          [--enable-tunneling {0, 1, f, false, n, no, t, true, y, yes}]
                          [--location]
                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                          [--scale-units]
                          [--sku {Basic, Standard}]
                          [--tags]

Create a Azure Bastion host machine.

az network bastion create --location westus2 --name MyBastionHost --public-ip-address MyPublicIpAddress --resource-group MyResourceGroup --vnet-name MyVnet

必須のパラメーター

--name -n

bastion ホストの名前。

--public-ip-address

Azure パブリック IP の名前または ID。 パブリック IP の SKU は Standard である必要があります。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--vnet-name

仮想ネットワークの名前。 AzureBastionSubnet というサブネットが必要です。

省略可能のパラメーター

--disable-copy-paste

この Azure Bastion リソースのすべてのセッションのコピーと貼り付けを無効にします。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
既定値: False
--enable-ip-connect

この Azure Bastion リソースで IP ベースの接続を有効にします。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
既定値: False
--enable-tunneling

この Azure Bastion リソースでネイティブ クライアント サポートを有効にします。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
既定値: False
--location -l

場所。 値のソース: az account list-locations az configure --defaults location=<location> を使用して、既定の場所を構成できます。

--no-wait

実行時間の長い操作の終了を待機しません。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
--scale-units

[2, 50] の範囲の Bastion ホスト リソースのスケール ユニット。

--sku

この Bastion ホストの SKU。

承認された値: Basic, Standard
既定値: Standard
--tags

スペース区切りのタグ: key[=value] [key[=value] ...]。短縮構文、json-file、yaml-file をサポートします。 詳細を表示してみてください ??

az network bastion delete

Delete a Azure Bastion host machine.

az network bastion delete [--ids]
                          [--name]
                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                          [--resource-group]
                          [--subscription]

Delete a Azure Bastion host machine.

az network bastion delete --name MyBastionHost --resource-group MyResourceGroup

省略可能のパラメーター

--ids

1 つまたは複数のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids またはその他の 'Resource Id' 引数を指定する必要があります。

--name -n

Name of the bastion host.

--no-wait

実行時間の長い操作の終了を待機しません。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

az network bastion list

List all Azure Bastion host machines.

az network bastion list [--resource-group]

List all Azure Bastion host machines.

az network bastion list -g MyResourceGroup

省略可能のパラメーター

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

az network bastion rdp

RDP to target Virtual Machine using Tunneling from Azure Bastion.

az network bastion rdp [--configure]
                       [--disable-gateway {false, true}]
                       [--enable-mfa {false, true}]
                       [--ids]
                       [--name]
                       [--resource-group]
                       [--resource-port]
                       [--subscription]
                       [--target-ip-address]
                       [--target-resource-id]

Azure Bastion を使用して仮想マシンに RDP 接続します。

az network bastion rdp --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId

到達可能な IP アドレスを使用してマシンに RDP 接続します。

az network bastion rdp --name MyBastionHost --resource-group MyResourceGroup --target-ip-address 10.0.0.1

省略可能のパラメーター

--configure

RDP セッションを構成するためのフラグ。

既定値: False
--disable-gateway

RD ゲートウェイ経由のアクセスを無効にするフラグ。

承認された値: false, true
既定値: False
--enable-mfa

ターゲット コンピューターでサポートされている場合は、MFA の RDS 認証を有効にします。

承認された値: false, true
既定値: False
--ids

1 つまたは複数のリソース ID (スペース区切り)。 It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the bastion host.

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--resource-port

bastion が接続するターゲット VM のリソース ポート。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--target-ip-address

ターゲット仮想マシンの IP アドレス。

--target-resource-id

ターゲット仮想マシンの ResourceId。

az network bastion show

Show a Azure Bastion host machine.

az network bastion show [--ids]
                        [--name]
                        [--resource-group]
                        [--subscription]

Show a Azure Bastion host machine.

az network bastion show --name MyBastionHost --resource-group MyResourceGroup

省略可能のパラメーター

--ids

1 つまたは複数のリソース ID (スペース区切り)。 It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the bastion host.

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

az network bastion ssh

Azure Bastion からのトンネリングを使用して仮想マシンに SSH 接続します。

az network bastion ssh --auth-type
                       [--ids]
                       [--name]
                       [--resource-group]
                       [--resource-port]
                       [--ssh-key]
                       [--subscription]
                       [--target-ip-address]
                       [--target-resource-id]
                       [--username]

パスワードを使用して Azure Bastion を使用して仮想マシンに SSH 接続します。

az network bastion ssh --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId --auth-type password --username xyz

ssh キー ファイルを使用して Azure Bastion を使用して仮想マシンに SSH 接続します。

az network bastion ssh --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId --auth-type ssh-key --username xyz --ssh-key C:/filepath/sshkey.pem

AAD を使用して Azure Bastion を使用して仮想マシンに SSH 接続します。

az network bastion ssh --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId --auth-type AAD

SSH to virtual machine using Azure Bastion using AAD.

az network bastion ssh --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId --auth-type AAD

必須のパラメーター

--auth-type

SSH 接続に使用する認証の種類。

省略可能のパラメーター

--ids

1 つまたは複数のリソース ID (スペース区切り)。 It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the bastion host.

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--resource-port

Resource port of the target VM to which the bastion will connect.

--ssh-key

SSH 接続の SSH キー ファイルの場所。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--target-ip-address

IP address of target Virtual Machine.

--target-resource-id

ResourceId of the target Virtual Machine.

--username

SSH 接続のユーザー名。

az network bastion tunnel

Azure Bastion 経由でターゲット仮想マシンへのトンネルを開きます。

az network bastion tunnel --port
                          --resource-port
                          [--ids]
                          [--name]
                          [--resource-group]
                          [--subscription]
                          [--target-ip-address]
                          [--target-resource-id]
                          [--timeout]

resourceId を使用して、Azure Bastion 経由でターゲット仮想マシンへのトンネルを開きます。

az network bastion tunnel --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId --resource-port 22 --port 50022

AZURE Bastion 経由で、その IP アドレスを使用してターゲット仮想マシンへのトンネルを開きます。

az network bastion tunnel --name MyBastionHost --resource-group MyResourceGroup --target-ip-address 10.0.0.1 --resource-port 22 --port 50022

必須のパラメーター

--port

トンネリングに使用するローカル ポート。

--resource-port

bastion が接続するターゲット VM のリソース ポート。

省略可能のパラメーター

--ids

1 つまたは複数のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids またはその他の 'Resource Id' 引数を指定する必要があります。

--name -n

bastion ホストの名前。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--target-ip-address

ターゲット仮想マシンの IP アドレス。

--target-resource-id

ターゲット仮想マシンの ResourceId。

--timeout

bastion ホスト トンネルへの接続のタイムアウト。

az network bastion update

Azure Bastion ホスト マシンを更新します。

az network bastion update [--add]
                          [--disable-copy-paste {0, 1, f, false, n, no, t, true, y, yes}]
                          [--enable-ip-connect {0, 1, f, false, n, no, t, true, y, yes}]
                          [--enable-tunneling {0, 1, f, false, n, no, t, true, y, yes}]
                          [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                          [--ids]
                          [--name]
                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                          [--remove]
                          [--resource-group]
                          [--scale-units]
                          [--set]
                          [--sku {Basic, Standard}]
                          [--subscription]

ネイティブ クライアントのサポートを有効にするために、Azure Bastion ホスト マシンを更新します。

az network bastion update --name MyBastionHost --resource-group MyResourceGroup --enable-tunneling

省略可能のパラメーター

--add

パスとキー値のペアを指定して、オブジェクトの一覧にオブジェクトを追加します。 例: --add property.listProperty <key=value、string、または JSON 文字列>。

--disable-copy-paste

この Azure Bastion リソースのすべてのセッションのコピーと貼り付けを無効にします。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
--enable-ip-connect

この Azure Bastion リソースで IP ベースの接続を有効にします。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
--enable-tunneling

この Azure Bastion リソースでネイティブ クライアント サポートを有効にします。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
--force-string

'set' または 'add' を使用する場合は、JSON への変換を試みるのではなく、文字列リテラルを保持します。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
--ids

1 つまたは複数のリソース ID (スペース区切り)。 It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the bastion host.

--no-wait

実行時間の長い操作の終了を待機しません。

承認された値: 0, 1, f, false, n, no, t, true, y, yes
--remove

リストからプロパティまたは要素を削除します。 例: --remove property.list OR --remove propertyToRemove。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--scale-units

[2, 50] の範囲の Bastion ホスト リソースのスケール ユニット。

--set

設定するプロパティ パスと値を指定して、オブジェクトを更新します。 例: --set property1.property2=。

--sku

この Bastion ホストの SKU。

承認された値: Basic, Standard
--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

az network bastion wait

条件が満たされるまで、CLI を待機状態にします。

az network bastion wait [--created]
                        [--custom]
                        [--deleted]
                        [--exists]
                        [--ids]
                        [--interval]
                        [--name]
                        [--resource-group]
                        [--subscription]
                        [--timeout]
                        [--updated]

省略可能のパラメーター

--created

'provisioningState' が 'Succeeded' で作成されるまで待ちます。

既定値: False
--custom

条件がカスタム JMESPath クエリを満たすまで待ちます。 例: provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

削除されるまで待ちます。

既定値: False
--exists

リソースが存在するまで待ちます。

既定値: False
--ids

1 つまたは複数のリソース ID (スペース区切り)。 It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

ポーリング間隔 (秒単位)。

既定値: 30
--name -n

Name of the bastion host.

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--timeout

最大待機時間 (秒単位)。

既定値: 3600
--updated

provisioningState が 'Succeeded' で更新されるまで待ちます。

既定値: False