Describes existing Amazon Aurora DB clusters and Multi-AZ DB clusters. This API supports pagination.
For more information on Amazon Aurora DB clusters, see What is Amazon Aurora? in the Amazon Aurora User Guide.
For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide.
This operation can also return information for Amazon Neptune DB instances and Amazon DocumentDB instances.
Parameters:
-
db_cluster_identifier
(Optional[String], default:
None
)
–
The user-supplied DB cluster identifier or the Amazon Resource Name (ARN) of the DB cluster. If this parameter is specified, information for only the specific DB cluster is returned. This parameter isn't case-sensitive.
Constraints:
-
filters
(Optional[FilterList], default:
None
)
–
A filter that specifies one or more DB clusters to describe.
Supported Filters:
-
clone-group-id - Accepts clone group identifiers. The results list only includes information about the DB clusters associated with these clone groups.
-
db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list only includes information about the DB clusters identified by these ARNs.
-
db-cluster-resource-id - Accepts DB cluster resource identifiers. The results list will only include information about the DB clusters identified by these DB cluster resource identifiers.
-
domain - Accepts Active Directory directory IDs. The results list only includes information about the DB clusters associated with these domains.
-
engine - Accepts engine names. The results list only includes information about the DB clusters for these engines.
-
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 DescribeDBClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
-
include_shared
(Optional[Boolean], default:
None
)
–
Specifies whether the output includes information about clusters shared from other Amazon Web Services accounts.
Raises:
Examples:
To describe a DB cluster
The following example retrieves the details of the specified DB cluster.
>>> await client.describe_db_clusters(db_cluster_identifier='mydbcluster')
To describe an Aurora DB cluster without VPC networking
The following example retrieves the details of the specified Aurora PostgreSQL DB cluster configured without VPC networking and with internet access gateway enabled. IAM database authentication is required when VPC networking is disabled and internet access gateway is enabled.
>>> await client.describe_db_clusters(db_cluster_identifier='my-vpcless-cluster')
Source code in docs_src/capo_rds/_services/async_rds.py
| async def describe_db_clusters(
self,
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_cluster_identifier: Optional["capo_rds.types.string.String"] = None,
filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
marker: Optional["capo_rds.types.string.String"] = None,
include_shared: Optional["capo_rds.types.boolean.Boolean"] = None,
) -> "capo_rds.types.db_cluster_message.DBClusterMessage":
"""<p>Describes existing Amazon Aurora DB clusters and Multi-AZ DB clusters. This API supports pagination.</p> <p>For more information on Amazon Aurora DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"> What is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide</i>.</p> <p>For more information on Multi-AZ DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html"> Multi-AZ DB cluster deployments</a> in the <i>Amazon RDS User Guide</i>.</p> <p>This operation can also return information for Amazon Neptune DB instances and Amazon DocumentDB instances.</p>
Args:
db_cluster_identifier: <p>The user-supplied DB cluster identifier or the Amazon Resource Name (ARN) of the DB cluster. If this parameter is specified, information for only the specific DB cluster is returned. This parameter isn't case-sensitive.</p> <p>Constraints:</p> <ul> <li> <p>If supplied, must match an existing DB cluster identifier.</p> </li> </ul>
filters: <p>A filter that specifies one or more DB clusters to describe.</p> <p>Supported Filters:</p> <ul> <li> <p> <code>clone-group-id</code> - Accepts clone group identifiers. The results list only includes information about the DB clusters associated with these clone groups.</p> </li> <li> <p> <code>db-cluster-id</code> - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list only includes information about the DB clusters identified by these ARNs.</p> </li> <li> <p> <code>db-cluster-resource-id</code> - Accepts DB cluster resource identifiers. The results list will only include information about the DB clusters identified by these DB cluster resource identifiers.</p> </li> <li> <p> <code>domain</code> - Accepts Active Directory directory IDs. The results list only includes information about the DB clusters associated with these domains.</p> </li> <li> <p> <code>engine</code> - Accepts engine names. The results list only includes information about the DB clusters for these engines.</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>DescribeDBClusters</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>
include_shared: <p>Specifies whether the output includes information about clusters shared from other Amazon Web Services accounts.</p>
Raises:
capo_rds.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.</p>
capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe a DB cluster
The following example retrieves the details of the specified DB cluster.
>>> await client.describe_db_clusters(db_cluster_identifier='mydbcluster')
To describe an Aurora DB cluster without VPC networking
The following example retrieves the details of the specified Aurora PostgreSQL DB cluster configured without VPC networking and with internet access gateway enabled. IAM database authentication is required when VPC networking is disabled and internet access gateway is enabled.
>>> await client.describe_db_clusters(db_cluster_identifier='my-vpcless-cluster')
"""
async def _handler(
req: "AsyncOperationRequest[capo_rds.types.describe_db_clusters_message.DescribeDBClustersMessage]",
) -> AsyncOperationResponse[
"capo_rds.types.db_cluster_message.DBClusterMessage"
]:
import capo_rds._operations.amazon_rd_sv19.describe_db_clusters
(
output,
http_response,
) = await capo_rds._operations.amazon_rd_sv19.describe_db_clusters.async_describe_db_clusters(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_rds.types.db_cluster_message.DBClusterMessage",
) -> dict[str, Any]:
import capo_rds.types.db_cluster_message
return capo_rds.types.db_cluster_message.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DescribeDBClusters", redact_output=_redact_output),
)
input_: capo_rds.types.describe_db_clusters_message.DescribeDBClustersMessage = {}
if db_cluster_identifier is not None:
input_["db_cluster_identifier"] = db_cluster_identifier
if filters is not None:
input_["filters"] = filters
if max_records is not None:
input_["max_records"] = max_records
if marker is not None:
input_["marker"] = marker
if include_shared is not None:
input_["include_shared"] = include_shared
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|