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

Implementations§

The name given to the newly created recognizer. Recognizer names can be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The name must be unique in the account/region.

Examples found in repository?
src/client.rs (line 2266)
2265
2266
2267
2268
        pub fn recognizer_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.recognizer_name(input.into());
            self
        }

The name given to the newly created recognizer. Recognizer names can be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The name must be unique in the account/region.

Examples found in repository?
src/client.rs (line 2274)
2270
2271
2272
2273
2274
2275
2276
        pub fn set_recognizer_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_recognizer_name(input);
            self
        }

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

Examples found in repository?
src/client.rs (line 2279)
2278
2279
2280
2281
        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 recognizer. Version names can be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be unique among all models with the same recognizer name in the account/ AWS Region.

Examples found in repository?
src/client.rs (line 2284)
2283
2284
2285
2286
        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 2289)
2288
2289
2290
2291
        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 2297)
2293
2294
2295
2296
2297
2298
2299
        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 entity recognizer 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 2306)
2305
2306
2307
2308
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            self.inner = self.inner.tags(input);
            self
        }

Tags to be associated with the entity recognizer 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 2314)
2310
2311
2312
2313
2314
2315
2316
        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. The S3 bucket containing the input data must be located in the same region as the entity recognizer being created.

Examples found in repository?
src/client.rs (line 2322)
2318
2319
2320
2321
2322
2323
2324
        pub fn input_data_config(
            mut self,
            input: crate::model::EntityRecognizerInputDataConfig,
        ) -> Self {
            self.inner = self.inner.input_data_config(input);
            self
        }

Specifies the format and location of the input data. The S3 bucket containing the input data must be located in the same region as the entity recognizer being created.

Examples found in repository?
src/client.rs (line 2330)
2326
2327
2328
2329
2330
2331
2332
        pub fn set_input_data_config(
            mut self,
            input: std::option::Option<crate::model::EntityRecognizerInputDataConfig>,
        ) -> Self {
            self.inner = self.inner.set_input_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 2335)
2334
2335
2336
2337
        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 2343)
2339
2340
2341
2342
2343
2344
2345
        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
        }

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

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

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

Examples found in repository?
src/client.rs (line 2356)
2352
2353
2354
2355
2356
2357
2358
        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 2365)
2364
2365
2366
2367
        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 2377)
2373
2374
2375
2376
2377
2378
2379
        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 entity recognizer. For more information, see Amazon VPC.

Examples found in repository?
src/client.rs (line 2382)
2381
2382
2383
2384
        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 entity recognizer. For more information, see Amazon VPC.

Examples found in repository?
src/client.rs (line 2390)
2386
2387
2388
2389
2390
2391
2392
        pub fn set_vpc_config(
            mut self,
            input: std::option::Option<crate::model::VpcConfig>,
        ) -> Self {
            self.inner = self.inner.set_vpc_config(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 2399)
2398
2399
2400
2401
        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 2411)
2407
2408
2409
2410
2411
2412
2413
        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 JSON resource-based policy to attach to your custom entity recognizer model. You can use this policy to allow another AWS account to import your custom model.

Provide your JSON as a UTF-8 encoded string without line breaks. To provide valid JSON for your policy, 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 2420)
2419
2420
2421
2422
        pub fn model_policy(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.model_policy(input.into());
            self
        }

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

Provide your JSON as a UTF-8 encoded string without line breaks. To provide valid JSON for your policy, 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 2429)
2428
2429
2430
2431
        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 CreateEntityRecognizerInput.

Examples found in repository?
src/client.rs (line 2233)
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateEntityRecognizer,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateEntityRecognizerError>,
        > {
            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::CreateEntityRecognizerOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateEntityRecognizerError>,
        > {
            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