describeSourceRegions method
Returns a list of the source Amazon Web Services Regions where the current Amazon Web Services Region can create a read replica, copy a DB snapshot from, or replicate automated backups from.
Use this operation to determine whether cross-Region features are supported between other Regions and your current Region. This operation supports pagination.
To return information about the Regions that are enabled for your account,
or all Regions, use the EC2 operation DescribeRegions. For
more information, see
DescribeRegions in the Amazon EC2 API Reference.
Parameter filters :
This parameter isn't currently supported.
Parameter marker :
An optional pagination token provided by a previous
DescribeSourceRegions request. If this parameter is
specified, the response includes only records beyond the marker, up to the
value specified by MaxRecords.
Parameter maxRecords :
The maximum number of records to include in the response. If more records
exist than the specified MaxRecords value, a pagination token
called a marker is included in the response so you can retrieve the
remaining results.
Default: 100
Constraints: Minimum 20, maximum 100.
Parameter regionName :
The source Amazon Web Services Region name. For example,
us-east-1.
Constraints:
- Must specify a valid Amazon Web Services Region name.
Implementation
Future<SourceRegionMessage> describeSourceRegions({
List<Filter>? filters,
String? marker,
int? maxRecords,
String? regionName,
}) async {
final $request = <String, String>{
if (filters != null)
if (filters.isEmpty)
'Filters': ''
else
for (var i1 = 0; i1 < filters.length; i1++)
for (var e3 in filters[i1].toQueryMap().entries)
'Filters.Filter.${i1 + 1}.${e3.key}': e3.value,
if (marker != null) 'Marker': marker,
if (maxRecords != null) 'MaxRecords': maxRecords.toString(),
if (regionName != null) 'RegionName': regionName,
};
final $result = await _protocol.send(
$request,
action: 'DescribeSourceRegions',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DescribeSourceRegionsResult',
);
return SourceRegionMessage.fromXml($result);
}