CreateContactFlowVersionCommand

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. This API only supports creating versions for flows of type Campaign.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ConnectClient, CreateContactFlowVersionCommand } from "@aws-sdk/client-connect"; // ES Modules import
// const { ConnectClient, CreateContactFlowVersionCommand } = require("@aws-sdk/client-connect"); // CommonJS import
const client = new ConnectClient(config);
const input = { // CreateContactFlowVersionRequest
  InstanceId: "STRING_VALUE", // required
  Description: "STRING_VALUE",
  ContactFlowId: "STRING_VALUE", // required
  FlowContentSha256: "STRING_VALUE",
  ContactFlowVersion: Number("long"),
  LastModifiedTime: new Date("TIMESTAMP"),
  LastModifiedRegion: "STRING_VALUE",
};
const command = new CreateContactFlowVersionCommand(input);
const response = await client.send(command);
// { // CreateContactFlowVersionResponse
//   ContactFlowArn: "STRING_VALUE",
//   Version: Number("long"),
// };

CreateContactFlowVersionCommand Input

Parameter
Type
Description
ContactFlowId
Required
string | undefined

The identifier of the flow.

InstanceId
Required
string | undefined

The identifier of the Amazon Connect instance.

ContactFlowVersion
number | undefined

The identifier of the flow version.

Description
string | undefined

The description of the flow version.

FlowContentSha256
string | undefined

Indicates the checksum value of the flow content.

LastModifiedRegion
string | undefined

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

LastModifiedTime
Date | undefined

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

CreateContactFlowVersionCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ContactFlowArn
string | undefined

The Amazon Resource Name (ARN) of the flow.

Version
number | undefined

The identifier of the flow version.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient permissions to perform this action.

InternalServiceException
server

Request processing failed because of an error or failure with the service.

InvalidParameterException
client

One or more of the specified parameters are not valid.

InvalidRequestException
client

The request is not valid.

LimitExceededException
client

The allowed limit for the resource has been exceeded.

ResourceNotFoundException
client

The specified resource was not found.

ThrottlingException
client

The throttling limit has been exceeded.

ConnectServiceException
Base exception class for all service exceptions from Connect service.