Skip to content

Commit fff346b

Browse files
author
awstools
committedJun 26, 2023
feat(client-connect): This release provides a way to search for existing tags within an instance. Before tagging a resource, ensure consistency by searching for pre-existing key:value pairs.
1 parent cd5ca74 commit fff346b

15 files changed

+963
-199
lines changed
 

‎clients/client-connect/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,14 @@ SearchQuickConnects
13001300

13011301
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/classes/searchquickconnectscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/searchquickconnectscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/searchquickconnectscommandoutput.html)
13021302

1303+
</details>
1304+
<details>
1305+
<summary>
1306+
SearchResourceTags
1307+
</summary>
1308+
1309+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/classes/searchresourcetagscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/searchresourcetagscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/searchresourcetagscommandoutput.html)
1310+
13031311
</details>
13041312
<details>
13051313
<summary>

‎clients/client-connect/src/Connect.ts

+23
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,11 @@ import {
638638
SearchQuickConnectsCommandInput,
639639
SearchQuickConnectsCommandOutput,
640640
} from "./commands/SearchQuickConnectsCommand";
641+
import {
642+
SearchResourceTagsCommand,
643+
SearchResourceTagsCommandInput,
644+
SearchResourceTagsCommandOutput,
645+
} from "./commands/SearchResourceTagsCommand";
641646
import {
642647
SearchRoutingProfilesCommand,
643648
SearchRoutingProfilesCommandInput,
@@ -1046,6 +1051,7 @@ const commands = {
10461051
SearchPromptsCommand,
10471052
SearchQueuesCommand,
10481053
SearchQuickConnectsCommand,
1054+
SearchResourceTagsCommand,
10491055
SearchRoutingProfilesCommand,
10501056
SearchSecurityProfilesCommand,
10511057
SearchUsersCommand,
@@ -3235,6 +3241,23 @@ export interface Connect {
32353241
cb: (err: any, data?: SearchQuickConnectsCommandOutput) => void
32363242
): void;
32373243

3244+
/**
3245+
* @see {@link SearchResourceTagsCommand}
3246+
*/
3247+
searchResourceTags(
3248+
args: SearchResourceTagsCommandInput,
3249+
options?: __HttpHandlerOptions
3250+
): Promise<SearchResourceTagsCommandOutput>;
3251+
searchResourceTags(
3252+
args: SearchResourceTagsCommandInput,
3253+
cb: (err: any, data?: SearchResourceTagsCommandOutput) => void
3254+
): void;
3255+
searchResourceTags(
3256+
args: SearchResourceTagsCommandInput,
3257+
options: __HttpHandlerOptions,
3258+
cb: (err: any, data?: SearchResourceTagsCommandOutput) => void
3259+
): void;
3260+
32383261
/**
32393262
* @see {@link SearchRoutingProfilesCommand}
32403263
*/

‎clients/client-connect/src/ConnectClient.ts

+3
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ import {
412412
SearchQuickConnectsCommandInput,
413413
SearchQuickConnectsCommandOutput,
414414
} from "./commands/SearchQuickConnectsCommand";
415+
import { SearchResourceTagsCommandInput, SearchResourceTagsCommandOutput } from "./commands/SearchResourceTagsCommand";
415416
import {
416417
SearchRoutingProfilesCommandInput,
417418
SearchRoutingProfilesCommandOutput,
@@ -742,6 +743,7 @@ export type ServiceInputTypes =
742743
| SearchPromptsCommandInput
743744
| SearchQueuesCommandInput
744745
| SearchQuickConnectsCommandInput
746+
| SearchResourceTagsCommandInput
745747
| SearchRoutingProfilesCommandInput
746748
| SearchSecurityProfilesCommandInput
747749
| SearchUsersCommandInput
@@ -940,6 +942,7 @@ export type ServiceOutputTypes =
940942
| SearchPromptsCommandOutput
941943
| SearchQueuesCommandOutput
942944
| SearchQuickConnectsCommandOutput
945+
| SearchResourceTagsCommandOutput
943946
| SearchRoutingProfilesCommandOutput
944947
| SearchSecurityProfilesCommandOutput
945948
| SearchUsersCommandOutput

‎clients/client-connect/src/commands/ClaimPhoneNumberCommand.ts

+13
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ export interface ClaimPhoneNumberCommandOutput extends ClaimPhoneNumberResponse,
4747
* the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribePhoneNumber.html">DescribePhoneNumber</a> API to verify the status of a previous <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimPhoneNumber.html">ClaimPhoneNumber</a>
4848
* operation.</p>
4949
* </important>
50+
* <p>If you plan to claim and release numbers frequently during a 30 day period,
51+
* contact us for a service quota exception. Otherwise, it is possible you will be blocked from
52+
* claiming and releasing any more numbers until 30 days past the oldest number
53+
* released has expired.</p>
54+
* <p>By default you can claim and release up to 200% of your maximum number of active
55+
* phone numbers during any 30 day period. If you claim and release phone numbers using
56+
* the UI or API during a rolling 30 day cycle that exceeds 200% of your phone number
57+
* service level quota, you will be blocked from claiming any more numbers until 30
58+
* days past the oldest number released has expired. </p>
59+
* <p>For example, if you already have 99 claimed numbers and a service level quota of 99 phone numbers, and in any 30
60+
* day period you release 99, claim 99, and then release 99, you will have exceeded the
61+
* 200% limit. At that point you are blocked from claiming any more numbers until you
62+
* open an Amazon Web Services support ticket.</p>
5063
* @example
5164
* Use a bare-bones client and the command you need to make an API call.
5265
* ```javascript

‎clients/client-connect/src/commands/DescribeContactEvaluationCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { SerdeContext as __SerdeContext } from "@smithy/types";
1515

1616
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
1717
import { DescribeContactEvaluationRequest } from "../models/models_0";
18-
import { DescribeContactEvaluationResponse } from "../models/models_1";
18+
import { DescribeContactEvaluationResponse } from "../models/models_2";
1919
import { de_DescribeContactEvaluationCommand, se_DescribeContactEvaluationCommand } from "../protocols/Aws_restJson1";
2020

2121
/**

‎clients/client-connect/src/commands/ReleasePhoneNumberCommand.ts

+13
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ export interface ReleasePhoneNumberCommandOutput extends __MetadataBearer {}
4545
* It cannot be searched for or claimed again until the period has ended. If you accidentally
4646
* release a phone number, contact Amazon Web Services Support.</p>
4747
* </important>
48+
* <p>If you plan to claim and release numbers frequently during a 30 day period,
49+
* contact us for a service quota exception. Otherwise, it is possible you will be blocked from
50+
* claiming and releasing any more numbers until 30 days past the oldest number
51+
* released has expired.</p>
52+
* <p>By default you can claim and release up to 200% of your maximum number of active
53+
* phone numbers during any 30 day period. If you claim and release phone numbers using
54+
* the UI or API during a rolling 30 day cycle that exceeds 200% of your phone number
55+
* service level quota, you will be blocked from claiming any more numbers until 30
56+
* days past the oldest number released has expired. </p>
57+
* <p>For example, if you already have 99 claimed numbers and a service level quota of 99 phone numbers, and in any 30
58+
* day period you release 99, claim 99, and then release 99, you will have exceeded the
59+
* 200% limit. At that point you are blocked from claiming any more numbers until you
60+
* open an Amazon Web Services support ticket.</p>
4861
* @example
4962
* Use a bare-bones client and the command you need to make an API call.
5063
* ```javascript
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
3+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
} from "@aws-sdk/types";
13+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
14+
import { SerdeContext as __SerdeContext } from "@smithy/types";
15+
16+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
17+
import { SearchResourceTagsRequest, SearchResourceTagsResponse } from "../models/models_1";
18+
import { de_SearchResourceTagsCommand, se_SearchResourceTagsCommand } from "../protocols/Aws_restJson1";
19+
20+
/**
21+
* @public
22+
*/
23+
export { __MetadataBearer, $Command };
24+
/**
25+
* @public
26+
*
27+
* The input for {@link SearchResourceTagsCommand}.
28+
*/
29+
export interface SearchResourceTagsCommandInput extends SearchResourceTagsRequest {}
30+
/**
31+
* @public
32+
*
33+
* The output of {@link SearchResourceTagsCommand}.
34+
*/
35+
export interface SearchResourceTagsCommandOutput extends SearchResourceTagsResponse, __MetadataBearer {}
36+
37+
/**
38+
* @public
39+
* <p>Searches tags used in an Amazon Connect instance using optional search criteria.</p>
40+
* @example
41+
* Use a bare-bones client and the command you need to make an API call.
42+
* ```javascript
43+
* import { ConnectClient, SearchResourceTagsCommand } from "@aws-sdk/client-connect"; // ES Modules import
44+
* // const { ConnectClient, SearchResourceTagsCommand } = require("@aws-sdk/client-connect"); // CommonJS import
45+
* const client = new ConnectClient(config);
46+
* const input = { // SearchResourceTagsRequest
47+
* InstanceId: "STRING_VALUE", // required
48+
* ResourceTypes: [ // ResourceTypeList
49+
* "STRING_VALUE",
50+
* ],
51+
* NextToken: "STRING_VALUE",
52+
* MaxResults: Number("int"),
53+
* SearchCriteria: { // ResourceTagsSearchCriteria
54+
* TagSearchCondition: { // TagSearchCondition
55+
* tagKey: "STRING_VALUE",
56+
* tagValue: "STRING_VALUE",
57+
* tagKeyComparisonType: "STARTS_WITH" || "CONTAINS" || "EXACT",
58+
* tagValueComparisonType: "STARTS_WITH" || "CONTAINS" || "EXACT",
59+
* },
60+
* },
61+
* };
62+
* const command = new SearchResourceTagsCommand(input);
63+
* const response = await client.send(command);
64+
* // { // SearchResourceTagsResponse
65+
* // Tags: [ // TagsList
66+
* // { // TagSet
67+
* // key: "STRING_VALUE",
68+
* // value: "STRING_VALUE",
69+
* // },
70+
* // ],
71+
* // NextToken: "STRING_VALUE",
72+
* // };
73+
*
74+
* ```
75+
*
76+
* @param SearchResourceTagsCommandInput - {@link SearchResourceTagsCommandInput}
77+
* @returns {@link SearchResourceTagsCommandOutput}
78+
* @see {@link SearchResourceTagsCommandInput} for command's `input` shape.
79+
* @see {@link SearchResourceTagsCommandOutput} for command's `response` shape.
80+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
81+
*
82+
* @throws {@link InternalServiceException} (server fault)
83+
* <p>Request processing failed because of an error or failure with the service.</p>
84+
*
85+
* @throws {@link InvalidParameterException} (client fault)
86+
* <p>One or more of the specified parameters are not valid.</p>
87+
*
88+
* @throws {@link InvalidRequestException} (client fault)
89+
* <p>The request is not valid.</p>
90+
*
91+
* @throws {@link MaximumResultReturnedException} (client fault)
92+
* <p>Maximum number (1000) of tags have been returned with current request. Consider
93+
* changing request parameters to get more tags.</p>
94+
*
95+
* @throws {@link ResourceNotFoundException} (client fault)
96+
* <p>The specified resource was not found.</p>
97+
*
98+
* @throws {@link ThrottlingException} (client fault)
99+
* <p>The throttling limit has been exceeded.</p>
100+
*
101+
* @throws {@link ConnectServiceException}
102+
* <p>Base exception class for all service exceptions from Connect service.</p>
103+
*
104+
*/
105+
export class SearchResourceTagsCommand extends $Command<
106+
SearchResourceTagsCommandInput,
107+
SearchResourceTagsCommandOutput,
108+
ConnectClientResolvedConfig
109+
> {
110+
// Start section: command_properties
111+
// End section: command_properties
112+
113+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
114+
return {
115+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
116+
Endpoint: { type: "builtInParams", name: "endpoint" },
117+
Region: { type: "builtInParams", name: "region" },
118+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
119+
};
120+
}
121+
122+
/**
123+
* @public
124+
*/
125+
constructor(readonly input: SearchResourceTagsCommandInput) {
126+
// Start section: command_constructor
127+
super();
128+
// End section: command_constructor
129+
}
130+
131+
/**
132+
* @internal
133+
*/
134+
resolveMiddleware(
135+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
136+
configuration: ConnectClientResolvedConfig,
137+
options?: __HttpHandlerOptions
138+
): Handler<SearchResourceTagsCommandInput, SearchResourceTagsCommandOutput> {
139+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
140+
this.middlewareStack.use(
141+
getEndpointPlugin(configuration, SearchResourceTagsCommand.getEndpointParameterInstructions())
142+
);
143+
144+
const stack = clientStack.concat(this.middlewareStack);
145+
146+
const { logger } = configuration;
147+
const clientName = "ConnectClient";
148+
const commandName = "SearchResourceTagsCommand";
149+
const handlerExecutionContext: HandlerExecutionContext = {
150+
logger,
151+
clientName,
152+
commandName,
153+
inputFilterSensitiveLog: (_: any) => _,
154+
outputFilterSensitiveLog: (_: any) => _,
155+
};
156+
const { requestHandler } = configuration;
157+
return stack.resolve(
158+
(request: FinalizeHandlerArguments<any>) =>
159+
requestHandler.handle(request.request as __HttpRequest, options || {}),
160+
handlerExecutionContext
161+
);
162+
}
163+
164+
/**
165+
* @internal
166+
*/
167+
private serialize(input: SearchResourceTagsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
168+
return se_SearchResourceTagsCommand(input, context);
169+
}
170+
171+
/**
172+
* @internal
173+
*/
174+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<SearchResourceTagsCommandOutput> {
175+
return de_SearchResourceTagsCommand(output, context);
176+
}
177+
178+
// Start section: command_body_extra
179+
// End section: command_body_extra
180+
}

‎clients/client-connect/src/commands/UpdateEvaluationFormCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@s
1414
import { SerdeContext as __SerdeContext } from "@smithy/types";
1515

1616
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
17-
import { UpdateEvaluationFormRequest, UpdateEvaluationFormResponse } from "../models/models_1";
17+
import { UpdateEvaluationFormResponse } from "../models/models_1";
18+
import { UpdateEvaluationFormRequest } from "../models/models_2";
1819
import { de_UpdateEvaluationFormCommand, se_UpdateEvaluationFormCommand } from "../protocols/Aws_restJson1";
1920

2021
/**

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

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export * from "./SearchHoursOfOperationsCommand";
135135
export * from "./SearchPromptsCommand";
136136
export * from "./SearchQueuesCommand";
137137
export * from "./SearchQuickConnectsCommand";
138+
export * from "./SearchResourceTagsCommand";
138139
export * from "./SearchRoutingProfilesCommand";
139140
export * from "./SearchSecurityProfilesCommand";
140141
export * from "./SearchUsersCommand";

0 commit comments

Comments
 (0)
Please sign in to comment.