|
| 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 | +} |
0 commit comments