Skip to content

Commit

Permalink
feat(client-glue): Add AttributesToGet parameter support for Glue Get…
Browse files Browse the repository at this point in the history
…Tables
  • Loading branch information
awstools committed Aug 13, 2024
1 parent 86d89c6 commit 3d999b6
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 12 deletions.
3 changes: 3 additions & 0 deletions clients/client-glue/src/commands/GetTablesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export interface GetTablesCommandOutput extends GetTablesResponse, __MetadataBea
* TransactionId: "STRING_VALUE",
* QueryAsOfTime: new Date("TIMESTAMP"),
* IncludeStatusDetails: true || false,
* AttributesToGet: [ // TableAttributesList
* "NAME" || "TABLE_TYPE",
* ],
* };
* const command = new GetTablesCommand(input);
* const response = await client.send(command);
Expand Down
3 changes: 2 additions & 1 deletion clients/client-glue/src/commands/UpdateWorkflowCommand.ts
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 { UpdateWorkflowRequest, UpdateWorkflowResponse } from "../models/models_2";
import { UpdateWorkflowRequest } from "../models/models_2";
import { UpdateWorkflowResponse } from "../models/models_3";
import { de_UpdateWorkflowCommand, se_UpdateWorkflowCommand } from "../protocols/Aws_json1_1";

/**
Expand Down
42 changes: 31 additions & 11 deletions clients/client-glue/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,20 @@ export interface GetTableOptimizerResponse {
TableOptimizer?: TableOptimizer;
}

/**
* @public
* @enum
*/
export const TableAttributes = {
NAME: "NAME",
TABLE_TYPE: "TABLE_TYPE",
} as const;

/**
* @public
*/
export type TableAttributes = (typeof TableAttributes)[keyof typeof TableAttributes];

/**
* @public
*/
Expand Down Expand Up @@ -1878,6 +1892,23 @@ export interface GetTablesRequest {
* @public
*/
IncludeStatusDetails?: boolean;

/**
* <p> Specifies the table fields returned by the <code>GetTables</code> call. This parameter doesn’t accept an empty list. The request must include <code>NAME</code>.</p>
* <p>The following are the valid combinations of values:</p>
* <ul>
* <li>
* <p>
* <code>NAME</code> - Names of all tables in the database.</p>
* </li>
* <li>
* <p>
* <code>NAME</code>, <code>TABLE_TYPE</code> - Names of all tables and the table types.</p>
* </li>
* </ul>
* @public
*/
AttributesToGet?: TableAttributes[];
}

/**
Expand Down Expand Up @@ -7788,17 +7819,6 @@ export interface UpdateWorkflowRequest {
MaxConcurrentRuns?: number;
}

/**
* @public
*/
export interface UpdateWorkflowResponse {
/**
* <p>The name of the workflow which was specified in input.</p>
* @public
*/
Name?: string;
}

/**
* @internal
*/
Expand Down
11 changes: 11 additions & 0 deletions clients/client-glue/src/models/models_3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ import {
ViewValidation,
} from "./models_2";

/**
* @public
*/
export interface UpdateWorkflowResponse {
/**
* <p>The name of the workflow which was specified in input.</p>
* @public
*/
Name?: string;
}

/**
* <p>Specifies the mapping of data property keys.</p>
* @public
Expand Down
4 changes: 4 additions & 0 deletions clients/client-glue/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,7 @@ import {
StopTriggerRequest,
StopWorkflowRunRequest,
SupportedDialect,
TableAttributes,
TagResourceRequest,
TimestampFilter,
TriggerUpdate,
Expand Down Expand Up @@ -10311,6 +10312,7 @@ const se_GetTableRequest = (input: GetTableRequest, context: __SerdeContext): an
*/
const se_GetTablesRequest = (input: GetTablesRequest, context: __SerdeContext): any => {
return take(input, {
AttributesToGet: _json,
CatalogId: [],
DatabaseName: [],
Expression: [],
Expand Down Expand Up @@ -11122,6 +11124,8 @@ const se_StringColumnStatisticsData = (input: StringColumnStatisticsData, contex

// se_SupportedDialect omitted.

// se_TableAttributesList omitted.

// se_TableIdentifier omitted.

/**
Expand Down
29 changes: 29 additions & 0 deletions codegen/sdk-codegen/aws-models/glue.json
Original file line number Diff line number Diff line change
Expand Up @@ -20451,6 +20451,12 @@
"traits": {
"smithy.api#documentation": "<p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>"
}
},
"AttributesToGet": {
"target": "com.amazonaws.glue#TableAttributesList",
"traits": {
"smithy.api#documentation": "<p> Specifies the table fields returned by the <code>GetTables</code> call. This parameter doesn’t accept an empty list. The request must include <code>NAME</code>.</p>\n <p>The following are the valid combinations of values:</p>\n <ul>\n <li>\n <p>\n <code>NAME</code> - Names of all tables in the database.</p>\n </li>\n <li>\n <p>\n <code>NAME</code>, <code>TABLE_TYPE</code> - Names of all tables and the table types.</p>\n </li>\n </ul>"
}
}
},
"traits": {
Expand Down Expand Up @@ -35007,6 +35013,29 @@
"smithy.api#documentation": "<p>Represents a collection of related data organized in columns and rows.</p>"
}
},
"com.amazonaws.glue#TableAttributes": {
"type": "enum",
"members": {
"NAME": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "NAME"
}
},
"TABLE_TYPE": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "TABLE_TYPE"
}
}
}
},
"com.amazonaws.glue#TableAttributesList": {
"type": "list",
"member": {
"target": "com.amazonaws.glue#TableAttributes"
}
},
"com.amazonaws.glue#TableError": {
"type": "structure",
"members": {
Expand Down

0 comments on commit 3d999b6

Please sign in to comment.