pub struct Builder { /* private fields */ }
Expand description

Implementations§

The name of the document classifier.

Examples found in repository?
src/client.rs (line 1867)
1866
1867
1868
1869
        pub fn document_classifier_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.document_classifier_name(input.into());
            self
        }

The name of the document classifier.

Examples found in repository?
src/client.rs (line 1875)
1871
1872
1873
1874
1875
1876
1877
        pub fn set_document_classifier_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_document_classifier_name(input);
            self
        }

The version name given to the newly created classifier. Version names can have a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be unique among all models with the same classifier name in the account/AWS Region.

Examples found in repository?
src/client.rs (line 1880)
1879
1880
1881
1882
        pub fn version_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.version_name(input.into());
            self
        }

The version name given to the newly created classifier. Version names can have a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be unique among all models with the same classifier name in the account/AWS Region.

Examples found in repository?
src/client.rs (line 1885)
1884
1885
1886
1887
        pub fn set_version_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_version_name(input);
            self
        }

The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.

Examples found in repository?
src/client.rs (line 1890)
1889
1890
1891
1892
        pub fn data_access_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.data_access_role_arn(input.into());
            self
        }

The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.

Examples found in repository?
src/client.rs (line 1898)
1894
1895
1896
1897
1898
1899
1900
        pub fn set_data_access_role_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_data_access_role_arn(input);
            self
        }

Appends an item to tags.

To override the contents of this collection use set_tags.

Tags to be associated with the document classifier being created. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.

Examples found in repository?
src/client.rs (line 1907)
1906
1907
1908
1909
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            self.inner = self.inner.tags(input);
            self
        }

Tags to be associated with the document classifier being created. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.

Examples found in repository?
src/client.rs (line 1915)
1911
1912
1913
1914
1915
1916
1917
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }

Specifies the format and location of the input data for the job.

Examples found in repository?
src/client.rs (line 1923)
1919
1920
1921
1922
1923
1924
1925
        pub fn input_data_config(
            mut self,
            input: crate::model::DocumentClassifierInputDataConfig,
        ) -> Self {
            self.inner = self.inner.input_data_config(input);
            self
        }

Specifies the format and location of the input data for the job.

Examples found in repository?
src/client.rs (line 1931)
1927
1928
1929
1930
1931
1932
1933
        pub fn set_input_data_config(
            mut self,
            input: std::option::Option<crate::model::DocumentClassifierInputDataConfig>,
        ) -> Self {
            self.inner = self.inner.set_input_data_config(input);
            self
        }

Enables the addition of output results configuration parameters for custom classifier jobs.

Examples found in repository?
src/client.rs (line 1939)
1935
1936
1937
1938
1939
1940
1941
        pub fn output_data_config(
            mut self,
            input: crate::model::DocumentClassifierOutputDataConfig,
        ) -> Self {
            self.inner = self.inner.output_data_config(input);
            self
        }

Enables the addition of output results configuration parameters for custom classifier jobs.

Examples found in repository?
src/client.rs (line 1947)
1943
1944
1945
1946
1947
1948
1949
        pub fn set_output_data_config(
            mut self,
            input: std::option::Option<crate::model::DocumentClassifierOutputDataConfig>,
        ) -> Self {
            self.inner = self.inner.set_output_data_config(input);
            self
        }

A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.

Examples found in repository?
src/client.rs (line 1952)
1951
1952
1953
1954
        pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.client_request_token(input.into());
            self
        }

A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.

Examples found in repository?
src/client.rs (line 1960)
1956
1957
1958
1959
1960
1961
1962
        pub fn set_client_request_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_client_request_token(input);
            self
        }

The language of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). All documents must be in the same language.

Examples found in repository?
src/client.rs (line 1965)
1964
1965
1966
1967
        pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
            self.inner = self.inner.language_code(input);
            self
        }

The language of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). All documents must be in the same language.

Examples found in repository?
src/client.rs (line 1973)
1969
1970
1971
1972
1973
1974
1975
        pub fn set_language_code(
            mut self,
            input: std::option::Option<crate::model::LanguageCode>,
        ) -> Self {
            self.inner = self.inner.set_language_code(input);
            self
        }

ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:

  • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"

  • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"

Examples found in repository?
src/client.rs (line 1982)
1981
1982
1983
1984
        pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.volume_kms_key_id(input.into());
            self
        }

ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:

  • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"

  • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"

Examples found in repository?
src/client.rs (line 1994)
1990
1991
1992
1993
1994
1995
1996
        pub fn set_volume_kms_key_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_volume_kms_key_id(input);
            self
        }

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see Amazon VPC.

Examples found in repository?
src/client.rs (line 1999)
1998
1999
2000
2001
        pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
            self.inner = self.inner.vpc_config(input);
            self
        }

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see Amazon VPC.

Examples found in repository?
src/client.rs (line 2007)
2003
2004
2005
2006
2007
2008
2009
        pub fn set_vpc_config(
            mut self,
            input: std::option::Option<crate::model::VpcConfig>,
        ) -> Self {
            self.inner = self.inner.set_vpc_config(input);
            self
        }

Indicates the mode in which the classifier will be trained. The classifier can be trained in multi-class mode, which identifies one and only one class for each document, or multi-label mode, which identifies one or more labels for each document. In multi-label mode, multiple labels for an individual document are separated by a delimiter. The default delimiter between labels is a pipe (|).

Examples found in repository?
src/client.rs (line 2012)
2011
2012
2013
2014
        pub fn mode(mut self, input: crate::model::DocumentClassifierMode) -> Self {
            self.inner = self.inner.mode(input);
            self
        }

Indicates the mode in which the classifier will be trained. The classifier can be trained in multi-class mode, which identifies one and only one class for each document, or multi-label mode, which identifies one or more labels for each document. In multi-label mode, multiple labels for an individual document are separated by a delimiter. The default delimiter between labels is a pipe (|).

Examples found in repository?
src/client.rs (line 2020)
2016
2017
2018
2019
2020
2021
2022
        pub fn set_mode(
            mut self,
            input: std::option::Option<crate::model::DocumentClassifierMode>,
        ) -> Self {
            self.inner = self.inner.set_mode(input);
            self
        }

ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:

  • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"

  • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"

Examples found in repository?
src/client.rs (line 2029)
2028
2029
2030
2031
        pub fn model_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.model_kms_key_id(input.into());
            self
        }

ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:

  • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"

  • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"

Examples found in repository?
src/client.rs (line 2041)
2037
2038
2039
2040
2041
2042
2043
        pub fn set_model_kms_key_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_model_kms_key_id(input);
            self
        }

The resource-based policy to attach to your custom document classifier model. You can use this policy to allow another AWS account to import your custom model.

Provide your policy as a JSON body that you enter as a UTF-8 encoded string without line breaks. To provide valid JSON, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:

"{\"attribute\": \"value\", \"attribute\": [\"value\"]}"

To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:

'{"attribute": "value", "attribute": ["value"]}'

Examples found in repository?
src/client.rs (line 2050)
2049
2050
2051
2052
        pub fn model_policy(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.model_policy(input.into());
            self
        }

The resource-based policy to attach to your custom document classifier model. You can use this policy to allow another AWS account to import your custom model.

Provide your policy as a JSON body that you enter as a UTF-8 encoded string without line breaks. To provide valid JSON, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:

"{\"attribute\": \"value\", \"attribute\": [\"value\"]}"

To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:

'{"attribute": "value", "attribute": ["value"]}'

Examples found in repository?
src/client.rs (line 2059)
2058
2059
2060
2061
        pub fn set_model_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_model_policy(input);
            self
        }

Consumes the builder and constructs a CreateDocumentClassifierInput.

Examples found in repository?
src/client.rs (line 1834)
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateDocumentClassifier,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateDocumentClassifierError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateDocumentClassifierOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateDocumentClassifierError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more