aws-sdk-bedrock 1.143.0

AWS SDK for Amazon Bedrock
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateCustomModel`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`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>
    ///   - [`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: **false**<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>
    ///   - [`custom_model_data_source(CustomModelDataSource)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::custom_model_data_source) / [`set_custom_model_data_source(Option<CustomModelDataSource>)`](crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::set_custom_model_data_source):<br>required: **false**<br><p>The data source for the custom model. Use this field to specify a SageMaker AI model package ARN as the source for your custom model. Amazon Bedrock resolves the model package to retrieve the model artifacts.</p> <p>You can specify either <code>customModelDataSource</code> or <code>modelSourceConfig</code>, but not both.</p><br>
    ///   - [`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>
    ///   - [`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> <p>This field is required when you use <code>modelSourceConfig</code> with an Amazon S3 data source. It is not required when you use <code>customModelDataSource</code> with a model package ARN, because Amazon Bedrock uses its own credentials to access the model artifacts.</p><br>
    ///   - [`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>
    ///   - [`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>
    /// - On success, responds with [`CreateCustomModelOutput`](crate::operation::create_custom_model::CreateCustomModelOutput) with field(s):
    ///   - [`model_arn(String)`](crate::operation::create_custom_model::CreateCustomModelOutput::model_arn): <p>The Amazon Resource Name (ARN) of the new custom model.</p>
    /// - On failure, responds with [`SdkError<CreateCustomModelError>`](crate::operation::create_custom_model::CreateCustomModelError)
    pub fn create_custom_model(&self) -> crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder {
        crate::operation::create_custom_model::builders::CreateCustomModelFluentBuilder::new(self.handle.clone())
    }
}