Skip to content

update_prompt async

update_prompt(
    instance_id: InstanceId,
    prompt_id: PromptId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    name: Optional[CommonNameLength127] = None,
    description: Optional[PromptDescription] = None,
    s3_uri: Optional[S3Uri] = None,
) -> UpdatePromptResponse

Updates a prompt.

Parameters:

  • 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.

  • prompt_id (PromptId) –

    A unique identifier for the prompt.

  • name (Optional[CommonNameLength127], default: None ) –

    The name of the prompt.

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

    A description of the prompt.

  • s3_uri (Optional[S3Uri], default: None ) –

    The URI for the S3 bucket where the prompt is stored. You can provide S3 pre-signed URLs returned by the GetPromptFile API instead of providing S3 URIs.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def update_prompt(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    prompt_id: "capo_connect.types.prompt_id.PromptId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    name: Optional[
        "capo_connect.types.common_name_length127.CommonNameLength127"
    ] = None,
    description: Optional[
        "capo_connect.types.prompt_description.PromptDescription"
    ] = None,
    s3_uri: Optional["capo_connect.types.s3_uri.S3Uri"] = None,
) -> "capo_connect.types.update_prompt_response.UpdatePromptResponse":
    """<p>Updates a prompt.</p>

    Args:
        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>
        prompt_id: <p>A unique identifier for the prompt.</p>
        name: <p>The name of the prompt.</p>
        description: <p>A description of the prompt.</p>
        s3_uri: <p>The URI for the S3 bucket where the prompt is stored. You can provide S3 pre-signed URLs returned by the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetPromptFile.html">GetPromptFile</a> API instead of providing S3 URIs.</p>

    Raises:
        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_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</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_prompt_request.UpdatePromptRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.update_prompt_response.UpdatePromptResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.update_prompt

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePrompt")
    )
    input_: capo_connect.types.update_prompt_request.UpdatePromptRequest = {
        "instance_id": instance_id,
        "prompt_id": prompt_id,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if s3_uri is not None:
        input_["s3_uri"] = s3_uri

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