aws_sdk_sagemaker/client/
create_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 [`CreateModel`](crate::operation::create_model::builders::CreateModelFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`model_name(impl Into<String>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::model_name) / [`set_model_name(Option<String>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::set_model_name):<br>required: **true**<br><p>The name of the new model.</p><br>
7    ///   - [`primary_container(ContainerDefinition)`](crate::operation::create_model::builders::CreateModelFluentBuilder::primary_container) / [`set_primary_container(Option<ContainerDefinition>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::set_primary_container):<br>required: **false**<br><p>The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.</p><br>
8    ///   - [`containers(ContainerDefinition)`](crate::operation::create_model::builders::CreateModelFluentBuilder::containers) / [`set_containers(Option<Vec::<ContainerDefinition>>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::set_containers):<br>required: **false**<br><p>Specifies the containers in the inference pipeline.</p><br>
9    ///   - [`inference_execution_config(InferenceExecutionConfig)`](crate::operation::create_model::builders::CreateModelFluentBuilder::inference_execution_config) / [`set_inference_execution_config(Option<InferenceExecutionConfig>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::set_inference_execution_config):<br>required: **false**<br><p>Specifies details of how containers in a multi-container endpoint are called.</p><br>
10    ///   - [`execution_role_arn(impl Into<String>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::execution_role_arn) / [`set_execution_role_arn(Option<String>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::set_execution_role_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker Roles</a>.</p><note>  <p>To be able to pass this role to SageMaker, the caller of this API must have the <code>iam:PassRole</code> permission.</p> </note><br>
11    ///   - [`tags(Tag)`](crate::operation::create_model::builders::CreateModelFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::set_tags):<br>required: **false**<br><p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p><br>
12    ///   - [`vpc_config(VpcConfig)`](crate::operation::create_model::builders::CreateModelFluentBuilder::vpc_config) / [`set_vpc_config(Option<VpcConfig>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::set_vpc_config):<br>required: **false**<br><p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. <code>VpcConfig</code> is used in hosting services and in batch transform. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a> and <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/batch-vpc.html">Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud</a>.</p><br>
13    ///   - [`enable_network_isolation(bool)`](crate::operation::create_model::builders::CreateModelFluentBuilder::enable_network_isolation) / [`set_enable_network_isolation(Option<bool>)`](crate::operation::create_model::builders::CreateModelFluentBuilder::set_enable_network_isolation):<br>required: **false**<br><p>Isolates the model container. No inbound or outbound network calls can be made to or from the model container.</p><br>
14    /// - On success, responds with [`CreateModelOutput`](crate::operation::create_model::CreateModelOutput) with field(s):
15    ///   - [`model_arn(Option<String>)`](crate::operation::create_model::CreateModelOutput::model_arn): <p>The ARN of the model created in SageMaker.</p>
16    /// - On failure, responds with [`SdkError<CreateModelError>`](crate::operation::create_model::CreateModelError)
17    pub fn create_model(&self) -> crate::operation::create_model::builders::CreateModelFluentBuilder {
18        crate::operation::create_model::builders::CreateModelFluentBuilder::new(self.handle.clone())
19    }
20}