describe_secondary_networks
async
¶
describe_secondary_networks(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
filters: Optional[FilterList] = None,
max_results: Optional[DescribeSecondaryNetworksMaxResults] = None,
next_token: Optional[String] = None,
secondary_network_ids: Optional[SecondaryNetworkIdList] = None,
) -> DescribeSecondaryNetworksResult
Describes one or more secondary networks.
Parameters:
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
filters(Optional[FilterList], default:None) –The filters. The following are the possible values:
-
ipv4-cidr-block-association.association-id- The association ID for an IPv4 CIDR block associated with the secondary network. -
ipv4-cidr-block-association.cidr-block- An IPv4 CIDR block associated with the secondary network. -
ipv4-cidr-block-association.state- The state of an IPv4 CIDR block associated with the secondary network. -
owner-id- The ID of the Amazon Web Services account that owns the secondary network. -
secondary-network-id- The ID of the secondary network. -
secondary-network-arn- The ARN of the secondary network. -
state- The state of the secondary network (create-in-progress|create-complete|create-failed|delete-in-progress|delete-complete|delete-failed). -
tag:- The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Ownerand the valueTeamA, specifytag:Ownerfor the filter name andTeamAfor the filter value. -
tag-key- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. -
type- The type of the secondary network (rdma).
-
-
max_results(Optional[DescribeSecondaryNetworksMaxResults], default:None) –The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned
nextTokenvalue. -
next_token(Optional[String], default:None) –The token for the next page of results.
-
secondary_network_ids(Optional[SecondaryNetworkIdList], default:None) –The IDs of the secondary networks.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To describe specified secondary networks This example describes the specified secondary networks.
>>> await client.describe_secondary_networks(secondary_network_ids=['sn-0123456789abcdef0', 'sn-0987654321fedcba0'])
To describe secondary networks using filters
This example uses filters to describe any secondary network you own that has a tag with the key Environment and the value Production and whose state is create-complete.
>>> await client.describe_secondary_networks(filters=[{'Name': 'tag:Environment', 'Values': ['Production']}, {'Name': 'state', 'Values': ['create-complete']}], max_results=5)
Source code in docs_src/capo_ec2/_services/async_ec2.py
32962 32963 32964 32965 32966 32967 32968 32969 32970 32971 32972 32973 32974 32975 32976 32977 32978 32979 32980 32981 32982 32983 32984 32985 32986 32987 32988 32989 32990 32991 32992 32993 32994 32995 32996 32997 32998 32999 33000 33001 33002 33003 33004 33005 33006 33007 33008 33009 33010 33011 33012 33013 33014 33015 33016 33017 33018 33019 33020 33021 33022 33023 33024 33025 33026 33027 33028 33029 33030 33031 33032 33033 33034 33035 | |