Class: AWSCDK::Kendra::CfnDataSource::WebCrawlerConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kendra/cfn_data_source.rb

Overview

Provides the configuration information required for Amazon Kendra Web Crawler.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(urls:, authentication_configuration: nil, crawl_depth: nil, max_content_size_per_page_in_mega_bytes: nil, max_links_per_page: nil, max_urls_per_minute_crawl_rate: nil, proxy_configuration: nil, url_exclusion_patterns: nil, url_inclusion_patterns: nil) ⇒ WebCrawlerConfigurationProperty

Returns a new instance of WebCrawlerConfigurationProperty.

Parameters:

  • urls (AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::WebCrawlerURLsProperty)

    Specifies the seed or starting point URLs of the websites or the sitemap URLs of the websites you want to crawl.

  • authentication_configuration (AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::WebCrawlerAuthenticationConfigurationProperty, nil) (defaults to: nil)

    Configuration information required to connect to websites using authentication.

  • crawl_depth (Numeric, nil) (defaults to: nil)

    The 'depth' or number of levels from the seed level to crawl.

  • max_content_size_per_page_in_mega_bytes (Numeric, nil) (defaults to: nil)

    The maximum size (in MB) of a web page or attachment to crawl.

  • max_links_per_page (Numeric, nil) (defaults to: nil)

    The maximum number of URLs on a web page to include when crawling a website.

  • max_urls_per_minute_crawl_rate (Numeric, nil) (defaults to: nil)

    The maximum number of URLs crawled per website host per minute.

  • proxy_configuration (AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::ProxyConfigurationProperty, nil) (defaults to: nil)

    Configuration information required to connect to your internal websites via a web proxy.

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

    A list of regular expression patterns to exclude certain URLs to crawl.

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

    A list of regular expression patterns to include certain URLs to crawl.



3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
# File 'kendra/cfn_data_source.rb', line 3804

def initialize(urls:, authentication_configuration: nil, crawl_depth: nil, max_content_size_per_page_in_mega_bytes: nil, max_links_per_page: nil, max_urls_per_minute_crawl_rate: nil, proxy_configuration: nil, url_exclusion_patterns: nil, url_inclusion_patterns: nil)
  @urls = urls.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::WebCrawlerURLsProperty.new(**urls.transform_keys(&:to_sym)) : urls
  Jsii::Type.check_type(@urls, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5XZWJDcmF3bGVyVXJsc1Byb3BlcnR5In1dfX0=")), "urls")
  @authentication_configuration = authentication_configuration.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::WebCrawlerAuthenticationConfigurationProperty.new(**authentication_configuration.transform_keys(&:to_sym)) : authentication_configuration
  Jsii::Type.check_type(@authentication_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5XZWJDcmF3bGVyQXV0aGVudGljYXRpb25Db25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "authenticationConfiguration") unless @authentication_configuration.nil?
  @crawl_depth = crawl_depth
  Jsii::Type.check_type(@crawl_depth, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "crawlDepth") unless @crawl_depth.nil?
  @max_content_size_per_page_in_mega_bytes = max_content_size_per_page_in_mega_bytes
  Jsii::Type.check_type(@max_content_size_per_page_in_mega_bytes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxContentSizePerPageInMegaBytes") unless @max_content_size_per_page_in_mega_bytes.nil?
  @max_links_per_page = max_links_per_page
  Jsii::Type.check_type(@max_links_per_page, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxLinksPerPage") unless @max_links_per_page.nil?
  @max_urls_per_minute_crawl_rate = max_urls_per_minute_crawl_rate
  Jsii::Type.check_type(@max_urls_per_minute_crawl_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxUrlsPerMinuteCrawlRate") unless @max_urls_per_minute_crawl_rate.nil?
  @proxy_configuration = proxy_configuration.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::ProxyConfigurationProperty.new(**proxy_configuration.transform_keys(&:to_sym)) : proxy_configuration
  Jsii::Type.check_type(@proxy_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5Qcm94eUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "proxyConfiguration") unless @proxy_configuration.nil?
  @url_exclusion_patterns = url_exclusion_patterns
  Jsii::Type.check_type(@url_exclusion_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "urlExclusionPatterns") unless @url_exclusion_patterns.nil?
  @url_inclusion_patterns = url_inclusion_patterns
  Jsii::Type.check_type(@url_inclusion_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "urlInclusionPatterns") unless @url_inclusion_patterns.nil?
end

Instance Attribute Details

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

Configuration information required to connect to websites using authentication.

You can connect to websites using basic authentication of user name and password. You use a secret in AWS Secrets Manager to store your authentication credentials.

You must provide the website host name and port number. For example, the host name of https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS.



3844
3845
3846
# File 'kendra/cfn_data_source.rb', line 3844

def authentication_configuration
  @authentication_configuration
end

#crawl_depthNumeric? (readonly)

The 'depth' or number of levels from the seed level to crawl.

For example, the seed URL page is depth 1 and any hyperlinks on this page that are also crawled are depth 2.



3851
3852
3853
# File 'kendra/cfn_data_source.rb', line 3851

def crawl_depth
  @crawl_depth
end

#max_content_size_per_page_in_mega_bytesNumeric? (readonly)

The maximum size (in MB) of a web page or attachment to crawl.

Files larger than this size (in MB) are skipped/not crawled.

The default maximum size of a web page or attachment is set to 50 MB.



3860
3861
3862
# File 'kendra/cfn_data_source.rb', line 3860

def max_content_size_per_page_in_mega_bytes
  @max_content_size_per_page_in_mega_bytes
end

The maximum number of URLs on a web page to include when crawling a website.

This number is per web page.

As a website’s web pages are crawled, any URLs the web pages link to are also crawled. URLs on a web page are crawled in order of appearance.

The default maximum links per page is 100.



3871
3872
3873
# File 'kendra/cfn_data_source.rb', line 3871

def max_links_per_page
  @max_links_per_page
end

#max_urls_per_minute_crawl_rateNumeric? (readonly)

The maximum number of URLs crawled per website host per minute.

A minimum of one URL is required.

The default maximum number of URLs crawled per website host per minute is 300.



3880
3881
3882
# File 'kendra/cfn_data_source.rb', line 3880

def max_urls_per_minute_crawl_rate
  @max_urls_per_minute_crawl_rate
end

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

Configuration information required to connect to your internal websites via a web proxy.

You must provide the website host name and port number. For example, the host name of https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS.

Web proxy credentials are optional and you can use them to connect to a web proxy server that requires basic authentication. To store web proxy credentials, you use a secret in AWS Secrets Manager .



3889
3890
3891
# File 'kendra/cfn_data_source.rb', line 3889

def proxy_configuration
  @proxy_configuration
end

#url_exclusion_patternsArray<String>? (readonly)

A list of regular expression patterns to exclude certain URLs to crawl.

URLs that match the patterns are excluded from the index. URLs that don't match the patterns are included in the index. If a URL matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the URL file isn't included in the index.



3896
3897
3898
# File 'kendra/cfn_data_source.rb', line 3896

def url_exclusion_patterns
  @url_exclusion_patterns
end

#url_inclusion_patternsArray<String>? (readonly)

A list of regular expression patterns to include certain URLs to crawl.

URLs that match the patterns are included in the index. URLs that don't match the patterns are excluded from the index. If a URL matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the URL file isn't included in the index.



3903
3904
3905
# File 'kendra/cfn_data_source.rb', line 3903

def url_inclusion_patterns
  @url_inclusion_patterns
end

#urlsAWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::WebCrawlerURLsProperty (readonly)

Specifies the seed or starting point URLs of the websites or the sitemap URLs of the websites you want to crawl.

You can include website subdomains. You can list up to 100 seed URLs and up to three sitemap URLs.

You can only crawl websites that use the secure communication protocol, Hypertext Transfer Protocol Secure (HTTPS). If you receive an error when crawling a website, it could be that the website is blocked from crawling.

When selecting websites to index, you must adhere to the Amazon Acceptable Use Policy and all other Amazon terms. Remember that you must only use Amazon Kendra Web Crawler to index your own webpages, or webpages that you have authorization to index.



3835
3836
3837
# File 'kendra/cfn_data_source.rb', line 3835

def urls
  @urls
end

Class Method Details

.jsii_propertiesObject



3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
# File 'kendra/cfn_data_source.rb', line 3905

def self.jsii_properties
  {
    :urls => "urls",
    :authentication_configuration => "authenticationConfiguration",
    :crawl_depth => "crawlDepth",
    :max_content_size_per_page_in_mega_bytes => "maxContentSizePerPageInMegaBytes",
    :max_links_per_page => "maxLinksPerPage",
    :max_urls_per_minute_crawl_rate => "maxUrlsPerMinuteCrawlRate",
    :proxy_configuration => "proxyConfiguration",
    :url_exclusion_patterns => "urlExclusionPatterns",
    :url_inclusion_patterns => "urlInclusionPatterns",
  }
end

Instance Method Details

#to_jsiiObject



3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
# File 'kendra/cfn_data_source.rb', line 3919

def to_jsii
  result = {}
  result.merge!({
    "urls" => @urls,
    "authenticationConfiguration" => @authentication_configuration,
    "crawlDepth" => @crawl_depth,
    "maxContentSizePerPageInMegaBytes" => @max_content_size_per_page_in_mega_bytes,
    "maxLinksPerPage" => @max_links_per_page,
    "maxUrlsPerMinuteCrawlRate" => @max_urls_per_minute_crawl_rate,
    "proxyConfiguration" => @proxy_configuration,
    "urlExclusionPatterns" => @url_exclusion_patterns,
    "urlInclusionPatterns" => @url_inclusion_patterns,
  })
  result.compact
end