Skip to content

Commit 89e628f

Browse files
author
awstools
committed
feat(client-glue): Added AttributesToGet parameter to Glue GetDatabases, allowing caller to limit output to include only the database name.
1 parent 5c9e9d7 commit 89e628f

File tree

6 files changed

+67
-18
lines changed

6 files changed

+67
-18
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ export interface GetDatabasesCommandOutput extends GetDatabasesResponse, __Metad
4040
* NextToken: "STRING_VALUE",
4141
* MaxResults: Number("int"),
4242
* ResourceShareType: "FOREIGN" || "ALL" || "FEDERATED",
43+
* AttributesToGet: [ // DatabaseAttributesList
44+
* "NAME",
45+
* ],
4346
* };
4447
* const command = new GetDatabasesCommand(input);
4548
* const response = await client.send(command);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
9-
import { GetPlanRequest, GetPlanResponse } from "../models/models_1";
9+
import { GetPlanRequest } from "../models/models_1";
10+
import { GetPlanResponse } from "../models/models_2";
1011
import { de_GetPlanCommand, se_GetPlanCommand } from "../protocols/Aws_json1_1";
1112

1213
/**

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

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5829,6 +5829,19 @@ export interface GetDatabaseResponse {
58295829
Database?: Database;
58305830
}
58315831

5832+
/**
5833+
* @public
5834+
* @enum
5835+
*/
5836+
export const DatabaseAttributes = {
5837+
NAME: "NAME",
5838+
} as const;
5839+
5840+
/**
5841+
* @public
5842+
*/
5843+
export type DatabaseAttributes = (typeof DatabaseAttributes)[keyof typeof DatabaseAttributes];
5844+
58325845
/**
58335846
* @public
58345847
* @enum
@@ -5883,6 +5896,12 @@ export interface GetDatabasesRequest {
58835896
* @public
58845897
*/
58855898
ResourceShareType?: ResourceShareType;
5899+
5900+
/**
5901+
* <p>Specifies the database fields returned by the <code>GetDatabases</code> call. This parameter doesn’t accept an empty list. The request must include the <code>NAME</code>.</p>
5902+
* @public
5903+
*/
5904+
AttributesToGet?: DatabaseAttributes[];
58865905
}
58875906

58885907
/**
@@ -8311,20 +8330,3 @@ export interface GetPlanRequest {
83118330
*/
83128331
AdditionalPlanOptionsMap?: Record<string, string>;
83138332
}
8314-
8315-
/**
8316-
* @public
8317-
*/
8318-
export interface GetPlanResponse {
8319-
/**
8320-
* <p>A Python script to perform the mapping.</p>
8321-
* @public
8322-
*/
8323-
PythonScript?: string;
8324-
8325-
/**
8326-
* <p>The Scala code to perform the mapping.</p>
8327-
* @public
8328-
*/
8329-
ScalaCode?: string;
8330-
}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,23 @@ import {
144144
ViewDialect,
145145
} from "./models_1";
146146

147+
/**
148+
* @public
149+
*/
150+
export interface GetPlanResponse {
151+
/**
152+
* <p>A Python script to perform the mapping.</p>
153+
* @public
154+
*/
155+
PythonScript?: string;
156+
157+
/**
158+
* <p>The Scala code to perform the mapping.</p>
159+
* @public
160+
*/
161+
ScalaCode?: string;
162+
}
163+
147164
/**
148165
* @public
149166
*/

clients/client-glue/src/protocols/Aws_json1_1.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,7 @@ import {
759759
CreateWorkflowRequest,
760760
CsvClassifier,
761761
Database,
762+
DatabaseAttributes,
762763
DatabaseIdentifier,
763764
DatabaseInput,
764765
DataCatalogEncryptionSettings,
@@ -9584,6 +9585,8 @@ const se_CreateTableRequest = (input: CreateTableRequest, context: __SerdeContex
95849585

95859586
// se_DagNodes omitted.
95869587

9588+
// se_DatabaseAttributesList omitted.
9589+
95879590
// se_DatabaseIdentifier omitted.
95889591

95899592
// se_DatabaseInput omitted.

codegen/sdk-codegen/aws-models/glue.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11770,6 +11770,23 @@
1177011770
"smithy.api#documentation": "<p>The <code>Database</code> object represents a logical grouping of tables that might reside\n in a Hive metastore or an RDBMS.</p>"
1177111771
}
1177211772
},
11773+
"com.amazonaws.glue#DatabaseAttributes": {
11774+
"type": "enum",
11775+
"members": {
11776+
"NAME": {
11777+
"target": "smithy.api#Unit",
11778+
"traits": {
11779+
"smithy.api#enumValue": "NAME"
11780+
}
11781+
}
11782+
}
11783+
},
11784+
"com.amazonaws.glue#DatabaseAttributesList": {
11785+
"type": "list",
11786+
"member": {
11787+
"target": "com.amazonaws.glue#DatabaseAttributes"
11788+
}
11789+
},
1177311790
"com.amazonaws.glue#DatabaseIdentifier": {
1177411791
"type": "structure",
1177511792
"members": {
@@ -17145,6 +17162,12 @@
1714517162
"traits": {
1714617163
"smithy.api#documentation": "<p>Allows you to specify that you want to list the databases shared with your account. The allowable values are <code>FEDERATED</code>, <code>FOREIGN</code> or <code>ALL</code>. </p>\n <ul>\n <li>\n <p>If set to <code>FEDERATED</code>, will list the federated databases (referencing an external entity) shared with your account.</p>\n </li>\n <li>\n <p>If set to <code>FOREIGN</code>, will list the databases shared with your account. </p>\n </li>\n <li>\n <p>If set to <code>ALL</code>, will list the databases shared with your account, as well as the databases in yor local account. </p>\n </li>\n </ul>"
1714717164
}
17165+
},
17166+
"AttributesToGet": {
17167+
"target": "com.amazonaws.glue#DatabaseAttributesList",
17168+
"traits": {
17169+
"smithy.api#documentation": "<p>Specifies the database fields returned by the <code>GetDatabases</code> call. This parameter doesn’t accept an empty list. The request must include the <code>NAME</code>.</p>"
17170+
}
1714817171
}
1714917172
},
1715017173
"traits": {

0 commit comments

Comments
 (0)