Skip to content

Commit a2d8d18

Browse files
author
awstools
committed
feat(client-connect): Added a new API UpdateRoutingProfileAgentAvailabilityTimer to update agent availability timer of a routing profile.
1 parent 126b1c6 commit a2d8d18

File tree

14 files changed

+733
-295
lines changed

14 files changed

+733
-295
lines changed

clients/client-connect/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,14 @@ UpdateQuickConnectName
16601660

16611661
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/classes/updatequickconnectnamecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/updatequickconnectnamecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/updatequickconnectnamecommandoutput.html)
16621662

1663+
</details>
1664+
<details>
1665+
<summary>
1666+
UpdateRoutingProfileAgentAvailabilityTimer
1667+
</summary>
1668+
1669+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/classes/updateroutingprofileagentavailabilitytimercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/updateroutingprofileagentavailabilitytimercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/updateroutingprofileagentavailabilitytimercommandoutput.html)
1670+
16631671
</details>
16641672
<details>
16651673
<summary>

clients/client-connect/src/Connect.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,11 @@ import {
847847
UpdateQuickConnectNameCommandInput,
848848
UpdateQuickConnectNameCommandOutput,
849849
} from "./commands/UpdateQuickConnectNameCommand";
850+
import {
851+
UpdateRoutingProfileAgentAvailabilityTimerCommand,
852+
UpdateRoutingProfileAgentAvailabilityTimerCommandInput,
853+
UpdateRoutingProfileAgentAvailabilityTimerCommandOutput,
854+
} from "./commands/UpdateRoutingProfileAgentAvailabilityTimerCommand";
850855
import {
851856
UpdateRoutingProfileConcurrencyCommand,
852857
UpdateRoutingProfileConcurrencyCommandInput,
@@ -1102,6 +1107,7 @@ const commands = {
11021107
UpdateQueueStatusCommand,
11031108
UpdateQuickConnectConfigCommand,
11041109
UpdateQuickConnectNameCommand,
1110+
UpdateRoutingProfileAgentAvailabilityTimerCommand,
11051111
UpdateRoutingProfileConcurrencyCommand,
11061112
UpdateRoutingProfileDefaultOutboundQueueCommand,
11071113
UpdateRoutingProfileNameCommand,
@@ -3966,6 +3972,23 @@ export interface Connect {
39663972
cb: (err: any, data?: UpdateQuickConnectNameCommandOutput) => void
39673973
): void;
39683974

3975+
/**
3976+
* @see {@link UpdateRoutingProfileAgentAvailabilityTimerCommand}
3977+
*/
3978+
updateRoutingProfileAgentAvailabilityTimer(
3979+
args: UpdateRoutingProfileAgentAvailabilityTimerCommandInput,
3980+
options?: __HttpHandlerOptions
3981+
): Promise<UpdateRoutingProfileAgentAvailabilityTimerCommandOutput>;
3982+
updateRoutingProfileAgentAvailabilityTimer(
3983+
args: UpdateRoutingProfileAgentAvailabilityTimerCommandInput,
3984+
cb: (err: any, data?: UpdateRoutingProfileAgentAvailabilityTimerCommandOutput) => void
3985+
): void;
3986+
updateRoutingProfileAgentAvailabilityTimer(
3987+
args: UpdateRoutingProfileAgentAvailabilityTimerCommandInput,
3988+
options: __HttpHandlerOptions,
3989+
cb: (err: any, data?: UpdateRoutingProfileAgentAvailabilityTimerCommandOutput) => void
3990+
): void;
3991+
39693992
/**
39703993
* @see {@link UpdateRoutingProfileConcurrencyCommand}
39713994
*/

clients/client-connect/src/ConnectClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,10 @@ import {
542542
UpdateQuickConnectNameCommandInput,
543543
UpdateQuickConnectNameCommandOutput,
544544
} from "./commands/UpdateQuickConnectNameCommand";
545+
import {
546+
UpdateRoutingProfileAgentAvailabilityTimerCommandInput,
547+
UpdateRoutingProfileAgentAvailabilityTimerCommandOutput,
548+
} from "./commands/UpdateRoutingProfileAgentAvailabilityTimerCommand";
545549
import {
546550
UpdateRoutingProfileConcurrencyCommandInput,
547551
UpdateRoutingProfileConcurrencyCommandOutput,
@@ -791,6 +795,7 @@ export type ServiceInputTypes =
791795
| UpdateQueueStatusCommandInput
792796
| UpdateQuickConnectConfigCommandInput
793797
| UpdateQuickConnectNameCommandInput
798+
| UpdateRoutingProfileAgentAvailabilityTimerCommandInput
794799
| UpdateRoutingProfileConcurrencyCommandInput
795800
| UpdateRoutingProfileDefaultOutboundQueueCommandInput
796801
| UpdateRoutingProfileNameCommandInput
@@ -992,6 +997,7 @@ export type ServiceOutputTypes =
992997
| UpdateQueueStatusCommandOutput
993998
| UpdateQuickConnectConfigCommandOutput
994999
| UpdateQuickConnectNameCommandOutput
1000+
| UpdateRoutingProfileAgentAvailabilityTimerCommandOutput
9951001
| UpdateRoutingProfileConcurrencyCommandOutput
9961002
| UpdateRoutingProfileDefaultOutboundQueueCommandOutput
9971003
| UpdateRoutingProfileNameCommandOutput

clients/client-connect/src/commands/CreateRoutingProfileCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export interface CreateRoutingProfileCommandOutput extends CreateRoutingProfileR
7070
* Tags: { // TagMap
7171
* "<keys>": "STRING_VALUE",
7272
* },
73+
* AgentAvailabilityTimer: "TIME_SINCE_LAST_ACTIVITY" || "TIME_SINCE_LAST_INBOUND",
7374
* };
7475
* const command = new CreateRoutingProfileCommand(input);
7576
* const response = await client.send(command);

clients/client-connect/src/commands/DescribeRoutingProfileCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export interface DescribeRoutingProfileCommandOutput extends DescribeRoutingProf
7171
* // },
7272
* // NumberOfAssociatedQueues: Number("long"),
7373
* // NumberOfAssociatedUsers: Number("long"),
74+
* // AgentAvailabilityTimer: "TIME_SINCE_LAST_ACTIVITY" || "TIME_SINCE_LAST_INBOUND",
7475
* // },
7576
* // };
7677
*

clients/client-connect/src/commands/SearchRoutingProfilesCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export interface SearchRoutingProfilesCommandOutput extends SearchRoutingProfile
118118
* // },
119119
* // NumberOfAssociatedQueues: Number("long"),
120120
* // NumberOfAssociatedUsers: Number("long"),
121+
* // AgentAvailabilityTimer: "TIME_SINCE_LAST_ACTIVITY" || "TIME_SINCE_LAST_INBOUND",
121122
* // },
122123
* // ],
123124
* // NextToken: "STRING_VALUE",
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
5+
import { Command as $Command } from "@smithy/smithy-client";
6+
import {
7+
FinalizeHandlerArguments,
8+
Handler,
9+
HandlerExecutionContext,
10+
HttpHandlerOptions as __HttpHandlerOptions,
11+
MetadataBearer as __MetadataBearer,
12+
MiddlewareStack,
13+
SerdeContext as __SerdeContext,
14+
} from "@smithy/types";
15+
16+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
17+
import { UpdateRoutingProfileAgentAvailabilityTimerRequest } from "../models/models_1";
18+
import {
19+
de_UpdateRoutingProfileAgentAvailabilityTimerCommand,
20+
se_UpdateRoutingProfileAgentAvailabilityTimerCommand,
21+
} from "../protocols/Aws_restJson1";
22+
23+
/**
24+
* @public
25+
*/
26+
export { __MetadataBearer, $Command };
27+
/**
28+
* @public
29+
*
30+
* The input for {@link UpdateRoutingProfileAgentAvailabilityTimerCommand}.
31+
*/
32+
export interface UpdateRoutingProfileAgentAvailabilityTimerCommandInput
33+
extends UpdateRoutingProfileAgentAvailabilityTimerRequest {}
34+
/**
35+
* @public
36+
*
37+
* The output of {@link UpdateRoutingProfileAgentAvailabilityTimerCommand}.
38+
*/
39+
export interface UpdateRoutingProfileAgentAvailabilityTimerCommandOutput extends __MetadataBearer {}
40+
41+
/**
42+
* @public
43+
* <p>Whether agents with this routing profile
44+
* will have their routing order calculated based on
45+
* <i>time since their last inbound
46+
* contact</i> or <i>longest idle
47+
* time</i>. </p>
48+
* @example
49+
* Use a bare-bones client and the command you need to make an API call.
50+
* ```javascript
51+
* import { ConnectClient, UpdateRoutingProfileAgentAvailabilityTimerCommand } from "@aws-sdk/client-connect"; // ES Modules import
52+
* // const { ConnectClient, UpdateRoutingProfileAgentAvailabilityTimerCommand } = require("@aws-sdk/client-connect"); // CommonJS import
53+
* const client = new ConnectClient(config);
54+
* const input = { // UpdateRoutingProfileAgentAvailabilityTimerRequest
55+
* InstanceId: "STRING_VALUE", // required
56+
* RoutingProfileId: "STRING_VALUE", // required
57+
* AgentAvailabilityTimer: "TIME_SINCE_LAST_ACTIVITY" || "TIME_SINCE_LAST_INBOUND", // required
58+
* };
59+
* const command = new UpdateRoutingProfileAgentAvailabilityTimerCommand(input);
60+
* const response = await client.send(command);
61+
* // {};
62+
*
63+
* ```
64+
*
65+
* @param UpdateRoutingProfileAgentAvailabilityTimerCommandInput - {@link UpdateRoutingProfileAgentAvailabilityTimerCommandInput}
66+
* @returns {@link UpdateRoutingProfileAgentAvailabilityTimerCommandOutput}
67+
* @see {@link UpdateRoutingProfileAgentAvailabilityTimerCommandInput} for command's `input` shape.
68+
* @see {@link UpdateRoutingProfileAgentAvailabilityTimerCommandOutput} for command's `response` shape.
69+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
70+
*
71+
* @throws {@link InternalServiceException} (server fault)
72+
* <p>Request processing failed because of an error or failure with the service.</p>
73+
*
74+
* @throws {@link InvalidParameterException} (client fault)
75+
* <p>One or more of the specified parameters are not valid.</p>
76+
*
77+
* @throws {@link InvalidRequestException} (client fault)
78+
* <p>The request is not valid.</p>
79+
*
80+
* @throws {@link ResourceNotFoundException} (client fault)
81+
* <p>The specified resource was not found.</p>
82+
*
83+
* @throws {@link ThrottlingException} (client fault)
84+
* <p>The throttling limit has been exceeded.</p>
85+
*
86+
* @throws {@link ConnectServiceException}
87+
* <p>Base exception class for all service exceptions from Connect service.</p>
88+
*
89+
*/
90+
export class UpdateRoutingProfileAgentAvailabilityTimerCommand extends $Command<
91+
UpdateRoutingProfileAgentAvailabilityTimerCommandInput,
92+
UpdateRoutingProfileAgentAvailabilityTimerCommandOutput,
93+
ConnectClientResolvedConfig
94+
> {
95+
// Start section: command_properties
96+
// End section: command_properties
97+
98+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
99+
return {
100+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
101+
Endpoint: { type: "builtInParams", name: "endpoint" },
102+
Region: { type: "builtInParams", name: "region" },
103+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
104+
};
105+
}
106+
107+
/**
108+
* @public
109+
*/
110+
constructor(readonly input: UpdateRoutingProfileAgentAvailabilityTimerCommandInput) {
111+
// Start section: command_constructor
112+
super();
113+
// End section: command_constructor
114+
}
115+
116+
/**
117+
* @internal
118+
*/
119+
resolveMiddleware(
120+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
121+
configuration: ConnectClientResolvedConfig,
122+
options?: __HttpHandlerOptions
123+
): Handler<
124+
UpdateRoutingProfileAgentAvailabilityTimerCommandInput,
125+
UpdateRoutingProfileAgentAvailabilityTimerCommandOutput
126+
> {
127+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
128+
this.middlewareStack.use(
129+
getEndpointPlugin(
130+
configuration,
131+
UpdateRoutingProfileAgentAvailabilityTimerCommand.getEndpointParameterInstructions()
132+
)
133+
);
134+
135+
const stack = clientStack.concat(this.middlewareStack);
136+
137+
const { logger } = configuration;
138+
const clientName = "ConnectClient";
139+
const commandName = "UpdateRoutingProfileAgentAvailabilityTimerCommand";
140+
const handlerExecutionContext: HandlerExecutionContext = {
141+
logger,
142+
clientName,
143+
commandName,
144+
inputFilterSensitiveLog: (_: any) => _,
145+
outputFilterSensitiveLog: (_: any) => _,
146+
};
147+
const { requestHandler } = configuration;
148+
return stack.resolve(
149+
(request: FinalizeHandlerArguments<any>) =>
150+
requestHandler.handle(request.request as __HttpRequest, options || {}),
151+
handlerExecutionContext
152+
);
153+
}
154+
155+
/**
156+
* @internal
157+
*/
158+
private serialize(
159+
input: UpdateRoutingProfileAgentAvailabilityTimerCommandInput,
160+
context: __SerdeContext
161+
): Promise<__HttpRequest> {
162+
return se_UpdateRoutingProfileAgentAvailabilityTimerCommand(input, context);
163+
}
164+
165+
/**
166+
* @internal
167+
*/
168+
private deserialize(
169+
output: __HttpResponse,
170+
context: __SerdeContext
171+
): Promise<UpdateRoutingProfileAgentAvailabilityTimerCommandOutput> {
172+
return de_UpdateRoutingProfileAgentAvailabilityTimerCommand(output, context);
173+
}
174+
175+
// Start section: command_body_extra
176+
// End section: command_body_extra
177+
}

clients/client-connect/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ export * from "./UpdateQueueOutboundCallerConfigCommand";
180180
export * from "./UpdateQueueStatusCommand";
181181
export * from "./UpdateQuickConnectConfigCommand";
182182
export * from "./UpdateQuickConnectNameCommand";
183+
export * from "./UpdateRoutingProfileAgentAvailabilityTimerCommand";
183184
export * from "./UpdateRoutingProfileConcurrencyCommand";
184185
export * from "./UpdateRoutingProfileDefaultOutboundQueueCommand";
185186
export * from "./UpdateRoutingProfileNameCommand";

clients/client-connect/src/endpoint/ruleset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ o={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[n,"supportsDualStack"]}]},
2828
p=[j],
2929
q=[k],
3030
r=[{[v]:"Region"}];
31-
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]}]},{type:b,rules:[{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://connect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://connect.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://connect-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://connect.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://connect.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
31+
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]},{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{endpoint:{url:"https://connect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://connect.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://connect-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{endpoint:{url:"https://connect.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://connect.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
3232
export const ruleSet: RuleSetObject = _data;

clients/client-connect/src/models/models_0.ts

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,20 @@ export class ThrottlingException extends __BaseException {
222222
}
223223
}
224224

225+
/**
226+
* @public
227+
* @enum
228+
*/
229+
export const AgentAvailabilityTimer = {
230+
TIME_SINCE_LAST_ACTIVITY: "TIME_SINCE_LAST_ACTIVITY",
231+
TIME_SINCE_LAST_INBOUND: "TIME_SINCE_LAST_INBOUND",
232+
} as const;
233+
234+
/**
235+
* @public
236+
*/
237+
export type AgentAvailabilityTimer = (typeof AgentAvailabilityTimer)[keyof typeof AgentAvailabilityTimer];
238+
225239
/**
226240
* @public
227241
* @enum
@@ -2812,6 +2826,16 @@ export interface CreateRoutingProfileRequest {
28122826
* <p>The tags used to organize, track, or control access for this resource. For example, \{ "tags": \{"key1":"value1", "key2":"value2"\} \}.</p>
28132827
*/
28142828
Tags?: Record<string, string>;
2829+
2830+
/**
2831+
* @public
2832+
* <p>Whether agents with this routing profile
2833+
* will have their routing order calculated based on
2834+
* <i>time since their last inbound
2835+
* contact</i> or <i>longest idle
2836+
* time</i>. </p>
2837+
*/
2838+
AgentAvailabilityTimer?: AgentAvailabilityTimer | string;
28152839
}
28162840

28172841
/**
@@ -6260,6 +6284,16 @@ export interface RoutingProfile {
62606284
* <p>The number of associated users in routing profile.</p>
62616285
*/
62626286
NumberOfAssociatedUsers?: number;
6287+
6288+
/**
6289+
* @public
6290+
* <p>Whether agents with this routing profile
6291+
* will have their routing order calculated based on
6292+
* <i>time since their last inbound
6293+
* contact</i> or <i>longest idle
6294+
* time</i>. </p>
6295+
*/
6296+
AgentAvailabilityTimer?: AgentAvailabilityTimer | string;
62636297
}
62646298

62656299
/**
@@ -7320,20 +7354,6 @@ export const Grouping = {
73207354
*/
73217355
export type Grouping = (typeof Grouping)[keyof typeof Grouping];
73227356

7323-
/**
7324-
* @public
7325-
* @enum
7326-
*/
7327-
export const SortOrder = {
7328-
ASCENDING: "ASCENDING",
7329-
DESCENDING: "DESCENDING",
7330-
} as const;
7331-
7332-
/**
7333-
* @public
7334-
*/
7335-
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder];
7336-
73377357
/**
73387358
* @internal
73397359
*/

0 commit comments

Comments
 (0)