#[non_exhaustive]pub struct WebCrawlerConfigurationBuilder { /* private fields */ }
Expand description
A builder for WebCrawlerConfiguration
.
Implementations§
Source§impl WebCrawlerConfigurationBuilder
impl WebCrawlerConfigurationBuilder
Sourcepub fn urls(self, input: Urls) -> Self
pub fn urls(self, input: Urls) -> Self
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 web pages, or web pages that you have authorization to index.
This field is required.Sourcepub fn set_urls(self, input: Option<Urls>) -> Self
pub fn set_urls(self, input: Option<Urls>) -> Self
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 web pages, or web pages that you have authorization to index.
Sourcepub fn get_urls(&self) -> &Option<Urls>
pub fn get_urls(&self) -> &Option<Urls>
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 web pages, or web pages that you have authorization to index.
Sourcepub fn crawl_depth(self, input: i32) -> Self
pub fn crawl_depth(self, input: i32) -> Self
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.
Sourcepub fn set_crawl_depth(self, input: Option<i32>) -> Self
pub fn set_crawl_depth(self, input: Option<i32>) -> Self
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.
Sourcepub fn get_crawl_depth(&self) -> &Option<i32>
pub fn get_crawl_depth(&self) -> &Option<i32>
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.
Sourcepub fn max_links_per_page(self, input: i32) -> Self
pub fn max_links_per_page(self, input: i32) -> Self
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.
Sourcepub fn set_max_links_per_page(self, input: Option<i32>) -> Self
pub fn set_max_links_per_page(self, input: Option<i32>) -> Self
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.
Sourcepub fn get_max_links_per_page(&self) -> &Option<i32>
pub fn get_max_links_per_page(&self) -> &Option<i32>
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.
Sourcepub fn max_content_size_per_page_in_mega_bytes(self, input: f32) -> Self
pub fn max_content_size_per_page_in_mega_bytes(self, input: f32) -> Self
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.
Sourcepub fn set_max_content_size_per_page_in_mega_bytes(
self,
input: Option<f32>,
) -> Self
pub fn set_max_content_size_per_page_in_mega_bytes( self, input: Option<f32>, ) -> Self
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.
Sourcepub fn get_max_content_size_per_page_in_mega_bytes(&self) -> &Option<f32>
pub fn get_max_content_size_per_page_in_mega_bytes(&self) -> &Option<f32>
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.
Sourcepub fn max_urls_per_minute_crawl_rate(self, input: i32) -> Self
pub fn max_urls_per_minute_crawl_rate(self, input: i32) -> Self
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.
Sourcepub fn set_max_urls_per_minute_crawl_rate(self, input: Option<i32>) -> Self
pub fn set_max_urls_per_minute_crawl_rate(self, input: Option<i32>) -> Self
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.
Sourcepub fn get_max_urls_per_minute_crawl_rate(&self) -> &Option<i32>
pub fn get_max_urls_per_minute_crawl_rate(&self) -> &Option<i32>
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.
Sourcepub fn url_inclusion_patterns(self, input: impl Into<String>) -> Self
pub fn url_inclusion_patterns(self, input: impl Into<String>) -> Self
Appends an item to url_inclusion_patterns
.
To override the contents of this collection use set_url_inclusion_patterns
.
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.
Sourcepub fn set_url_inclusion_patterns(self, input: Option<Vec<String>>) -> Self
pub fn set_url_inclusion_patterns(self, input: Option<Vec<String>>) -> Self
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.
Sourcepub fn get_url_inclusion_patterns(&self) -> &Option<Vec<String>>
pub fn get_url_inclusion_patterns(&self) -> &Option<Vec<String>>
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.
Sourcepub fn url_exclusion_patterns(self, input: impl Into<String>) -> Self
pub fn url_exclusion_patterns(self, input: impl Into<String>) -> Self
Appends an item to url_exclusion_patterns
.
To override the contents of this collection use set_url_exclusion_patterns
.
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.
Sourcepub fn set_url_exclusion_patterns(self, input: Option<Vec<String>>) -> Self
pub fn set_url_exclusion_patterns(self, input: Option<Vec<String>>) -> Self
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.
Sourcepub fn get_url_exclusion_patterns(&self) -> &Option<Vec<String>>
pub fn get_url_exclusion_patterns(&self) -> &Option<Vec<String>>
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.
Sourcepub fn proxy_configuration(self, input: ProxyConfiguration) -> Self
pub fn proxy_configuration(self, input: ProxyConfiguration) -> Self
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 Secrets Manager.
Sourcepub fn set_proxy_configuration(self, input: Option<ProxyConfiguration>) -> Self
pub fn set_proxy_configuration(self, input: Option<ProxyConfiguration>) -> Self
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 Secrets Manager.
Sourcepub fn get_proxy_configuration(&self) -> &Option<ProxyConfiguration>
pub fn get_proxy_configuration(&self) -> &Option<ProxyConfiguration>
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 Secrets Manager.
Sourcepub fn authentication_configuration(
self,
input: AuthenticationConfiguration,
) -> Self
pub fn authentication_configuration( self, input: AuthenticationConfiguration, ) -> Self
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 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.
Sourcepub fn set_authentication_configuration(
self,
input: Option<AuthenticationConfiguration>,
) -> Self
pub fn set_authentication_configuration( self, input: Option<AuthenticationConfiguration>, ) -> Self
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 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.
Sourcepub fn get_authentication_configuration(
&self,
) -> &Option<AuthenticationConfiguration>
pub fn get_authentication_configuration( &self, ) -> &Option<AuthenticationConfiguration>
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 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.
Sourcepub fn build(self) -> WebCrawlerConfiguration
pub fn build(self) -> WebCrawlerConfiguration
Consumes the builder and constructs a WebCrawlerConfiguration
.
Trait Implementations§
Source§impl Clone for WebCrawlerConfigurationBuilder
impl Clone for WebCrawlerConfigurationBuilder
Source§fn clone(&self) -> WebCrawlerConfigurationBuilder
fn clone(&self) -> WebCrawlerConfigurationBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for WebCrawlerConfigurationBuilder
impl Default for WebCrawlerConfigurationBuilder
Source§fn default() -> WebCrawlerConfigurationBuilder
fn default() -> WebCrawlerConfigurationBuilder
Source§impl PartialEq for WebCrawlerConfigurationBuilder
impl PartialEq for WebCrawlerConfigurationBuilder
Source§fn eq(&self, other: &WebCrawlerConfigurationBuilder) -> bool
fn eq(&self, other: &WebCrawlerConfigurationBuilder) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for WebCrawlerConfigurationBuilder
Auto Trait Implementations§
impl Freeze for WebCrawlerConfigurationBuilder
impl RefUnwindSafe for WebCrawlerConfigurationBuilder
impl Send for WebCrawlerConfigurationBuilder
impl Sync for WebCrawlerConfigurationBuilder
impl Unpin for WebCrawlerConfigurationBuilder
impl UnwindSafe for WebCrawlerConfigurationBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);