CreateTrafficDistributionGroupCommand

Creates a traffic distribution group given an Amazon Connect instance that has been replicated.

The SignInConfig distribution is available only on a default TrafficDistributionGroup (see the IsDefault parameter in the TrafficDistributionGroup  data type). If you call UpdateTrafficDistribution with a modified SignInConfig and a non-default TrafficDistributionGroup, an InvalidRequestException is returned.

For more information about creating traffic distribution groups, see Set up traffic distribution groups  in the Amazon Connect Administrator Guide.

Example Syntax

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

import { ConnectClient, CreateTrafficDistributionGroupCommand } from "@aws-sdk/client-connect"; // ES Modules import
// const { ConnectClient, CreateTrafficDistributionGroupCommand } = require("@aws-sdk/client-connect"); // CommonJS import
const client = new ConnectClient(config);
const input = { // CreateTrafficDistributionGroupRequest
  Name: "STRING_VALUE", // required
  Description: "STRING_VALUE",
  InstanceId: "STRING_VALUE", // required
  ClientToken: "STRING_VALUE",
  Tags: { // TagMap
    "<keys>": "STRING_VALUE",
  },
};
const command = new CreateTrafficDistributionGroupCommand(input);
const response = await client.send(command);
// { // CreateTrafficDistributionGroupResponse
//   Id: "STRING_VALUE",
//   Arn: "STRING_VALUE",
// };

CreateTrafficDistributionGroupCommand Input

Parameter
Type
Description
InstanceId
Required
string | undefined

The identifier of the Amazon Connect instance that has been replicated. You can find the instanceId in the ARN of the instance.

Name
Required
string | undefined

The name for the traffic distribution group.

ClientToken
string | undefined

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .

Description
string | undefined

A description for the traffic distribution group.

Tags
Record<string, string> | undefined

The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

CreateTrafficDistributionGroupCommand Output

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

The Amazon Resource Name (ARN) of the traffic distribution group.

Id
string | undefined

The identifier of the traffic distribution group. This can be the ID or the ARN of the traffic distribution group.

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.

InvalidRequestException
client

The request is not valid.

ResourceConflictException
client

A resource already has that name.

ResourceNotFoundException
client

The specified resource was not found.

ResourceNotReadyException
client

The resource is not ready.

ServiceQuotaExceededException
client

The service quota has been exceeded.

ThrottlingException
client

The throttling limit has been exceeded.

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