Skip to content

invoke_data_automation_library_ingestion_job

invoke_data_automation_library_ingestion_job(
    library_arn: DataAutomationLibraryArn,
    input_configuration: InputConfiguration,
    entity_type: EntityType,
    operation_type: LibraryIngestionJobOperationType,
    output_configuration: OutputConfiguration,
    *,
    config_overrides: Optional[BedrockDataAutomationClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    notification_configuration: Optional[NotificationConfiguration] = None,
    tags: Optional[TagList] = None,
) -> InvokeDataAutomationLibraryIngestionJobResponse

Async API: Invoke data automation library ingestion job

Parameters:

Raises:

Source code in docs_src/capo_bedrock_data_automation/_services/bedrock_data_automation.py
def invoke_data_automation_library_ingestion_job(
    self,
    library_arn: "capo_bedrock_data_automation.types.data_automation_library_arn.DataAutomationLibraryArn",
    input_configuration: "capo_bedrock_data_automation.types.input_configuration.InputConfiguration",
    entity_type: "capo_bedrock_data_automation.types.entity_type.EntityType",
    operation_type: "capo_bedrock_data_automation.types.library_ingestion_job_operation_type.LibraryIngestionJobOperationType",
    output_configuration: "capo_bedrock_data_automation.types.output_configuration.OutputConfiguration",
    *,
    config_overrides: Optional[BedrockDataAutomationClientConfig] = None,
    client_token: Optional[
        "capo_bedrock_data_automation.types.client_token.ClientToken"
    ] = None,
    notification_configuration: Optional[
        "capo_bedrock_data_automation.types.notification_configuration.NotificationConfiguration"
    ] = None,
    tags: Optional["capo_bedrock_data_automation.types.tag_list.TagList"] = None,
) -> "capo_bedrock_data_automation.types.invoke_data_automation_library_ingestion_job_response.InvokeDataAutomationLibraryIngestionJobResponse":
    """Async API: Invoke data automation library ingestion job

    Args:
        library_arn: ARN generated at the server side when a DataAutomationLibrary is created
        client_token: Idempotency token
        input_configuration: Input configuration of DataAutomationLibraryIngestionJob request
        entity_type: The entity type for which DataAutomationLibraryIngestionJob is being run
        operation_type: The operation to be performed by DataAutomationLibraryIngestionJob
        output_configuration: Output configuration of DataAutomationLibraryIngestionJob
        notification_configuration: Notification configuration.
        tags: List of tags

    Raises:
        capo_bedrock_data_automation.errors.access_denied_exception.AccessDeniedException: This exception is thrown when a request is denied per access permissions
        capo_bedrock_data_automation.errors.conflict_exception.ConflictException: This exception is thrown when there is a conflict performing an operation
        capo_bedrock_data_automation.errors.internal_server_exception.InternalServerException: This exception is thrown if there was an unexpected error during processing of request
        capo_bedrock_data_automation.errors.resource_not_found_exception.ResourceNotFoundException: This exception is thrown when a resource referenced by the operation does not exist
        capo_bedrock_data_automation.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: This exception is thrown when a request is made beyond the service quota
        capo_bedrock_data_automation.errors.throttling_exception.ThrottlingException: This exception is thrown when the number of requests exceeds the limit
        capo_bedrock_data_automation.errors.validation_exception.ValidationException: This exception is thrown when the request's input validation fails
        capo_bedrock_data_automation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_bedrock_data_automation.types.invoke_data_automation_library_ingestion_job_request.InvokeDataAutomationLibraryIngestionJobRequest]",
    ) -> OperationResponse[
        "capo_bedrock_data_automation.types.invoke_data_automation_library_ingestion_job_response.InvokeDataAutomationLibraryIngestionJobResponse"
    ]:
        import capo_bedrock_data_automation._operations.amazon_bedrock_keystone_build_time_service.invoke_data_automation_library_ingestion_job

        output, http_response = (
            capo_bedrock_data_automation._operations.amazon_bedrock_keystone_build_time_service.invoke_data_automation_library_ingestion_job.invoke_data_automation_library_ingestion_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_bedrock_data_automation.types.invoke_data_automation_library_ingestion_job_request.InvokeDataAutomationLibraryIngestionJobRequest",
    ) -> dict[str, Any]:
        import capo_bedrock_data_automation.types.invoke_data_automation_library_ingestion_job_request

        return capo_bedrock_data_automation.types.invoke_data_automation_library_ingestion_job_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "InvokeDataAutomationLibraryIngestionJob", redact_input=_redact_input
        ),
    )
    input_: capo_bedrock_data_automation.types.invoke_data_automation_library_ingestion_job_request.InvokeDataAutomationLibraryIngestionJobRequest = {
        "library_arn": library_arn,
        "input_configuration": input_configuration,
        "entity_type": entity_type,
        "operation_type": operation_type,
        "output_configuration": output_configuration,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if notification_configuration is not None:
        input_["notification_configuration"] = notification_configuration
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output