Skip to content

Commit c1607f6

Browse files
author
awstools
committed
feat(client-glue): This release adds additional configurations for Query Session Context on the following APIs: GetUnfilteredTableMetadata, GetUnfilteredPartitionMetadata, GetUnfilteredPartitionsMetadata.
1 parent c313bdd commit c1607f6

13 files changed

+467
-8
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export interface BatchGetPartitionCommandOutput extends BatchGetPartitionRespons
155155
* <p>A federation source failed.</p>
156156
*
157157
* @throws {@link FederationSourceRetryableException} (client fault)
158+
* <p>A federation source failed, but the operation may be retried.</p>
158159
*
159160
* @throws {@link GlueEncryptionException} (client fault)
160161
* <p>An encryption operation failed.</p>

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

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export interface CreateConnectionCommandOutput extends CreateConnectionResponse,
3838
/**
3939
* @public
4040
* <p>Creates a connection definition in the Data Catalog.</p>
41+
* <p>Connections used for creating federated resources require the IAM <code>glue:PassConnection</code> permission.</p>
4142
* @example
4243
* Use a bare-bones client and the command you need to make an API call.
4344
* ```javascript

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

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export interface GetPartitionCommandOutput extends GetPartitionResponse, __Metad
142142
* <p>A federation source failed.</p>
143143
*
144144
* @throws {@link FederationSourceRetryableException} (client fault)
145+
* <p>A federation source failed, but the operation may be retried.</p>
145146
*
146147
* @throws {@link GlueEncryptionException} (client fault)
147148
* <p>An encryption operation failed.</p>

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

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export interface GetPartitionsCommandOutput extends GetPartitionsResponse, __Met
152152
* <p>A federation source failed.</p>
153153
*
154154
* @throws {@link FederationSourceRetryableException} (client fault)
155+
* <p>A federation source failed, but the operation may be retried.</p>
155156
*
156157
* @throws {@link GlueEncryptionException} (client fault)
157158
* <p>An encryption operation failed.</p>

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

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ export interface GetTableCommandOutput extends GetTableResponse, __MetadataBeare
168168
* <p>A federation source failed.</p>
169169
*
170170
* @throws {@link FederationSourceRetryableException} (client fault)
171+
* <p>A federation source failed, but the operation may be retried.</p>
171172
*
172173
* @throws {@link GlueEncryptionException} (client fault)
173174
* <p>An encryption operation failed.</p>

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

+1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export interface GetTablesCommandOutput extends GetTablesResponse, __MetadataBea
173173
* <p>A federation source failed.</p>
174174
*
175175
* @throws {@link FederationSourceRetryableException} (client fault)
176+
* <p>A federation source failed, but the operation may be retried.</p>
176177
*
177178
* @throws {@link GlueEncryptionException} (client fault)
178179
* <p>An encryption operation failed.</p>

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

+11
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export interface GetUnfilteredPartitionMetadataCommandOutput
5252
* // const { GlueClient, GetUnfilteredPartitionMetadataCommand } = require("@aws-sdk/client-glue"); // CommonJS import
5353
* const client = new GlueClient(config);
5454
* const input = { // GetUnfilteredPartitionMetadataRequest
55+
* Region: "STRING_VALUE",
5556
* CatalogId: "STRING_VALUE", // required
5657
* DatabaseName: "STRING_VALUE", // required
5758
* TableName: "STRING_VALUE", // required
@@ -68,6 +69,15 @@ export interface GetUnfilteredPartitionMetadataCommandOutput
6869
* SupportedPermissionTypes: [ // PermissionTypeList // required
6970
* "COLUMN_PERMISSION" || "CELL_FILTER_PERMISSION" || "NESTED_PERMISSION" || "NESTED_CELL_PERMISSION",
7071
* ],
72+
* QuerySessionContext: { // QuerySessionContext
73+
* QueryId: "STRING_VALUE",
74+
* QueryStartTime: new Date("TIMESTAMP"),
75+
* ClusterId: "STRING_VALUE",
76+
* QueryAuthorizationId: "STRING_VALUE",
77+
* AdditionalContext: { // AdditionalContextMap
78+
* "<keys>": "STRING_VALUE",
79+
* },
80+
* },
7181
* };
7282
* const command = new GetUnfilteredPartitionMetadataCommand(input);
7383
* const response = await client.send(command);
@@ -161,6 +171,7 @@ export interface GetUnfilteredPartitionMetadataCommandOutput
161171
* <p>A federation source failed.</p>
162172
*
163173
* @throws {@link FederationSourceRetryableException} (client fault)
174+
* <p>A federation source failed, but the operation may be retried.</p>
164175
*
165176
* @throws {@link GlueEncryptionException} (client fault)
166177
* <p>An encryption operation failed.</p>

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

+11
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export interface GetUnfilteredPartitionsMetadataCommandOutput
5252
* // const { GlueClient, GetUnfilteredPartitionsMetadataCommand } = require("@aws-sdk/client-glue"); // CommonJS import
5353
* const client = new GlueClient(config);
5454
* const input = { // GetUnfilteredPartitionsMetadataRequest
55+
* Region: "STRING_VALUE",
5556
* CatalogId: "STRING_VALUE", // required
5657
* DatabaseName: "STRING_VALUE", // required
5758
* TableName: "STRING_VALUE", // required
@@ -72,6 +73,15 @@ export interface GetUnfilteredPartitionsMetadataCommandOutput
7273
* TotalSegments: Number("int"), // required
7374
* },
7475
* MaxResults: Number("int"),
76+
* QuerySessionContext: { // QuerySessionContext
77+
* QueryId: "STRING_VALUE",
78+
* QueryStartTime: new Date("TIMESTAMP"),
79+
* ClusterId: "STRING_VALUE",
80+
* QueryAuthorizationId: "STRING_VALUE",
81+
* AdditionalContext: { // AdditionalContextMap
82+
* "<keys>": "STRING_VALUE",
83+
* },
84+
* },
7585
* };
7686
* const command = new GetUnfilteredPartitionsMetadataCommand(input);
7787
* const response = await client.send(command);
@@ -170,6 +180,7 @@ export interface GetUnfilteredPartitionsMetadataCommandOutput
170180
* <p>A federation source failed.</p>
171181
*
172182
* @throws {@link FederationSourceRetryableException} (client fault)
183+
* <p>A federation source failed, but the operation may be retried.</p>
173184
*
174185
* @throws {@link GlueEncryptionException} (client fault)
175186
* <p>An encryption operation failed.</p>

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

+23
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface GetUnfilteredTableMetadataCommandOutput extends GetUnfilteredTa
4747
* // const { GlueClient, GetUnfilteredTableMetadataCommand } = require("@aws-sdk/client-glue"); // CommonJS import
4848
* const client = new GlueClient(config);
4949
* const input = { // GetUnfilteredTableMetadataRequest
50+
* Region: "STRING_VALUE",
5051
* CatalogId: "STRING_VALUE", // required
5152
* DatabaseName: "STRING_VALUE", // required
5253
* Name: "STRING_VALUE", // required
@@ -60,6 +61,22 @@ export interface GetUnfilteredTableMetadataCommandOutput extends GetUnfilteredTa
6061
* SupportedPermissionTypes: [ // PermissionTypeList // required
6162
* "COLUMN_PERMISSION" || "CELL_FILTER_PERMISSION" || "NESTED_PERMISSION" || "NESTED_CELL_PERMISSION",
6263
* ],
64+
* SupportedDialect: { // SupportedDialect
65+
* Dialect: "REDSHIFT" || "ATHENA" || "SPARK",
66+
* DialectVersion: "STRING_VALUE",
67+
* },
68+
* Permissions: [ // PermissionList
69+
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS",
70+
* ],
71+
* QuerySessionContext: { // QuerySessionContext
72+
* QueryId: "STRING_VALUE",
73+
* QueryStartTime: new Date("TIMESTAMP"),
74+
* ClusterId: "STRING_VALUE",
75+
* QueryAuthorizationId: "STRING_VALUE",
76+
* AdditionalContext: { // AdditionalContextMap
77+
* "<keys>": "STRING_VALUE",
78+
* },
79+
* },
6380
* };
6481
* const command = new GetUnfilteredTableMetadataCommand(input);
6582
* const response = await client.send(command);
@@ -168,6 +185,11 @@ export interface GetUnfilteredTableMetadataCommandOutput extends GetUnfilteredTa
168185
* // RowFilterExpression: "STRING_VALUE",
169186
* // },
170187
* // ],
188+
* // QueryAuthorizationId: "STRING_VALUE",
189+
* // ResourceArn: "STRING_VALUE",
190+
* // Permissions: [ // PermissionList
191+
* // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS",
192+
* // ],
171193
* // };
172194
*
173195
* ```
@@ -185,6 +207,7 @@ export interface GetUnfilteredTableMetadataCommandOutput extends GetUnfilteredTa
185207
* <p>A federation source failed.</p>
186208
*
187209
* @throws {@link FederationSourceRetryableException} (client fault)
210+
* <p>A federation source failed, but the operation may be retried.</p>
188211
*
189212
* @throws {@link GlueEncryptionException} (client fault)
190213
* <p>An encryption operation failed.</p>

clients/client-glue/src/models/models_0.ts

+5
Original file line numberDiff line numberDiff line change
@@ -7034,10 +7034,15 @@ export class FederationSourceException extends __BaseException {
70347034

70357035
/**
70367036
* @public
7037+
* <p>A federation source failed, but the operation may be retried.</p>
70377038
*/
70387039
export class FederationSourceRetryableException extends __BaseException {
70397040
readonly name: "FederationSourceRetryableException" = "FederationSourceRetryableException";
70407041
readonly $fault: "client" = "client";
7042+
/**
7043+
* @public
7044+
* <p>A message describing the problem.</p>
7045+
*/
70417046
Message?: string;
70427047
/**
70437048
* @internal

clients/client-glue/src/models/models_2.ts

+136
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ import {
121121
DataQualityEvaluationRunAdditionalRunOptions,
122122
DataQualityTargetTable,
123123
JobBookmarkEntry,
124+
Permission,
124125
PrincipalType,
125126
RegistryId,
126127
RegistryStatus,
@@ -902,6 +903,42 @@ export interface GetTriggersResponse {
902903
NextToken?: string;
903904
}
904905

906+
/**
907+
* @public
908+
* <p>A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context.</p>
909+
*/
910+
export interface QuerySessionContext {
911+
/**
912+
* @public
913+
* <p>A unique identifier generated by the query engine for the query.</p>
914+
*/
915+
QueryId?: string;
916+
917+
/**
918+
* @public
919+
* <p>A timestamp provided by the query engine for when the query started.</p>
920+
*/
921+
QueryStartTime?: Date;
922+
923+
/**
924+
* @public
925+
* <p>An identifier string for the consumer cluster.</p>
926+
*/
927+
ClusterId?: string;
928+
929+
/**
930+
* @public
931+
* <p>A cryptographically generated query identifier generated by Glue or Lake Formation.</p>
932+
*/
933+
QueryAuthorizationId?: string;
934+
935+
/**
936+
* @public
937+
* <p>An opaque string-string map passed by the query engine.</p>
938+
*/
939+
AdditionalContext?: Record<string, string>;
940+
}
941+
905942
/**
906943
* @public
907944
* @enum
@@ -922,6 +959,12 @@ export type PermissionType = (typeof PermissionType)[keyof typeof PermissionType
922959
* @public
923960
*/
924961
export interface GetUnfilteredPartitionMetadataRequest {
962+
/**
963+
* @public
964+
* <p>Specified only if the base tables belong to a different Amazon Web Services Region.</p>
965+
*/
966+
Region?: string;
967+
925968
/**
926969
* @public
927970
* <p>The catalog ID where the partition resides.</p>
@@ -957,6 +1000,12 @@ export interface GetUnfilteredPartitionMetadataRequest {
9571000
* <p>(Required) A list of supported permission types. </p>
9581001
*/
9591002
SupportedPermissionTypes: PermissionType[] | undefined;
1003+
1004+
/**
1005+
* @public
1006+
* <p>A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context.</p>
1007+
*/
1008+
QuerySessionContext?: QuerySessionContext;
9601009
}
9611010

9621011
/**
@@ -1014,6 +1063,12 @@ export class PermissionTypeMismatchException extends __BaseException {
10141063
* @public
10151064
*/
10161065
export interface GetUnfilteredPartitionsMetadataRequest {
1066+
/**
1067+
* @public
1068+
* <p>Specified only if the base tables belong to a different Amazon Web Services Region.</p>
1069+
*/
1070+
Region?: string;
1071+
10171072
/**
10181073
* @public
10191074
* <p>The ID of the Data Catalog where the partitions in question reside. If none is provided,
@@ -1168,6 +1223,12 @@ export interface GetUnfilteredPartitionsMetadataRequest {
11681223
* <p>The maximum number of partitions to return in a single response.</p>
11691224
*/
11701225
MaxResults?: number;
1226+
1227+
/**
1228+
* @public
1229+
* <p>A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context.</p>
1230+
*/
1231+
QuerySessionContext?: QuerySessionContext;
11711232
}
11721233

11731234
/**
@@ -1212,10 +1273,49 @@ export interface GetUnfilteredPartitionsMetadataResponse {
12121273
NextToken?: string;
12131274
}
12141275

1276+
/**
1277+
* @public
1278+
* @enum
1279+
*/
1280+
export const ViewDialect = {
1281+
ATHENA: "ATHENA",
1282+
REDSHIFT: "REDSHIFT",
1283+
SPARK: "SPARK",
1284+
} as const;
1285+
1286+
/**
1287+
* @public
1288+
*/
1289+
export type ViewDialect = (typeof ViewDialect)[keyof typeof ViewDialect];
1290+
1291+
/**
1292+
* @public
1293+
* <p>A structure specifying the dialect and dialect version used by the query engine.</p>
1294+
*/
1295+
export interface SupportedDialect {
1296+
/**
1297+
* @public
1298+
* <p>The dialect of the query engine.</p>
1299+
*/
1300+
Dialect?: ViewDialect;
1301+
1302+
/**
1303+
* @public
1304+
* <p>The version of the dialect of the query engine. For example, 3.0.0.</p>
1305+
*/
1306+
DialectVersion?: string;
1307+
}
1308+
12151309
/**
12161310
* @public
12171311
*/
12181312
export interface GetUnfilteredTableMetadataRequest {
1313+
/**
1314+
* @public
1315+
* <p>Specified only if the base tables belong to a different Amazon Web Services Region.</p>
1316+
*/
1317+
Region?: string;
1318+
12191319
/**
12201320
* @public
12211321
* <p>The catalog ID where the table resides.</p>
@@ -1245,6 +1345,24 @@ export interface GetUnfilteredTableMetadataRequest {
12451345
* <p>(Required) A list of supported permission types. </p>
12461346
*/
12471347
SupportedPermissionTypes: PermissionType[] | undefined;
1348+
1349+
/**
1350+
* @public
1351+
* <p>A structure specifying the dialect and dialect version used by the query engine.</p>
1352+
*/
1353+
SupportedDialect?: SupportedDialect;
1354+
1355+
/**
1356+
* @public
1357+
* <p>The Lake Formation data permissions of the caller on the table. Used to authorize the call when no view context is found.</p>
1358+
*/
1359+
Permissions?: Permission[];
1360+
1361+
/**
1362+
* @public
1363+
* <p>A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context.</p>
1364+
*/
1365+
QuerySessionContext?: QuerySessionContext;
12481366
}
12491367

12501368
/**
@@ -1293,6 +1411,24 @@ export interface GetUnfilteredTableMetadataResponse {
12931411
* <p>A list of column row filters.</p>
12941412
*/
12951413
CellFilters?: ColumnRowFilter[];
1414+
1415+
/**
1416+
* @public
1417+
* <p>A cryptographically generated query identifier generated by Glue or Lake Formation.</p>
1418+
*/
1419+
QueryAuthorizationId?: string;
1420+
1421+
/**
1422+
* @public
1423+
* <p>The resource ARN of the parent resource extracted from the request.</p>
1424+
*/
1425+
ResourceArn?: string;
1426+
1427+
/**
1428+
* @public
1429+
* <p>The Lake Formation data permissions of the caller on the table. Used to authorize the call when no view context is found.</p>
1430+
*/
1431+
Permissions?: Permission[];
12961432
}
12971433

12981434
/**

0 commit comments

Comments
 (0)