describe_regions
async
¶
describe_regions(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
region_names: Optional[RegionNameStringList] = None,
all_regions: Optional[Boolean] = None,
dry_run: Optional[Boolean] = None,
filters: Optional[FilterList] = None,
) -> DescribeRegionsResult
Describes the Regions that are enabled for your account, or all Regions.
For a list of the Regions supported by Amazon EC2, see Amazon EC2 service endpoints.
For information about enabling and disabling Regions for your account, see Specify which Amazon Web Services Regions your account can use in the Amazon Web Services Account Management Reference Guide.
The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.
Parameters:
-
region_names(Optional[RegionNameStringList], default:None) –The names of the Regions. You can specify any Regions, whether they are enabled and disabled for your account.
-
all_regions(Optional[Boolean], default:None) –Indicates whether to display all Regions, including Regions that are disabled for your account.
-
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.
-
endpoint- The endpoint of the Region (for example,ec2.us-east-1.amazonaws.com). -
opt-in-status- The opt-in status of the Region (opt-in-not-required|opted-in|not-opted-in). -
region-name- The name of the Region (for example,us-east-1).
-
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To describe your regions This example describes all the regions that are available to you.
Source code in docs_src/capo_ec2/_services/async_ec2.py
31705 31706 31707 31708 31709 31710 31711 31712 31713 31714 31715 31716 31717 31718 31719 31720 31721 31722 31723 31724 31725 31726 31727 31728 31729 31730 31731 31732 31733 31734 31735 31736 31737 31738 31739 31740 31741 31742 31743 31744 31745 31746 31747 31748 31749 31750 31751 31752 31753 31754 31755 31756 31757 31758 31759 31760 31761 31762 31763 31764 31765 31766 31767 31768 | |