Skip to content

Commit

Permalink
feat(client-glue): This change is for releasing TestConnection api SD…
Browse files Browse the repository at this point in the history
…K model
  • Loading branch information
awstools committed Sep 19, 2024
1 parent 97088ae commit ddea9dd
Show file tree
Hide file tree
Showing 11 changed files with 470 additions and 91 deletions.
8 changes: 8 additions & 0 deletions clients/client-glue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,14 @@ TagResource

[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/)

</details>
<details>
<summary>
TestConnection
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
21 changes: 21 additions & 0 deletions clients/client-glue/src/Glue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,11 @@ import {
StopWorkflowRunCommandOutput,
} from "./commands/StopWorkflowRunCommand";
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import {
TestConnectionCommand,
TestConnectionCommandInput,
TestConnectionCommandOutput,
} from "./commands/TestConnectionCommand";
import {
UntagResourceCommand,
UntagResourceCommandInput,
Expand Down Expand Up @@ -1197,6 +1202,7 @@ const commands = {
StopTriggerCommand,
StopWorkflowRunCommand,
TagResourceCommand,
TestConnectionCommand,
UntagResourceCommand,
UpdateBlueprintCommand,
UpdateClassifierCommand,
Expand Down Expand Up @@ -4236,6 +4242,21 @@ export interface Glue {
cb: (err: any, data?: TagResourceCommandOutput) => void
): void;

/**
* @see {@link TestConnectionCommand}
*/
testConnection(): Promise<TestConnectionCommandOutput>;
testConnection(
args: TestConnectionCommandInput,
options?: __HttpHandlerOptions
): Promise<TestConnectionCommandOutput>;
testConnection(args: TestConnectionCommandInput, cb: (err: any, data?: TestConnectionCommandOutput) => void): void;
testConnection(
args: TestConnectionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: TestConnectionCommandOutput) => void
): void;

/**
* @see {@link UntagResourceCommand}
*/
Expand Down
3 changes: 3 additions & 0 deletions clients/client-glue/src/GlueClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ import { StopSessionCommandInput, StopSessionCommandOutput } from "./commands/St
import { StopTriggerCommandInput, StopTriggerCommandOutput } from "./commands/StopTriggerCommand";
import { StopWorkflowRunCommandInput, StopWorkflowRunCommandOutput } from "./commands/StopWorkflowRunCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { TestConnectionCommandInput, TestConnectionCommandOutput } from "./commands/TestConnectionCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import { UpdateBlueprintCommandInput, UpdateBlueprintCommandOutput } from "./commands/UpdateBlueprintCommand";
import { UpdateClassifierCommandInput, UpdateClassifierCommandOutput } from "./commands/UpdateClassifierCommand";
Expand Down Expand Up @@ -759,6 +760,7 @@ export type ServiceInputTypes =
| StopTriggerCommandInput
| StopWorkflowRunCommandInput
| TagResourceCommandInput
| TestConnectionCommandInput
| UntagResourceCommandInput
| UpdateBlueprintCommandInput
| UpdateClassifierCommandInput
Expand Down Expand Up @@ -988,6 +990,7 @@ export type ServiceOutputTypes =
| StopTriggerCommandOutput
| StopWorkflowRunCommandOutput
| TagResourceCommandOutput
| TestConnectionCommandOutput
| UntagResourceCommandOutput
| UpdateBlueprintCommandOutput
| UpdateClassifierCommandOutput
Expand Down
144 changes: 144 additions & 0 deletions clients/client-glue/src/commands/TestConnectionCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
import { TestConnectionRequest, TestConnectionResponse } from "../models/models_2";
import { de_TestConnectionCommand, se_TestConnectionCommand } from "../protocols/Aws_json1_1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link TestConnectionCommand}.
*/
export interface TestConnectionCommandInput extends TestConnectionRequest {}
/**
* @public
*
* The output of {@link TestConnectionCommand}.
*/
export interface TestConnectionCommandOutput extends TestConnectionResponse, __MetadataBearer {}

/**
* <p>Tests a connection to a service to validate the service credentials that you provide.</p>
* <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>
* <p>If the action is successful, the service sends back an HTTP 200 response.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { GlueClient, TestConnectionCommand } from "@aws-sdk/client-glue"; // ES Modules import
* // const { GlueClient, TestConnectionCommand } = require("@aws-sdk/client-glue"); // CommonJS import
* const client = new GlueClient(config);
* const input = { // TestConnectionRequest
* ConnectionName: "STRING_VALUE",
* TestConnectionInput: { // TestConnectionInput
* ConnectionType: "JDBC" || "SFTP" || "MONGODB" || "KAFKA" || "NETWORK" || "MARKETPLACE" || "CUSTOM" || "SALESFORCE" || "VIEW_VALIDATION_REDSHIFT" || "VIEW_VALIDATION_ATHENA", // required
* ConnectionProperties: { // ConnectionProperties // required
* "<keys>": "STRING_VALUE",
* },
* AuthenticationConfiguration: { // AuthenticationConfigurationInput
* AuthenticationType: "BASIC" || "OAUTH2" || "CUSTOM",
* SecretArn: "STRING_VALUE",
* OAuth2Properties: { // OAuth2PropertiesInput
* OAuth2GrantType: "AUTHORIZATION_CODE" || "CLIENT_CREDENTIALS" || "JWT_BEARER",
* OAuth2ClientApplication: { // OAuth2ClientApplication
* UserManagedClientApplicationClientId: "STRING_VALUE",
* AWSManagedClientApplicationReference: "STRING_VALUE",
* },
* TokenUrl: "STRING_VALUE",
* TokenUrlParametersMap: { // TokenUrlParametersMap
* "<keys>": "STRING_VALUE",
* },
* AuthorizationCodeProperties: { // AuthorizationCodeProperties
* AuthorizationCode: "STRING_VALUE",
* RedirectUri: "STRING_VALUE",
* },
* },
* },
* },
* };
* const command = new TestConnectionCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param TestConnectionCommandInput - {@link TestConnectionCommandInput}
* @returns {@link TestConnectionCommandOutput}
* @see {@link TestConnectionCommandInput} for command's `input` shape.
* @see {@link TestConnectionCommandOutput} for command's `response` shape.
* @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>Access to a resource was denied.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>The <code>CreatePartitions</code> API was called on a table that has indexes enabled. </p>
*
* @throws {@link EntityNotFoundException} (client fault)
* <p>A specified entity does not exist</p>
*
* @throws {@link FederationSourceException} (client fault)
* <p>A federation source failed.</p>
*
* @throws {@link GlueEncryptionException} (client fault)
* <p>An encryption operation failed.</p>
*
* @throws {@link InternalServiceException} (server fault)
* <p>An internal service error occurred.</p>
*
* @throws {@link InvalidInputException} (client fault)
* <p>The input provided was not valid.</p>
*
* @throws {@link OperationTimeoutException} (client fault)
* <p>The operation timed out.</p>
*
* @throws {@link ResourceNumberLimitExceededException} (client fault)
* <p>A resource numerical limit was exceeded.</p>
*
* @throws {@link GlueServiceException}
* <p>Base exception class for all service exceptions from Glue service.</p>
*
* @public
*/
export class TestConnectionCommand extends $Command
.classBuilder<
TestConnectionCommandInput,
TestConnectionCommandOutput,
GlueClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: GlueClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AWSGlue", "TestConnection", {})
.n("GlueClient", "TestConnectionCommand")
.f(void 0, void 0)
.ser(se_TestConnectionCommand)
.de(de_TestConnectionCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: TestConnectionRequest;
output: {};
};
sdk: {
input: TestConnectionCommandInput;
output: TestConnectionCommandOutput;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
import { UpdateSourceControlFromJobRequest, UpdateSourceControlFromJobResponse } from "../models/models_2";
import { UpdateSourceControlFromJobRequest } from "../models/models_2";
import { UpdateSourceControlFromJobResponse } from "../models/models_3";
import { de_UpdateSourceControlFromJobCommand, se_UpdateSourceControlFromJobCommand } from "../protocols/Aws_json1_1";

/**
Expand Down
3 changes: 1 addition & 2 deletions clients/client-glue/src/commands/UpdateTableCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
import { UpdateTableRequest } from "../models/models_2";
import { UpdateTableResponse } from "../models/models_3";
import { UpdateTableRequest, UpdateTableResponse } from "../models/models_3";
import { de_UpdateTableCommand, se_UpdateTableCommand } from "../protocols/Aws_json1_1";

/**
Expand Down
1 change: 1 addition & 0 deletions clients/client-glue/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export * from "./StopSessionCommand";
export * from "./StopTriggerCommand";
export * from "./StopWorkflowRunCommand";
export * from "./TagResourceCommand";
export * from "./TestConnectionCommand";
export * from "./UntagResourceCommand";
export * from "./UpdateBlueprintCommand";
export * from "./UpdateClassifierCommand";
Expand Down
Loading

0 comments on commit ddea9dd

Please sign in to comment.