aws_sdk_sagemaker/operation/create_notebook_instance/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_notebook_instance::_create_notebook_instance_output::CreateNotebookInstanceOutputBuilder;
3
4pub use crate::operation::create_notebook_instance::_create_notebook_instance_input::CreateNotebookInstanceInputBuilder;
5
6impl crate::operation::create_notebook_instance::builders::CreateNotebookInstanceInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_notebook_instance::CreateNotebookInstanceOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_notebook_instance::CreateNotebookInstanceError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_notebook_instance();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateNotebookInstance`.
24///
25/// <p>Creates an SageMaker AI notebook instance. A notebook instance is a machine learning (ML) compute instance running on a Jupyter notebook.</p>
26/// <p>In a <code>CreateNotebookInstance</code> request, specify the type of ML compute instance that you want to run. SageMaker AI launches the instance, installs common libraries that you can use to explore datasets for model training, and attaches an ML storage volume to the notebook instance.</p>
27/// <p>SageMaker AI also provides a set of example notebooks. Each notebook demonstrates how to use SageMaker AI with a specific algorithm or with a machine learning framework.</p>
28/// <p>After receiving the request, SageMaker AI does the following:</p>
29/// <ol>
30/// <li>
31/// <p>Creates a network interface in the SageMaker AI VPC.</p></li>
32/// <li>
33/// <p>(Option) If you specified <code>SubnetId</code>, SageMaker AI creates a network interface in your own VPC, which is inferred from the subnet ID that you provide in the input. When creating this network interface, SageMaker AI attaches the security group that you specified in the request to the network interface that it creates in your VPC.</p></li>
34/// <li>
35/// <p>Launches an EC2 instance of the type specified in the request in the SageMaker AI VPC. If you specified <code>SubnetId</code> of your VPC, SageMaker AI specifies both network interfaces when launching this instance. This enables inbound traffic from your own VPC to the notebook instance, assuming that the security groups allow it.</p></li>
36/// </ol>
37/// <p>After creating the notebook instance, SageMaker AI returns its Amazon Resource Name (ARN). You can't change the name of a notebook instance after you create it.</p>
38/// <p>After SageMaker AI creates the notebook instance, you can connect to the Jupyter server and work in Jupyter notebooks. For example, you can write code to explore a dataset that you can use for model training, train a model, host models by creating SageMaker AI endpoints, and validate hosted models.</p>
39/// <p>For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html">How It Works</a>.</p>
40#[derive(::std::clone::Clone, ::std::fmt::Debug)]
41pub struct CreateNotebookInstanceFluentBuilder {
42    handle: ::std::sync::Arc<crate::client::Handle>,
43    inner: crate::operation::create_notebook_instance::builders::CreateNotebookInstanceInputBuilder,
44    config_override: ::std::option::Option<crate::config::Builder>,
45}
46impl
47    crate::client::customize::internal::CustomizableSend<
48        crate::operation::create_notebook_instance::CreateNotebookInstanceOutput,
49        crate::operation::create_notebook_instance::CreateNotebookInstanceError,
50    > for CreateNotebookInstanceFluentBuilder
51{
52    fn send(
53        self,
54        config_override: crate::config::Builder,
55    ) -> crate::client::customize::internal::BoxFuture<
56        crate::client::customize::internal::SendResult<
57            crate::operation::create_notebook_instance::CreateNotebookInstanceOutput,
58            crate::operation::create_notebook_instance::CreateNotebookInstanceError,
59        >,
60    > {
61        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
62    }
63}
64impl CreateNotebookInstanceFluentBuilder {
65    /// Creates a new `CreateNotebookInstanceFluentBuilder`.
66    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
67        Self {
68            handle,
69            inner: ::std::default::Default::default(),
70            config_override: ::std::option::Option::None,
71        }
72    }
73    /// Access the CreateNotebookInstance as a reference.
74    pub fn as_input(&self) -> &crate::operation::create_notebook_instance::builders::CreateNotebookInstanceInputBuilder {
75        &self.inner
76    }
77    /// Sends the request and returns the response.
78    ///
79    /// If an error occurs, an `SdkError` will be returned with additional details that
80    /// can be matched against.
81    ///
82    /// By default, any retryable failures will be retried twice. Retry behavior
83    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
84    /// set when configuring the client.
85    pub async fn send(
86        self,
87    ) -> ::std::result::Result<
88        crate::operation::create_notebook_instance::CreateNotebookInstanceOutput,
89        ::aws_smithy_runtime_api::client::result::SdkError<
90            crate::operation::create_notebook_instance::CreateNotebookInstanceError,
91            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
92        >,
93    > {
94        let input = self
95            .inner
96            .build()
97            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
98        let runtime_plugins = crate::operation::create_notebook_instance::CreateNotebookInstance::operation_runtime_plugins(
99            self.handle.runtime_plugins.clone(),
100            &self.handle.conf,
101            self.config_override,
102        );
103        crate::operation::create_notebook_instance::CreateNotebookInstance::orchestrate(&runtime_plugins, input).await
104    }
105
106    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
107    pub fn customize(
108        self,
109    ) -> crate::client::customize::CustomizableOperation<
110        crate::operation::create_notebook_instance::CreateNotebookInstanceOutput,
111        crate::operation::create_notebook_instance::CreateNotebookInstanceError,
112        Self,
113    > {
114        crate::client::customize::CustomizableOperation::new(self)
115    }
116    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
117        self.set_config_override(::std::option::Option::Some(config_override.into()));
118        self
119    }
120
121    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
122        self.config_override = config_override;
123        self
124    }
125    /// <p>The name of the new notebook instance.</p>
126    pub fn notebook_instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.notebook_instance_name(input.into());
128        self
129    }
130    /// <p>The name of the new notebook instance.</p>
131    pub fn set_notebook_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_notebook_instance_name(input);
133        self
134    }
135    /// <p>The name of the new notebook instance.</p>
136    pub fn get_notebook_instance_name(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_notebook_instance_name()
138    }
139    /// <p>The type of ML compute instance to launch for the notebook instance.</p>
140    pub fn instance_type(mut self, input: crate::types::InstanceType) -> Self {
141        self.inner = self.inner.instance_type(input);
142        self
143    }
144    /// <p>The type of ML compute instance to launch for the notebook instance.</p>
145    pub fn set_instance_type(mut self, input: ::std::option::Option<crate::types::InstanceType>) -> Self {
146        self.inner = self.inner.set_instance_type(input);
147        self
148    }
149    /// <p>The type of ML compute instance to launch for the notebook instance.</p>
150    pub fn get_instance_type(&self) -> &::std::option::Option<crate::types::InstanceType> {
151        self.inner.get_instance_type()
152    }
153    /// <p>The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.</p>
154    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.subnet_id(input.into());
156        self
157    }
158    /// <p>The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.</p>
159    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_subnet_id(input);
161        self
162    }
163    /// <p>The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.</p>
164    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_subnet_id()
166    }
167    ///
168    /// Appends an item to `SecurityGroupIds`.
169    ///
170    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
171    ///
172    /// <p>The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.</p>
173    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.security_group_ids(input.into());
175        self
176    }
177    /// <p>The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.</p>
178    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
179        self.inner = self.inner.set_security_group_ids(input);
180        self
181    }
182    /// <p>The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.</p>
183    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
184        self.inner.get_security_group_ids()
185    }
186    /// <p>The IP address type for the notebook instance. Specify <code>ipv4</code> for IPv4-only connectivity or <code>dualstack</code> for both IPv4 and IPv6 connectivity. When you specify <code>dualstack</code>, the subnet must support IPv6 CIDR blocks. If not specified, defaults to <code>ipv4</code>.</p>
187    pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
188        self.inner = self.inner.ip_address_type(input);
189        self
190    }
191    /// <p>The IP address type for the notebook instance. Specify <code>ipv4</code> for IPv4-only connectivity or <code>dualstack</code> for both IPv4 and IPv6 connectivity. When you specify <code>dualstack</code>, the subnet must support IPv6 CIDR blocks. If not specified, defaults to <code>ipv4</code>.</p>
192    pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
193        self.inner = self.inner.set_ip_address_type(input);
194        self
195    }
196    /// <p>The IP address type for the notebook instance. Specify <code>ipv4</code> for IPv4-only connectivity or <code>dualstack</code> for both IPv4 and IPv6 connectivity. When you specify <code>dualstack</code>, the subnet must support IPv6 CIDR blocks. If not specified, defaults to <code>ipv4</code>.</p>
197    pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
198        self.inner.get_ip_address_type()
199    }
200    /// <p>When you send any requests to Amazon Web Services resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker AI Roles</a>.</p><note>
201    /// <p>To be able to pass this role to SageMaker AI, the caller of this API must have the <code>iam:PassRole</code> permission.</p>
202    /// </note>
203    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204        self.inner = self.inner.role_arn(input.into());
205        self
206    }
207    /// <p>When you send any requests to Amazon Web Services resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker AI Roles</a>.</p><note>
208    /// <p>To be able to pass this role to SageMaker AI, the caller of this API must have the <code>iam:PassRole</code> permission.</p>
209    /// </note>
210    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.inner = self.inner.set_role_arn(input);
212        self
213    }
214    /// <p>When you send any requests to Amazon Web Services resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker AI Roles</a>.</p><note>
215    /// <p>To be able to pass this role to SageMaker AI, the caller of this API must have the <code>iam:PassRole</code> permission.</p>
216    /// </note>
217    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
218        self.inner.get_role_arn()
219    }
220    /// <p>The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/enabling-keys.html">Enabling and Disabling Keys</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
221    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222        self.inner = self.inner.kms_key_id(input.into());
223        self
224    }
225    /// <p>The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/enabling-keys.html">Enabling and Disabling Keys</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
226    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.inner = self.inner.set_kms_key_id(input);
228        self
229    }
230    /// <p>The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/enabling-keys.html">Enabling and Disabling Keys</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
231    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
232        self.inner.get_kms_key_id()
233    }
234    ///
235    /// Appends an item to `Tags`.
236    ///
237    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
238    ///
239    /// <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>
240    pub fn tags(mut self, input: crate::types::Tag) -> Self {
241        self.inner = self.inner.tags(input);
242        self
243    }
244    /// <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>
245    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
246        self.inner = self.inner.set_tags(input);
247        self
248    }
249    /// <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>
250    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
251        self.inner.get_tags()
252    }
253    /// <p>The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step 2.1: (Optional) Customize a Notebook Instance</a>.</p>
254    pub fn lifecycle_config_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255        self.inner = self.inner.lifecycle_config_name(input.into());
256        self
257    }
258    /// <p>The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step 2.1: (Optional) Customize a Notebook Instance</a>.</p>
259    pub fn set_lifecycle_config_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260        self.inner = self.inner.set_lifecycle_config_name(input);
261        self
262    }
263    /// <p>The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step 2.1: (Optional) Customize a Notebook Instance</a>.</p>
264    pub fn get_lifecycle_config_name(&self) -> &::std::option::Option<::std::string::String> {
265        self.inner.get_lifecycle_config_name()
266    }
267    /// <p>Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to <code>Disabled</code> this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC.</p>
268    /// <p>For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/appendix-additional-considerations.html#appendix-notebook-and-internet-access">Notebook Instances Are Internet-Enabled by Default</a>. You can set the value of this parameter to <code>Disabled</code> only if you set a value for the <code>SubnetId</code> parameter.</p>
269    pub fn direct_internet_access(mut self, input: crate::types::DirectInternetAccess) -> Self {
270        self.inner = self.inner.direct_internet_access(input);
271        self
272    }
273    /// <p>Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to <code>Disabled</code> this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC.</p>
274    /// <p>For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/appendix-additional-considerations.html#appendix-notebook-and-internet-access">Notebook Instances Are Internet-Enabled by Default</a>. You can set the value of this parameter to <code>Disabled</code> only if you set a value for the <code>SubnetId</code> parameter.</p>
275    pub fn set_direct_internet_access(mut self, input: ::std::option::Option<crate::types::DirectInternetAccess>) -> Self {
276        self.inner = self.inner.set_direct_internet_access(input);
277        self
278    }
279    /// <p>Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to <code>Disabled</code> this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC.</p>
280    /// <p>For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/appendix-additional-considerations.html#appendix-notebook-and-internet-access">Notebook Instances Are Internet-Enabled by Default</a>. You can set the value of this parameter to <code>Disabled</code> only if you set a value for the <code>SubnetId</code> parameter.</p>
281    pub fn get_direct_internet_access(&self) -> &::std::option::Option<crate::types::DirectInternetAccess> {
282        self.inner.get_direct_internet_access()
283    }
284    /// <p>The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.</p>
285    pub fn volume_size_in_gb(mut self, input: i32) -> Self {
286        self.inner = self.inner.volume_size_in_gb(input);
287        self
288    }
289    /// <p>The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.</p>
290    pub fn set_volume_size_in_gb(mut self, input: ::std::option::Option<i32>) -> Self {
291        self.inner = self.inner.set_volume_size_in_gb(input);
292        self
293    }
294    /// <p>The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.</p>
295    pub fn get_volume_size_in_gb(&self) -> &::std::option::Option<i32> {
296        self.inner.get_volume_size_in_gb()
297    }
298    ///
299    /// Appends an item to `AcceleratorTypes`.
300    ///
301    /// To override the contents of this collection use [`set_accelerator_types`](Self::set_accelerator_types).
302    ///
303    /// <p>This parameter is no longer supported. Elastic Inference (EI) is no longer available.</p>
304    /// <p>This parameter was used to specify a list of EI instance types to associate with this notebook instance.</p>
305    pub fn accelerator_types(mut self, input: crate::types::NotebookInstanceAcceleratorType) -> Self {
306        self.inner = self.inner.accelerator_types(input);
307        self
308    }
309    /// <p>This parameter is no longer supported. Elastic Inference (EI) is no longer available.</p>
310    /// <p>This parameter was used to specify a list of EI instance types to associate with this notebook instance.</p>
311    pub fn set_accelerator_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NotebookInstanceAcceleratorType>>) -> Self {
312        self.inner = self.inner.set_accelerator_types(input);
313        self
314    }
315    /// <p>This parameter is no longer supported. Elastic Inference (EI) is no longer available.</p>
316    /// <p>This parameter was used to specify a list of EI instance types to associate with this notebook instance.</p>
317    pub fn get_accelerator_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NotebookInstanceAcceleratorType>> {
318        self.inner.get_accelerator_types()
319    }
320    /// <p>A Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a> or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git Repositories with SageMaker AI Notebook Instances</a>.</p>
321    pub fn default_code_repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322        self.inner = self.inner.default_code_repository(input.into());
323        self
324    }
325    /// <p>A Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a> or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git Repositories with SageMaker AI Notebook Instances</a>.</p>
326    pub fn set_default_code_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327        self.inner = self.inner.set_default_code_repository(input);
328        self
329    }
330    /// <p>A Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a> or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git Repositories with SageMaker AI Notebook Instances</a>.</p>
331    pub fn get_default_code_repository(&self) -> &::std::option::Option<::std::string::String> {
332        self.inner.get_default_code_repository()
333    }
334    ///
335    /// Appends an item to `AdditionalCodeRepositories`.
336    ///
337    /// To override the contents of this collection use [`set_additional_code_repositories`](Self::set_additional_code_repositories).
338    ///
339    /// <p>An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a> or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git Repositories with SageMaker AI Notebook Instances</a>.</p>
340    pub fn additional_code_repositories(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
341        self.inner = self.inner.additional_code_repositories(input.into());
342        self
343    }
344    /// <p>An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a> or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git Repositories with SageMaker AI Notebook Instances</a>.</p>
345    pub fn set_additional_code_repositories(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
346        self.inner = self.inner.set_additional_code_repositories(input);
347        self
348    }
349    /// <p>An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a> or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git Repositories with SageMaker AI Notebook Instances</a>.</p>
350    pub fn get_additional_code_repositories(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
351        self.inner.get_additional_code_repositories()
352    }
353    /// <p>Whether root access is enabled or disabled for users of the notebook instance. The default value is <code>Enabled</code>.</p><note>
354    /// <p>Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.</p>
355    /// </note>
356    pub fn root_access(mut self, input: crate::types::RootAccess) -> Self {
357        self.inner = self.inner.root_access(input);
358        self
359    }
360    /// <p>Whether root access is enabled or disabled for users of the notebook instance. The default value is <code>Enabled</code>.</p><note>
361    /// <p>Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.</p>
362    /// </note>
363    pub fn set_root_access(mut self, input: ::std::option::Option<crate::types::RootAccess>) -> Self {
364        self.inner = self.inner.set_root_access(input);
365        self
366    }
367    /// <p>Whether root access is enabled or disabled for users of the notebook instance. The default value is <code>Enabled</code>.</p><note>
368    /// <p>Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.</p>
369    /// </note>
370    pub fn get_root_access(&self) -> &::std::option::Option<crate::types::RootAccess> {
371        self.inner.get_root_access()
372    }
373    /// <p>The platform identifier of the notebook instance runtime environment.</p>
374    pub fn platform_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
375        self.inner = self.inner.platform_identifier(input.into());
376        self
377    }
378    /// <p>The platform identifier of the notebook instance runtime environment.</p>
379    pub fn set_platform_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
380        self.inner = self.inner.set_platform_identifier(input);
381        self
382    }
383    /// <p>The platform identifier of the notebook instance runtime environment.</p>
384    pub fn get_platform_identifier(&self) -> &::std::option::Option<::std::string::String> {
385        self.inner.get_platform_identifier()
386    }
387    /// <p>Information on the IMDS configuration of the notebook instance</p>
388    pub fn instance_metadata_service_configuration(mut self, input: crate::types::InstanceMetadataServiceConfiguration) -> Self {
389        self.inner = self.inner.instance_metadata_service_configuration(input);
390        self
391    }
392    /// <p>Information on the IMDS configuration of the notebook instance</p>
393    pub fn set_instance_metadata_service_configuration(
394        mut self,
395        input: ::std::option::Option<crate::types::InstanceMetadataServiceConfiguration>,
396    ) -> Self {
397        self.inner = self.inner.set_instance_metadata_service_configuration(input);
398        self
399    }
400    /// <p>Information on the IMDS configuration of the notebook instance</p>
401    pub fn get_instance_metadata_service_configuration(&self) -> &::std::option::Option<crate::types::InstanceMetadataServiceConfiguration> {
402        self.inner.get_instance_metadata_service_configuration()
403    }
404}