Skip to content

describe_source_regions

describe_source_regions(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    region_name: Optional[String] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
    filters: Optional[FilterList] = None,
) -> SourceRegionMessage

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.

Parameters:

  • region_name (Optional[String], default: None ) –

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

    Constraints:

    • Must specify a valid Amazon Web Services Region name.

  • max_records (Optional[IntegerOptional], default: None ) –

    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 (Optional[String], default: None ) –

    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 (Optional[FilterList], default: None ) –

    This parameter isn't currently supported.

Raises:

Examples:

To describe source Regions The following example retrieves details about all source AWS Regions where the current AWS Region can create a read replica, copy a DB snapshot from, or replicate automated backups from. It also shows that automated backups can be replicated only from US West (Oregon) to the destination AWS Region, US East (N. Virginia).

>>> client.describe_source_regions(region_name='us-east-1')
Source code in docs_src/capo_rds/_services/rds.py
def describe_source_regions(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    region_name: Optional["capo_rds.types.string.String"] = None,
    max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
) -> "capo_rds.types.source_region_message.SourceRegionMessage":
    """<p>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.</p> <p>Use this operation to determine whether cross-Region features are supported between other Regions and your current Region. This operation supports pagination.</p> <p>To return information about the Regions that are enabled for your account, or all Regions, use the EC2 operation <code>DescribeRegions</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html"> DescribeRegions</a> in the <i>Amazon EC2 API Reference</i>.</p>

    Args:
        region_name: <p>The source Amazon Web Services Region name. For example, <code>us-east-1</code>.</p> <p>Constraints:</p> <ul> <li> <p>Must specify a valid Amazon Web Services Region name.</p> </li> </ul>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so you can retrieve the remaining results.</p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 100.</p>
        marker: <p>An optional pagination token provided by a previous <code>DescribeSourceRegions</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
        filters: <p>This parameter isn't currently supported.</p>

    Raises:
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe source Regions
        The following example retrieves details about all source AWS Regions where the current AWS Region can create a read replica, copy a DB snapshot from, or replicate automated backups from. It also shows that automated backups can be replicated only from US West (Oregon) to the destination AWS Region, US East (N. Virginia).

        >>> client.describe_source_regions(region_name='us-east-1')
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.describe_source_regions_message.DescribeSourceRegionsMessage]",
    ) -> OperationResponse[
        "capo_rds.types.source_region_message.SourceRegionMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_source_regions

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.describe_source_regions.describe_source_regions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeSourceRegions")
    )
    input_: capo_rds.types.describe_source_regions_message.DescribeSourceRegionsMessage = {}
    if region_name is not None:
        input_["region_name"] = region_name
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker
    if filters is not None:
        input_["filters"] = filters

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output