Skip to content

update_flywheel async

update_flywheel(
    flywheel_arn: ComprehendFlywheelArn,
    *,
    config_overrides: Optional[AsyncComprehendClientConfig] = None,
    active_model_arn: Optional[ComprehendModelArn] = None,
    data_access_role_arn: Optional[IamRoleArn] = None,
    data_security_config: Optional[UpdateDataSecurityConfig] = None,
) -> UpdateFlywheelResponse

Update the configuration information for an existing flywheel.

Parameters:

  • flywheel_arn (ComprehendFlywheelArn) –

    The Amazon Resource Number (ARN) of the flywheel to update.

  • active_model_arn (Optional[ComprehendModelArn], default: None ) –

    The Amazon Resource Number (ARN) of the active model version.

  • data_access_role_arn (Optional[IamRoleArn], default: None ) –

    The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.

  • data_security_config (Optional[UpdateDataSecurityConfig], default: None ) –

    Flywheel data security configuration.

Raises:

Source code in docs_src/capo_comprehend/_services/async_comprehend.py
async def update_flywheel(
    self,
    flywheel_arn: "capo_comprehend.types.comprehend_flywheel_arn.ComprehendFlywheelArn",
    *,
    config_overrides: Optional[AsyncComprehendClientConfig] = None,
    active_model_arn: Optional[
        "capo_comprehend.types.comprehend_model_arn.ComprehendModelArn"
    ] = None,
    data_access_role_arn: Optional[
        "capo_comprehend.types.iam_role_arn.IamRoleArn"
    ] = None,
    data_security_config: Optional[
        "capo_comprehend.types.update_data_security_config.UpdateDataSecurityConfig"
    ] = None,
) -> "capo_comprehend.types.update_flywheel_response.UpdateFlywheelResponse":
    """<p>Update the configuration information for an existing flywheel.</p>

    Args:
        flywheel_arn: <p>The Amazon Resource Number (ARN) of the flywheel to update.</p>
        active_model_arn: <p>The Amazon Resource Number (ARN) of the active model version.</p>
        data_access_role_arn: <p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.</p>
        data_security_config: <p>Flywheel data security configuration.</p>

    Raises:
        capo_comprehend.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_comprehend.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</p>
        capo_comprehend.errors.kms_key_validation_exception.KmsKeyValidationException: <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it.</p>
        capo_comprehend.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
        capo_comprehend.errors.too_many_requests_exception.TooManyRequestsException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_comprehend.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_comprehend.types.update_flywheel_request.UpdateFlywheelRequest]",
    ) -> AsyncOperationResponse[
        "capo_comprehend.types.update_flywheel_response.UpdateFlywheelResponse"
    ]:
        import capo_comprehend._operations.comprehend_20171127.update_flywheel

        (
            output,
            http_response,
        ) = await capo_comprehend._operations.comprehend_20171127.update_flywheel.async_update_flywheel(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFlywheel")
    )
    input_: capo_comprehend.types.update_flywheel_request.UpdateFlywheelRequest = {
        "flywheel_arn": flywheel_arn
    }
    if active_model_arn is not None:
        input_["active_model_arn"] = active_model_arn
    if data_access_role_arn is not None:
        input_["data_access_role_arn"] = data_access_role_arn
    if data_security_config is not None:
        input_["data_security_config"] = data_security_config

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