describe_secondary_networks
¶
describe_secondary_networks(
*,
config_overrides: Optional[EC2ClientConfig] = 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.
>>> 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.
>>> 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/ec2.py
32528 32529 32530 32531 32532 32533 32534 32535 32536 32537 32538 32539 32540 32541 32542 32543 32544 32545 32546 32547 32548 32549 32550 32551 32552 32553 32554 32555 32556 32557 32558 32559 32560 32561 32562 32563 32564 32565 32566 32567 32568 32569 32570 32571 32572 32573 32574 32575 32576 32577 32578 32579 32580 32581 32582 32583 32584 32585 32586 32587 32588 32589 32590 32591 32592 32593 32594 32595 32596 32597 32598 32599 32600 | |