Skip to content

update_account_configuration async

update_account_configuration(
    encryption_config: EncryptionConfig,
    *,
    config_overrides: Optional[AsyncCodeGuruSecurityClientConfig] = None,
) -> UpdateAccountConfigurationResponse

Use to update the encryption configuration for an account.

Parameters:

  • encryption_config (EncryptionConfig) –

    The customer-managed KMS key ARN you want to use for encryption. If not specified, CodeGuru Security will use an AWS-managed key for encryption. If you previously specified a customer-managed KMS key and want CodeGuru Security to use an AWS-managed key for encryption instead, pass nothing.

Raises:

Source code in docs_src/capo_codeguru_security/_services/async_code_guru_security.py
async def update_account_configuration(
    self,
    encryption_config: "capo_codeguru_security.types.encryption_config.EncryptionConfig",
    *,
    config_overrides: Optional[AsyncCodeGuruSecurityClientConfig] = None,
) -> "capo_codeguru_security.types.update_account_configuration_response.UpdateAccountConfigurationResponse":
    """<p>Use to update the encryption configuration for an account.</p>

    Args:
        encryption_config: <p>The customer-managed KMS key ARN you want to use for encryption. If not specified, CodeGuru Security will use an AWS-managed key for encryption. If you previously specified a customer-managed KMS key and want CodeGuru Security to use an AWS-managed key for encryption instead, pass nothing.</p>

    Raises:
        capo_codeguru_security.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_codeguru_security.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_codeguru_security.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request was not found.</p>
        capo_codeguru_security.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_codeguru_security.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints.</p>
        capo_codeguru_security.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codeguru_security.types.update_account_configuration_request.UpdateAccountConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_codeguru_security.types.update_account_configuration_response.UpdateAccountConfigurationResponse"
    ]:
        import capo_codeguru_security._operations.aws_code_guru_security.update_account_configuration

        (
            output,
            http_response,
        ) = await capo_codeguru_security._operations.aws_code_guru_security.update_account_configuration.async_update_account_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAccountConfiguration")
    )
    input_: capo_codeguru_security.types.update_account_configuration_request.UpdateAccountConfigurationRequest = {
        "encryption_config": encryption_config
    }

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