Obtenir des informations sur vos route tables
Vous pouvez obtenir des informations à propos d’une ou plusieurs de vos route tables, comme le Net pour lequel elles sont créées ou les routes qu’elles contiennent.
Obtenir des informations sur vos route tables avec octl
|
À ce jour, cette section est disponible en anglais uniquement. |
The ReadRouteTables command lists one or more of your route tables.
In your Net, each Subnet must be associated with a route table. If a Subnet is not explicitly associated with a route table, it is implicitly associated with the main route table of the Net.
$ octl iaas api ReadRouteTables --profile "default" \
--Filters.RouteTableIds "rtb-12345678"
$ octl iaas api ReadRouteTables --profile "default" \
--Filters.NetIds "vpc-12345678","vpc-87654321" \
--Filters.LinkRouteTableMain=true
This command contains the following options that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
Filters.LinkRouteTableIds: (optional) The IDs of the route tables involved in the associations. -
Filters.LinkRouteTableLinkRouteTableIds: (optional) The IDs of the associations between the route tables and the Subnets. -
Filters.LinkRouteTableMain: (optional) If true, the route tables are the main ones for their Nets. -
Filters.LinkSubnetIds: (optional) The IDs of the Subnets involved in the associations. -
Filters.NetIds: (optional) The IDs of the Nets for the route tables. -
Filters.RouteCreationMethods: (optional) The methods used to create a route. -
Filters.RouteDestinationIpRanges: (optional) The IP ranges specified in routes in the tables. -
Filters.RouteDestinationServiceIds: (optional) The service IDs specified in routes in the tables. -
Filters.RouteGatewayIds: (optional) The IDs of the gateways specified in routes in the tables. -
Filters.RouteNatServiceIds: (optional) The IDs of the NAT services specified in routes in the tables. -
Filters.RouteNetPeeringIds: (optional) The IDs of the Net peerings specified in routes in the tables. -
Filters.RouteStates: (optional) The states of routes in the route tables (alwaysactive). -
Filters.RouteTableIds: (optional) The IDs of the route tables. -
Filters.RouteVmIds: (optional) The IDs of the VMs specified in routes in the tables. -
Filters.TagKeys: (optional) The keys of the tags associated with the route tables. -
Filters.TagValues: (optional) The values of the tags associated with the route tables. -
Filters.Tags: (optional) The key/value combination of the tags associated with the route tables, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
The ReadRouteTables command returns the following elements:
-
NextPageToken: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
-
RouteTables: Information about one or more route tables.-
LinkRouteTables: One or more associations between the route table and Subnets.-
LinkRouteTableId: The ID of the association between the route table and the Net or Subnet. -
Main: If true, the route table is the main one. -
NetId: The ID of the Net, if the route table is not explicitly linked to a Subnet. -
RouteTableId: The ID of the route table. -
SubnetId: The ID of the Subnet, if the route table is explicitly linked to a Subnet.
-
-
NetId: The ID of the Net for the route table. -
RoutePropagatingVirtualGateways: Information about virtual gateways propagating routes.-
VirtualGatewayId: The ID of the virtual gateway.
-
-
RouteTableId: The ID of the route table. -
Routes: One or more routes in the route table.-
CreationMethod: The method used to create the route. -
DestinationIpRange: The IP range used for the destination match, in CIDR notation (for example,10.0.0.0/24). -
DestinationServiceId: The ID of the OUTSCALE service. -
GatewayId: The ID of the internet service or virtual gateway attached to the Net. -
NatServiceId: The ID of a NAT service attached to the Net. -
NetAccessPointId: The ID of the Net access point. -
NetPeeringId: The ID of the Net peering. -
NicId: The ID of the NIC. -
State: The state of a route in the route table (alwaysactive). -
VmAccountId: The OUTSCALE account ID of the owner of the VM. -
VmId: The ID of a VM specified in a route in the table.
-
-
Tags: One or more tags associated with the route table.-
Key: The key of the tag, between 1 and 255 characters. -
Value: The value of the tag, between 0 and 255 characters.
-
-
{
"RouteTables": [
{
"Routes": [
{
"DestinationIpRange": "10.0.0.0/16",
"CreationMethod": "CreateRouteTable",
"State": "active"
}
],
"LinkRouteTables": [
{
"Main": true,
"LinkRouteTableId": "rtbassoc-12345678",
"RouteTableId": "rtb-12345678",
"NetId": "vpc-12345678"
}
],
"NetId": "vpc-12345678",
"Tags": [],
"RoutePropagatingVirtualGateways": [],
"RouteTableId": "rtb-12345678"
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Obtenir des informations sur vos route tables avec OSC CLI
|
À ce jour, cette section est disponible en anglais uniquement. |
The ReadRouteTables command lists one or more of your route tables.
In your Net, each Subnet must be associated with a route table. If a Subnet is not explicitly associated with a route table, it is implicitly associated with the main route table of the Net.
$ osc-cli api ReadRouteTables --profile "default" \
--Filters '{
"RouteTableIds": ["rtb-12345678"]
}'
$ osc-cli api ReadRouteTables --profile "default" \
--Filters '{
"NetIds": ["vpc-12345678", "vpc-87654321"],
"LinkRouteTableMain": True
}'
This command contains the following options that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
Filters: (optional) One or more filters.-
LinkRouteTableIds: (optional) The IDs of the route tables involved in the associations. -
LinkRouteTableLinkRouteTableIds: (optional) The IDs of the associations between the route tables and the Subnets. -
LinkRouteTableMain: (optional) If true, the route tables are the main ones for their Nets. -
LinkSubnetIds: (optional) The IDs of the Subnets involved in the associations. -
NetIds: (optional) The IDs of the Nets for the route tables. -
RouteCreationMethods: (optional) The methods used to create a route. -
RouteDestinationIpRanges: (optional) The IP ranges specified in routes in the tables. -
RouteDestinationServiceIds: (optional) The service IDs specified in routes in the tables. -
RouteGatewayIds: (optional) The IDs of the gateways specified in routes in the tables. -
RouteNatServiceIds: (optional) The IDs of the NAT services specified in routes in the tables. -
RouteNetPeeringIds: (optional) The IDs of the Net peerings specified in routes in the tables. -
RouteStates: (optional) The states of routes in the route tables (alwaysactive). -
RouteTableIds: (optional) The IDs of the route tables. -
RouteVmIds: (optional) The IDs of the VMs specified in routes in the tables. -
TagKeys: (optional) The keys of the tags associated with the route tables. -
TagValues: (optional) The values of the tags associated with the route tables. -
Tags: (optional) The key/value combination of the tags associated with the route tables, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
-
-
NextPageToken: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage: (optional) The maximum number of logs returned in a single response (between1and1000, both included).
The ReadRouteTables command returns the following elements:
-
NextPageToken: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
-
RouteTables: Information about one or more route tables.-
LinkRouteTables: One or more associations between the route table and Subnets.-
LinkRouteTableId: The ID of the association between the route table and the Net or Subnet. -
Main: If true, the route table is the main one. -
NetId: The ID of the Net, if the route table is not explicitly linked to a Subnet. -
RouteTableId: The ID of the route table. -
SubnetId: The ID of the Subnet, if the route table is explicitly linked to a Subnet.
-
-
NetId: The ID of the Net for the route table. -
RoutePropagatingVirtualGateways: Information about virtual gateways propagating routes.-
VirtualGatewayId: The ID of the virtual gateway.
-
-
RouteTableId: The ID of the route table. -
Routes: One or more routes in the route table.-
CreationMethod: The method used to create the route. -
DestinationIpRange: The IP range used for the destination match, in CIDR notation (for example,10.0.0.0/24). -
DestinationServiceId: The ID of the OUTSCALE service. -
GatewayId: The ID of the internet service or virtual gateway attached to the Net. -
NatServiceId: The ID of a NAT service attached to the Net. -
NetAccessPointId: The ID of the Net access point. -
NetPeeringId: The ID of the Net peering. -
NicId: The ID of the NIC. -
State: The state of a route in the route table (alwaysactive). -
VmAccountId: The OUTSCALE account ID of the owner of the VM. -
VmId: The ID of a VM specified in a route in the table.
-
-
Tags: One or more tags associated with the route table.-
Key: The key of the tag, between 1 and 255 characters. -
Value: The value of the tag, between 0 and 255 characters.
-
-
{
"RouteTables": [
{
"Routes": [
{
"DestinationIpRange": "10.0.0.0/16",
"CreationMethod": "CreateRouteTable",
"State": "active"
}
],
"LinkRouteTables": [
{
"Main": true,
"LinkRouteTableId": "rtbassoc-12345678",
"RouteTableId": "rtb-12345678",
"NetId": "vpc-12345678"
}
],
"NetId": "vpc-12345678",
"Tags": [],
"RoutePropagatingVirtualGateways": [],
"RouteTableId": "rtb-12345678"
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Obtenir des informations sur vos route tables avec oapi-cli
|
À ce jour, cette section est disponible en anglais uniquement. |
The ReadRouteTables command lists one or more of your route tables.
In your Net, each Subnet must be associated with a route table. If a Subnet is not explicitly associated with a route table, it is implicitly associated with the main route table of the Net.
$ oapi-cli --profile "default" ReadRouteTables \
--Filters '{
"RouteTableIds": ["rtb-12345678"]
}'
$ oapi-cli --profile "default" ReadRouteTables \
--Filters '{
"NetIds": ["vpc-12345678", "vpc-87654321"],
"LinkRouteTableMain": true
}'
This command contains the following options that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
Filters: (optional) One or more filters.-
LinkRouteTableIds: (optional) The IDs of the route tables involved in the associations. -
LinkRouteTableLinkRouteTableIds: (optional) The IDs of the associations between the route tables and the Subnets. -
LinkRouteTableMain: (optional) If true, the route tables are the main ones for their Nets. -
LinkSubnetIds: (optional) The IDs of the Subnets involved in the associations. -
NetIds: (optional) The IDs of the Nets for the route tables. -
RouteCreationMethods: (optional) The methods used to create a route. -
RouteDestinationIpRanges: (optional) The IP ranges specified in routes in the tables. -
RouteDestinationServiceIds: (optional) The service IDs specified in routes in the tables. -
RouteGatewayIds: (optional) The IDs of the gateways specified in routes in the tables. -
RouteNatServiceIds: (optional) The IDs of the NAT services specified in routes in the tables. -
RouteNetPeeringIds: (optional) The IDs of the Net peerings specified in routes in the tables. -
RouteStates: (optional) The states of routes in the route tables (alwaysactive). -
RouteTableIds: (optional) The IDs of the route tables. -
RouteVmIds: (optional) The IDs of the VMs specified in routes in the tables. -
TagKeys: (optional) The keys of the tags associated with the route tables. -
TagValues: (optional) The values of the tags associated with the route tables. -
Tags: (optional) The key/value combination of the tags associated with the route tables, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
-
-
NextPageToken: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage: (optional) The maximum number of logs returned in a single response (between1and1000, both included).
The ReadRouteTables command returns the following elements:
-
NextPageToken: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
-
RouteTables: Information about one or more route tables.-
LinkRouteTables: One or more associations between the route table and Subnets.-
LinkRouteTableId: The ID of the association between the route table and the Net or Subnet. -
Main: If true, the route table is the main one. -
NetId: The ID of the Net, if the route table is not explicitly linked to a Subnet. -
RouteTableId: The ID of the route table. -
SubnetId: The ID of the Subnet, if the route table is explicitly linked to a Subnet.
-
-
NetId: The ID of the Net for the route table. -
RoutePropagatingVirtualGateways: Information about virtual gateways propagating routes.-
VirtualGatewayId: The ID of the virtual gateway.
-
-
RouteTableId: The ID of the route table. -
Routes: One or more routes in the route table.-
CreationMethod: The method used to create the route. -
DestinationIpRange: The IP range used for the destination match, in CIDR notation (for example,10.0.0.0/24). -
DestinationServiceId: The ID of the OUTSCALE service. -
GatewayId: The ID of the internet service or virtual gateway attached to the Net. -
NatServiceId: The ID of a NAT service attached to the Net. -
NetAccessPointId: The ID of the Net access point. -
NetPeeringId: The ID of the Net peering. -
NicId: The ID of the NIC. -
State: The state of a route in the route table (alwaysactive). -
VmAccountId: The OUTSCALE account ID of the owner of the VM. -
VmId: The ID of a VM specified in a route in the table.
-
-
Tags: One or more tags associated with the route table.-
Key: The key of the tag, between 1 and 255 characters. -
Value: The value of the tag, between 0 and 255 characters.
-
-
{
"RouteTables": [
{
"Routes": [
{
"DestinationIpRange": "10.0.0.0/16",
"CreationMethod": "CreateRouteTable",
"State": "active"
}
],
"LinkRouteTables": [
{
"Main": true,
"LinkRouteTableId": "rtbassoc-12345678",
"RouteTableId": "rtb-12345678",
"NetId": "vpc-12345678"
}
],
"NetId": "vpc-12345678",
"Tags": [],
"RoutePropagatingVirtualGateways": [],
"RouteTableId": "rtb-12345678"
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Obtenir des informations sur vos route tables avec AWS CLI
Avant de commencer : Installez et configurez AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. |
Pour obtenir des informations sur une ou plusieurs route tables, utilisez la commande describe-route-tables en suivant cette syntaxe :
$ aws ec2 describe-route-tables \
--profile YOUR_PROFILE \
--route-table-id NOT_SPECIFIED \
--filters Name=vpc-id,Values=vpc-12345678 \
--endpoint https://fcu.eu-west-2.outscale.com
Cette commande contient les options suivantes que vous devez spécifier :
-
(optionnel)
profile: Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. -
(optionnel)
route-table-ids: Un ou plusieurs ID de route tables. -
(optionnel)
filters: Un ou plusieurs filtres, au format "Name=X,Values=Y".Vous pouvez spécifier plusieurs valeurs pour un même filtre en utilisant le format "Name=X,Values=Y, Z".
Les filtres suivants sont disponibles :
-
association.route-table-association-id: L’ID d’une association pour la route table. -
association.route-table-id: L’ID de la route table impliquée dans l’association. -
association.subnet-id: L’ID du subnet impliqué dans l’association. -
association.main: Indique si la route table est la principale pour le VPC (true|false). -
route-table-id: L’ID de la route table. -
route.destination-cidr-block: La plage d’IP de destination spécifiée pour la route table, en notation CIDR. -
route.destination-prefix-list-id: L’ID de la prefix list du service atteignable par un VPC endpoint spécifié dans une route de la route table. Pour en savoir plus, voir Obtenir des informations sur les prefix lists. -
route.gateway-id: L’ID de l’internet gateway ou de la Virtual Private gateway attachée au VPC et utilisée comme target pour la route. -
route.instance-id: L’ID d’une instance dans le VPC utilisée comme target pour la route. -
route.nat-gateway-id: L’ID d’une NAT gateway utilisée comme target pour la route. -
route.origin: Indique comment la route a été créée (create-route-tablesi la route a été automatiquement créée lors de la création de la route table,create-routesi la route a été créée manuellement,vgw-route-propagationsi la route a été propagée à l’aide de la propagation de route). -
route.state: L’état d’une route dans la route table (toujoursactive). Pour en savoir plus, voir À propos des route tables. -
route.vpc-peering-connection-id: L’ID d’une VPC peering connection spécifiée dans une route de la route table.
-
tag-key: La clé d’un tag associé à la ressource. -
tag-value: La valeur d’un tag associé à la ressource. -
tag:XXXX: La valeur d’un tag associé à la ressource, oùXXXXest la clé du tag.Pour filtrer un tag dont la clé est
XXXXet la valeur estYYYY, vous pouvez donc utiliser un des deux formats suivants :-
--filters Name=tag-key,Values=XXXX Name=tag-value,Values=YYYY -
--filters Name=tag:XXXX,Values=YYYY
-
-
vpc-id: L’ID du VPC.
-
-
endpoint: Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête. Pour en savoir plus, voir Installer et configurer AWS CLI.
La commande describe-route-tables renvoie les éléments suivants :
-
RouteTable: Informations à propos d’une ou plusieurs route tables. Cet élément contient les informations suivantes :-
Association: Une ou plusieurs associations entre la route table et des subnets. Cet élément contient les informations suivantes :-
RouteTableAssociationId: L’ID de l’association entre la route table et un subnet. -
Main: Sitrue, la route table est la principale pour le VPC. Sifalse, elle ne l’est pas. -
RouteTableId: L’ID de la route table.
-
-
RouteTableId: L’ID de la route table. -
VpcId: L’ID du VPC. -
PropagatingVgws: Les Virtual Private gateways (VGW) qui propagent les routes, en protocole BGP. -
Tags: Un ou plusieurs tags associés à la route table. Cet élément contient les informations suivantes :-
Value: La valeur du tag. -
Key: La clé du tag.
-
-
Routes: Informations à propos des routes contenues dans la route table. Cet élément contient l’information suivante :-
GatewayId: La target utilisée pour la route.Cet élément peut également être un
instance-idou unnat-gateway-id. -
DestinationCidrBlock: La plage d’IP de destination, en notation CIDR. -
State: L’état de la route.
-
-
{
"RouteTables": [
{
"Associations": [
{
"RouteTableAssociationId": "rtbassoc-1234abcd",
"Main": true,
"RouteTableId": "rtb-4321dcba"
}
],
"RouteTableId": "rtb-5678abcd",
"VpcId": "vpc-12345678",
"PropagatingVgws": [],
"Tags": [
{
"Value": "SUB1",
"Key": "Name"
}
],
"Routes": [
{
"GatewayId": "local",
"DestinationCidrBlock": "10.0.0.0/16",
"State": "active"
}
]
}
]
}
Pages connexes
Méthodes API correspondantes
AWS™ et Amazon Web Services™ sont des marques de commerce d'Amazon Technologies, Inc. ou de ses affiliées aux États-Unis et/ou dans les autres pays.