Skip to content

create_contact_flow_version

create_contact_flow_version(
    instance_id: InstanceId,
    contact_flow_id: ARN,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    description: Optional[ContactFlowDescription] = None,
    flow_content_sha256: Optional[FlowContentSha256] = None,
    contact_flow_version: Optional[ResourceVersion] = None,
    last_modified_time: Optional[Timestamp] = None,
    last_modified_region: Optional[RegionName] = None,
) -> CreateContactFlowVersionResponse

Publishes a new version of the flow provided. Versions are immutable and monotonically increasing. If the FlowContentSha256 provided is different from the FlowContentSha256 of the $LATEST published flow content, then an error is returned.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance.

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

    The description of the flow version.

  • contact_flow_id (ARN) –

    The identifier of the flow.

  • flow_content_sha256 (Optional[FlowContentSha256], default: None ) –

    Indicates the checksum value of the flow content.

  • contact_flow_version (Optional[ResourceVersion], default: None ) –

    The identifier of the flow version.

  • last_modified_time (Optional[Timestamp], default: None ) –

    The Amazon Web Services Region where this resource was last modified.

  • last_modified_region (Optional[RegionName], default: None ) –

    The Amazon Web Services Region where this resource was last modified.

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def create_contact_flow_version(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    contact_flow_id: "capo_connect.types.arn.ARN",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    description: Optional[
        "capo_connect.types.contact_flow_description.ContactFlowDescription"
    ] = None,
    flow_content_sha256: Optional[
        "capo_connect.types.flow_content_sha256.FlowContentSha256"
    ] = None,
    contact_flow_version: Optional[
        "capo_connect.types.resource_version.ResourceVersion"
    ] = None,
    last_modified_time: Optional["capo_connect.types.timestamp.Timestamp"] = None,
    last_modified_region: Optional[
        "capo_connect.types.region_name.RegionName"
    ] = None,
) -> "capo_connect.types.create_contact_flow_version_response.CreateContactFlowVersionResponse":
    """<p>Publishes a new version of the flow provided. Versions are immutable and monotonically increasing. If the <code>FlowContentSha256</code> provided is different from the <code>FlowContentSha256</code> of the <code>$LATEST</code> published flow content, then an error is returned.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance.</p>
        description: <p>The description of the flow version.</p>
        contact_flow_id: <p>The identifier of the flow.</p>
        flow_content_sha256: <p>Indicates the checksum value of the flow content.</p>
        contact_flow_version: <p>The identifier of the flow version.</p>
        last_modified_time: <p>The Amazon Web Services Region where this resource was last modified.</p>
        last_modified_region: <p>The Amazon Web Services Region where this resource was last modified.</p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        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.limit_exceeded_exception.LimitExceededException: <p>The allowed limit for the resource has been exceeded.</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.
    """

    def _handler(
        req: "OperationRequest[capo_connect.types.create_contact_flow_version_request.CreateContactFlowVersionRequest]",
    ) -> OperationResponse[
        "capo_connect.types.create_contact_flow_version_response.CreateContactFlowVersionResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.create_contact_flow_version

        output, http_response = (
            capo_connect._operations.amazon_connect_service.create_contact_flow_version.create_contact_flow_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateContactFlowVersion")
    )
    input_: capo_connect.types.create_contact_flow_version_request.CreateContactFlowVersionRequest = {
        "instance_id": instance_id,
        "contact_flow_id": contact_flow_id,
    }
    if description is not None:
        input_["description"] = description
    if flow_content_sha256 is not None:
        input_["flow_content_sha256"] = flow_content_sha256
    if contact_flow_version is not None:
        input_["contact_flow_version"] = contact_flow_version
    if last_modified_time is not None:
        input_["last_modified_time"] = last_modified_time
    if last_modified_region is not None:
        input_["last_modified_region"] = last_modified_region

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