Skip to content

create_job async

create_job(
    details: RequestDetails,
    type: Type,
    *,
    config_overrides: Optional[AsyncDataExchangeClientConfig] = None,
    asset_configuration: Optional[AssetConfiguration] = None,
) -> CreateJobResponse

This operation creates a job.

Parameters:

  • asset_configuration (Optional[AssetConfiguration], default: None ) –

    The configuration for the asset, including tags to be applied to assets created by the job.

  • details (RequestDetails) –

    The details for the CreateJob request.

  • type (Type) –

    The type of job to be created.

Raises:

Source code in docs_src/capo_dataexchange/_services/async_data_exchange.py
async def create_job(
    self,
    details: "capo_dataexchange.types.request_details.RequestDetails",
    type: "capo_dataexchange.types.type.Type",
    *,
    config_overrides: Optional[AsyncDataExchangeClientConfig] = None,
    asset_configuration: Optional[
        "capo_dataexchange.types.asset_configuration.AssetConfiguration"
    ] = None,
) -> "capo_dataexchange.types.create_job_response.CreateJobResponse":
    """<p>This operation creates a job.</p>

    Args:
        asset_configuration: <p>The configuration for the asset, including tags to be applied to assets created by the job.</p>
        details: <p>The details for the CreateJob request.</p>
        type: <p>The type of job to be created.</p>

    Raises:
        capo_dataexchange.errors.access_denied_exception.AccessDeniedException: <p>Access to the resource is denied.</p>
        capo_dataexchange.errors.conflict_exception.ConflictException: <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
        capo_dataexchange.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
        capo_dataexchange.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
        capo_dataexchange.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_dataexchange.errors.validation_exception.ValidationException: <p>The request was invalid.</p>
        capo_dataexchange.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_dataexchange.types.create_job_request.CreateJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_dataexchange.types.create_job_response.CreateJobResponse"
    ]:
        import capo_dataexchange._operations.data_exchange.create_job

        (
            output,
            http_response,
        ) = await capo_dataexchange._operations.data_exchange.create_job.async_create_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateJob")
    )
    input_: capo_dataexchange.types.create_job_request.CreateJobRequest = {
        "details": details,
        "type": type,
    }
    if asset_configuration is not None:
        input_["asset_configuration"] = asset_configuration

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