Transit Gateway CLI
IBM Cloud® Transit Gateway 命令行提供了 Transit Gateway 服务的接口。 您可以使用 CLI 来创建和管理网关和连接,并列出网关的可用位置。
准备工作
遵循以下指示信息以使用 Transit Gateway 命令行界面,该界面作为 IBM Cloud CLI 插件实现。
-
安装 IBM Cloud CLI。
-
将
tg-cli/tg
CLI 插件安装到 IBM Cloud CLI。安装该插件:
ibmcloud plugin install tg
如果要将 CLI 与虚拟专用端点 (VPE) 配合使用,那么必须设置以下变量:
export IBMCLOUD_TG_API_ENDPOINT=private.transit.cloud.ibm.com
ibmcloud plugin show tg
显示 Transit Gateway CLI 插件信息。
ibmcloud plugin show tg
ibmcloud tg --help
获取有关 Transit Gateway 命令的帮助。
ibmcloud tg -h|--help
传输网关
本节介绍网关功能的CLI命令。
ibmcloud tg gateway
检索有关特定网关的详细信息。
ibmcloud tg gateway|gw GATEWAY_ID [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 要详细信息的网关的标识。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
网关的请求详细信息。
ibmcloud tg gw $gateway
ibmcloud tg gateways
列出传输网关。
ibmcloud tg gateways|gws [--output json] [-h, --help]
命令选项
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
其他命令需要网关标识。 将ID保存为环境变量,以便日后使用,例如:
gateway="bdf8fa2b-c518-9999-9028-f3c9ece86159"
ibmcloud tg gateway-create
创建运输网关。
ibmcloud tg gateway-create|gwc --name NAME --location LOCATION [--routing ROUTING] [--resource-group-id RES_GROUP_ID] [--output json] [-h, --help]
命令选项
--name
- 新网关的名称。
--location
- 网关的位置 (请参阅使用
ibmcloud tg locations
的可能值) --routing
- 资源的网关路由 (
global
|local
)。选择global
以跨区域连接资源。 默认值为local
。 --resource-group-id
- 可选: 网关资源组标识。 使用缺省资源组 (如果未指定)。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
使用 local
路由在 us-south
中创建名为 myGateway
的网关,并使用缺省资源组。
ibmcloud tg gwc --name myGateway --location us-south
ibmcloud tg gateway-delete
删除现有网关。
ibmcloud tg gateway-delete|gwd GATEWAY_ID [-f, --force] [-h, --help]
命令选项
GATEWAY_ID
- 您要删除的网关的ID。
--force | -f
- 可选: 强制删除而不确认。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
删除网关而不进行确认。
ibmcloud tg gwd $gateway -f
ibmcloud tg gateway-update
更新现有网关上的属性。
ibmcloud tg gateway-update|gwu GATEWAY_ID [--name NAME] [--routing ROUTING] [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 要更新的网关的标识。
--name
- 可选: 网关的新名称。
--routing
- 可选: 资源的网关路由 (
global
|local
)。选择全局以跨区域连接资源。 将路由从global
更改为local
需要所有现有连接为local
。 --output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
使用路由值 global
更新网关。
ibmcloud tg gwu $gateway --routing global
连接
本节介绍连接功能的CLI命令。
ibmcloud tg connection
检索有关特定连接的详细信息。
ibmcloud tg connection|c GATEWAY_ID CONNECTION_ID [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 连接所在的网关的标识。
CONNECTION_ID
- 要详细信息的连接的标识。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
特定连接标识的请求详细信息。
ibmcloud tg c $gateway $connection
ibmcloud tg connections
列出运输网关上的连接。
ibmcloud tg connections|cs GATEWAY_ID [--all-pages] [--limit NUMERIC_VALUE] [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 要连接的网关的标识。
--all-pages
(此时选择可用性)- 列出所有连接,而不考虑是否指定
--limit
大小。 --limit
(此时选择可用性)- 每页要返回的最大资源数。 默认限制为
100
。 可能的值:1
≤ 值 ≤500
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
列出网关上的连接。
ibmcloud tg cs $gateway
其他命令需要连接标识。 将ID保存为环境变量,以便日后使用,例如:
connection="4892849f-368e-9999-bb58-8888fb21e513"
ibmcloud tg connection-create
在 Transit Gateway 上创建连接。
ibmcloud tg connection-create|cc GATEWAY_ID --name NAME --network-type NETWORK_TYPE --network-id NETWORK_ID --network-account-id NETWORK_ACCOUNT_ID [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 新连接所使用的网关的标识。
--name
- 新连接的名称。
--network-type
- 连接的网络类型。 值为
classic
,vpc
,directlink
或power_virtual_server
。 --network-id
- 网络连接的ID。 对于
classic
,请勿设置值。 将 CRN 用于所有其他网络类型。 例如,要查找 VPC 的 CRN:
ibmcloud is vpc VPC_ID --json
--network-account-id
- 用于创建经典连接的 IBM Cloud 帐户的标识。 仅当连接的帐户与网关的帐户不同时,才与
classic
类型配合使用。 --default-prefix-filter
- 可选:默认连接前缀过滤器(
permit
|deny
)。 --output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
创建名为 vpc-connection
且使用 vpcCRN="crn:v1:bluemix:public:is:us-south:a/3aa0a9999a1a46258064d84f7f447920::vpc:r134-f87014d5-87d2-46d1-9999-24683082f6bc"
的 VPC 连接
ibmcloud tg cc $gateway --name vpc-connection --network-id $vpcCRN --network-type vpc
创建名为 classic-conn
的经典连接。
ibmcloud tg cc $gateway --name classic-conn --network-type classic
ibmcloud tg connection-delete
删除现有连接。
ibmcloud tg connection-delete|cd GATEWAY_ID CONNECTION_ID [-f, --force] [-h, --help]
命令选项
GATEWAY_ID
- 要删除的连接的网关的标识。
CONNECTION_ID
- 要删除的连接的标识。
--force | -f
- 可选: 强制删除而不确认。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
删除连接而不确认。
ibmcloud tg cd $gateway $connection -f
ibmcloud tg connection-create-gre
(不推荐)
不推荐使用该命令。 使用 tg-connection-gre-create 命令。
在传输网关上创建通用路由封装 (GRE) 隧道连接。
ibmcloud tg connection-rcreate-gre|crgre GATEWAY_ID --name NAME --zone ZONE --local-gateway-ip LOCAL_GATEWAY_IP --local-tunnel-ip LOCAL_TUNNEL_IP --remote-gateway-ip REMOTE_GATEWAY_IP --remote-tunnel-ip REMOTE_TUNNEL_IP [--base-connection-id BASE_CONNECTION_ID] [--base-network-type BASE_NETWORK_TYPE] [--network-type NETWORK_TYPE] [--network-account-id NETWORK_ACCOUNT_ID] [--remote-bgp-asn REMOTE_BGP_ASN] [--default-prefix-filter DEFAULT_PREFIX_FILTER] [--output json]
命令选项
GATEWAY_ID
绑定新连接的网关的标识。
--name
- 新 GRE 连接的名称。
--zone
- GRE 隧道的可用性区域。 示例:
us-south-1
--local-gateway-ip
- GRE 隧道连接的本地网关 IP 地址。
--local-tunnel-ip
- GRE 隧道连接的本地隧道 IP 地址。
--remote-gateway-ip
- GRE 隧道连接的远程网关 IP 地址。
--remote-tunnel-ip
- GRE 隧道连接的远程隧道 IP 地址。
--base-connection-id
- 可选: 作为 GRE 隧道的底层的经典网络连接的标识。 此选项仅用于
gre_tunnel
网络类型。 --base-network-type
- 基础连接的网络类型(
classic
)。 --network-type
- 可选: GRE 连接的网络类型。 默认值为
gre_tunnel
。 --network-account-id
- 可选: 用于连接到经典连接的帐户的标识。 仅当连接的帐户与网关的帐户不同时,才与
classic
类型配合使用。 --remote-bgp-asn
- 可选: 如果未指定远程 BGP ASN,那么将生成一个。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
创建名为 gre-connection
的 GRE 隧道连接,并使用经典连接 9037f710-8dfb-4948-a2bd-847c8dde96d3
作为基本连接。
ibmcloud tg connection-create-gre $gateway --name gre-connection --base-connection-id 9037f710-8dfb-9999-a2bd-847c8dde96d3 --zone us-south-2 --local-gateway-ip 192.168.100.1 --local-tunnel-ip 192.168.101.1 --remote-gateway-ip 10.242.63.12 --remote-tunnel-ip 192.168.101.2
ibmcloud tg connection-approve
以网络所有者身份核准来自其他帐户的连接。
ibmcloud tg connection-approve|ca GATEWAY_ID CONNECTION_ID [-h, --help]
命令选项
GATEWAY_ID
- 连接所在的网关的标识。
CONNECTION_ID
- 您正在核准的连接的标识。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
核准连接请求。
ibmcloud tg ca $gateway $connection
ibmcloud tg connection-gre-create
在 Transit Gateway 上创建通用路由封装 (GRE) 隧道或未绑定的 GRE 连接。
ibmcloud tg connection-gre-create|cgrec GATEWAY_ID --name NAME --zone ZONE --local-gateway-ip LOCAL_GATEWAY_IP --local-tunnel-ip LOCAL_TUNNEL_IP --remote-gateway-ip REMOTE_GATEWAY_IP --remote-tunnel-ip REMOTE_TUNNEL_IP [--base-connection-id BASE_CONNECTION_ID] [--base-network-type BASE_NETWORK_TYPE] [--network-type NETWORK_TYPE] [--network-account-id NETWORK_ACCOUNT_ID] [--remote-bgp-asn REMOTE_BGP_ASN] [--default-prefix-filter DEFAULT_PREFIX_FILTER] [--output json]
命令选项
GATEWAY_ID
- 绑定新连接的网关的标识。
--name
- 新 GRE 连接的名称。
--zone
- GRE 隧道的可用性区域。 示例:
us-south-1
--local-gateway-ip
- GRE 隧道连接的本地网关 IP 地址。
--local-tunnel-ip
- GRE 隧道连接的本地隧道 IP 地址。
--remote-gateway-ip
- GRE 隧道连接的远程网关 IP 地址。
--remote-tunnel-ip
- GRE 隧道连接的远程隧道 IP 地址。
--base-connection-id
- 可选: 作为 GRE 隧道的底层的经典网络连接的标识。 此选项仅用于
gre_tunnel
网络类型。 --base-network-type
- 可选:基本连接的网络类型(
classic
)。 --network-type
- 可选: GRE 连接的网络类型。 值为
gre_tunnel
或unbound_gre_tunnel
。 缺省值为gre_tunnel
。 --network-account-id
- 可选: 用于连接到经典连接的帐户的标识。 仅当连接的帐户与网关的帐户不同时,才与
classic
类型配合使用。 --remote-bgp-asn
- 可选: 如果未指定远程 BGP ASN,那么将生成一个。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
创建名为 gre-connection
的 GRE 隧道连接,并使用经典连接 9037f710-8dfb-4948-a2bd-847c8dde96d3
作为基本连接。
ibmcloud tg connection-gre-create $gateway --name gre-connection --base-connection-id 9037f710-8dfb-9999-a2bd-847c8dde96d3 --zone us-south-2 --local-gateway-ip 192.168.100.1 --local-tunnel-ip 192.168.101.1 --remote-gateway-ip 10.242.63.12 --remote-tunnel-ip 192.168.101.2
ibmcloud tg connection-reject
以网络所有者身份拒绝来自其他帐户的连接。
ibmcloud tg connection-reject|cr GATEWAY_ID CONNECTION_ID [-h, --help]
命令选项
GATEWAY_ID
- 连接所在的网关的标识。
CONNECTION_ID
- 要拒绝的连接的标识。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
拒绝连接请求。
ibmcloud tg cr $gateway $connection
ibmcloud tg connection-rgre-create
在 Transit Gateway 上创建冗余 GRE 连接。
必须使用 JSON 文件作为输入。
ibmcloud tg connection-rgre-create|crgrec --file JSON_FILE_PATH [--output json]
JSON 文件
{
"gateway_id": "47f11b01-471c-47d0-9e84-550c88c94055",
"name": "redundant_gre1",
"network_type": "redundant_gre",
"base_network_type": "classic",
"network_account_id": "28e4d90ac7504be694471ee66e70d0d5",
"network_id": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b",
"tunnels": [
{
"local_gateway_ip": "192.168.100.1",
"local_tunnel_ip": "192.168.129.2",
"name": "gre1",
"remote_bgp_asn": 65010,
"remote_gateway_ip": "10.242.63.12",
"remote_tunnel_ip": "192.168.129.1",
"zone": {
"name": "us-south-1"
}
}, {
"local_gateway_ip": "192.168.101.1",
"local_tunnel_ip": "192.168.128.2",
"name": "gre2",
"remote_bgp_asn": 65010,
"remote_gateway_ip": "10.242.63.12",
"remote_tunnel_ip": "192.168.128.1",
"zone": {
"name": "us-south-1"
}
}
]
}
命令选项
gateway_id
- 新冗余 GRE 连接所使用的网关的标识。
name
- 新的冗余 GRE 连接的名称。
network_type
- 连接的网络类型。 值为
redundant_gre
。
base_network_type
要使用的网络类型。 选项为 classic
和 vpc
。
network_account_id
- 要用于跨帐户经典网络的 IBM Cloud 帐户的标识。 仅当连接的帐户与网关的帐户不同时,才与
classic
类型配合使用。 此选项对于vpc
基本网络类型无效。 network_id
- 要使用的 VPC 网络的 CRN。 此选项对于
classic
基本网络类型无效。 例如,要查找 VPC 的 CRN:
ibmcloud is vpc VPC_ID --json
tunnels
-
GRE 隧道的信息。
local_gateway_ip
-
GRE 隧道连接的本地网关 IP 地址。 对于网络类型
redundant_gre
连接,此字段是必需的。使用
vpc
基本网络类型时,此 IP 地址必须符合 RFC 1918,并且不能是224.0.0.0
到239.255.255.255
的多点广播范围内的 IP 地址,并且不能与连接到 Transit Gateway 的任何现有网络相冲突。 此外,此 IP 地址不能用作使用同一底层网络的另一个 GRE 的local-gateway-ip
。 local_tunnel_ip
-
分配给隧道的 Transit Gateway 端的本地隧道 IP 地址。
local_tunnel_ip
和remote_tunnel_ip
地址必须位于同一/30
网络中。 既不能是网络,也不能是广播地址。 对于网络类型redundant_gre
连接,此字段是必需的。 name
-
GRE隧道的名称。
remote_bgp_asn
-
可选: 如果未指定远程 BGP ASN,那么将生成一个。
remote_gateway_ip
-
GRE 隧道连接的远程网关 IP 地址。
remote_tunnel_ip
-
GRE 隧道连接的远程隧道 IP 地址。
zone
-
GRE 隧道的可用性区域。 示例:
us-south-1
ibmcloud tg connection-update
更新现有连接上的属性。
ibmcloud tg connection-update|cu GATEWAY_ID CONNECTION_ID --name NAME [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 正在更新连接的网关的标识。
CONNECTION_ID
- 要更新的连接的ID。
--name
- 连接的新名称。
--default-prefix-filter
- 可选:默认连接前缀过滤器(
permit
|deny
)。 --output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
更新与 MyConn2
的连接的名称。
ibmcloud tg cu $gateway $connection --name MyConn2
ibmcloud tg redundant-gre-tunnel-add
为冗余GRE添加隧道。
ibmcloud tg redundant-gre-tunnel-add|targre GATEWAY_ID REDUNDANT_GRE_ID --name NAME --zone ZONE --local-gateway-ip LOCAL_GATEWAY_IP --local-tunnel-ip LOCAL_TUNNEL_IP --remote-gateway-ip REMOTE_GATEWAY_IP --remote-tunnel-ip REMOTE_TUNNEL_IP [--remote-bgp-asn REMOTE_BGP_ASN] [--output json]
命令选项
GATEWAY_ID
- 绑定新连接的网关的标识。
REDUNDANT_GRE_ID
- 冗余 GRE 连接的标识。
--name
- 新 GRE 隧道的名称。
--zone
- GRE 隧道的可用性区域。 示例:
us-south-1
--local-gateway-ip
- GRE 隧道连接的本地网关 IP 地址。
--local-tunnel-ip
- GRE 隧道连接的本地隧道 IP 地址。
--remote-gateway-ip
- GRE 隧道连接的远程网关 IP 地址。
--remote-tunnel-ip
- GRE 隧道连接的远程隧道 IP 地址。
--remote-bgp-asn
- 可选: 如果未指定远程 BGP ASN,那么将生成一个。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
ibmcloud tg redundant-gre-tunnel-add e47d6b9c-095f-4d31-aa47-5c89c2ded820 e4e37e31-8895-4594-be6b-61e8088b53c7 --name gre-tunnel3 --zone us-south-3 --local-gateway-ip 192.193.202.1 --local-tunnel-ip 192.193.237.2 -ibmcloud login -a https://test.cloud.ibm.com -r us-south --sso -remote-gateway-ip 10.186.203.5 --remote-tunnel-ip 192.193.237.1
ibmcloud tg redundant-gre-tunnel-remove
从冗余 GRE 中除去隧道。
ibmcloud tg redundant-gre-tunnel-remove|trrgre GATEWAY_ID REDUNDANT_GRE_ID TUNNEL_ID [--force | -f] [--help | -h]
命令选项
GATEWAY_ID
- 绑定新连接的网关的标识。
REDUNDANT_GRE_ID
- 冗余 GRE 连接的标识。
TUNNEL_ID
- 要删除的隧道ID。
--force | -f
- 可选: 强制删除而不确认。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
ibmcloud tg redundant-gre-tunnel-remove e47d6b9c-095f-4d31-aa47-5c89c2ded820 e4e37e31-8895-4594-be6b-61e8088b53c7 b97a5cf5-7ee4-4073-b719-f6df36dea08f
ibmcloud tg tunnels
列出给定冗余 GRE 下的所有隧道。
ibmcloud tg tunnels|ts GATEWAY_ID REDUNDANT_GRE_ID [--output json]
命令选项
GATEWAY_ID
- 绑定新连接的网关的标识。
REDUNDANT_GRE_ID
- 冗余 GRE 连接的标识。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--force | -f
- 可选: 强制删除而不确认。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
ibmcloud tg ts e47d6b9c-095f-4d31-aa47-5c89c2ded820 e4e37e31-8895-4594-be6b-61e8088b53c7
位置
本节介绍用于定位功能的CLI命令。
ibmcloud tg locations
使用此命令可列出创建网关的可能位置。
ibmcloud tg locations|locs [--output json] [-h, --help]
命令选项
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
ibmcloud tg location
检索此位置的特定信息。
ibmcloud tg location|loc NAME [--output json] [-h, --help]
命令选项
NAME
- 要详细信息的位置的名称。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
位置 us-south
的请求详细信息。
ibmcloud tg location us-south
连接前缀过滤器
本部分提供了有关用于连接前缀过滤器功能的 CLI 命令的信息。
ibmcloud tg prefix-filter-create
向连接添加前缀过滤器。
ibmcloud tg prefix-filter-create GATEWAY_ID CONNECTION_ID --prefix PREFIX --action ACTION [--le LE] [--ge GE] [--before BEFORE] [--output json]
命令选项
GATEWAY_ID
- 要应用前缀过滤器的网关的标识。
CONNECTION_ID
- 要应用前缀过滤器的连接的标识。
--prefix
- 要对其应用过滤器的网络前缀。
--action
- 请使用指定的前缀(
permit
|deny
)。 --le
- 可选: 应用于小于或等于此值的子网掩码的前缀过滤器。
--ge
- 可选: 应用于大于或等于此值的子网掩码的前缀过滤器。
--before
- 可选:前缀标识符,此过滤器应先应用。 如果为空,那么将最后应用此过滤器。
--output
- 可选:指定输出格式;仅支持
json
。
示例
将 10.0.250.0/24
的前缀过滤器添加到网关 9f559c43-63f4-4da5-b312-b525a8dce185
,并使用操作 permit
连接 6c1bdc19-4adb-4760-8cdc-ef3b74b626f7
。
ibmcloud tg pfc 9f559c43-63f4-4da5-b312-b525a8dce185 6c1bdc19-4adb-4760-8cdc-ef3b74b626f7 --prefix 10.0.250.0/24 --action permit
ibmcloud tg prefix-filter-delete
从连接中删除前缀过滤器。
ibmcloud tg prefix-filter-delete GATEWAY_ID CONNECTION_ID FILTER_ID [-f, --force]
命令选项
GATEWAY_ID
- 要从中删除前缀过滤器的网关的标识。
CONNECTION_ID
- 要从中删除前缀过滤器的连接的标识。
FILTER_ID
- 要删除的前缀过滤器的标识。
--force, -f
- 强制执行删除操作,无需确认。
示例
从网关 9f559c43-63f4-4da5-b312-b525a8dce185
和连接 6c1bdc19-4adb-4760-8cdc-ef3b74b626f7
中删除前缀过滤器标识 b4dbe0a6-c52d-4128-cc32-6f53d86bc82b
ibmcloud tg pfd 9f559c43-63f4-4da5-b312-b525a8dce185 6c1bdc19-4adb-4760-8cdc-ef3b74b626f7 b4dbe0a6-c52d-4128-cc32-6f53d86bc82b
路由报告
本部分提供了有关用于路由报告功能的 CLI 命令的信息。
ibmcloud tg route-reports
使用此命令可列出网关上可用的路由报告。
ibmcloud tg route-reports|rrs GATEWAY_ID [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 要列出其路由报告的网关的标识。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
列出网关上的路由报告。
ibmcloud tg rrs $gateway
其他命令需要路由报告标识。 将ID保存为环境变量,以便日后使用,例如:
report="4892849f-368e-9999-4444-8888fb21e513"
ibmcloud tg route-report
检索有关特定路由报告的详细信息。
ibmcloud tg route-report|rr GATEWAY_ID REPORT_ID [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 路由报告所来自的网关的标识。
REPORT_ID
- 要详细信息的路由报告的标识。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
路由报告的请求详细信息。
ibmcloud tg rr $gateway $report
ibmcloud tg route-report-create
创建检修路线报告。
ibmcloud tg route-report-create|rrc GATEWAY_ID [--output json] [-h, --help]
命令选项
GATEWAY_ID
- 为其创建路由报告的网关的标识。
--output json
- 可选: 指定是否要以 JSON 格式显示输出。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
为网关创建路由报告。
ibmcloud tg rrc $gateway
ibmcloud tg route-report-delete
删除现有路由报告。
ibmcloud tg route-report-delete|rrd GATEWAY_ID REPORT_ID [-f, --force] [-h, --help]
命令选项
GATEWAY_ID
- 报告所针对的网关的标识。
REPORT_ID
- 您要删除的报告编号。
--force | -f
- 可选: 强制删除而不确认。
--help | -h
- 可选: 获取有关此命令的帮助。
示例
删除路由报告而不进行确认。
ibmcloud tg rrd $gateway $report -f