Skip to content

Commit ddea9dd

Browse files
author
awstools
committed
feat(client-glue): This change is for releasing TestConnection api SDK model
1 parent 97088ae commit ddea9dd

File tree

11 files changed

+470
-91
lines changed

11 files changed

+470
-91
lines changed

clients/client-glue/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,14 @@ TagResource
18041804

18051805
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glue/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glue/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glue/Interface/TagResourceCommandOutput/)
18061806

1807+
</details>
1808+
<details>
1809+
<summary>
1810+
TestConnection
1811+
</summary>
1812+
1813+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glue/command/TestConnectionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glue/Interface/TestConnectionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glue/Interface/TestConnectionCommandOutput/)
1814+
18071815
</details>
18081816
<details>
18091817
<summary>

clients/client-glue/src/Glue.ts

+21
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,11 @@ import {
882882
StopWorkflowRunCommandOutput,
883883
} from "./commands/StopWorkflowRunCommand";
884884
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
885+
import {
886+
TestConnectionCommand,
887+
TestConnectionCommandInput,
888+
TestConnectionCommandOutput,
889+
} from "./commands/TestConnectionCommand";
885890
import {
886891
UntagResourceCommand,
887892
UntagResourceCommandInput,
@@ -1197,6 +1202,7 @@ const commands = {
11971202
StopTriggerCommand,
11981203
StopWorkflowRunCommand,
11991204
TagResourceCommand,
1205+
TestConnectionCommand,
12001206
UntagResourceCommand,
12011207
UpdateBlueprintCommand,
12021208
UpdateClassifierCommand,
@@ -4236,6 +4242,21 @@ export interface Glue {
42364242
cb: (err: any, data?: TagResourceCommandOutput) => void
42374243
): void;
42384244

4245+
/**
4246+
* @see {@link TestConnectionCommand}
4247+
*/
4248+
testConnection(): Promise<TestConnectionCommandOutput>;
4249+
testConnection(
4250+
args: TestConnectionCommandInput,
4251+
options?: __HttpHandlerOptions
4252+
): Promise<TestConnectionCommandOutput>;
4253+
testConnection(args: TestConnectionCommandInput, cb: (err: any, data?: TestConnectionCommandOutput) => void): void;
4254+
testConnection(
4255+
args: TestConnectionCommandInput,
4256+
options: __HttpHandlerOptions,
4257+
cb: (err: any, data?: TestConnectionCommandOutput) => void
4258+
): void;
4259+
42394260
/**
42404261
* @see {@link UntagResourceCommand}
42414262
*/

clients/client-glue/src/GlueClient.ts

+3
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ import { StopSessionCommandInput, StopSessionCommandOutput } from "./commands/St
496496
import { StopTriggerCommandInput, StopTriggerCommandOutput } from "./commands/StopTriggerCommand";
497497
import { StopWorkflowRunCommandInput, StopWorkflowRunCommandOutput } from "./commands/StopWorkflowRunCommand";
498498
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
499+
import { TestConnectionCommandInput, TestConnectionCommandOutput } from "./commands/TestConnectionCommand";
499500
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
500501
import { UpdateBlueprintCommandInput, UpdateBlueprintCommandOutput } from "./commands/UpdateBlueprintCommand";
501502
import { UpdateClassifierCommandInput, UpdateClassifierCommandOutput } from "./commands/UpdateClassifierCommand";
@@ -759,6 +760,7 @@ export type ServiceInputTypes =
759760
| StopTriggerCommandInput
760761
| StopWorkflowRunCommandInput
761762
| TagResourceCommandInput
763+
| TestConnectionCommandInput
762764
| UntagResourceCommandInput
763765
| UpdateBlueprintCommandInput
764766
| UpdateClassifierCommandInput
@@ -988,6 +990,7 @@ export type ServiceOutputTypes =
988990
| StopTriggerCommandOutput
989991
| StopWorkflowRunCommandOutput
990992
| TagResourceCommandOutput
993+
| TestConnectionCommandOutput
991994
| UntagResourceCommandOutput
992995
| UpdateBlueprintCommandOutput
993996
| UpdateClassifierCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
9+
import { TestConnectionRequest, TestConnectionResponse } from "../models/models_2";
10+
import { de_TestConnectionCommand, se_TestConnectionCommand } from "../protocols/Aws_json1_1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link TestConnectionCommand}.
21+
*/
22+
export interface TestConnectionCommandInput extends TestConnectionRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link TestConnectionCommand}.
27+
*/
28+
export interface TestConnectionCommandOutput extends TestConnectionResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Tests a connection to a service to validate the service credentials that you provide.</p>
32+
* <p>You can either provide an existing connection name or a <code>TestConnectionInput</code> for testing a non-existing connection input. Providing both at the same time will cause an error.</p>
33+
* <p>If the action is successful, the service sends back an HTTP 200 response.</p>
34+
* @example
35+
* Use a bare-bones client and the command you need to make an API call.
36+
* ```javascript
37+
* import { GlueClient, TestConnectionCommand } from "@aws-sdk/client-glue"; // ES Modules import
38+
* // const { GlueClient, TestConnectionCommand } = require("@aws-sdk/client-glue"); // CommonJS import
39+
* const client = new GlueClient(config);
40+
* const input = { // TestConnectionRequest
41+
* ConnectionName: "STRING_VALUE",
42+
* TestConnectionInput: { // TestConnectionInput
43+
* ConnectionType: "JDBC" || "SFTP" || "MONGODB" || "KAFKA" || "NETWORK" || "MARKETPLACE" || "CUSTOM" || "SALESFORCE" || "VIEW_VALIDATION_REDSHIFT" || "VIEW_VALIDATION_ATHENA", // required
44+
* ConnectionProperties: { // ConnectionProperties // required
45+
* "<keys>": "STRING_VALUE",
46+
* },
47+
* AuthenticationConfiguration: { // AuthenticationConfigurationInput
48+
* AuthenticationType: "BASIC" || "OAUTH2" || "CUSTOM",
49+
* SecretArn: "STRING_VALUE",
50+
* OAuth2Properties: { // OAuth2PropertiesInput
51+
* OAuth2GrantType: "AUTHORIZATION_CODE" || "CLIENT_CREDENTIALS" || "JWT_BEARER",
52+
* OAuth2ClientApplication: { // OAuth2ClientApplication
53+
* UserManagedClientApplicationClientId: "STRING_VALUE",
54+
* AWSManagedClientApplicationReference: "STRING_VALUE",
55+
* },
56+
* TokenUrl: "STRING_VALUE",
57+
* TokenUrlParametersMap: { // TokenUrlParametersMap
58+
* "<keys>": "STRING_VALUE",
59+
* },
60+
* AuthorizationCodeProperties: { // AuthorizationCodeProperties
61+
* AuthorizationCode: "STRING_VALUE",
62+
* RedirectUri: "STRING_VALUE",
63+
* },
64+
* },
65+
* },
66+
* },
67+
* };
68+
* const command = new TestConnectionCommand(input);
69+
* const response = await client.send(command);
70+
* // {};
71+
*
72+
* ```
73+
*
74+
* @param TestConnectionCommandInput - {@link TestConnectionCommandInput}
75+
* @returns {@link TestConnectionCommandOutput}
76+
* @see {@link TestConnectionCommandInput} for command's `input` shape.
77+
* @see {@link TestConnectionCommandOutput} for command's `response` shape.
78+
* @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape.
79+
*
80+
* @throws {@link AccessDeniedException} (client fault)
81+
* <p>Access to a resource was denied.</p>
82+
*
83+
* @throws {@link ConflictException} (client fault)
84+
* <p>The <code>CreatePartitions</code> API was called on a table that has indexes enabled. </p>
85+
*
86+
* @throws {@link EntityNotFoundException} (client fault)
87+
* <p>A specified entity does not exist</p>
88+
*
89+
* @throws {@link FederationSourceException} (client fault)
90+
* <p>A federation source failed.</p>
91+
*
92+
* @throws {@link GlueEncryptionException} (client fault)
93+
* <p>An encryption operation failed.</p>
94+
*
95+
* @throws {@link InternalServiceException} (server fault)
96+
* <p>An internal service error occurred.</p>
97+
*
98+
* @throws {@link InvalidInputException} (client fault)
99+
* <p>The input provided was not valid.</p>
100+
*
101+
* @throws {@link OperationTimeoutException} (client fault)
102+
* <p>The operation timed out.</p>
103+
*
104+
* @throws {@link ResourceNumberLimitExceededException} (client fault)
105+
* <p>A resource numerical limit was exceeded.</p>
106+
*
107+
* @throws {@link GlueServiceException}
108+
* <p>Base exception class for all service exceptions from Glue service.</p>
109+
*
110+
* @public
111+
*/
112+
export class TestConnectionCommand extends $Command
113+
.classBuilder<
114+
TestConnectionCommandInput,
115+
TestConnectionCommandOutput,
116+
GlueClientResolvedConfig,
117+
ServiceInputTypes,
118+
ServiceOutputTypes
119+
>()
120+
.ep(commonParams)
121+
.m(function (this: any, Command: any, cs: any, config: GlueClientResolvedConfig, o: any) {
122+
return [
123+
getSerdePlugin(config, this.serialize, this.deserialize),
124+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
125+
];
126+
})
127+
.s("AWSGlue", "TestConnection", {})
128+
.n("GlueClient", "TestConnectionCommand")
129+
.f(void 0, void 0)
130+
.ser(se_TestConnectionCommand)
131+
.de(de_TestConnectionCommand)
132+
.build() {
133+
/** @internal type navigation helper, not in runtime. */
134+
protected declare static __types: {
135+
api: {
136+
input: TestConnectionRequest;
137+
output: {};
138+
};
139+
sdk: {
140+
input: TestConnectionCommandInput;
141+
output: TestConnectionCommandOutput;
142+
};
143+
};
144+
}

clients/client-glue/src/commands/UpdateSourceControlFromJobCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
9-
import { UpdateSourceControlFromJobRequest, UpdateSourceControlFromJobResponse } from "../models/models_2";
9+
import { UpdateSourceControlFromJobRequest } from "../models/models_2";
10+
import { UpdateSourceControlFromJobResponse } from "../models/models_3";
1011
import { de_UpdateSourceControlFromJobCommand, se_UpdateSourceControlFromJobCommand } from "../protocols/Aws_json1_1";
1112

1213
/**

clients/client-glue/src/commands/UpdateTableCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
9-
import { UpdateTableRequest } from "../models/models_2";
10-
import { UpdateTableResponse } from "../models/models_3";
9+
import { UpdateTableRequest, UpdateTableResponse } from "../models/models_3";
1110
import { de_UpdateTableCommand, se_UpdateTableCommand } from "../protocols/Aws_json1_1";
1211

1312
/**

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

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ export * from "./StopSessionCommand";
199199
export * from "./StopTriggerCommand";
200200
export * from "./StopWorkflowRunCommand";
201201
export * from "./TagResourceCommand";
202+
export * from "./TestConnectionCommand";
202203
export * from "./UntagResourceCommand";
203204
export * from "./UpdateBlueprintCommand";
204205
export * from "./UpdateClassifierCommand";

0 commit comments

Comments
 (0)