Remove the association between one or more DBProxyTarget data structures and a DBProxyTargetGroup.
Parameters:
-
db_proxy_name
(Optional[DBProxyName], default:
None
)
–
The identifier of the DBProxy that is associated with the DBProxyTargetGroup.
-
target_group_name
(Optional[DBProxyTargetGroupName], default:
None
)
–
The identifier of the DBProxyTargetGroup.
-
db_instance_identifiers
(Optional[StringList], default:
None
)
–
One or more DB instance identifiers.
-
db_cluster_identifiers
(Optional[StringList], default:
None
)
–
One or more DB cluster identifiers.
Raises:
-
DBProxyNotFoundFault
–
The specified proxy name doesn't correspond to a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.
-
DBProxyTargetGroupNotFoundFault
–
The specified target group isn't available for a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.
-
DBProxyTargetNotFoundFault
–
The specified RDS DB instance or Aurora DB cluster isn't available for a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.
-
InvalidDBProxyStateFault
–
The requested operation can't be performed while the proxy is in this state.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_rds/_services/rds.py
| def deregister_db_proxy_targets(
self,
*,
config_overrides: Optional[RDSClientConfig] = None,
db_proxy_name: Optional["capo_rds.types.db_proxy_name.DBProxyName"] = None,
target_group_name: Optional[
"capo_rds.types.db_proxy_target_group_name.DBProxyTargetGroupName"
] = None,
db_instance_identifiers: Optional[
"capo_rds.types.string_list.StringList"
] = None,
db_cluster_identifiers: Optional[
"capo_rds.types.string_list.StringList"
] = None,
) -> "capo_rds.types.deregister_db_proxy_targets_response.DeregisterDBProxyTargetsResponse":
"""<p>Remove the association between one or more <code>DBProxyTarget</code> data structures and a <code>DBProxyTargetGroup</code>.</p>
Args:
db_proxy_name: <p>The identifier of the <code>DBProxy</code> that is associated with the <code>DBProxyTargetGroup</code>.</p>
target_group_name: <p>The identifier of the <code>DBProxyTargetGroup</code>.</p>
db_instance_identifiers: <p>One or more DB instance identifiers.</p>
db_cluster_identifiers: <p>One or more DB cluster identifiers.</p>
Raises:
capo_rds.errors.db_proxy_not_found_fault.DBProxyNotFoundFault: <p>The specified proxy name doesn't correspond to a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.</p>
capo_rds.errors.db_proxy_target_group_not_found_fault.DBProxyTargetGroupNotFoundFault: <p>The specified target group isn't available for a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.</p>
capo_rds.errors.db_proxy_target_not_found_fault.DBProxyTargetNotFoundFault: <p>The specified RDS DB instance or Aurora DB cluster isn't available for a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.</p>
capo_rds.errors.invalid_db_proxy_state_fault.InvalidDBProxyStateFault: <p>The requested operation can't be performed while the proxy is in this state.</p>
capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_rds.types.deregister_db_proxy_targets_request.DeregisterDBProxyTargetsRequest]",
) -> OperationResponse[
"capo_rds.types.deregister_db_proxy_targets_response.DeregisterDBProxyTargetsResponse"
]:
import capo_rds._operations.amazon_rd_sv19.deregister_db_proxy_targets
output, http_response = (
capo_rds._operations.amazon_rd_sv19.deregister_db_proxy_targets.deregister_db_proxy_targets(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeregisterDBProxyTargets")
)
input_: capo_rds.types.deregister_db_proxy_targets_request.DeregisterDBProxyTargetsRequest = {}
if db_proxy_name is not None:
input_["db_proxy_name"] = db_proxy_name
if target_group_name is not None:
input_["target_group_name"] = target_group_name
if db_instance_identifiers is not None:
input_["db_instance_identifiers"] = db_instance_identifiers
if db_cluster_identifiers is not None:
input_["db_cluster_identifiers"] = db_cluster_identifiers
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|