Skip to content

put_catalog_discovery

put_catalog_discovery(
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    mode: Optional[CatalogDiscoveryMode] = None,
) -> PutCatalogDiscoveryOutput

Turns business context and search on or off for the Glue Data Catalog in your account. Set Mode to OPTED_IN to turn it on, or to OPTED_OUT to turn it off.

A call with the mode that is already set has no effect, unless the last change failed. In that case the call runs the change again. If an earlier change is still in progress, the call fails with a ConflictException.

Parameters:

  • mode (Optional[CatalogDiscoveryMode], default: None ) –

    The catalog discovery mode to set. Valid values are OPTED_IN and OPTED_OUT. This field is required.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def put_catalog_discovery(
    self,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    mode: Optional[
        "capo_glue.types.catalog_discovery_mode.CatalogDiscoveryMode"
    ] = None,
) -> "capo_glue.types.put_catalog_discovery_output.PutCatalogDiscoveryOutput":
    """<p>Turns business context and search on or off for the Glue Data Catalog in your account. Set <code>Mode</code> to <code>OPTED_IN</code> to turn it on, or to <code>OPTED_OUT</code> to turn it off.</p> <p>A call with the mode that is already set has no effect, unless the last change failed. In that case the call runs the change again. If an earlier change is still in progress, the call fails with a <code>ConflictException</code>.</p>

    Args:
        mode: <p>The catalog discovery mode to set. Valid values are <code>OPTED_IN</code> and <code>OPTED_OUT</code>. This field is required.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.conflict_exception.ConflictException: <p>The <code>CreatePartitions</code> API was called on a table that has indexes enabled. </p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.throttling_exception.ThrottlingException: <p>The throttling threshhold was exceeded.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.put_catalog_discovery_input.PutCatalogDiscoveryInput]",
    ) -> OperationResponse[
        "capo_glue.types.put_catalog_discovery_output.PutCatalogDiscoveryOutput"
    ]:
        import capo_glue._operations.aws_glue.put_catalog_discovery

        output, http_response = (
            capo_glue._operations.aws_glue.put_catalog_discovery.put_catalog_discovery(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutCatalogDiscovery")
    )
    input_: capo_glue.types.put_catalog_discovery_input.PutCatalogDiscoveryInput = {}
    if mode is not None:
        input_["mode"] = mode

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output