Skip to content

update_extraction_definition async

update_extraction_definition(
    extraction_definition_id: ExtractionDefinitionId,
    instance_id: InstanceId,
    name: ExtractionDefinitionName,
    extraction_configuration: ExtractionConfiguration,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    display: Optional[ExtractionDefinitionDisplay] = None,
) -> UpdateExtractionDefinitionResponse

Updates an extraction definition in the specified Connect Customer instance.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field.

  • extraction_definition_id (ExtractionDefinitionId) –

    The identifier of the extraction definition to update.

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • name (ExtractionDefinitionName) –

    The name of the extraction definition.

  • extraction_configuration (ExtractionConfiguration) –

    The configuration that defines how data is extracted, including the prompt hint and not-found behavior.

  • display (Optional[ExtractionDefinitionDisplay], default: None ) –

    The display settings for the extraction definition.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def update_extraction_definition(
    self,
    extraction_definition_id: "capo_connect.types.extraction_definition_id.ExtractionDefinitionId",
    instance_id: "capo_connect.types.instance_id.InstanceId",
    name: "capo_connect.types.extraction_definition_name.ExtractionDefinitionName",
    extraction_configuration: "capo_connect.types.extraction_configuration.ExtractionConfiguration",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    client_token: Optional["capo_connect.types.client_token.ClientToken"] = None,
    display: Optional[
        "capo_connect.types.extraction_definition_display.ExtractionDefinitionDisplay"
    ] = None,
) -> "capo_connect.types.update_extraction_definition_response.UpdateExtractionDefinitionResponse":
    """<p>Updates an extraction definition in the specified Connect Customer instance.</p>

    Args:
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field.</p>
        extraction_definition_id: <p>The identifier of the extraction definition to update.</p>
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        name: <p>The name of the extraction definition.</p>
        extraction_configuration: <p>The configuration that defines how data is extracted, including the prompt hint and not-found behavior.</p>
        display: <p>The display settings for the extraction definition.</p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_conflict_exception.ResourceConflictException: <p>A resource already has that name.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.update_extraction_definition_request.UpdateExtractionDefinitionRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.update_extraction_definition_response.UpdateExtractionDefinitionResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.update_extraction_definition

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.update_extraction_definition.async_update_extraction_definition(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateExtractionDefinition")
    )
    input_: capo_connect.types.update_extraction_definition_request.UpdateExtractionDefinitionRequest = {
        "extraction_definition_id": extraction_definition_id,
        "instance_id": instance_id,
        "name": name,
        "extraction_configuration": extraction_configuration,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if display is not None:
        input_["display"] = display

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