Skip to content

Commit 95c192f

Browse files
author
awstools
committed
feat(client-glue): This release enables the new ListCrawls API for viewing the AWS Glue Crawler run history.
1 parent 647d02e commit 95c192f

File tree

12 files changed

+1008
-219
lines changed

12 files changed

+1008
-219
lines changed

clients/client-glue/src/Glue.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ import {
543543
ListCrawlersCommandInput,
544544
ListCrawlersCommandOutput,
545545
} from "./commands/ListCrawlersCommand";
546+
import { ListCrawlsCommand, ListCrawlsCommandInput, ListCrawlsCommandOutput } from "./commands/ListCrawlsCommand";
546547
import {
547548
ListCustomEntityTypesCommand,
548549
ListCustomEntityTypesCommandInput,
@@ -4781,6 +4782,48 @@ export class Glue extends GlueClient {
47814782
}
47824783
}
47834784

4785+
/**
4786+
* <p>Returns all the crawls of a specified crawler. Returns only the crawls that have occurred since the launch date of the crawler history feature, and only retains up to 12 months of crawls. Older crawls will not be returned.</p>
4787+
*
4788+
* <p>You may use this API to:</p>
4789+
* <ul>
4790+
* <li>
4791+
* <p>Retrive all the crawls of a specified crawler.</p>
4792+
* </li>
4793+
* <li>
4794+
* <p>Retrieve all the crawls of a specified crawler within a limited count.</p>
4795+
* </li>
4796+
* <li>
4797+
* <p>Retrieve all the crawls of a specified crawler in a specific time range.</p>
4798+
* </li>
4799+
* <li>
4800+
* <p>Retrieve all the crawls of a specified crawler with a particular state, crawl ID, or DPU hour value.</p>
4801+
* </li>
4802+
* </ul>
4803+
*/
4804+
public listCrawls(args: ListCrawlsCommandInput, options?: __HttpHandlerOptions): Promise<ListCrawlsCommandOutput>;
4805+
public listCrawls(args: ListCrawlsCommandInput, cb: (err: any, data?: ListCrawlsCommandOutput) => void): void;
4806+
public listCrawls(
4807+
args: ListCrawlsCommandInput,
4808+
options: __HttpHandlerOptions,
4809+
cb: (err: any, data?: ListCrawlsCommandOutput) => void
4810+
): void;
4811+
public listCrawls(
4812+
args: ListCrawlsCommandInput,
4813+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListCrawlsCommandOutput) => void),
4814+
cb?: (err: any, data?: ListCrawlsCommandOutput) => void
4815+
): Promise<ListCrawlsCommandOutput> | void {
4816+
const command = new ListCrawlsCommand(args);
4817+
if (typeof optionsOrCb === "function") {
4818+
this.send(command, optionsOrCb);
4819+
} else if (typeof cb === "function") {
4820+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
4821+
this.send(command, optionsOrCb || {}, cb);
4822+
} else {
4823+
return this.send(command, optionsOrCb);
4824+
}
4825+
}
4826+
47844827
/**
47854828
* <p>Lists all the custom patterns that have been created.</p>
47864829
*/

clients/client-glue/src/GlueClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ import {
293293
} from "./commands/ImportCatalogToGlueCommand";
294294
import { ListBlueprintsCommandInput, ListBlueprintsCommandOutput } from "./commands/ListBlueprintsCommand";
295295
import { ListCrawlersCommandInput, ListCrawlersCommandOutput } from "./commands/ListCrawlersCommand";
296+
import { ListCrawlsCommandInput, ListCrawlsCommandOutput } from "./commands/ListCrawlsCommand";
296297
import {
297298
ListCustomEntityTypesCommandInput,
298299
ListCustomEntityTypesCommandOutput,
@@ -530,6 +531,7 @@ export type ServiceInputTypes =
530531
| ImportCatalogToGlueCommandInput
531532
| ListBlueprintsCommandInput
532533
| ListCrawlersCommandInput
534+
| ListCrawlsCommandInput
533535
| ListCustomEntityTypesCommandInput
534536
| ListDevEndpointsCommandInput
535537
| ListJobsCommandInput
@@ -715,6 +717,7 @@ export type ServiceOutputTypes =
715717
| ImportCatalogToGlueCommandOutput
716718
| ListBlueprintsCommandOutput
717719
| ListCrawlersCommandOutput
720+
| ListCrawlsCommandOutput
718721
| ListCustomEntityTypesCommandOutput
719722
| ListDevEndpointsCommandOutput
720723
| ListJobsCommandOutput
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
16+
import { ListCrawlsRequest, ListCrawlsResponse } from "../models/models_1";
17+
import {
18+
deserializeAws_json1_1ListCrawlsCommand,
19+
serializeAws_json1_1ListCrawlsCommand,
20+
} from "../protocols/Aws_json1_1";
21+
22+
export interface ListCrawlsCommandInput extends ListCrawlsRequest {}
23+
export interface ListCrawlsCommandOutput extends ListCrawlsResponse, __MetadataBearer {}
24+
25+
/**
26+
* <p>Returns all the crawls of a specified crawler. Returns only the crawls that have occurred since the launch date of the crawler history feature, and only retains up to 12 months of crawls. Older crawls will not be returned.</p>
27+
*
28+
* <p>You may use this API to:</p>
29+
* <ul>
30+
* <li>
31+
* <p>Retrive all the crawls of a specified crawler.</p>
32+
* </li>
33+
* <li>
34+
* <p>Retrieve all the crawls of a specified crawler within a limited count.</p>
35+
* </li>
36+
* <li>
37+
* <p>Retrieve all the crawls of a specified crawler in a specific time range.</p>
38+
* </li>
39+
* <li>
40+
* <p>Retrieve all the crawls of a specified crawler with a particular state, crawl ID, or DPU hour value.</p>
41+
* </li>
42+
* </ul>
43+
* @example
44+
* Use a bare-bones client and the command you need to make an API call.
45+
* ```javascript
46+
* import { GlueClient, ListCrawlsCommand } from "@aws-sdk/client-glue"; // ES Modules import
47+
* // const { GlueClient, ListCrawlsCommand } = require("@aws-sdk/client-glue"); // CommonJS import
48+
* const client = new GlueClient(config);
49+
* const command = new ListCrawlsCommand(input);
50+
* const response = await client.send(command);
51+
* ```
52+
*
53+
* @see {@link ListCrawlsCommandInput} for command's `input` shape.
54+
* @see {@link ListCrawlsCommandOutput} for command's `response` shape.
55+
* @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape.
56+
*
57+
*/
58+
export class ListCrawlsCommand extends $Command<
59+
ListCrawlsCommandInput,
60+
ListCrawlsCommandOutput,
61+
GlueClientResolvedConfig
62+
> {
63+
// Start section: command_properties
64+
// End section: command_properties
65+
66+
constructor(readonly input: ListCrawlsCommandInput) {
67+
// Start section: command_constructor
68+
super();
69+
// End section: command_constructor
70+
}
71+
72+
/**
73+
* @internal
74+
*/
75+
resolveMiddleware(
76+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
77+
configuration: GlueClientResolvedConfig,
78+
options?: __HttpHandlerOptions
79+
): Handler<ListCrawlsCommandInput, ListCrawlsCommandOutput> {
80+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
81+
82+
const stack = clientStack.concat(this.middlewareStack);
83+
84+
const { logger } = configuration;
85+
const clientName = "GlueClient";
86+
const commandName = "ListCrawlsCommand";
87+
const handlerExecutionContext: HandlerExecutionContext = {
88+
logger,
89+
clientName,
90+
commandName,
91+
inputFilterSensitiveLog: ListCrawlsRequest.filterSensitiveLog,
92+
outputFilterSensitiveLog: ListCrawlsResponse.filterSensitiveLog,
93+
};
94+
const { requestHandler } = configuration;
95+
return stack.resolve(
96+
(request: FinalizeHandlerArguments<any>) =>
97+
requestHandler.handle(request.request as __HttpRequest, options || {}),
98+
handlerExecutionContext
99+
);
100+
}
101+
102+
private serialize(input: ListCrawlsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
103+
return serializeAws_json1_1ListCrawlsCommand(input, context);
104+
}
105+
106+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListCrawlsCommandOutput> {
107+
return deserializeAws_json1_1ListCrawlsCommand(output, context);
108+
}
109+
110+
// Start section: command_body_extra
111+
// End section: command_body_extra
112+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from "@aws-sdk/types";
1414

1515
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
16-
import { RegisterSchemaVersionInput, RegisterSchemaVersionResponse } from "../models/models_1";
16+
import { RegisterSchemaVersionInput, RegisterSchemaVersionResponse } from "../models/models_2";
1717
import {
1818
deserializeAws_json1_1RegisterSchemaVersionCommand,
1919
serializeAws_json1_1RegisterSchemaVersionCommand,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from "@aws-sdk/types";
1414

1515
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
16-
import { RemoveSchemaVersionMetadataInput, RemoveSchemaVersionMetadataResponse } from "../models/models_1";
16+
import { RemoveSchemaVersionMetadataInput, RemoveSchemaVersionMetadataResponse } from "../models/models_2";
1717
import {
1818
deserializeAws_json1_1RemoveSchemaVersionMetadataCommand,
1919
serializeAws_json1_1RemoveSchemaVersionMetadataCommand,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from "@aws-sdk/types";
1414

1515
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
16-
import { ResetJobBookmarkRequest, ResetJobBookmarkResponse } from "../models/models_1";
16+
import { ResetJobBookmarkRequest, ResetJobBookmarkResponse } from "../models/models_2";
1717
import {
1818
deserializeAws_json1_1ResetJobBookmarkCommand,
1919
serializeAws_json1_1ResetJobBookmarkCommand,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export * from "./GetWorkflowRunsCommand";
125125
export * from "./ImportCatalogToGlueCommand";
126126
export * from "./ListBlueprintsCommand";
127127
export * from "./ListCrawlersCommand";
128+
export * from "./ListCrawlsCommand";
128129
export * from "./ListCustomEntityTypesCommand";
129130
export * from "./ListDevEndpointsCommand";
130131
export * from "./ListJobsCommand";

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,11 +1356,11 @@ export namespace BatchGetCrawlersRequest {
13561356
}
13571357

13581358
/**
1359-
* <p>Specifies AWS Lake Formation configuration settings for the crawler.</p>
1359+
* <p>Specifies Lake Formation configuration settings for the crawler.</p>
13601360
*/
13611361
export interface LakeFormationConfiguration {
13621362
/**
1363-
* <p>Specifies whether to use AWS Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
1363+
* <p>Specifies whether to use Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
13641364
*/
13651365
UseLakeFormationCredentials?: boolean;
13661366

@@ -1916,7 +1916,7 @@ export interface Crawler {
19161916
CrawlerSecurityConfiguration?: string;
19171917

19181918
/**
1919-
* <p>Specifies whether the crawler should use AWS Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
1919+
* <p>Specifies whether the crawler should use Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
19201920
*/
19211921
LakeFormationConfiguration?: LakeFormationConfiguration;
19221922
}
@@ -6933,7 +6933,7 @@ export interface CreateCrawlerRequest {
69336933
LineageConfiguration?: LineageConfiguration;
69346934

69356935
/**
6936-
* <p>Specifies AWS Lake Formation configuration settings for the crawler.</p>
6936+
* <p>Specifies Lake Formation configuration settings for the crawler.</p>
69376937
*/
69386938
LakeFormationConfiguration?: LakeFormationConfiguration;
69396939

0 commit comments

Comments
 (0)