describe-transit-gateways get transit-gateway-ID using its description row

0

So, i wanted to get transit-gateway-id using description line (or maybe better to use tag?) that i have added to it when i was creating the transit-gateway. Now im trying to get transit-gateway-id using this command aws ec2 describe-transit-gateways.

But im stuck with using --filter, cant really understand if it is even possible. Thanks

已提問 1 年前檢視次數 255 次
1 個回答
1
已接受的答案

Upon review of the documentation, it did not appear to be possible to filter by description field or tag. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-transit-gateways.html

--filters (list)

One or more filters. The possible values are:

  • options.propagation-default-route-table-id - The ID of the default propagation route table.
  • options.amazon-side-asn - The private ASN for the Amazon side of a BGP session.
  • options.association-default-route-table-id - The ID of the default association route table.
  • options.auto-accept-shared-attachments - Indicates whether there is automatic acceptance of attachment requests (enable | disable ).
  • options.default-route-table-association - Indicates whether resource attachments are automatically associated with the default association route table (enable | disable ).
  • options.default-route-table-propagation - Indicates whether resource attachments automatically propagate routes to the default propagation route table (enable | disable ).
  • options.dns-support - Indicates whether DNS support is enabled (enable | disable ).
  • options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol support is enabled (enable | disable ).
  • owner-id - The ID of the Amazon Web Services account that owns the transit gateway. state - The state of the transit gateway (available | deleted | deleting | modifying | pending ).
  • transit-gateway-id - The ID of the transit gateway.
profile picture
已回答 1 年前
profile pictureAWS
專家
已審閱 1 年前
profile pictureAWS
專家
已審閱 1 年前
  • Welp, yeah, if it is the only possible values for filtering, then sad.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南