Skip to content

Commit

Permalink
feat(client-glue): Added AthenaProperties parameter to Glue Connectio…
Browse files Browse the repository at this point in the history
…ns, allowing Athena to store service specific properties on Glue Connections.
  • Loading branch information
awstools committed Sep 23, 2024
1 parent 3db793d commit a8db47f
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 20 deletions.
13 changes: 10 additions & 3 deletions clients/client-glue/src/commands/CreateConnectionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
import { CreateConnectionRequest, CreateConnectionResponse } from "../models/models_1";
import {
CreateConnectionRequest,
CreateConnectionRequestFilterSensitiveLog,
CreateConnectionResponse,
} from "../models/models_1";
import { de_CreateConnectionCommand, se_CreateConnectionCommand } from "../protocols/Aws_json1_1";

/**
Expand Down Expand Up @@ -48,6 +52,9 @@ export interface CreateConnectionCommandOutput extends CreateConnectionResponse,
* ConnectionProperties: { // ConnectionProperties // required
* "<keys>": "STRING_VALUE",
* },
* AthenaProperties: { // PropertyMap
* "<keys>": "STRING_VALUE",
* },
* PhysicalConnectionRequirements: { // PhysicalConnectionRequirements
* SubnetId: "STRING_VALUE",
* SecurityGroupIdList: [ // SecurityGroupIdList
Expand All @@ -57,7 +64,6 @@ export interface CreateConnectionCommandOutput extends CreateConnectionResponse,
* },
* AuthenticationConfiguration: { // AuthenticationConfigurationInput
* AuthenticationType: "BASIC" || "OAUTH2" || "CUSTOM",
* SecretArn: "STRING_VALUE",
* OAuth2Properties: { // OAuth2PropertiesInput
* OAuth2GrantType: "AUTHORIZATION_CODE" || "CLIENT_CREDENTIALS" || "JWT_BEARER",
* OAuth2ClientApplication: { // OAuth2ClientApplication
Expand All @@ -73,6 +79,7 @@ export interface CreateConnectionCommandOutput extends CreateConnectionResponse,
* RedirectUri: "STRING_VALUE",
* },
* },
* SecretArn: "STRING_VALUE",
* },
* ValidateCredentials: true || false,
* },
Expand Down Expand Up @@ -131,7 +138,7 @@ export class CreateConnectionCommand extends $Command
})
.s("AWSGlue", "CreateConnection", {})
.n("GlueClient", "CreateConnectionCommand")
.f(void 0, void 0)
.f(CreateConnectionRequestFilterSensitiveLog, void 0)
.ser(se_CreateConnectionCommand)
.de(de_CreateConnectionCommand)
.build() {
Expand Down
3 changes: 3 additions & 0 deletions clients/client-glue/src/commands/GetConnectionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export interface GetConnectionCommandOutput extends GetConnectionResponse, __Met
* // ConnectionProperties: { // ConnectionProperties
* // "<keys>": "STRING_VALUE",
* // },
* // AthenaProperties: { // PropertyMap
* // "<keys>": "STRING_VALUE",
* // },
* // PhysicalConnectionRequirements: { // PhysicalConnectionRequirements
* // SubnetId: "STRING_VALUE",
* // SecurityGroupIdList: [ // SecurityGroupIdList
Expand Down
3 changes: 3 additions & 0 deletions clients/client-glue/src/commands/GetConnectionsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export interface GetConnectionsCommandOutput extends GetConnectionsResponse, __M
* // ConnectionProperties: { // ConnectionProperties
* // "<keys>": "STRING_VALUE",
* // },
* // AthenaProperties: { // PropertyMap
* // "<keys>": "STRING_VALUE",
* // },
* // PhysicalConnectionRequirements: { // PhysicalConnectionRequirements
* // SubnetId: "STRING_VALUE",
* // SecurityGroupIdList: [ // SecurityGroupIdList
Expand Down
10 changes: 7 additions & 3 deletions clients/client-glue/src/commands/TestConnectionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ 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 {
TestConnectionRequest,
TestConnectionRequestFilterSensitiveLog,
TestConnectionResponse,
} from "../models/models_2";
import { de_TestConnectionCommand, se_TestConnectionCommand } from "../protocols/Aws_json1_1";

/**
Expand Down Expand Up @@ -46,7 +50,6 @@ export interface TestConnectionCommandOutput extends TestConnectionResponse, __M
* },
* AuthenticationConfiguration: { // AuthenticationConfigurationInput
* AuthenticationType: "BASIC" || "OAUTH2" || "CUSTOM",
* SecretArn: "STRING_VALUE",
* OAuth2Properties: { // OAuth2PropertiesInput
* OAuth2GrantType: "AUTHORIZATION_CODE" || "CLIENT_CREDENTIALS" || "JWT_BEARER",
* OAuth2ClientApplication: { // OAuth2ClientApplication
Expand All @@ -62,6 +65,7 @@ export interface TestConnectionCommandOutput extends TestConnectionResponse, __M
* RedirectUri: "STRING_VALUE",
* },
* },
* SecretArn: "STRING_VALUE",
* },
* },
* };
Expand Down Expand Up @@ -126,7 +130,7 @@ export class TestConnectionCommand extends $Command
})
.s("AWSGlue", "TestConnection", {})
.n("GlueClient", "TestConnectionCommand")
.f(void 0, void 0)
.f(TestConnectionRequestFilterSensitiveLog, void 0)
.ser(se_TestConnectionCommand)
.de(de_TestConnectionCommand)
.build() {
Expand Down
13 changes: 10 additions & 3 deletions clients/client-glue/src/commands/UpdateConnectionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
import { UpdateConnectionRequest, UpdateConnectionResponse } from "../models/models_2";
import {
UpdateConnectionRequest,
UpdateConnectionRequestFilterSensitiveLog,
UpdateConnectionResponse,
} from "../models/models_2";
import { de_UpdateConnectionCommand, se_UpdateConnectionCommand } from "../protocols/Aws_json1_1";

/**
Expand Down Expand Up @@ -48,6 +52,9 @@ export interface UpdateConnectionCommandOutput extends UpdateConnectionResponse,
* ConnectionProperties: { // ConnectionProperties // required
* "<keys>": "STRING_VALUE",
* },
* AthenaProperties: { // PropertyMap
* "<keys>": "STRING_VALUE",
* },
* PhysicalConnectionRequirements: { // PhysicalConnectionRequirements
* SubnetId: "STRING_VALUE",
* SecurityGroupIdList: [ // SecurityGroupIdList
Expand All @@ -57,7 +64,6 @@ export interface UpdateConnectionCommandOutput extends UpdateConnectionResponse,
* },
* AuthenticationConfiguration: { // AuthenticationConfigurationInput
* AuthenticationType: "BASIC" || "OAUTH2" || "CUSTOM",
* SecretArn: "STRING_VALUE",
* OAuth2Properties: { // OAuth2PropertiesInput
* OAuth2GrantType: "AUTHORIZATION_CODE" || "CLIENT_CREDENTIALS" || "JWT_BEARER",
* OAuth2ClientApplication: { // OAuth2ClientApplication
Expand All @@ -73,6 +79,7 @@ export interface UpdateConnectionCommandOutput extends UpdateConnectionResponse,
* RedirectUri: "STRING_VALUE",
* },
* },
* SecretArn: "STRING_VALUE",
* },
* ValidateCredentials: true || false,
* },
Expand Down Expand Up @@ -123,7 +130,7 @@ export class UpdateConnectionCommand extends $Command
})
.s("AWSGlue", "UpdateConnection", {})
.n("GlueClient", "UpdateConnectionCommand")
.f(void 0, void 0)
.f(UpdateConnectionRequestFilterSensitiveLog, void 0)
.ser(se_UpdateConnectionCommand)
.de(de_UpdateConnectionCommand)
.build() {
Expand Down
34 changes: 30 additions & 4 deletions clients/client-glue/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,16 +810,16 @@ export interface AuthenticationConfigurationInput {
AuthenticationType?: AuthenticationType;

/**
* <p>The secret manager ARN to store credentials in the CreateConnection request.</p>
* <p>The properties for OAuth2 authentication in the CreateConnection request.</p>
* @public
*/
SecretArn?: string;
OAuth2Properties?: OAuth2PropertiesInput;

/**
* <p>The properties for OAuth2 authentication in the CreateConnection request.</p>
* <p>The secret manager ARN to store credentials in the CreateConnection request.</p>
* @public
*/
OAuth2Properties?: OAuth2PropertiesInput;
SecretArn?: string;
}

/**
Expand Down Expand Up @@ -9243,6 +9243,32 @@ export interface CancelDataQualityRuleRecommendationRunRequest {
*/
export interface CancelDataQualityRuleRecommendationRunResponse {}

/**
* @internal
*/
export const AuthorizationCodePropertiesFilterSensitiveLog = (obj: AuthorizationCodeProperties): any => ({
...obj,
...(obj.AuthorizationCode && { AuthorizationCode: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const OAuth2PropertiesInputFilterSensitiveLog = (obj: OAuth2PropertiesInput): any => ({
...obj,
...(obj.AuthorizationCodeProperties && {
AuthorizationCodeProperties: AuthorizationCodePropertiesFilterSensitiveLog(obj.AuthorizationCodeProperties),
}),
});

/**
* @internal
*/
export const AuthenticationConfigurationInputFilterSensitiveLog = (obj: AuthenticationConfigurationInput): any => ({
...obj,
...(obj.OAuth2Properties && { OAuth2Properties: OAuth2PropertiesInputFilterSensitiveLog(obj.OAuth2Properties) }),
});

/**
* @internal
*/
Expand Down
31 changes: 31 additions & 0 deletions clients/client-glue/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Action,
AuthenticationConfiguration,
AuthenticationConfigurationInput,
AuthenticationConfigurationInputFilterSensitiveLog,
Blueprint,
Column,
ConnectionsList,
Expand Down Expand Up @@ -715,6 +716,12 @@ export interface ConnectionInput {
*/
ConnectionProperties: Partial<Record<ConnectionPropertyKey, string>> | undefined;

/**
* <p>This field is not currently used.</p>
* @public
*/
AthenaProperties?: Record<string, string>;

/**
* <p>The physical connection requirements, such as virtual private cloud (VPC) and <code>SecurityGroup</code>, that are needed to successfully make this connection.</p>
* @public
Expand Down Expand Up @@ -5881,6 +5888,12 @@ export interface Connection {
*/
ConnectionProperties?: Partial<Record<ConnectionPropertyKey, string>>;

/**
* <p>This field is not currently used.</p>
* @public
*/
AthenaProperties?: Record<string, string>;

/**
* <p>The physical connection requirements, such as virtual private cloud (VPC) and <code>SecurityGroup</code>, that are needed to make this connection successfully.</p>
* @public
Expand Down Expand Up @@ -7837,6 +7850,24 @@ export interface GetMLTaskRunsResponse {
NextToken?: string;
}

/**
* @internal
*/
export const ConnectionInputFilterSensitiveLog = (obj: ConnectionInput): any => ({
...obj,
...(obj.AuthenticationConfiguration && {
AuthenticationConfiguration: AuthenticationConfigurationInputFilterSensitiveLog(obj.AuthenticationConfiguration),
}),
});

/**
* @internal
*/
export const CreateConnectionRequestFilterSensitiveLog = (obj: CreateConnectionRequest): any => ({
...obj,
...(obj.ConnectionInput && { ConnectionInput: ConnectionInputFilterSensitiveLog(obj.ConnectionInput) }),
});

/**
* @internal
*/
Expand Down
30 changes: 30 additions & 0 deletions clients/client-glue/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { GlueServiceException as __BaseException } from "./GlueServiceException"
import {
AuditContext,
AuthenticationConfigurationInput,
AuthenticationConfigurationInputFilterSensitiveLog,
CrawlerTargets,
CustomEntityType,
DataSource,
Expand Down Expand Up @@ -40,6 +41,7 @@ import {
ColumnStatistics,
Compatibility,
ConnectionInput,
ConnectionInputFilterSensitiveLog,
ConnectionPropertyKey,
ConnectionType,
CsvHeaderOption,
Expand Down Expand Up @@ -7997,3 +7999,31 @@ export const ListDataQualityStatisticsResponseFilterSensitiveLog = (obj: ListDat
...obj,
...(obj.Statistics && { Statistics: obj.Statistics.map((item) => StatisticSummaryFilterSensitiveLog(item)) }),
});

/**
* @internal
*/
export const TestConnectionInputFilterSensitiveLog = (obj: TestConnectionInput): any => ({
...obj,
...(obj.AuthenticationConfiguration && {
AuthenticationConfiguration: AuthenticationConfigurationInputFilterSensitiveLog(obj.AuthenticationConfiguration),
}),
});

/**
* @internal
*/
export const TestConnectionRequestFilterSensitiveLog = (obj: TestConnectionRequest): any => ({
...obj,
...(obj.TestConnectionInput && {
TestConnectionInput: TestConnectionInputFilterSensitiveLog(obj.TestConnectionInput),
}),
});

/**
* @internal
*/
export const UpdateConnectionRequestFilterSensitiveLog = (obj: UpdateConnectionRequest): any => ({
...obj,
...(obj.ConnectionInput && { ConnectionInput: ConnectionInputFilterSensitiveLog(obj.ConnectionInput) }),
});
5 changes: 5 additions & 0 deletions clients/client-glue/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10930,6 +10930,8 @@ const se_PIIDetection = (input: PIIDetection, context: __SerdeContext): any => {

// se_ProfileConfiguration omitted.

// se_PropertyMap omitted.

// se_PropertyPredicate omitted.

// se_PublicKeysList omitted.
Expand Down Expand Up @@ -12158,6 +12160,7 @@ const de_CompactionMetrics = (output: any, context: __SerdeContext): CompactionM
*/
const de_Connection = (output: any, context: __SerdeContext): Connection => {
return take(output, {
AthenaProperties: _json,
AuthenticationConfiguration: _json,
ConnectionProperties: _json,
ConnectionType: __expectString,
Expand Down Expand Up @@ -14579,6 +14582,8 @@ const de_PIIDetection = (output: any, context: __SerdeContext): PIIDetection =>

// de_ProfileConfiguration omitted.

// de_PropertyMap omitted.

// de_PublicKeysList omitted.

// de_PutDataCatalogEncryptionSettingsResponse omitted.
Expand Down
Loading

0 comments on commit a8db47f

Please sign in to comment.