RDS / Client / describe_source_regions

describe_source_regions#

RDS.Client.describe_source_regions(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.describe_source_regions(
    RegionName='string',
    MaxRecords=123,
    Marker='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
Parameters:
  • RegionName (string) –

    The source Amazon Web Services Region name. For example, us-east-1.

    Constraints:

    • Must specify a valid Amazon Web Services Region name.

  • MaxRecords (integer) –

    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.

  • Marker (string) – 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.

  • Filters (list) –

    This parameter isn’t currently supported.

    • (dict) –

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as IDs. The filters supported by a describe operation are documented with the describe operation.

      Note

      Currently, wildcards are not supported in filters.

      The following actions can be filtered:

      • DescribeDBClusterBacktracks

      • DescribeDBClusterEndpoints

      • DescribeDBClusters

      • DescribeDBInstances

      • DescribePendingMaintenanceActions

      • Name (string) – [REQUIRED]

        The name of the filter. Filter names are case-sensitive.

      • Values (list) – [REQUIRED]

        One or more filter values. Filter values are case-sensitive.

        • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'Marker': 'string',
    'SourceRegions': [
        {
            'RegionName': 'string',
            'Endpoint': 'string',
            'Status': 'string',
            'SupportsDBInstanceAutomatedBackupsReplication': True|False
        },
    ]
}

Response Structure

  • (dict) –

    Contains the result of a successful invocation of the DescribeSourceRegions action.

    • Marker (string) –

      An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

    • SourceRegions (list) –

      A list of SourceRegion instances that contains each source Amazon Web Services Region that the current Amazon Web Services Region can get a read replica or a DB snapshot from.

      • (dict) –

        Contains an Amazon Web Services Region name as the result of a successful call to the DescribeSourceRegions action.

        • RegionName (string) –

          The name of the source Amazon Web Services Region.

        • Endpoint (string) –

          The endpoint for the source Amazon Web Services Region endpoint.

        • Status (string) –

          The status of the source Amazon Web Services Region.

        • SupportsDBInstanceAutomatedBackupsReplication (boolean) –

          Whether the source Amazon Web Services Region supports replicating automated backups to the current Amazon Web Services Region.

Examples

To list the AWS regions where a Read Replica can be created.

response = client.describe_source_regions(
)

print(response)

Expected Output:

{
    'SourceRegions': [
        {
            'Endpoint': 'https://rds.ap-northeast-1.amazonaws.com',
            'RegionName': 'ap-northeast-1',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.ap-northeast-2.amazonaws.com',
            'RegionName': 'ap-northeast-2',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.ap-south-1.amazonaws.com',
            'RegionName': 'ap-south-1',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.ap-southeast-1.amazonaws.com',
            'RegionName': 'ap-southeast-1',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.ap-southeast-2.amazonaws.com',
            'RegionName': 'ap-southeast-2',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.eu-central-1.amazonaws.com',
            'RegionName': 'eu-central-1',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.eu-west-1.amazonaws.com',
            'RegionName': 'eu-west-1',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.sa-east-1.amazonaws.com',
            'RegionName': 'sa-east-1',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.us-west-1.amazonaws.com',
            'RegionName': 'us-west-1',
            'Status': 'available',
        },
        {
            'Endpoint': 'https://rds.us-west-2.amazonaws.com',
            'RegionName': 'us-west-2',
            'Status': 'available',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}