Skip to content

describe_replication_groups

describe_replication_groups(
    *,
    config_overrides: Optional[ElastiCacheClientConfig] = None,
    replication_group_id: Optional[String] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> ReplicationGroupMessage

Returns information about a particular replication group. If no identifier is specified, DescribeReplicationGroups returns information about all replication groups.

This operation is valid for Valkey or Redis OSS only.

Parameters:

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

    The identifier for the replication group to be described. This parameter is not case sensitive.

    If you do not specify this parameter, information about all replication groups is returned.

  • 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 marker is included in the response so that the remaining results can be retrieved.

    Default: 100

    Constraints: minimum 20; maximum 100.

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

    An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Raises:

Examples:

DescribeReplicationGroups Returns information about the replication group myreplgroup.

>>> client.describe_replication_groups()
Source code in docs_src/capo_elasticache/_services/elasti_cache.py
def describe_replication_groups(
    self,
    *,
    config_overrides: Optional[ElastiCacheClientConfig] = None,
    replication_group_id: Optional["capo_elasticache.types.string.String"] = None,
    max_records: Optional[
        "capo_elasticache.types.integer_optional.IntegerOptional"
    ] = None,
    marker: Optional["capo_elasticache.types.string.String"] = None,
) -> "capo_elasticache.types.replication_group_message.ReplicationGroupMessage":
    """<p>Returns information about a particular replication group. If no identifier is specified, <code>DescribeReplicationGroups</code> returns information about all replication groups.</p> <note> <p>This operation is valid for Valkey or Redis OSS only.</p> </note>

    Args:
        replication_group_id: <p>The identifier for the replication group to be described. This parameter is not case sensitive.</p> <p>If you do not specify this parameter, information about all replication groups is returned.</p>
        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 marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
        marker: <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>

    Raises:
        capo_elasticache.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more incompatible parameters were specified.</p>
        capo_elasticache.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value for a parameter is invalid.</p>
        capo_elasticache.errors.replication_group_not_found_fault.ReplicationGroupNotFoundFault: <p>The specified replication group does not exist.</p>
        capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        DescribeReplicationGroups
        Returns information about the replication group myreplgroup.

        >>> client.describe_replication_groups()
    """

    def _handler(
        req: "OperationRequest[capo_elasticache.types.describe_replication_groups_message.DescribeReplicationGroupsMessage]",
    ) -> OperationResponse[
        "capo_elasticache.types.replication_group_message.ReplicationGroupMessage"
    ]:
        import capo_elasticache._operations.amazon_elasti_cache_v9.describe_replication_groups

        output, http_response = (
            capo_elasticache._operations.amazon_elasti_cache_v9.describe_replication_groups.describe_replication_groups(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeReplicationGroups")
    )
    input_: capo_elasticache.types.describe_replication_groups_message.DescribeReplicationGroupsMessage = {}
    if replication_group_id is not None:
        input_["replication_group_id"] = replication_group_id
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker

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