Class: AWSCDK::Glue::CfnCrawlerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_crawler_props.rb

Overview

Properties for defining a CfnCrawler.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role:, targets:, classifiers: nil, configuration: nil, crawler_security_configuration: nil, database_name: nil, description: nil, lake_formation_configuration: nil, name: nil, recrawl_policy: nil, schedule: nil, schema_change_policy: nil, table_prefix: nil, tags: nil) ⇒ CfnCrawlerProps

Returns a new instance of CfnCrawlerProps.

Parameters:

  • role (String, AWSCDK::Interfaces::AWSIAM::IRoleRef)

    The Amazon Resource Name (ARN) of an IAM role that's used to access customer resources, such as Amazon Simple Storage Service (Amazon S3) data.

  • targets (AWSCDK::IResolvable, AWSCDK::Glue::CfnCrawler::TargetsProperty)

    A collection of targets to crawl.

  • classifiers (Array<String>, nil) (defaults to: nil)

    A list of UTF-8 strings that specify the names of custom classifiers that are associated with the crawler.

  • configuration (String, nil) (defaults to: nil)

    Crawler configuration information.

  • crawler_security_configuration (String, nil) (defaults to: nil)

    The name of the SecurityConfiguration structure to be used by this crawler.

  • database_name (String, AWSCDK::Interfaces::AWSS3::IBucketRef, nil) (defaults to: nil)

    The name of the database in which the crawler's output is stored.

  • description (String, nil) (defaults to: nil)

    A description of the crawler.

  • lake_formation_configuration (AWSCDK::IResolvable, AWSCDK::Glue::CfnCrawler::LakeFormationConfigurationProperty, nil) (defaults to: nil)

    Specifies whether the crawler should use AWS Lake Formation credentials for the crawler instead of the IAM role credentials.

  • name (String, nil) (defaults to: nil)

    The name of the crawler.

  • recrawl_policy (AWSCDK::IResolvable, AWSCDK::Glue::CfnCrawler::RecrawlPolicyProperty, nil) (defaults to: nil)

    A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.

  • schedule (AWSCDK::IResolvable, AWSCDK::Glue::CfnCrawler::ScheduleProperty, nil) (defaults to: nil)

    For scheduled crawlers, the schedule when the crawler runs.

  • schema_change_policy (AWSCDK::IResolvable, AWSCDK::Glue::CfnCrawler::SchemaChangePolicyProperty, nil) (defaults to: nil)

    The policy that specifies update and delete behaviors for the crawler.

  • table_prefix (String, nil) (defaults to: nil)

    The prefix added to the names of tables that are created.

  • tags (Object, nil) (defaults to: nil)

    The tags to use with this crawler.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'glue/cfn_crawler_props.rb', line 23

def initialize(role:, targets:, classifiers: nil, configuration: nil, crawler_security_configuration: nil, database_name: nil, description: nil, lake_formation_configuration: nil, name: nil, recrawl_policy: nil, schedule: nil, schema_change_policy: nil, table_prefix: nil, tags: nil)
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "role")
  @targets = targets.is_a?(Hash) ? ::AWSCDK::Glue::CfnCrawler::TargetsProperty.new(**targets.transform_keys(&:to_sym)) : targets
  Jsii::Type.check_type(@targets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmbkNyYXdsZXIuVGFyZ2V0c1Byb3BlcnR5In1dfX0=")), "targets")
  @classifiers = classifiers
  Jsii::Type.check_type(@classifiers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "classifiers") unless @classifiers.nil?
  @configuration = configuration
  Jsii::Type.check_type(@configuration, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "configuration") unless @configuration.nil?
  @crawler_security_configuration = crawler_security_configuration
  Jsii::Type.check_type(@crawler_security_configuration, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "crawlerSecurityConfiguration") unless @crawler_security_configuration.nil?
  @database_name = database_name
  Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zMy5JQnVja2V0UmVmIn1dfX0=")), "databaseName") unless @database_name.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @lake_formation_configuration = lake_formation_configuration.is_a?(Hash) ? ::AWSCDK::Glue::CfnCrawler::LakeFormationConfigurationProperty.new(**lake_formation_configuration.transform_keys(&:to_sym)) : lake_formation_configuration
  Jsii::Type.check_type(@lake_formation_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmbkNyYXdsZXIuTGFrZUZvcm1hdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "lakeFormationConfiguration") unless @lake_formation_configuration.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @recrawl_policy = recrawl_policy.is_a?(Hash) ? ::AWSCDK::Glue::CfnCrawler::RecrawlPolicyProperty.new(**recrawl_policy.transform_keys(&:to_sym)) : recrawl_policy
  Jsii::Type.check_type(@recrawl_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmbkNyYXdsZXIuUmVjcmF3bFBvbGljeVByb3BlcnR5In1dfX0=")), "recrawlPolicy") unless @recrawl_policy.nil?
  @schedule = schedule.is_a?(Hash) ? ::AWSCDK::Glue::CfnCrawler::ScheduleProperty.new(**schedule.transform_keys(&:to_sym)) : schedule
  Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmbkNyYXdsZXIuU2NoZWR1bGVQcm9wZXJ0eSJ9XX19")), "schedule") unless @schedule.nil?
  @schema_change_policy = schema_change_policy.is_a?(Hash) ? ::AWSCDK::Glue::CfnCrawler::SchemaChangePolicyProperty.new(**schema_change_policy.transform_keys(&:to_sym)) : schema_change_policy
  Jsii::Type.check_type(@schema_change_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmbkNyYXdsZXIuU2NoZW1hQ2hhbmdlUG9saWN5UHJvcGVydHkifV19fQ==")), "schemaChangePolicy") unless @schema_change_policy.nil?
  @table_prefix = table_prefix
  Jsii::Type.check_type(@table_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tablePrefix") unless @table_prefix.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil?
end

Instance Attribute Details

#classifiersArray<String>? (readonly)

A list of UTF-8 strings that specify the names of custom classifiers that are associated with the crawler.



68
69
70
# File 'glue/cfn_crawler_props.rb', line 68

def classifiers
  @classifiers
end

#configurationString? (readonly)

Crawler configuration information.

This versioned JSON string allows users to specify aspects of a crawler's behavior. For more information, see Configuring a Crawler .



75
76
77
# File 'glue/cfn_crawler_props.rb', line 75

def configuration
  @configuration
end

#crawler_security_configurationString? (readonly)

The name of the SecurityConfiguration structure to be used by this crawler.



80
81
82
# File 'glue/cfn_crawler_props.rb', line 80

def crawler_security_configuration
  @crawler_security_configuration
end

#database_nameString, ... (readonly)

The name of the database in which the crawler's output is stored.



85
86
87
# File 'glue/cfn_crawler_props.rb', line 85

def database_name
  @database_name
end

#descriptionString? (readonly)

A description of the crawler.



90
91
92
# File 'glue/cfn_crawler_props.rb', line 90

def description
  @description
end

#lake_formation_configurationAWSCDK::IResolvable, ... (readonly)

Specifies whether the crawler should use AWS Lake Formation credentials for the crawler instead of the IAM role credentials.



95
96
97
# File 'glue/cfn_crawler_props.rb', line 95

def lake_formation_configuration
  @lake_formation_configuration
end

#nameString? (readonly)

The name of the crawler.



100
101
102
# File 'glue/cfn_crawler_props.rb', line 100

def name
  @name
end

#recrawl_policyAWSCDK::IResolvable, ... (readonly)

A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.



105
106
107
# File 'glue/cfn_crawler_props.rb', line 105

def recrawl_policy
  @recrawl_policy
end

#roleString, AWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

The Amazon Resource Name (ARN) of an IAM role that's used to access customer resources, such as Amazon Simple Storage Service (Amazon S3) data.



58
59
60
# File 'glue/cfn_crawler_props.rb', line 58

def role
  @role
end

#scheduleAWSCDK::IResolvable, ... (readonly)

For scheduled crawlers, the schedule when the crawler runs.



110
111
112
# File 'glue/cfn_crawler_props.rb', line 110

def schedule
  @schedule
end

#schema_change_policyAWSCDK::IResolvable, ... (readonly)

The policy that specifies update and delete behaviors for the crawler.

The policy tells the crawler what to do in the event that it detects a change in a table that already exists in the customer's database at the time of the crawl. The SchemaChangePolicy does not affect whether or how new tables and partitions are added. New tables and partitions are always created regardless of the SchemaChangePolicy on a crawler.

The SchemaChangePolicy consists of two components, UpdateBehavior and DeleteBehavior .



119
120
121
# File 'glue/cfn_crawler_props.rb', line 119

def schema_change_policy
  @schema_change_policy
end

#table_prefixString? (readonly)

The prefix added to the names of tables that are created.



124
125
126
# File 'glue/cfn_crawler_props.rb', line 124

def table_prefix
  @table_prefix
end

#tagsObject? (readonly)

The tags to use with this crawler.



129
130
131
# File 'glue/cfn_crawler_props.rb', line 129

def tags
  @tags
end

#targetsAWSCDK::IResolvable, AWSCDK::Glue::CfnCrawler::TargetsProperty (readonly)

A collection of targets to crawl.



63
64
65
# File 'glue/cfn_crawler_props.rb', line 63

def targets
  @targets
end

Class Method Details

.jsii_propertiesObject



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'glue/cfn_crawler_props.rb', line 131

def self.jsii_properties
  {
    :role => "role",
    :targets => "targets",
    :classifiers => "classifiers",
    :configuration => "configuration",
    :crawler_security_configuration => "crawlerSecurityConfiguration",
    :database_name => "databaseName",
    :description => "description",
    :lake_formation_configuration => "lakeFormationConfiguration",
    :name => "name",
    :recrawl_policy => "recrawlPolicy",
    :schedule => "schedule",
    :schema_change_policy => "schemaChangePolicy",
    :table_prefix => "tablePrefix",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'glue/cfn_crawler_props.rb', line 150

def to_jsii
  result = {}
  result.merge!({
    "role" => @role,
    "targets" => @targets,
    "classifiers" => @classifiers,
    "configuration" => @configuration,
    "crawlerSecurityConfiguration" => @crawler_security_configuration,
    "databaseName" => @database_name,
    "description" => @description,
    "lakeFormationConfiguration" => @lake_formation_configuration,
    "name" => @name,
    "recrawlPolicy" => @recrawl_policy,
    "schedule" => @schedule,
    "schemaChangePolicy" => @schema_change_policy,
    "tablePrefix" => @table_prefix,
    "tags" => @tags,
  })
  result.compact
end