Skip to content

put_data_catalog_encryption_settings async

put_data_catalog_encryption_settings(
    data_catalog_encryption_settings: DataCatalogEncryptionSettings,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
) -> PutDataCatalogEncryptionSettingsResponse

Sets the security configuration for a specified catalog. After the configuration has been set, the specified encryption is applied to every catalog write thereafter.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The ID of the Data Catalog to set the security configuration for. If none is provided, the Amazon Web Services account ID is used by default.

  • data_catalog_encryption_settings (DataCatalogEncryptionSettings) –

    The security configuration to set.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def put_data_catalog_encryption_settings(
    self,
    data_catalog_encryption_settings: "capo_glue.types.data_catalog_encryption_settings.DataCatalogEncryptionSettings",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
) -> "capo_glue.types.put_data_catalog_encryption_settings_response.PutDataCatalogEncryptionSettingsResponse":
    """<p>Sets the security configuration for a specified catalog. After the configuration has been set, the specified encryption is applied to every catalog write thereafter.</p>

    Args:
        catalog_id: <p>The ID of the Data Catalog to set the security configuration for. If none is provided, the Amazon Web Services account ID is used by default.</p>
        data_catalog_encryption_settings: <p>The security configuration to set.</p>

    Raises:
        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.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.put_data_catalog_encryption_settings_request.PutDataCatalogEncryptionSettingsRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.put_data_catalog_encryption_settings_response.PutDataCatalogEncryptionSettingsResponse"
    ]:
        import capo_glue._operations.aws_glue.put_data_catalog_encryption_settings

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.put_data_catalog_encryption_settings.async_put_data_catalog_encryption_settings(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutDataCatalogEncryptionSettings")
    )
    input_: capo_glue.types.put_data_catalog_encryption_settings_request.PutDataCatalogEncryptionSettingsRequest = {
        "data_catalog_encryption_settings": data_catalog_encryption_settings
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output