你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az networkfabric l2domain

Note

This reference is part of the managednetworkfabric extension for the Azure CLI (version 2.70.0 or higher). 该扩展将在首次运行 az networkfabric l2domain 命令时自动安装。 Learn more about extensions.

管理 L2 隔离域资源。

命令

名称 说明 类型 Status
az networkfabric l2domain create

创建 L2 隔离域资源。

Extension GA
az networkfabric l2domain delete

删除 L2 隔离域资源。

Extension GA
az networkfabric l2domain list

列出提供的资源组或订阅中的所有 L2 隔离域。

Extension GA
az networkfabric l2domain show

显示提供的 L2 隔离域资源的详细信息。

Extension GA
az networkfabric l2domain update

更新 L2 隔离域资源。

Extension GA
az networkfabric l2domain update-admin-state

跨结构或指定机架启用隔离域。

Extension GA
az networkfabric l2domain wait

将 CLI 置于等待状态,直到满足条件。

Extension GA

az networkfabric l2domain create

创建 L2 隔离域资源。

az networkfabric l2domain create --network-fabric-id --nf-id
                                 --resource-group
                                 --resource-name
                                 --vlan-id
                                 [--annotation]
                                 [--extended-vlan {Disabled, Enabled}]
                                 [--location]
                                 [--mtu]
                                 [--network-to-network-interconnect-id --nni-id]
                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                 [--tags]

示例

创建 L2 隔离域

az networkfabric l2domain create --resource-group "example-rg" --resource-name "example-l2domain" --location "westus3" --nf-id "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/NetworkFabrics/example-fabricName" --vlan-id  501 --mtu 1500

必需参数

--network-fabric-id --nf-id

网络构造的 ARM 资源 ID。

属性
Parameter group: Properties Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--resource-name

L2 隔离域的名称。

--vlan-id

网络构造的 Vlan 标识符。 Example: 501.

属性
Parameter group: Properties Arguments

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--annotation

切换配置说明。

属性
Parameter group: Properties Arguments
--extended-vlan

扩展 VLAN 状态,默认值为“已禁用”。

属性
Parameter group: Properties Arguments
默认值: Disabled
接受的值: Disabled, Enabled
--location -l

未指定资源所在的地理位置,将使用资源组的位置。

属性
Parameter group: Resource Arguments
--mtu

最大传输单位。 默认值为 1500。

属性
Parameter group: Properties Arguments
默认值: 1500
--network-to-network-interconnect-id --nni-id

L2 ISD 资源的 networkToNetworkInterconnectId 的 ARM 资源 ID。

属性
Parameter group: Properties Arguments
--no-wait

不等待长时间运行的操作完成。

属性
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--tags

Resource tags. 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
Parameter group: Resource Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az networkfabric l2domain delete

删除 L2 隔离域资源。

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

示例

删除 L2 隔离域

az networkfabric l2domain delete --resource-group "example-rg" --resource-name "example-l2domain"

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--no-wait

不等待长时间运行的操作完成。

属性
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--resource-name

L2 隔离域的名称。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az networkfabric l2domain list

列出提供的资源组或订阅中的所有 L2 隔离域。

az networkfabric l2domain list [--max-items]
                               [--next-token]
                               [--resource-group]

示例

列出资源组的 L2 隔离域

az networkfabric l2domain list --resource-group "example-rg"

列出订阅的 L2 隔离域

az networkfabric l2domain list --subscription "<subscriptionId>"

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的 --next-token 参数中提供令牌值。

属性
Parameter group: Pagination Arguments
--next-token

用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。

属性
Parameter group: Pagination Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az networkfabric l2domain show

显示提供的 L2 隔离域资源的详细信息。

az networkfabric l2domain show [--ids]
                               [--resource-group]
                               [--resource-name]
                               [--subscription]

示例

显示 L2 隔离域

az networkfabric l2domain show --resource-group "example-rg" --resource-name "example-l2domain"

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--resource-name

L2 隔离域的名称。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az networkfabric l2domain update

更新 L2 隔离域资源。

az networkfabric l2domain update [--annotation]
                                 [--extended-vlan {Disabled, Enabled}]
                                 [--ids]
                                 [--mtu]
                                 [--network-to-network-interconnect-id --nni-id]
                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                 [--resource-group]
                                 [--resource-name]
                                 [--subscription]
                                 [--tags]

示例

更新 L2 隔离域

az networkfabric l2domain update --resource-group "example-rg" --resource-name "example-l2domain" --mtu 1500

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--annotation

切换配置说明。

属性
Parameter group: Properties Arguments
--extended-vlan

扩展 VLAN 状态。

属性
Parameter group: Properties Arguments
接受的值: Disabled, Enabled
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--mtu

最大传输单位。 默认值为 1500。

属性
Parameter group: Properties Arguments
--network-to-network-interconnect-id --nni-id

L2 ISD 资源的 networkToNetworkInterconnectId 的 ARM 资源 ID。

属性
Parameter group: Properties Arguments
--no-wait

不等待长时间运行的操作完成。

属性
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--resource-name

L2 隔离域的名称。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
--tags

Resource tags. 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
Parameter group: Properties Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az networkfabric l2domain update-admin-state

跨结构或指定机架启用隔离域。

az networkfabric l2domain update-admin-state [--ids]
                                             [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                             [--resource-group]
                                             [--resource-ids]
                                             [--resource-name]
                                             [--state {Disable, Enable, UnderMaintenance}]
                                             [--subscription]

示例

更新 L2 隔离域的管理员状态

az networkfabric l2domain update-admin-state --resource-group "example-rg" --resource-name "example-l2domain" --state "Enable"

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--no-wait

不等待长时间运行的操作完成。

属性
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--resource-ids

网络结构或网络机架资源 ID。支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
Parameter group: Body Arguments
--resource-name

L2 隔离域的名称。

属性
Parameter group: Resource Id Arguments
--state

Administrative state.

属性
Parameter group: Body Arguments
接受的值: Disable, Enable, UnderMaintenance
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az networkfabric l2domain wait

将 CLI 置于等待状态,直到满足条件。

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

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

等待在“Succeeded”中使用“provisioningState”创建。

属性
Parameter group: Wait Condition Arguments
默认值: False
--custom

等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

属性
Parameter group: Wait Condition Arguments
--deleted

等到删除为止。

属性
Parameter group: Wait Condition Arguments
默认值: False
--exists

等待资源存在。

属性
Parameter group: Wait Condition Arguments
默认值: False
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--interval

轮询间隔(以秒为单位)。

属性
Parameter group: Wait Condition Arguments
默认值: 30
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--resource-name

L2 隔离域的名称。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
--timeout

最大等待(以秒为单位)。

属性
Parameter group: Wait Condition Arguments
默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

属性
Parameter group: Wait Condition Arguments
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False