create_db_cluster_endpoint
async
¶
create_db_cluster_endpoint(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_cluster_identifier: Optional[String] = None,
db_cluster_endpoint_identifier: Optional[String] = None,
endpoint_type: Optional[String] = None,
static_members: Optional[StringList] = None,
excluded_members: Optional[StringList] = None,
tags: Optional[TagList] = None,
) -> DBClusterEndpoint
Creates a new custom endpoint and associates it with an Amazon Aurora DB cluster.
This action applies only to Aurora DB clusters.
Parameters:
-
db_cluster_identifier(Optional[String], default:None) –The DB cluster identifier of the DB cluster associated with the endpoint. This parameter is stored as a lowercase string.
-
db_cluster_endpoint_identifier(Optional[String], default:None) –The identifier to use for the new endpoint. This parameter is stored as a lowercase string.
-
endpoint_type(Optional[String], default:None) –The type of the endpoint, one of:
READER,WRITER,ANY. -
static_members(Optional[StringList], default:None) –List of DB instance identifiers that are part of the custom endpoint group.
-
excluded_members(Optional[StringList], default:None) –List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. This parameter is relevant only if the list of static members is empty.
-
tags(Optional[TagList], default:None) –The tags to be assigned to the Amazon RDS resource.
Raises:
-
DBClusterEndpointAlreadyExistsFault–The specified custom endpoint can't be created because it already exists.
-
DBClusterEndpointQuotaExceededFault–The cluster already has the maximum number of custom endpoints.
-
DBClusterNotFoundFault–DBClusterIdentifierdoesn't refer to an existing DB cluster. -
DBInstanceNotFoundFault–DBInstanceIdentifierdoesn't refer to an existing DB instance. -
InvalidDBClusterStateFault–The requested operation can't be performed while the cluster is in this state.
-
InvalidDBInstanceStateFault–The DB instance isn't in a valid state.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a custom DB cluster endpoint The following example creates a custom DB cluster endpoint and associate it with the specified Aurora DB cluster.
>>> await client.create_db_cluster_endpoint(db_cluster_identifier='mydbcluster', db_cluster_endpoint_identifier='mycustomendpoint', endpoint_type='reader', static_members=['dbinstance1', 'dbinstance2'])
Source code in docs_src/capo_rds/_services/async_rds.py
2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 | |