From 83abe0674847bd7e70423eabb3cf59606fcb1588 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 31 Aug 2023 19:32:29 +0000 Subject: [PATCH] feat(client-connectcampaigns): Amazon Connect outbound campaigns has launched agentless dialing mode which enables customers to make automated outbound calls without agent engagement. This release updates three of the campaign management API's to support the new agentless dialing mode and the new dialing capacity field. --- .../src/commands/CreateCampaignCommand.ts | 7 +- .../src/commands/DescribeCampaignCommand.ts | 7 +- .../UpdateCampaignDialerConfigCommand.ts | 5 + .../src/endpoint/ruleset.ts | 35 +- .../src/models/models_0.ts | 43 +- .../src/protocols/Aws_restJson1.ts | 29 + .../aws-models/connectcampaigns.json | 665 +++++++++++------- 7 files changed, 515 insertions(+), 276 deletions(-) diff --git a/clients/client-connectcampaigns/src/commands/CreateCampaignCommand.ts b/clients/client-connectcampaigns/src/commands/CreateCampaignCommand.ts index 138a2ba62ae5..cb44803301fc 100644 --- a/clients/client-connectcampaigns/src/commands/CreateCampaignCommand.ts +++ b/clients/client-connectcampaigns/src/commands/CreateCampaignCommand.ts @@ -49,15 +49,20 @@ export interface CreateCampaignCommandOutput extends CreateCampaignResponse, __M * dialerConfig: { // DialerConfig Union: only one key present * progressiveDialerConfig: { // ProgressiveDialerConfig * bandwidthAllocation: Number("double"), // required + * dialingCapacity: Number("double"), * }, * predictiveDialerConfig: { // PredictiveDialerConfig * bandwidthAllocation: Number("double"), // required + * dialingCapacity: Number("double"), + * }, + * agentlessDialerConfig: { // AgentlessDialerConfig + * dialingCapacity: Number("double"), * }, * }, * outboundCallConfig: { // OutboundCallConfig * connectContactFlowId: "STRING_VALUE", // required * connectSourcePhoneNumber: "STRING_VALUE", - * connectQueueId: "STRING_VALUE", // required + * connectQueueId: "STRING_VALUE", * answerMachineDetectionConfig: { // AnswerMachineDetectionConfig * enableAnswerMachineDetection: true || false, // required * }, diff --git a/clients/client-connectcampaigns/src/commands/DescribeCampaignCommand.ts b/clients/client-connectcampaigns/src/commands/DescribeCampaignCommand.ts index 72afbf104456..d680318f78d1 100644 --- a/clients/client-connectcampaigns/src/commands/DescribeCampaignCommand.ts +++ b/clients/client-connectcampaigns/src/commands/DescribeCampaignCommand.ts @@ -57,15 +57,20 @@ export interface DescribeCampaignCommandOutput extends DescribeCampaignResponse, * // dialerConfig: { // DialerConfig Union: only one key present * // progressiveDialerConfig: { // ProgressiveDialerConfig * // bandwidthAllocation: Number("double"), // required + * // dialingCapacity: Number("double"), * // }, * // predictiveDialerConfig: { // PredictiveDialerConfig * // bandwidthAllocation: Number("double"), // required + * // dialingCapacity: Number("double"), + * // }, + * // agentlessDialerConfig: { // AgentlessDialerConfig + * // dialingCapacity: Number("double"), * // }, * // }, * // outboundCallConfig: { // OutboundCallConfig * // connectContactFlowId: "STRING_VALUE", // required * // connectSourcePhoneNumber: "STRING_VALUE", - * // connectQueueId: "STRING_VALUE", // required + * // connectQueueId: "STRING_VALUE", * // answerMachineDetectionConfig: { // AnswerMachineDetectionConfig * // enableAnswerMachineDetection: true || false, // required * // }, diff --git a/clients/client-connectcampaigns/src/commands/UpdateCampaignDialerConfigCommand.ts b/clients/client-connectcampaigns/src/commands/UpdateCampaignDialerConfigCommand.ts index 7a3ae12c5bc6..645f4c46efac 100644 --- a/clients/client-connectcampaigns/src/commands/UpdateCampaignDialerConfigCommand.ts +++ b/clients/client-connectcampaigns/src/commands/UpdateCampaignDialerConfigCommand.ts @@ -48,9 +48,14 @@ export interface UpdateCampaignDialerConfigCommandOutput extends __MetadataBeare * dialerConfig: { // DialerConfig Union: only one key present * progressiveDialerConfig: { // ProgressiveDialerConfig * bandwidthAllocation: Number("double"), // required + * dialingCapacity: Number("double"), * }, * predictiveDialerConfig: { // PredictiveDialerConfig * bandwidthAllocation: Number("double"), // required + * dialingCapacity: Number("double"), + * }, + * agentlessDialerConfig: { // AgentlessDialerConfig + * dialingCapacity: Number("double"), * }, * }, * }; diff --git a/clients/client-connectcampaigns/src/endpoint/ruleset.ts b/clients/client-connectcampaigns/src/endpoint/ruleset.ts index daa89c674a00..cb3e7b5804f6 100644 --- a/clients/client-connectcampaigns/src/endpoint/ruleset.ts +++ b/clients/client-connectcampaigns/src/endpoint/ruleset.ts @@ -6,24 +6,25 @@ import { RuleSetObject } from "@smithy/types"; or see "smithy.rules#endpointRuleSet" in codegen/sdk-codegen/aws-models/connectcampaigns.json */ -const p="required", -q="fn", -r="argv", -s="ref"; -const a="PartitionResult", +const q="required", +r="fn", +s="argv", +t="ref"; +const a="isSet", b="tree", c="error", d="endpoint", -e={[p]:false,"type":"String"}, -f={[p]:true,"default":false,"type":"Boolean"}, -g={[s]:"Endpoint"}, -h={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]}, -i={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]}, -j={}, -k={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsFIPS"]}]}, -l={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsDualStack"]}]}, -m=[g], -n=[h], -o=[i]; -const _data={version:"1.0",parameters:{Region:e,UseDualStack:f,UseFIPS:f,Endpoint:e},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:a}],type:b,rules:[{conditions:[{[q]:"isSet",[r]:m},{[q]:"parseURL",[r]:m,assign:"url"}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:g,properties:j,headers:j},type:d}]}]},{conditions:[h,i],type:b,rules:[{conditions:[k,l],type:b,rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[k],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]}; +e="PartitionResult", +f={[q]:false,"type":"String"}, +g={[q]:true,"default":false,"type":"Boolean"}, +h={[t]:"Endpoint"}, +i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]}, +j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]}, +k={}, +l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]}, +m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]}, +n=[i], +o=[j], +p=[{[t]:"Region"}]; +const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}; export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-connectcampaigns/src/models/models_0.ts b/clients/client-connectcampaigns/src/models/models_0.ts index c7045815d024..c7cee4cd177e 100644 --- a/clients/client-connectcampaigns/src/models/models_0.ts +++ b/clients/client-connectcampaigns/src/models/models_0.ts @@ -30,6 +30,18 @@ export class AccessDeniedException extends __BaseException { } } +/** + * @public + * Agentless Dialer config + */ +export interface AgentlessDialerConfig { + /** + * @public + * Allocates dialing capacity for this campaign between multiple active campaigns + */ + dialingCapacity?: number; +} + /** * @public * The request could not be processed because of conflict in the current state of the resource. @@ -67,6 +79,12 @@ export interface PredictiveDialerConfig { * The bandwidth allocation of a queue resource. */ bandwidthAllocation: number | undefined; + + /** + * @public + * Allocates dialing capacity for this campaign between multiple active campaigns + */ + dialingCapacity?: number; } /** @@ -79,6 +97,12 @@ export interface ProgressiveDialerConfig { * The bandwidth allocation of a queue resource. */ bandwidthAllocation: number | undefined; + + /** + * @public + * Allocates dialing capacity for this campaign between multiple active campaigns + */ + dialingCapacity?: number; } /** @@ -86,6 +110,7 @@ export interface ProgressiveDialerConfig { * The possible types of dialer config parameters */ export type DialerConfig = + | DialerConfig.AgentlessDialerConfigMember | DialerConfig.PredictiveDialerConfigMember | DialerConfig.ProgressiveDialerConfigMember | DialerConfig.$UnknownMember; @@ -101,6 +126,7 @@ export namespace DialerConfig { export interface ProgressiveDialerConfigMember { progressiveDialerConfig: ProgressiveDialerConfig; predictiveDialerConfig?: never; + agentlessDialerConfig?: never; $unknown?: never; } @@ -111,6 +137,18 @@ export namespace DialerConfig { export interface PredictiveDialerConfigMember { progressiveDialerConfig?: never; predictiveDialerConfig: PredictiveDialerConfig; + agentlessDialerConfig?: never; + $unknown?: never; + } + + /** + * @public + * Agentless Dialer config + */ + export interface AgentlessDialerConfigMember { + progressiveDialerConfig?: never; + predictiveDialerConfig?: never; + agentlessDialerConfig: AgentlessDialerConfig; $unknown?: never; } @@ -120,12 +158,14 @@ export namespace DialerConfig { export interface $UnknownMember { progressiveDialerConfig?: never; predictiveDialerConfig?: never; + agentlessDialerConfig?: never; $unknown: [string, any]; } export interface Visitor { progressiveDialerConfig: (value: ProgressiveDialerConfig) => T; predictiveDialerConfig: (value: PredictiveDialerConfig) => T; + agentlessDialerConfig: (value: AgentlessDialerConfig) => T; _: (name: string, value: any) => T; } @@ -133,6 +173,7 @@ export namespace DialerConfig { if (value.progressiveDialerConfig !== undefined) return visitor.progressiveDialerConfig(value.progressiveDialerConfig); if (value.predictiveDialerConfig !== undefined) return visitor.predictiveDialerConfig(value.predictiveDialerConfig); + if (value.agentlessDialerConfig !== undefined) return visitor.agentlessDialerConfig(value.agentlessDialerConfig); return visitor._(value.$unknown[0], value.$unknown[1]); }; } @@ -170,7 +211,7 @@ export interface OutboundCallConfig { * @public * The queue for the call. If you specify a queue, the phone displayed for caller ID is the phone number specified in the queue. If you do not specify a queue, the queue defined in the contact flow is used. If you do not specify a queue, you must specify a source phone number. */ - connectQueueId: string | undefined; + connectQueueId?: string; /** * @public diff --git a/clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts b/clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts index 1e4893444de2..101821a9427a 100644 --- a/clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts +++ b/clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts @@ -77,6 +77,7 @@ import { import { ConnectCampaignsServiceException as __BaseException } from "../models/ConnectCampaignsServiceException"; import { AccessDeniedException, + AgentlessDialerConfig, AnswerMachineDetectionConfig, Campaign, CampaignFilters, @@ -2196,6 +2197,15 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; +/** + * serializeAws_restJson1AgentlessDialerConfig + */ +const se_AgentlessDialerConfig = (input: AgentlessDialerConfig, context: __SerdeContext): any => { + return take(input, { + dialingCapacity: __serializeFloat, + }); +}; + // se_AnswerMachineDetectionConfig omitted. // se_Attributes omitted. @@ -2209,6 +2219,7 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const se_DialerConfig = (input: DialerConfig, context: __SerdeContext): any => { return DialerConfig.visit(input, { + agentlessDialerConfig: (value) => ({ agentlessDialerConfig: se_AgentlessDialerConfig(value, context) }), predictiveDialerConfig: (value) => ({ predictiveDialerConfig: se_PredictiveDialerConfig(value, context) }), progressiveDialerConfig: (value) => ({ progressiveDialerConfig: se_ProgressiveDialerConfig(value, context) }), _: (name, value) => ({ name: value } as any), @@ -2250,6 +2261,7 @@ const se_DialRequestList = (input: DialRequest[], context: __SerdeContext): any const se_PredictiveDialerConfig = (input: PredictiveDialerConfig, context: __SerdeContext): any => { return take(input, { bandwidthAllocation: __serializeFloat, + dialingCapacity: __serializeFloat, }); }; @@ -2259,11 +2271,21 @@ const se_PredictiveDialerConfig = (input: PredictiveDialerConfig, context: __Ser const se_ProgressiveDialerConfig = (input: ProgressiveDialerConfig, context: __SerdeContext): any => { return take(input, { bandwidthAllocation: __serializeFloat, + dialingCapacity: __serializeFloat, }); }; // se_TagMap omitted. +/** + * deserializeAws_restJson1AgentlessDialerConfig + */ +const de_AgentlessDialerConfig = (output: any, context: __SerdeContext): AgentlessDialerConfig => { + return take(output, { + dialingCapacity: __limitedParseDouble, + }) as any; +}; + // de_AnswerMachineDetectionConfig omitted. /** @@ -2289,6 +2311,11 @@ const de_Campaign = (output: any, context: __SerdeContext): Campaign => { * deserializeAws_restJson1DialerConfig */ const de_DialerConfig = (output: any, context: __SerdeContext): DialerConfig => { + if (output.agentlessDialerConfig != null) { + return { + agentlessDialerConfig: de_AgentlessDialerConfig(output.agentlessDialerConfig, context), + }; + } if (output.predictiveDialerConfig != null) { return { predictiveDialerConfig: de_PredictiveDialerConfig(output.predictiveDialerConfig, context), @@ -2324,6 +2351,7 @@ const de_DialerConfig = (output: any, context: __SerdeContext): DialerConfig => const de_PredictiveDialerConfig = (output: any, context: __SerdeContext): PredictiveDialerConfig => { return take(output, { bandwidthAllocation: __limitedParseDouble, + dialingCapacity: __limitedParseDouble, }) as any; }; @@ -2333,6 +2361,7 @@ const de_PredictiveDialerConfig = (output: any, context: __SerdeContext): Predic const de_ProgressiveDialerConfig = (output: any, context: __SerdeContext): ProgressiveDialerConfig => { return take(output, { bandwidthAllocation: __limitedParseDouble, + dialingCapacity: __limitedParseDouble, }) as any; }; diff --git a/codegen/sdk-codegen/aws-models/connectcampaigns.json b/codegen/sdk-codegen/aws-models/connectcampaigns.json index 88b817a83fa5..7ad1d3e19b1e 100644 --- a/codegen/sdk-codegen/aws-models/connectcampaigns.json +++ b/codegen/sdk-codegen/aws-models/connectcampaigns.json @@ -23,6 +23,17 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.connectcampaigns#AgentlessDialerConfig": { + "type": "structure", + "members": { + "dialingCapacity": { + "target": "com.amazonaws.connectcampaigns#DialingCapacity" + } + }, + "traits": { + "smithy.api#documentation": "Agentless Dialer config" + } + }, "com.amazonaws.connectcampaigns#AmazonConnectCampaignService": { "type": "service", "version": "2021-01-30", @@ -104,6 +115,31 @@ "name": "connect-campaigns" }, "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "origin": "*", + "additionalAllowedHeaders": [ + "*", + "Authorization", + "Date", + "X-Amz-Date", + "X-Amz-Security-Token", + "X-Amz-Target", + "content-type", + "x-amz-content-sha256", + "x-amz-user-agent", + "x-amzn-platform-id", + "x-amzn-trace-id" + ], + "additionalExposedHeaders": [ + "x-amzn-errortype", + "x-amzn-requestid", + "x-amzn-errormessage", + "x-amzn-trace-id", + "x-amz-apigw-id", + "date" + ], + "maxAge": 86400 + }, "smithy.api#documentation": "Provide APIs to create and manage Amazon Connect Campaigns.", "smithy.api#title": "AmazonConnectCampaignService", "smithy.rules#endpointRuleSet": { @@ -140,13 +176,12 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "isSet", "argv": [ { - "ref": "Region" + "ref": "Endpoint" } - ], - "assign": "PartitionResult" + ] } ], "type": "tree", @@ -154,21 +189,69 @@ { "conditions": [ { - "fn": "isSet", + "fn": "booleanEquals", "argv": [ { - "ref": "Endpoint" - } + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ { - "fn": "parseURL", + "ref": "Region" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", "argv": [ { - "ref": "Endpoint" + "ref": "Region" } ], - "assign": "url" + "assign": "PartitionResult" } ], "type": "tree", @@ -183,13 +266,17 @@ }, true ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], "type": "tree", "rules": [ { @@ -197,143 +284,86 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ + true, { - "ref": "PartitionResult" - }, - "supportsFIPS" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } ] } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, + ], + "type": "tree", + "rules": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] + "conditions": [], + "endpoint": { + "url": "https://connect-campaigns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - } - ], - "type": "tree", - "rules": [ + }, { "conditions": [], - "endpoint": { - "url": "https://connect-campaigns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "UseFIPS" + }, + true ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], "type": "tree", "rules": [ { @@ -346,120 +376,125 @@ "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } + "ref": "UseDualStack" + }, + true ] } ], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://connect-campaigns.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, { "conditions": [], - "endpoint": { - "url": "https://connect-campaigns.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://connect-campaigns.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "endpoint": { - "url": "https://connect-campaigns.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-west-2 with FIPS enabled and DualStack enabled", + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns-fips.us-west-2.api.aws" + "url": "https://connect-campaigns.ap-southeast-2.amazonaws.com" } }, "params": { - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": true + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns-fips.us-west-2.amazonaws.com" + "url": "https://connect-campaigns.eu-west-2.amazonaws.com" } }, "params": { - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-west-2 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns.us-west-2.api.aws" + "url": "https://connect-campaigns.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -471,168 +506,251 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region eu-west-2 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://connect-campaigns-fips.eu-west-2.api.aws" + "url": "https://connect-campaigns-fips.us-east-1.api.aws" } }, "params": { - "Region": "eu-west-2", - "UseDualStack": true, - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region eu-west-2 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns-fips.eu-west-2.amazonaws.com" + "url": "https://connect-campaigns-fips.us-east-1.amazonaws.com" } }, "params": { - "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://connect-campaigns.eu-west-2.api.aws" + "url": "https://connect-campaigns.us-east-1.api.aws" } }, "params": { - "Region": "eu-west-2", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://connect-campaigns.eu-west-2.amazonaws.com" + "url": "https://connect-campaigns-fips.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { - "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack enabled", + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns-fips.ap-southeast-2.api.aws" + "url": "https://connect-campaigns-fips.cn-north-1.amazonaws.com.cn" } }, "params": { - "Region": "ap-southeast-2", - "UseDualStack": true, - "UseFIPS": true + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://connect-campaigns-fips.ap-southeast-2.amazonaws.com" + "url": "https://connect-campaigns.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { - "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": true + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack enabled", + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns.ap-southeast-2.api.aws" + "url": "https://connect-campaigns.cn-north-1.amazonaws.com.cn" } }, "params": { - "Region": "ap-southeast-2", - "UseDualStack": true, - "UseFIPS": false + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://connect-campaigns.ap-southeast-2.amazonaws.com" + "url": "https://connect-campaigns-fips.us-gov-east-1.api.aws" } }, "params": { - "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns-fips.us-east-1.api.aws" + "url": "https://connect-campaigns-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://connect-campaigns-fips.us-east-1.amazonaws.com" + "url": "https://connect-campaigns.us-gov-east-1.api.aws" } }, "params": { - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns.us-east-1.api.aws" + "url": "https://connect-campaigns.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://connect-campaigns.us-east-1.amazonaws.com" + "url": "https://connect-campaigns-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" @@ -640,8 +758,21 @@ }, "params": { "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -652,8 +783,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -664,10 +795,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1322,12 +1459,25 @@ }, "predictiveDialerConfig": { "target": "com.amazonaws.connectcampaigns#PredictiveDialerConfig" + }, + "agentlessDialerConfig": { + "target": "com.amazonaws.connectcampaigns#AgentlessDialerConfig" } }, "traits": { "smithy.api#documentation": "The possible types of dialer config parameters" } }, + "com.amazonaws.connectcampaigns#DialingCapacity": { + "type": "double", + "traits": { + "smithy.api#documentation": "Allocates dialing capacity for this campaign between multiple active campaigns", + "smithy.api#range": { + "min": 0.01, + "max": 1 + } + } + }, "com.amazonaws.connectcampaigns#Enabled": { "type": "boolean", "traits": { @@ -2084,10 +2234,7 @@ "target": "com.amazonaws.connectcampaigns#SourcePhoneNumber" }, "connectQueueId": { - "target": "com.amazonaws.connectcampaigns#QueueId", - "traits": { - "smithy.api#required": {} - } + "target": "com.amazonaws.connectcampaigns#QueueId" }, "answerMachineDetectionConfig": { "target": "com.amazonaws.connectcampaigns#AnswerMachineDetectionConfig" @@ -2159,6 +2306,9 @@ "traits": { "smithy.api#required": {} } + }, + "dialingCapacity": { + "target": "com.amazonaws.connectcampaigns#DialingCapacity" } }, "traits": { @@ -2173,6 +2323,9 @@ "traits": { "smithy.api#required": {} } + }, + "dialingCapacity": { + "target": "com.amazonaws.connectcampaigns#DialingCapacity" } }, "traits": { @@ -2997,4 +3150,4 @@ } } } -} \ No newline at end of file +}