Skip to content

update_contact_flow_content async

update_contact_flow_content(
    instance_id: InstanceId,
    contact_flow_id: ContactFlowId,
    content: ContactFlowContent,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
) -> UpdateContactFlowContentResponse

Updates the specified flow.

You can also create and update flows using the Connect Customer Flow language.

Use the $SAVED alias in the request to describe the SAVED content of a Flow. For example, arn:aws:.../contact-flow/{id}:$SAVED. After a flow is published, $SAVED needs to be supplied to view saved content that has not been published.

Parameters:

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def update_contact_flow_content(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    contact_flow_id: "capo_connect.types.contact_flow_id.ContactFlowId",
    content: "capo_connect.types.contact_flow_content.ContactFlowContent",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
) -> "capo_connect.types.update_contact_flow_content_response.UpdateContactFlowContentResponse":
    """<p>Updates the specified flow.</p> <p>You can also create and update flows using the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/flow-language.html">Connect Customer Flow language</a>.</p> <p>Use the <code>$SAVED</code> alias in the request to describe the <code>SAVED</code> content of a Flow. For example, <code>arn:aws:.../contact-flow/{id}:$SAVED</code>. After a flow is published, <code>$SAVED</code> needs to be supplied to view saved content that has not been published.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance.</p>
        contact_flow_id: <p>The identifier of the flow.</p>
        content: <p>The JSON string that represents the content of the flow. For an example, see <a href="https://docs.aws.amazon.com/connect/latest/APIReference/flow-language-example.html">Example flow in Connect Customer Flow language</a>. </p> <p>Length Constraints: Minimum length of 1. Maximum length of 256000.</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_contact_flow_exception.InvalidContactFlowException: <p>The flow is not valid.</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_contact_flow_content_request.UpdateContactFlowContentRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.update_contact_flow_content_response.UpdateContactFlowContentResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.update_contact_flow_content

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateContactFlowContent")
    )
    input_: capo_connect.types.update_contact_flow_content_request.UpdateContactFlowContentRequest = {
        "instance_id": instance_id,
        "contact_flow_id": contact_flow_id,
        "content": content,
    }

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