-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-glue): This release enables the new ListCrawls API for vi…
…ewing the AWS Glue Crawler run history.
- Loading branch information
awstools
committed
Jun 24, 2022
1 parent
647d02e
commit 95c192f
Showing
12 changed files
with
1,008 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
// smithy-typescript generated code | ||
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; | ||
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; | ||
import { Command as $Command } from "@aws-sdk/smithy-client"; | ||
import { | ||
FinalizeHandlerArguments, | ||
Handler, | ||
HandlerExecutionContext, | ||
HttpHandlerOptions as __HttpHandlerOptions, | ||
MetadataBearer as __MetadataBearer, | ||
MiddlewareStack, | ||
SerdeContext as __SerdeContext, | ||
} from "@aws-sdk/types"; | ||
|
||
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; | ||
import { ListCrawlsRequest, ListCrawlsResponse } from "../models/models_1"; | ||
import { | ||
deserializeAws_json1_1ListCrawlsCommand, | ||
serializeAws_json1_1ListCrawlsCommand, | ||
} from "../protocols/Aws_json1_1"; | ||
|
||
export interface ListCrawlsCommandInput extends ListCrawlsRequest {} | ||
export interface ListCrawlsCommandOutput extends ListCrawlsResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <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> | ||
* | ||
* <p>You may use this API to:</p> | ||
* <ul> | ||
* <li> | ||
* <p>Retrive all the crawls of a specified crawler.</p> | ||
* </li> | ||
* <li> | ||
* <p>Retrieve all the crawls of a specified crawler within a limited count.</p> | ||
* </li> | ||
* <li> | ||
* <p>Retrieve all the crawls of a specified crawler in a specific time range.</p> | ||
* </li> | ||
* <li> | ||
* <p>Retrieve all the crawls of a specified crawler with a particular state, crawl ID, or DPU hour value.</p> | ||
* </li> | ||
* </ul> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { GlueClient, ListCrawlsCommand } from "@aws-sdk/client-glue"; // ES Modules import | ||
* // const { GlueClient, ListCrawlsCommand } = require("@aws-sdk/client-glue"); // CommonJS import | ||
* const client = new GlueClient(config); | ||
* const command = new ListCrawlsCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link ListCrawlsCommandInput} for command's `input` shape. | ||
* @see {@link ListCrawlsCommandOutput} for command's `response` shape. | ||
* @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. | ||
* | ||
*/ | ||
export class ListCrawlsCommand extends $Command< | ||
ListCrawlsCommandInput, | ||
ListCrawlsCommandOutput, | ||
GlueClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: ListCrawlsCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: GlueClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<ListCrawlsCommandInput, ListCrawlsCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "GlueClient"; | ||
const commandName = "ListCrawlsCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: ListCrawlsRequest.filterSensitiveLog, | ||
outputFilterSensitiveLog: ListCrawlsResponse.filterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: ListCrawlsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_json1_1ListCrawlsCommand(input, context); | ||
} | ||
|
||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListCrawlsCommandOutput> { | ||
return deserializeAws_json1_1ListCrawlsCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.