Skip to content

Commit 6e0eda3

Browse files
author
awstools
committed
feat(client-connect): Adds the BatchGetFlowAssociation API which returns flow associations (flow-resource) corresponding to the list of resourceArns supplied in the request. This release also adds IsDefault, LastModifiedRegion and LastModifiedTime fields to the responses of several Describe and List APIs.
1 parent 1725b9c commit 6e0eda3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2035
-389
lines changed

clients/client-connect/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ AssociateTrafficDistributionGroupUser
308308

309309
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/classes/associatetrafficdistributiongroupusercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/associatetrafficdistributiongroupusercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/associatetrafficdistributiongroupusercommandoutput.html)
310310

311+
</details>
312+
<details>
313+
<summary>
314+
BatchGetFlowAssociation
315+
</summary>
316+
317+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/classes/batchgetflowassociationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/batchgetflowassociationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/batchgetflowassociationcommandoutput.html)
318+
311319
</details>
312320
<details>
313321
<summary>

clients/client-connect/src/Connect.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ import {
6262
AssociateTrafficDistributionGroupUserCommandInput,
6363
AssociateTrafficDistributionGroupUserCommandOutput,
6464
} from "./commands/AssociateTrafficDistributionGroupUserCommand";
65+
import {
66+
BatchGetFlowAssociationCommand,
67+
BatchGetFlowAssociationCommandInput,
68+
BatchGetFlowAssociationCommandOutput,
69+
} from "./commands/BatchGetFlowAssociationCommand";
6570
import {
6671
ClaimPhoneNumberCommand,
6772
ClaimPhoneNumberCommandInput,
@@ -996,6 +1001,7 @@ const commands = {
9961001
AssociateRoutingProfileQueuesCommand,
9971002
AssociateSecurityKeyCommand,
9981003
AssociateTrafficDistributionGroupUserCommand,
1004+
BatchGetFlowAssociationCommand,
9991005
ClaimPhoneNumberCommand,
10001006
CreateAgentStatusCommand,
10011007
CreateContactFlowCommand,
@@ -1393,6 +1399,23 @@ export interface Connect {
13931399
cb: (err: any, data?: AssociateTrafficDistributionGroupUserCommandOutput) => void
13941400
): void;
13951401

1402+
/**
1403+
* @see {@link BatchGetFlowAssociationCommand}
1404+
*/
1405+
batchGetFlowAssociation(
1406+
args: BatchGetFlowAssociationCommandInput,
1407+
options?: __HttpHandlerOptions
1408+
): Promise<BatchGetFlowAssociationCommandOutput>;
1409+
batchGetFlowAssociation(
1410+
args: BatchGetFlowAssociationCommandInput,
1411+
cb: (err: any, data?: BatchGetFlowAssociationCommandOutput) => void
1412+
): void;
1413+
batchGetFlowAssociation(
1414+
args: BatchGetFlowAssociationCommandInput,
1415+
options: __HttpHandlerOptions,
1416+
cb: (err: any, data?: BatchGetFlowAssociationCommandOutput) => void
1417+
): void;
1418+
13961419
/**
13971420
* @see {@link ClaimPhoneNumberCommand}
13981421
*/

clients/client-connect/src/ConnectClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ import {
9292
AssociateTrafficDistributionGroupUserCommandInput,
9393
AssociateTrafficDistributionGroupUserCommandOutput,
9494
} from "./commands/AssociateTrafficDistributionGroupUserCommand";
95+
import {
96+
BatchGetFlowAssociationCommandInput,
97+
BatchGetFlowAssociationCommandOutput,
98+
} from "./commands/BatchGetFlowAssociationCommand";
9599
import { ClaimPhoneNumberCommandInput, ClaimPhoneNumberCommandOutput } from "./commands/ClaimPhoneNumberCommand";
96100
import { CreateAgentStatusCommandInput, CreateAgentStatusCommandOutput } from "./commands/CreateAgentStatusCommand";
97101
import { CreateContactFlowCommandInput, CreateContactFlowCommandOutput } from "./commands/CreateContactFlowCommand";
@@ -657,6 +661,7 @@ export type ServiceInputTypes =
657661
| AssociateRoutingProfileQueuesCommandInput
658662
| AssociateSecurityKeyCommandInput
659663
| AssociateTrafficDistributionGroupUserCommandInput
664+
| BatchGetFlowAssociationCommandInput
660665
| ClaimPhoneNumberCommandInput
661666
| CreateAgentStatusCommandInput
662667
| CreateContactFlowCommandInput
@@ -873,6 +878,7 @@ export type ServiceOutputTypes =
873878
| AssociateRoutingProfileQueuesCommandOutput
874879
| AssociateSecurityKeyCommandOutput
875880
| AssociateTrafficDistributionGroupUserCommandOutput
881+
| BatchGetFlowAssociationCommandOutput
876882
| ClaimPhoneNumberCommandOutput
877883
| CreateAgentStatusCommandOutput
878884
| CreateContactFlowCommandOutput
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
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+
SMITHY_CONTEXT_KEY,
15+
} from "@smithy/types";
16+
17+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
18+
import { BatchGetFlowAssociationRequest, BatchGetFlowAssociationResponse } from "../models/models_0";
19+
import { de_BatchGetFlowAssociationCommand, se_BatchGetFlowAssociationCommand } from "../protocols/Aws_restJson1";
20+
21+
/**
22+
* @public
23+
*/
24+
export { __MetadataBearer, $Command };
25+
/**
26+
* @public
27+
*
28+
* The input for {@link BatchGetFlowAssociationCommand}.
29+
*/
30+
export interface BatchGetFlowAssociationCommandInput extends BatchGetFlowAssociationRequest {}
31+
/**
32+
* @public
33+
*
34+
* The output of {@link BatchGetFlowAssociationCommand}.
35+
*/
36+
export interface BatchGetFlowAssociationCommandOutput extends BatchGetFlowAssociationResponse, __MetadataBearer {}
37+
38+
/**
39+
* @public
40+
* <p>Retrieve the flow associations for the given resources.</p>
41+
* @example
42+
* Use a bare-bones client and the command you need to make an API call.
43+
* ```javascript
44+
* import { ConnectClient, BatchGetFlowAssociationCommand } from "@aws-sdk/client-connect"; // ES Modules import
45+
* // const { ConnectClient, BatchGetFlowAssociationCommand } = require("@aws-sdk/client-connect"); // CommonJS import
46+
* const client = new ConnectClient(config);
47+
* const input = { // BatchGetFlowAssociationRequest
48+
* InstanceId: "STRING_VALUE", // required
49+
* ResourceIds: [ // resourceArnListMaxLimit100 // required
50+
* "STRING_VALUE",
51+
* ],
52+
* ResourceType: "SMS_PHONE_NUMBER" || "VOICE_PHONE_NUMBER",
53+
* };
54+
* const command = new BatchGetFlowAssociationCommand(input);
55+
* const response = await client.send(command);
56+
* // { // BatchGetFlowAssociationResponse
57+
* // FlowAssociationSummaryList: [ // FlowAssociationSummaryList
58+
* // { // FlowAssociationSummary
59+
* // ResourceId: "STRING_VALUE",
60+
* // FlowId: "STRING_VALUE",
61+
* // ResourceType: "SMS_PHONE_NUMBER" || "VOICE_PHONE_NUMBER",
62+
* // },
63+
* // ],
64+
* // };
65+
*
66+
* ```
67+
*
68+
* @param BatchGetFlowAssociationCommandInput - {@link BatchGetFlowAssociationCommandInput}
69+
* @returns {@link BatchGetFlowAssociationCommandOutput}
70+
* @see {@link BatchGetFlowAssociationCommandInput} for command's `input` shape.
71+
* @see {@link BatchGetFlowAssociationCommandOutput} for command's `response` shape.
72+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
73+
*
74+
* @throws {@link AccessDeniedException} (client fault)
75+
* <p>You do not have sufficient permissions to perform this action.</p>
76+
*
77+
* @throws {@link InternalServiceException} (server fault)
78+
* <p>Request processing failed because of an error or failure with the service.</p>
79+
*
80+
* @throws {@link InvalidParameterException} (client fault)
81+
* <p>One or more of the specified parameters are not valid.</p>
82+
*
83+
* @throws {@link InvalidRequestException} (client fault)
84+
* <p>The request is not valid.</p>
85+
*
86+
* @throws {@link ResourceNotFoundException} (client fault)
87+
* <p>The specified resource was not found.</p>
88+
*
89+
* @throws {@link ThrottlingException} (client fault)
90+
* <p>The throttling limit has been exceeded.</p>
91+
*
92+
* @throws {@link ConnectServiceException}
93+
* <p>Base exception class for all service exceptions from Connect service.</p>
94+
*
95+
*/
96+
export class BatchGetFlowAssociationCommand extends $Command<
97+
BatchGetFlowAssociationCommandInput,
98+
BatchGetFlowAssociationCommandOutput,
99+
ConnectClientResolvedConfig
100+
> {
101+
// Start section: command_properties
102+
// End section: command_properties
103+
104+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
105+
return {
106+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
107+
Endpoint: { type: "builtInParams", name: "endpoint" },
108+
Region: { type: "builtInParams", name: "region" },
109+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
110+
};
111+
}
112+
113+
/**
114+
* @public
115+
*/
116+
constructor(readonly input: BatchGetFlowAssociationCommandInput) {
117+
// Start section: command_constructor
118+
super();
119+
// End section: command_constructor
120+
}
121+
122+
/**
123+
* @internal
124+
*/
125+
resolveMiddleware(
126+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
127+
configuration: ConnectClientResolvedConfig,
128+
options?: __HttpHandlerOptions
129+
): Handler<BatchGetFlowAssociationCommandInput, BatchGetFlowAssociationCommandOutput> {
130+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
131+
this.middlewareStack.use(
132+
getEndpointPlugin(configuration, BatchGetFlowAssociationCommand.getEndpointParameterInstructions())
133+
);
134+
135+
const stack = clientStack.concat(this.middlewareStack);
136+
137+
const { logger } = configuration;
138+
const clientName = "ConnectClient";
139+
const commandName = "BatchGetFlowAssociationCommand";
140+
const handlerExecutionContext: HandlerExecutionContext = {
141+
logger,
142+
clientName,
143+
commandName,
144+
inputFilterSensitiveLog: (_: any) => _,
145+
outputFilterSensitiveLog: (_: any) => _,
146+
[SMITHY_CONTEXT_KEY]: {
147+
service: "AmazonConnectService",
148+
operation: "BatchGetFlowAssociation",
149+
},
150+
};
151+
const { requestHandler } = configuration;
152+
return stack.resolve(
153+
(request: FinalizeHandlerArguments<any>) =>
154+
requestHandler.handle(request.request as __HttpRequest, options || {}),
155+
handlerExecutionContext
156+
);
157+
}
158+
159+
/**
160+
* @internal
161+
*/
162+
private serialize(input: BatchGetFlowAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
163+
return se_BatchGetFlowAssociationCommand(input, context);
164+
}
165+
166+
/**
167+
* @internal
168+
*/
169+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<BatchGetFlowAssociationCommandOutput> {
170+
return de_BatchGetFlowAssociationCommand(output, context);
171+
}
172+
173+
// Start section: command_body_extra
174+
// End section: command_body_extra
175+
}

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ export interface CreateViewCommandOutput extends CreateViewResponse, __MetadataB
4242

4343
/**
4444
* @public
45-
* <p>Creates a new view with the possible status of <code>SAVED</code> or
46-
* <code>PUBLISHED</code>.</p>
45+
* <p>Creates a new view with the possible status of <code>SAVED</code> or <code>PUBLISHED</code>.</p>
4746
* <p>The views will have a unique name for each connect instance.</p>
48-
* <p>It performs basic content validation if the status is <code>SAVED</code> or full content
49-
* validation if the status is set to <code>PUBLISHED</code>. An error is returned if validation
50-
* fails. It associates either the <code>$SAVED</code> qualifier or both of the <code>$SAVED</code>
51-
* and <code>$LATEST</code> qualifiers with the provided view content based on the status. The view
52-
* is idempotent if ClientToken is provided.</p>
47+
* <p>It performs basic content validation if the status is <code>SAVED</code> or full content validation if the status
48+
* is set to <code>PUBLISHED</code>. An error is returned if validation fails. It associates either
49+
* the <code>$SAVED</code> qualifier or both of the <code>$SAVED</code> and <code>$LATEST</code> qualifiers with the
50+
* provided view content based on the status. The view is idempotent if ClientToken is provided.</p>
5351
* @example
5452
* Use a bare-bones client and the command you need to make an API call.
5553
* ```javascript

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export interface CreateViewVersionCommandOutput extends CreateViewVersionRespons
4343
* @public
4444
* <p>Publishes a new version of the view identifier.</p>
4545
* <p>Versions are immutable and monotonically increasing.</p>
46-
* <p>It returns the highest version if there is no change in content compared to that version. An
47-
* error is displayed if the supplied ViewContentSha256 is different from the ViewContentSha256 of
48-
* the <code>$LATEST</code> alias.</p>
46+
* <p>It returns the highest version if there is no change in content compared to that version. An error
47+
* is displayed if the supplied ViewContentSha256 is different from the ViewContentSha256 of the
48+
* <code>$LATEST</code> alias.</p>
4949
* @example
5050
* Use a bare-bones client and the command you need to make an API call.
5151
* ```javascript

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ export interface DeleteViewCommandOutput extends DeleteViewResponse, __MetadataB
3737

3838
/**
3939
* @public
40-
* <p>Deletes the view entirely. It deletes the view and all associated qualifiers (versions and
41-
* aliases).</p>
40+
* <p>Deletes the view entirely. It deletes the view and all associated qualifiers (versions and aliases).</p>
4241
* @example
4342
* Use a bare-bones client and the command you need to make an API call.
4443
* ```javascript

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export interface DescribeAgentStatusCommandOutput extends DescribeAgentStatusRes
6363
* // Tags: { // TagMap
6464
* // "<keys>": "STRING_VALUE",
6565
* // },
66+
* // LastModifiedTime: new Date("TIMESTAMP"),
67+
* // LastModifiedRegion: "STRING_VALUE",
6668
* // },
6769
* // };
6870
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ export interface DescribeHoursOfOperationCommandOutput extends DescribeHoursOfOp
7474
* // Tags: { // TagMap
7575
* // "<keys>": "STRING_VALUE",
7676
* // },
77+
* // LastModifiedTime: new Date("TIMESTAMP"),
78+
* // LastModifiedRegion: "STRING_VALUE",
7779
* // },
7880
* // };
7981
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ export interface DescribePromptCommandOutput extends DescribePromptResponse, __M
5959
* // Tags: { // TagMap
6060
* // "<keys>": "STRING_VALUE",
6161
* // },
62+
* // LastModifiedTime: new Date("TIMESTAMP"),
63+
* // LastModifiedRegion: "STRING_VALUE",
6264
* // },
6365
* // };
6466
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ export interface DescribeQueueCommandOutput extends DescribeQueueResponse, __Met
6868
* // Tags: { // TagMap
6969
* // "<keys>": "STRING_VALUE",
7070
* // },
71+
* // LastModifiedTime: new Date("TIMESTAMP"),
72+
* // LastModifiedRegion: "STRING_VALUE",
7173
* // },
7274
* // };
7375
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ export interface DescribeQuickConnectCommandOutput extends DescribeQuickConnectR
7373
* // Tags: { // TagMap
7474
* // "<keys>": "STRING_VALUE",
7575
* // },
76+
* // LastModifiedTime: new Date("TIMESTAMP"),
77+
* // LastModifiedRegion: "STRING_VALUE",
7678
* // },
7779
* // };
7880
*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ export interface DescribeRoutingProfileCommandOutput extends DescribeRoutingProf
7373
* // NumberOfAssociatedQueues: Number("long"),
7474
* // NumberOfAssociatedUsers: Number("long"),
7575
* // AgentAvailabilityTimer: "TIME_SINCE_LAST_ACTIVITY" || "TIME_SINCE_LAST_INBOUND",
76+
* // LastModifiedTime: new Date("TIMESTAMP"),
77+
* // LastModifiedRegion: "STRING_VALUE",
78+
* // IsDefault: true || false,
7679
* // },
7780
* // };
7881
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ export interface DescribeSecurityProfileCommandOutput extends DescribeSecurityPr
6666
* // TagRestrictedResources: [ // TagRestrictedResourceList
6767
* // "STRING_VALUE",
6868
* // ],
69+
* // LastModifiedTime: new Date("TIMESTAMP"),
70+
* // LastModifiedRegion: "STRING_VALUE",
6971
* // },
7072
* // };
7173
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ export interface DescribeUserCommandOutput extends DescribeUserResponse, __Metad
7878
* // Tags: { // TagMap
7979
* // "<keys>": "STRING_VALUE",
8080
* // },
81+
* // LastModifiedTime: new Date("TIMESTAMP"),
82+
* // LastModifiedRegion: "STRING_VALUE",
8183
* // },
8284
* // };
8385
*

0 commit comments

Comments
 (0)