/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateCrawlerRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Name of the new crawler. *
*/ private String name; /** ** The IAM role or Amazon Resource Name (ARN) of an IAM role used by the new crawler to access customer resources. *
*/ private String role; /** *
* The Glue database where results are written, such as:
* arn:aws:daylight:us-east-1::database/sometable/*
.
*
* A description of the new crawler. *
*/ private String description; /** ** A list of collection of targets to crawl. *
*/ private CrawlerTargets targets; /** *
* 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 * * ? *)
.
*
* 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. *
*/ private java.util.List* The table prefix used for catalog tables that are created. *
*/ private String tablePrefix; /** ** The policy for the crawler's update and deletion behavior. *
*/ private SchemaChangePolicy schemaChangePolicy; /** ** A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since * the last crawler run. *
*/ private RecrawlPolicy recrawlPolicy; /** ** Specifies data lineage configuration settings for the crawler. *
*/ private LineageConfiguration lineageConfiguration; /** ** Specifies Lake Formation configuration settings for the crawler. *
*/ private LakeFormationConfiguration lakeFormationConfiguration; /** ** 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. *
*/ private String configuration; /** *
* The name of the SecurityConfiguration
structure to be used by this crawler.
*
* The tags to use with this crawler request. You may use tags to limit access to the crawler. For more information * about tags in Glue, see Amazon Web * Services Tags in Glue in the developer guide. *
*/ private java.util.Map* Name of the new crawler. *
* * @param name * Name of the new crawler. */ public void setName(String name) { this.name = name; } /** ** Name of the new crawler. *
* * @return Name of the new crawler. */ public String getName() { return this.name; } /** ** Name of the new crawler. *
* * @param name * Name of the new crawler. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withName(String name) { setName(name); return this; } /** ** The IAM role or Amazon Resource Name (ARN) of an IAM role used by the new crawler to access customer resources. *
* * @param role * The IAM role or Amazon Resource Name (ARN) of an IAM role used by the new crawler to access customer * resources. */ public void setRole(String role) { this.role = role; } /** ** The IAM role or Amazon Resource Name (ARN) of an IAM role used by the new crawler to access customer resources. *
* * @return The IAM role or Amazon Resource Name (ARN) of an IAM role used by the new crawler to access customer * resources. */ public String getRole() { return this.role; } /** ** The IAM role or Amazon Resource Name (ARN) of an IAM role used by the new crawler to access customer resources. *
* * @param role * The IAM role or Amazon Resource Name (ARN) of an IAM role used by the new crawler to access customer * resources. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withRole(String role) { setRole(role); return this; } /** *
* The Glue database where results are written, such as:
* arn:aws:daylight:us-east-1::database/sometable/*
.
*
arn:aws:daylight:us-east-1::database/sometable/*
.
*/
public void setDatabaseName(String databaseName) {
this.databaseName = databaseName;
}
/**
*
* The Glue database where results are written, such as:
* arn:aws:daylight:us-east-1::database/sometable/*
.
*
arn:aws:daylight:us-east-1::database/sometable/*
.
*/
public String getDatabaseName() {
return this.databaseName;
}
/**
*
* The Glue database where results are written, such as:
* arn:aws:daylight:us-east-1::database/sometable/*
.
*
arn:aws:daylight:us-east-1::database/sometable/*
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCrawlerRequest withDatabaseName(String databaseName) {
setDatabaseName(databaseName);
return this;
}
/**
* * A description of the new crawler. *
* * @param description * A description of the new crawler. */ public void setDescription(String description) { this.description = description; } /** ** A description of the new crawler. *
* * @return A description of the new crawler. */ public String getDescription() { return this.description; } /** ** A description of the new crawler. *
* * @param description * A description of the new crawler. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withDescription(String description) { setDescription(description); return this; } /** ** A list of collection of targets to crawl. *
* * @param targets * A list of collection of targets to crawl. */ public void setTargets(CrawlerTargets targets) { this.targets = targets; } /** ** A list of collection of targets to crawl. *
* * @return A list of collection of targets to crawl. */ public CrawlerTargets getTargets() { return this.targets; } /** ** A list of collection of targets to crawl. *
* * @param targets * A list of collection of targets to crawl. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withTargets(CrawlerTargets targets) { setTargets(targets); return this; } /** *
* 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 * * ? *)
.
*
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 * * ? *)
.
*/
public void setSchedule(String schedule) {
this.schedule = 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 * * ? *)
.
*
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 * * ? *)
.
*/
public String getSchedule() {
return this.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 * * ? *)
.
*
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 * * ? *)
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCrawlerRequest withSchedule(String schedule) {
setSchedule(schedule);
return this;
}
/**
* * 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. *
* * @return 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. */ public java.util.List* 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. *
* * @param 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. */ public void setClassifiers(java.util.Collection* 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setClassifiers(java.util.Collection)} or {@link #withClassifiers(java.util.Collection)} if you want to * override the existing values. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withClassifiers(String... classifiers) { if (this.classifiers == null) { setClassifiers(new java.util.ArrayList* 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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withClassifiers(java.util.Collection* The table prefix used for catalog tables that are created. *
* * @param tablePrefix * The table prefix used for catalog tables that are created. */ public void setTablePrefix(String tablePrefix) { this.tablePrefix = tablePrefix; } /** ** The table prefix used for catalog tables that are created. *
* * @return The table prefix used for catalog tables that are created. */ public String getTablePrefix() { return this.tablePrefix; } /** ** The table prefix used for catalog tables that are created. *
* * @param tablePrefix * The table prefix used for catalog tables that are created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withTablePrefix(String tablePrefix) { setTablePrefix(tablePrefix); return this; } /** ** The policy for the crawler's update and deletion behavior. *
* * @param schemaChangePolicy * The policy for the crawler's update and deletion behavior. */ public void setSchemaChangePolicy(SchemaChangePolicy schemaChangePolicy) { this.schemaChangePolicy = schemaChangePolicy; } /** ** The policy for the crawler's update and deletion behavior. *
* * @return The policy for the crawler's update and deletion behavior. */ public SchemaChangePolicy getSchemaChangePolicy() { return this.schemaChangePolicy; } /** ** The policy for the crawler's update and deletion behavior. *
* * @param schemaChangePolicy * The policy for the crawler's update and deletion behavior. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withSchemaChangePolicy(SchemaChangePolicy schemaChangePolicy) { setSchemaChangePolicy(schemaChangePolicy); return this; } /** ** A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since * the last crawler run. *
* * @param 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. */ public void setRecrawlPolicy(RecrawlPolicy recrawlPolicy) { this.recrawlPolicy = 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. *
* * @return A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were * added since the last crawler run. */ public RecrawlPolicy getRecrawlPolicy() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withRecrawlPolicy(RecrawlPolicy recrawlPolicy) { setRecrawlPolicy(recrawlPolicy); return this; } /** ** Specifies data lineage configuration settings for the crawler. *
* * @param lineageConfiguration * Specifies data lineage configuration settings for the crawler. */ public void setLineageConfiguration(LineageConfiguration lineageConfiguration) { this.lineageConfiguration = lineageConfiguration; } /** ** Specifies data lineage configuration settings for the crawler. *
* * @return Specifies data lineage configuration settings for the crawler. */ public LineageConfiguration getLineageConfiguration() { return this.lineageConfiguration; } /** ** Specifies data lineage configuration settings for the crawler. *
* * @param lineageConfiguration * Specifies data lineage configuration settings for the crawler. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withLineageConfiguration(LineageConfiguration lineageConfiguration) { setLineageConfiguration(lineageConfiguration); return this; } /** ** Specifies Lake Formation configuration settings for the crawler. *
* * @param lakeFormationConfiguration * Specifies Lake Formation configuration settings for the crawler. */ public void setLakeFormationConfiguration(LakeFormationConfiguration lakeFormationConfiguration) { this.lakeFormationConfiguration = lakeFormationConfiguration; } /** ** Specifies Lake Formation configuration settings for the crawler. *
* * @return Specifies Lake Formation configuration settings for the crawler. */ public LakeFormationConfiguration getLakeFormationConfiguration() { return this.lakeFormationConfiguration; } /** ** Specifies Lake Formation configuration settings for the crawler. *
* * @param lakeFormationConfiguration * Specifies Lake Formation configuration settings for the crawler. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withLakeFormationConfiguration(LakeFormationConfiguration lakeFormationConfiguration) { setLakeFormationConfiguration(lakeFormationConfiguration); return this; } /** ** 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. *
* * @param 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. */ public void setConfiguration(String configuration) { this.configuration = 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. *
* * @return 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. */ public String getConfiguration() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withConfiguration(String configuration) { setConfiguration(configuration); return this; } /** *
* The name of the SecurityConfiguration
structure to be used by this crawler.
*
SecurityConfiguration
structure to be used by this crawler.
*/
public void setCrawlerSecurityConfiguration(String crawlerSecurityConfiguration) {
this.crawlerSecurityConfiguration = crawlerSecurityConfiguration;
}
/**
*
* The name of the SecurityConfiguration
structure to be used by this crawler.
*
SecurityConfiguration
structure to be used by this crawler.
*/
public String getCrawlerSecurityConfiguration() {
return this.crawlerSecurityConfiguration;
}
/**
*
* The name of the SecurityConfiguration
structure to be used by this crawler.
*
SecurityConfiguration
structure to be used by this crawler.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCrawlerRequest withCrawlerSecurityConfiguration(String crawlerSecurityConfiguration) {
setCrawlerSecurityConfiguration(crawlerSecurityConfiguration);
return this;
}
/**
* * The tags to use with this crawler request. You may use tags to limit access to the crawler. For more information * about tags in Glue, see Amazon Web * Services Tags in Glue in the developer guide. *
* * @return The tags to use with this crawler request. You may use tags to limit access to the crawler. For more * information about tags in Glue, see Amazon Web Services Tags in Glue * in the developer guide. */ public java.util.Map* The tags to use with this crawler request. You may use tags to limit access to the crawler. For more information * about tags in Glue, see Amazon Web * Services Tags in Glue in the developer guide. *
* * @param tags * The tags to use with this crawler request. You may use tags to limit access to the crawler. For more * information about tags in Glue, see Amazon Web Services Tags in Glue * in the developer guide. */ public void setTags(java.util.Map* The tags to use with this crawler request. You may use tags to limit access to the crawler. For more information * about tags in Glue, see Amazon Web * Services Tags in Glue in the developer guide. *
* * @param tags * The tags to use with this crawler request. You may use tags to limit access to the crawler. For more * information about tags in Glue, see Amazon Web Services Tags in Glue * in the developer guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCrawlerRequest withTags(java.util.Map