aws_sdk_bedrock/client/
create_custom_model.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateCustomModel`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`model_name(impl Into<String>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::model_name) / [`set_model_name(Option<String>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::set_model_name):<br>required: **true**<br><p>A unique name for the custom model.</p><br>
7    ///   - [`model_source_config(ModelDataSource)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::model_source_config) / [`set_model_source_config(Option<ModelDataSource>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::set_model_source_config):<br>required: **true**<br><p>The data source for the model. The Amazon S3 URI in the model source must be for the Amazon-managed Amazon S3 bucket containing your model artifacts.</p><br>
8    ///   - [`model_kms_key_arn(impl Into<String>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::model_kms_key_arn) / [`set_model_kms_key_arn(Option<String>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::set_model_kms_key_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the customer managed KMS key to encrypt the custom model. If you don't provide a KMS key, Amazon Bedrock uses an Amazon Web Services-managed KMS key to encrypt the model.</p> <p>If you provide a customer managed KMS key, your Amazon Bedrock service role must have permissions to use it. For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/encryption-import-model.html">Encryption of imported models</a>.</p><br>
9    ///   - [`role_arn(impl Into<String>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::set_role_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock assumes to perform tasks on your behalf. This role must have permissions to access the Amazon S3 bucket containing your model artifacts and the KMS key (if specified). For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-import-iam-role.html">Setting up an IAM service role for importing models</a> in the Amazon Bedrock User Guide.</p><br>
10    ///   - [`model_tags(Tag)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::model_tags) / [`set_model_tags(Option<Vec::<Tag>>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::set_model_tags):<br>required: **false**<br><p>A list of key-value pairs to associate with the custom model resource. You can use these tags to organize and identify your resources.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html">Tagging resources</a> in the <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html">Amazon Bedrock User Guide</a>.</p><br>
11    ///   - [`client_request_token(impl Into<String>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::client_request_token) / [`set_client_request_token(Option<String>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::set_client_request_token):<br>required: **false**<br><p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p><br>
12    /// - On success, responds with [`CreateCustomModelOutput`](crate::operation::create_custom_model::CreateCustomModelOutput) with field(s):
13    ///   - [`model_arn(String)`](crate::operation::create_custom_model::CreateCustomModelOutput::model_arn): <p>The Amazon Resource Name (ARN) of the new custom model.</p>
14    /// - On failure, responds with [`SdkError<CreateCustomModelError>`](crate::operation::create_custom_model::CreateCustomModelError)
15    pub fn create_custom_model(&self) -> crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder {
16        crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::new(self.handle.clone())
17    }
18}