updateCrawler method
- required String name,
- List<
String> ? classifiers, - String? configuration,
- String? crawlerSecurityConfiguration,
- String? databaseName,
- String? description,
- LakeFormationConfiguration? lakeFormationConfiguration,
- LineageConfiguration? lineageConfiguration,
- RecrawlPolicy? recrawlPolicy,
- String? role,
- String? schedule,
- SchemaChangePolicy? schemaChangePolicy,
- String? tablePrefix,
- CrawlerTargets? targets,
Updates a crawler. If a crawler is running, you must stop it using
StopCrawler before updating it.
May throw CrawlerRunningException.
May throw EntityNotFoundException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw VersionMismatchException.
Parameter name :
Name of the new crawler.
Parameter classifiers :
A list of custom classifiers that the user has registered. By default, all
built-in classifiers are included in a crawl, but these custom classifiers
always override the default classifiers for a given classification.
Parameter configuration :
Crawler configuration information. This versioned JSON string allows users
to specify aspects of a crawler's behavior. For more information, see Setting
crawler configuration options.
Parameter crawlerSecurityConfiguration :
The name of the SecurityConfiguration structure to be used by
this crawler.
Parameter databaseName :
The Glue database where results are stored, such as:
arn:aws:daylight:us-east-1::database/sometable/*.
Parameter description :
A description of the new crawler.
Parameter lakeFormationConfiguration :
Specifies Lake Formation configuration settings for the crawler.
Parameter lineageConfiguration :
Specifies data lineage configuration settings for the crawler.
Parameter recrawlPolicy :
A policy that specifies whether to crawl the entire dataset again, or to
crawl only folders that were added since the last crawler run.
Parameter role :
The IAM role or Amazon Resource Name (ARN) of an IAM role that is used by
the new crawler to access customer resources.
Parameter schedule :
A cron expression used to specify the schedule (see Time-Based
Schedules for Jobs and Crawlers. For example, to run something every
day at 12:15 UTC, you would specify: cron(15 12 * * ? *).
Parameter schemaChangePolicy :
The policy for the crawler's update and deletion behavior.
Parameter tablePrefix :
The table prefix used for catalog tables that are created.
Parameter targets :
A list of targets to crawl.
Implementation
Future<void> updateCrawler({
required String name,
List<String>? classifiers,
String? configuration,
String? crawlerSecurityConfiguration,
String? databaseName,
String? description,
LakeFormationConfiguration? lakeFormationConfiguration,
LineageConfiguration? lineageConfiguration,
RecrawlPolicy? recrawlPolicy,
String? role,
String? schedule,
SchemaChangePolicy? schemaChangePolicy,
String? tablePrefix,
CrawlerTargets? targets,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.UpdateCrawler'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (classifiers != null) 'Classifiers': classifiers,
if (configuration != null) 'Configuration': configuration,
if (crawlerSecurityConfiguration != null)
'CrawlerSecurityConfiguration': crawlerSecurityConfiguration,
if (databaseName != null) 'DatabaseName': databaseName,
if (description != null) 'Description': description,
if (lakeFormationConfiguration != null)
'LakeFormationConfiguration': lakeFormationConfiguration,
if (lineageConfiguration != null)
'LineageConfiguration': lineageConfiguration,
if (recrawlPolicy != null) 'RecrawlPolicy': recrawlPolicy,
if (role != null) 'Role': role,
if (schedule != null) 'Schedule': schedule,
if (schemaChangePolicy != null)
'SchemaChangePolicy': schemaChangePolicy,
if (tablePrefix != null) 'TablePrefix': tablePrefix,
if (targets != null) 'Targets': targets,
},
);
}