Skip to content

update_parallel_data async

update_parallel_data(
    name: ResourceName,
    parallel_data_config: ParallelDataConfig,
    client_token: ClientTokenString,
    *,
    config_overrides: Optional[AsyncTranslateClientConfig] = None,
    description: Optional[Description] = None,
) -> UpdateParallelDataResponse

Updates a previously created parallel data resource by importing a new input file from Amazon S3.

Parameters:

  • name (ResourceName) –

    The name of the parallel data resource being updated.

  • description (Optional[Description], default: None ) –

    A custom description for the parallel data resource in Amazon Translate.

  • parallel_data_config (ParallelDataConfig) –

    Specifies the format and S3 location of the parallel data input file.

  • client_token (ClientTokenString) –

    A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK.

Raises:

  • ConcurrentModificationException –

    Another modification is being made. That modification must complete before you can make your change.

  • ConflictException –

    There was a conflict processing the request. Try your request again.

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • InvalidParameterValueException –

    The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation.

  • InvalidRequestException –

    The request that you made is not valid. Check your request to determine why it's not valid and then retry the request.

  • LimitExceededException –

    The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit.

  • ResourceNotFoundException –

    The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request.

  • TooManyRequestsException –

    You have made too many requests within a short period of time. Wait for a short time and then try your request again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_translate/_services/async_translate.py
async def update_parallel_data(
    self,
    name: "capo_translate.types.resource_name.ResourceName",
    parallel_data_config: "capo_translate.types.parallel_data_config.ParallelDataConfig",
    client_token: "capo_translate.types.client_token_string.ClientTokenString",
    *,
    config_overrides: Optional[AsyncTranslateClientConfig] = None,
    description: Optional["capo_translate.types.description.Description"] = None,
) -> (
    "capo_translate.types.update_parallel_data_response.UpdateParallelDataResponse"
):
    """<p>Updates a previously created parallel data resource by importing a new input file from Amazon S3.</p>

    Args:
        name: <p>The name of the parallel data resource being updated.</p>
        description: <p>A custom description for the parallel data resource in Amazon Translate.</p>
        parallel_data_config: <p>Specifies the format and S3 location of the parallel data input file.</p>
        client_token: <p>A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK.</p>

    Raises:
        capo_translate.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Another modification is being made. That modification must complete before you can make your change.</p>
        capo_translate.errors.conflict_exception.ConflictException: <p>There was a conflict processing the request. Try your request again.</p>
        capo_translate.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_translate.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation.</p>
        capo_translate.errors.invalid_request_exception.InvalidRequestException: <p> The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. </p>
        capo_translate.errors.limit_exceeded_exception.LimitExceededException: <p>The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit.</p>
        capo_translate.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request.</p>
        capo_translate.errors.too_many_requests_exception.TooManyRequestsException: <p> You have made too many requests within a short period of time. Wait for a short time and then try your request again.</p>
        capo_translate.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_translate.types.update_parallel_data_request.UpdateParallelDataRequest]",
    ) -> AsyncOperationResponse[
        "capo_translate.types.update_parallel_data_response.UpdateParallelDataResponse"
    ]:
        import capo_translate._operations.aws_shine_frontend_service_20170701.update_parallel_data

        (
            output,
            http_response,
        ) = await capo_translate._operations.aws_shine_frontend_service_20170701.update_parallel_data.async_update_parallel_data(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateParallelData")
    )
    input_: capo_translate.types.update_parallel_data_request.UpdateParallelDataRequest = {
        "name": name,
        "parallel_data_config": parallel_data_config,
        "client_token": client_token,
    }
    if description is not None:
        input_["description"] = description

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