Skip to content

update_security async

update_security(
    cluster_arn: __string,
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    client_authentication: Optional[ClientAuthentication] = None,
    current_version: Optional[__string] = None,
    encryption_info: Optional[EncryptionInfo] = None,
) -> UpdateSecurityResponse

Updates the security settings for the cluster. You can use this operation to specify encryption and authentication on existing clusters.

Parameters:

  • client_authentication (Optional[ClientAuthentication], default: None ) –

    Includes all client authentication related information.

  • cluster_arn (__string) –

    The Amazon Resource Name (ARN) that uniquely identifies the cluster.

  • current_version (Optional[__string], default: None ) –

    The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.

  • encryption_info (Optional[EncryptionInfo], default: None ) –

    Includes all encryption-related information.

Raises:

Source code in docs_src/capo_kafka/_services/async_kafka.py
async def update_security(
    self,
    cluster_arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    client_authentication: Optional[
        "capo_kafka.types.client_authentication.ClientAuthentication"
    ] = None,
    current_version: Optional["capo_kafka.types.__string.__string"] = None,
    encryption_info: Optional[
        "capo_kafka.types.encryption_info.EncryptionInfo"
    ] = None,
) -> "capo_kafka.types.update_security_response.UpdateSecurityResponse":
    """<p>Updates the security settings for the cluster. You can use this operation to specify encryption and authentication on existing clusters.</p>

    Args:
        client_authentication: <p>Includes all client authentication related information.</p>
        cluster_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
        current_version: <p>The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.</p>
        encryption_info: <p>Includes all encryption-related information.</p>

    Raises:
        capo_kafka.errors.bad_request_exception.BadRequestException: <p>Returns information about an error.</p>
        capo_kafka.errors.forbidden_exception.ForbiddenException: <p>Returns information about an error.</p>
        capo_kafka.errors.internal_server_error_exception.InternalServerErrorException: <p>Returns information about an error.</p>
        capo_kafka.errors.not_found_exception.NotFoundException: <p>Returns information about an error.</p>
        capo_kafka.errors.service_unavailable_exception.ServiceUnavailableException: <p>Returns information about an error.</p>
        capo_kafka.errors.too_many_requests_exception.TooManyRequestsException: <p>Returns information about an error.</p>
        capo_kafka.errors.unauthorized_exception.UnauthorizedException: <p>Returns information about an error.</p>
        capo_kafka.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_kafka.types.update_security_request.UpdateSecurityRequest]",
    ) -> AsyncOperationResponse[
        "capo_kafka.types.update_security_response.UpdateSecurityResponse"
    ]:
        import capo_kafka._operations.kafka.update_security

        (
            output,
            http_response,
        ) = await capo_kafka._operations.kafka.update_security.async_update_security(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSecurity")
    )
    input_: capo_kafka.types.update_security_request.UpdateSecurityRequest = {
        "cluster_arn": cluster_arn
    }
    if client_authentication is not None:
        input_["client_authentication"] = client_authentication
    if current_version is not None:
        input_["current_version"] = current_version
    if encryption_info is not None:
        input_["encryption_info"] = encryption_info

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