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>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>
187 /// <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>
188 /// </note>
189 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190 self.inner = self.inner.role_arn(input.into());
191 self
192 }
193 /// <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>
194 /// <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>
195 /// </note>
196 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
197 self.inner = self.inner.set_role_arn(input);
198 self
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 get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
204 self.inner.get_role_arn()
205 }
206 /// <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>
207 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208 self.inner = self.inner.kms_key_id(input.into());
209 self
210 }
211 /// <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>
212 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213 self.inner = self.inner.set_kms_key_id(input);
214 self
215 }
216 /// <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>
217 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
218 self.inner.get_kms_key_id()
219 }
220 ///
221 /// Appends an item to `Tags`.
222 ///
223 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
224 ///
225 /// <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>
226 pub fn tags(mut self, input: crate::types::Tag) -> Self {
227 self.inner = self.inner.tags(input);
228 self
229 }
230 /// <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>
231 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
232 self.inner = self.inner.set_tags(input);
233 self
234 }
235 /// <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>
236 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
237 self.inner.get_tags()
238 }
239 /// <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>
240 pub fn lifecycle_config_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241 self.inner = self.inner.lifecycle_config_name(input.into());
242 self
243 }
244 /// <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>
245 pub fn set_lifecycle_config_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246 self.inner = self.inner.set_lifecycle_config_name(input);
247 self
248 }
249 /// <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>
250 pub fn get_lifecycle_config_name(&self) -> &::std::option::Option<::std::string::String> {
251 self.inner.get_lifecycle_config_name()
252 }
253 /// <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>
254 /// <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>
255 pub fn direct_internet_access(mut self, input: crate::types::DirectInternetAccess) -> Self {
256 self.inner = self.inner.direct_internet_access(input);
257 self
258 }
259 /// <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>
260 /// <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>
261 pub fn set_direct_internet_access(mut self, input: ::std::option::Option<crate::types::DirectInternetAccess>) -> Self {
262 self.inner = self.inner.set_direct_internet_access(input);
263 self
264 }
265 /// <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>
266 /// <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>
267 pub fn get_direct_internet_access(&self) -> &::std::option::Option<crate::types::DirectInternetAccess> {
268 self.inner.get_direct_internet_access()
269 }
270 /// <p>The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.</p>
271 pub fn volume_size_in_gb(mut self, input: i32) -> Self {
272 self.inner = self.inner.volume_size_in_gb(input);
273 self
274 }
275 /// <p>The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.</p>
276 pub fn set_volume_size_in_gb(mut self, input: ::std::option::Option<i32>) -> Self {
277 self.inner = self.inner.set_volume_size_in_gb(input);
278 self
279 }
280 /// <p>The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.</p>
281 pub fn get_volume_size_in_gb(&self) -> &::std::option::Option<i32> {
282 self.inner.get_volume_size_in_gb()
283 }
284 ///
285 /// Appends an item to `AcceleratorTypes`.
286 ///
287 /// To override the contents of this collection use [`set_accelerator_types`](Self::set_accelerator_types).
288 ///
289 /// <p>This parameter is no longer supported. Elastic Inference (EI) is no longer available.</p>
290 /// <p>This parameter was used to specify a list of EI instance types to associate with this notebook instance.</p>
291 pub fn accelerator_types(mut self, input: crate::types::NotebookInstanceAcceleratorType) -> Self {
292 self.inner = self.inner.accelerator_types(input);
293 self
294 }
295 /// <p>This parameter is no longer supported. Elastic Inference (EI) is no longer available.</p>
296 /// <p>This parameter was used to specify a list of EI instance types to associate with this notebook instance.</p>
297 pub fn set_accelerator_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NotebookInstanceAcceleratorType>>) -> Self {
298 self.inner = self.inner.set_accelerator_types(input);
299 self
300 }
301 /// <p>This parameter is no longer supported. Elastic Inference (EI) is no longer available.</p>
302 /// <p>This parameter was used to specify a list of EI instance types to associate with this notebook instance.</p>
303 pub fn get_accelerator_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NotebookInstanceAcceleratorType>> {
304 self.inner.get_accelerator_types()
305 }
306 /// <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>
307 pub fn default_code_repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
308 self.inner = self.inner.default_code_repository(input.into());
309 self
310 }
311 /// <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>
312 pub fn set_default_code_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313 self.inner = self.inner.set_default_code_repository(input);
314 self
315 }
316 /// <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>
317 pub fn get_default_code_repository(&self) -> &::std::option::Option<::std::string::String> {
318 self.inner.get_default_code_repository()
319 }
320 ///
321 /// Appends an item to `AdditionalCodeRepositories`.
322 ///
323 /// To override the contents of this collection use [`set_additional_code_repositories`](Self::set_additional_code_repositories).
324 ///
325 /// <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>
326 pub fn additional_code_repositories(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
327 self.inner = self.inner.additional_code_repositories(input.into());
328 self
329 }
330 /// <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>
331 pub fn set_additional_code_repositories(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
332 self.inner = self.inner.set_additional_code_repositories(input);
333 self
334 }
335 /// <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>
336 pub fn get_additional_code_repositories(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
337 self.inner.get_additional_code_repositories()
338 }
339 /// <p>Whether root access is enabled or disabled for users of the notebook instance. The default value is <code>Enabled</code>.</p><note>
340 /// <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>
341 /// </note>
342 pub fn root_access(mut self, input: crate::types::RootAccess) -> Self {
343 self.inner = self.inner.root_access(input);
344 self
345 }
346 /// <p>Whether root access is enabled or disabled for users of the notebook instance. The default value is <code>Enabled</code>.</p><note>
347 /// <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>
348 /// </note>
349 pub fn set_root_access(mut self, input: ::std::option::Option<crate::types::RootAccess>) -> Self {
350 self.inner = self.inner.set_root_access(input);
351 self
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 get_root_access(&self) -> &::std::option::Option<crate::types::RootAccess> {
357 self.inner.get_root_access()
358 }
359 /// <p>The platform identifier of the notebook instance runtime environment.</p>
360 pub fn platform_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
361 self.inner = self.inner.platform_identifier(input.into());
362 self
363 }
364 /// <p>The platform identifier of the notebook instance runtime environment.</p>
365 pub fn set_platform_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
366 self.inner = self.inner.set_platform_identifier(input);
367 self
368 }
369 /// <p>The platform identifier of the notebook instance runtime environment.</p>
370 pub fn get_platform_identifier(&self) -> &::std::option::Option<::std::string::String> {
371 self.inner.get_platform_identifier()
372 }
373 /// <p>Information on the IMDS configuration of the notebook instance</p>
374 pub fn instance_metadata_service_configuration(mut self, input: crate::types::InstanceMetadataServiceConfiguration) -> Self {
375 self.inner = self.inner.instance_metadata_service_configuration(input);
376 self
377 }
378 /// <p>Information on the IMDS configuration of the notebook instance</p>
379 pub fn set_instance_metadata_service_configuration(
380 mut self,
381 input: ::std::option::Option<crate::types::InstanceMetadataServiceConfiguration>,
382 ) -> Self {
383 self.inner = self.inner.set_instance_metadata_service_configuration(input);
384 self
385 }
386 /// <p>Information on the IMDS configuration of the notebook instance</p>
387 pub fn get_instance_metadata_service_configuration(&self) -> &::std::option::Option<crate::types::InstanceMetadataServiceConfiguration> {
388 self.inner.get_instance_metadata_service_configuration()
389 }
390}