describe_regions
¶
describe_regions(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
31282 31283 31284 31285 31286 31287 31288 31289 31290 31291 31292 31293 31294 31295 31296 31297 31298 31299 31300 31301 31302 31303 31304 31305 31306 31307 31308 31309 31310 31311 31312 31313 31314 31315 31316 31317 31318 31319 31320 31321 31322 31323 31324 31325 31326 31327 31328 31329 31330 31331 31332 31333 31334 31335 31336 31337 31338 31339 31340 31341 31342 31343 31344 | |