create_db_cluster_endpoint
¶
create_db_cluster_endpoint(
*,
config_overrides: Optional[RDSClientConfig] = 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.
>>> 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/rds.py
2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 | |