Deregisters a cluster or serverless namespace from the Amazon Web Services Glue Data Catalog.
Parameters:
-
namespace_identifier
(Optional[NamespaceIdentifierUnion], default:
None
)
–
The unique identifier of the cluster or serverless namespace that you want to deregister.
-
consumer_identifiers
(Optional[ConsumerIdentifierList], default:
None
)
–
An array containing the ID of the consumer account that you want to deregister the cluster or serverless namespace from.
Raises:
Source code in docs_src/capo_redshift/_services/redshift.py
| def deregister_namespace(
self,
*,
config_overrides: Optional[RedshiftClientConfig] = None,
namespace_identifier: Optional[
"capo_redshift.types.namespace_identifier_union.NamespaceIdentifierUnion"
] = None,
consumer_identifiers: Optional[
"capo_redshift.types.consumer_identifier_list.ConsumerIdentifierList"
] = None,
) -> "capo_redshift.types.deregister_namespace_output_message.DeregisterNamespaceOutputMessage":
"""<p>Deregisters a cluster or serverless namespace from the Amazon Web Services Glue Data Catalog.</p>
Args:
namespace_identifier: <p>The unique identifier of the cluster or serverless namespace that you want to deregister.</p>
consumer_identifiers: <p>An array containing the ID of the consumer account that you want to deregister the cluster or serverless namespace from.</p>
Raises:
capo_redshift.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster. </p>
capo_redshift.errors.invalid_cluster_state_fault.InvalidClusterStateFault: <p>The specified cluster is not in the <code>available</code> state. </p>
capo_redshift.errors.invalid_namespace_fault.InvalidNamespaceFault: <p>The namespace isn't valid because the namespace doesn't exist. Provide a valid namespace.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_redshift.types.deregister_namespace_input_message.DeregisterNamespaceInputMessage]",
) -> OperationResponse[
"capo_redshift.types.deregister_namespace_output_message.DeregisterNamespaceOutputMessage"
]:
import capo_redshift._operations.redshift_service_version20121201.deregister_namespace
output, http_response = (
capo_redshift._operations.redshift_service_version20121201.deregister_namespace.deregister_namespace(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeregisterNamespace")
)
input_: capo_redshift.types.deregister_namespace_input_message.DeregisterNamespaceInputMessage = {}
if namespace_identifier is not None:
input_["namespace_identifier"] = namespace_identifier
if consumer_identifiers is not None:
input_["consumer_identifiers"] = consumer_identifiers
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|