aws_sdk_sagemaker/operation/update_domain/_update_domain_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateDomainInput {
6 /// <p>The ID of the domain to be updated.</p>
7 pub domain_id: ::std::option::Option<::std::string::String>,
8 /// <p>A collection of settings.</p>
9 pub default_user_settings: ::std::option::Option<crate::types::UserSettings>,
10 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
11 pub domain_settings_for_update: ::std::option::Option<crate::types::DomainSettingsForUpdate>,
12 /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
13 pub app_security_group_management: ::std::option::Option<crate::types::AppSecurityGroupManagement>,
14 /// <p>The default settings for shared spaces that users create in the domain.</p>
15 pub default_space_settings: ::std::option::Option<crate::types::DefaultSpaceSettings>,
16 /// <p>The VPC subnets that Studio uses for communication.</p>
17 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
18 pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
19 /// <p>Specifies the VPC used for non-EFS traffic.</p>
20 /// <ul>
21 /// <li>
22 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
23 /// <li>
24 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
25 /// </ul>
26 /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
27 pub app_network_access_type: ::std::option::Option<crate::types::AppNetworkAccessType>,
28 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
29 pub tag_propagation: ::std::option::Option<crate::types::TagPropagation>,
30 /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
31 pub vpc_id: ::std::option::Option<::std::string::String>,
32}
33impl UpdateDomainInput {
34 /// <p>The ID of the domain to be updated.</p>
35 pub fn domain_id(&self) -> ::std::option::Option<&str> {
36 self.domain_id.as_deref()
37 }
38 /// <p>A collection of settings.</p>
39 pub fn default_user_settings(&self) -> ::std::option::Option<&crate::types::UserSettings> {
40 self.default_user_settings.as_ref()
41 }
42 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
43 pub fn domain_settings_for_update(&self) -> ::std::option::Option<&crate::types::DomainSettingsForUpdate> {
44 self.domain_settings_for_update.as_ref()
45 }
46 /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
47 pub fn app_security_group_management(&self) -> ::std::option::Option<&crate::types::AppSecurityGroupManagement> {
48 self.app_security_group_management.as_ref()
49 }
50 /// <p>The default settings for shared spaces that users create in the domain.</p>
51 pub fn default_space_settings(&self) -> ::std::option::Option<&crate::types::DefaultSpaceSettings> {
52 self.default_space_settings.as_ref()
53 }
54 /// <p>The VPC subnets that Studio uses for communication.</p>
55 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
56 ///
57 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
58 pub fn subnet_ids(&self) -> &[::std::string::String] {
59 self.subnet_ids.as_deref().unwrap_or_default()
60 }
61 /// <p>Specifies the VPC used for non-EFS traffic.</p>
62 /// <ul>
63 /// <li>
64 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
65 /// <li>
66 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
67 /// </ul>
68 /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
69 pub fn app_network_access_type(&self) -> ::std::option::Option<&crate::types::AppNetworkAccessType> {
70 self.app_network_access_type.as_ref()
71 }
72 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
73 pub fn tag_propagation(&self) -> ::std::option::Option<&crate::types::TagPropagation> {
74 self.tag_propagation.as_ref()
75 }
76 /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
77 pub fn vpc_id(&self) -> ::std::option::Option<&str> {
78 self.vpc_id.as_deref()
79 }
80}
81impl UpdateDomainInput {
82 /// Creates a new builder-style object to manufacture [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
83 pub fn builder() -> crate::operation::update_domain::builders::UpdateDomainInputBuilder {
84 crate::operation::update_domain::builders::UpdateDomainInputBuilder::default()
85 }
86}
87
88/// A builder for [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
89#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
90#[non_exhaustive]
91pub struct UpdateDomainInputBuilder {
92 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
93 pub(crate) default_user_settings: ::std::option::Option<crate::types::UserSettings>,
94 pub(crate) domain_settings_for_update: ::std::option::Option<crate::types::DomainSettingsForUpdate>,
95 pub(crate) app_security_group_management: ::std::option::Option<crate::types::AppSecurityGroupManagement>,
96 pub(crate) default_space_settings: ::std::option::Option<crate::types::DefaultSpaceSettings>,
97 pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
98 pub(crate) app_network_access_type: ::std::option::Option<crate::types::AppNetworkAccessType>,
99 pub(crate) tag_propagation: ::std::option::Option<crate::types::TagPropagation>,
100 pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
101}
102impl UpdateDomainInputBuilder {
103 /// <p>The ID of the domain to be updated.</p>
104 /// This field is required.
105 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106 self.domain_id = ::std::option::Option::Some(input.into());
107 self
108 }
109 /// <p>The ID of the domain to be updated.</p>
110 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111 self.domain_id = input;
112 self
113 }
114 /// <p>The ID of the domain to be updated.</p>
115 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
116 &self.domain_id
117 }
118 /// <p>A collection of settings.</p>
119 pub fn default_user_settings(mut self, input: crate::types::UserSettings) -> Self {
120 self.default_user_settings = ::std::option::Option::Some(input);
121 self
122 }
123 /// <p>A collection of settings.</p>
124 pub fn set_default_user_settings(mut self, input: ::std::option::Option<crate::types::UserSettings>) -> Self {
125 self.default_user_settings = input;
126 self
127 }
128 /// <p>A collection of settings.</p>
129 pub fn get_default_user_settings(&self) -> &::std::option::Option<crate::types::UserSettings> {
130 &self.default_user_settings
131 }
132 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
133 pub fn domain_settings_for_update(mut self, input: crate::types::DomainSettingsForUpdate) -> Self {
134 self.domain_settings_for_update = ::std::option::Option::Some(input);
135 self
136 }
137 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
138 pub fn set_domain_settings_for_update(mut self, input: ::std::option::Option<crate::types::DomainSettingsForUpdate>) -> Self {
139 self.domain_settings_for_update = input;
140 self
141 }
142 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
143 pub fn get_domain_settings_for_update(&self) -> &::std::option::Option<crate::types::DomainSettingsForUpdate> {
144 &self.domain_settings_for_update
145 }
146 /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
147 pub fn app_security_group_management(mut self, input: crate::types::AppSecurityGroupManagement) -> Self {
148 self.app_security_group_management = ::std::option::Option::Some(input);
149 self
150 }
151 /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
152 pub fn set_app_security_group_management(mut self, input: ::std::option::Option<crate::types::AppSecurityGroupManagement>) -> Self {
153 self.app_security_group_management = input;
154 self
155 }
156 /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
157 pub fn get_app_security_group_management(&self) -> &::std::option::Option<crate::types::AppSecurityGroupManagement> {
158 &self.app_security_group_management
159 }
160 /// <p>The default settings for shared spaces that users create in the domain.</p>
161 pub fn default_space_settings(mut self, input: crate::types::DefaultSpaceSettings) -> Self {
162 self.default_space_settings = ::std::option::Option::Some(input);
163 self
164 }
165 /// <p>The default settings for shared spaces that users create in the domain.</p>
166 pub fn set_default_space_settings(mut self, input: ::std::option::Option<crate::types::DefaultSpaceSettings>) -> Self {
167 self.default_space_settings = input;
168 self
169 }
170 /// <p>The default settings for shared spaces that users create in the domain.</p>
171 pub fn get_default_space_settings(&self) -> &::std::option::Option<crate::types::DefaultSpaceSettings> {
172 &self.default_space_settings
173 }
174 /// Appends an item to `subnet_ids`.
175 ///
176 /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
177 ///
178 /// <p>The VPC subnets that Studio uses for communication.</p>
179 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
180 pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181 let mut v = self.subnet_ids.unwrap_or_default();
182 v.push(input.into());
183 self.subnet_ids = ::std::option::Option::Some(v);
184 self
185 }
186 /// <p>The VPC subnets that Studio uses for communication.</p>
187 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
188 pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
189 self.subnet_ids = input;
190 self
191 }
192 /// <p>The VPC subnets that Studio uses for communication.</p>
193 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
194 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
195 &self.subnet_ids
196 }
197 /// <p>Specifies the VPC used for non-EFS traffic.</p>
198 /// <ul>
199 /// <li>
200 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
201 /// <li>
202 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
203 /// </ul>
204 /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
205 pub fn app_network_access_type(mut self, input: crate::types::AppNetworkAccessType) -> Self {
206 self.app_network_access_type = ::std::option::Option::Some(input);
207 self
208 }
209 /// <p>Specifies the VPC used for non-EFS traffic.</p>
210 /// <ul>
211 /// <li>
212 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
213 /// <li>
214 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
215 /// </ul>
216 /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
217 pub fn set_app_network_access_type(mut self, input: ::std::option::Option<crate::types::AppNetworkAccessType>) -> Self {
218 self.app_network_access_type = input;
219 self
220 }
221 /// <p>Specifies the VPC used for non-EFS traffic.</p>
222 /// <ul>
223 /// <li>
224 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
225 /// <li>
226 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
227 /// </ul>
228 /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
229 pub fn get_app_network_access_type(&self) -> &::std::option::Option<crate::types::AppNetworkAccessType> {
230 &self.app_network_access_type
231 }
232 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
233 pub fn tag_propagation(mut self, input: crate::types::TagPropagation) -> Self {
234 self.tag_propagation = ::std::option::Option::Some(input);
235 self
236 }
237 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
238 pub fn set_tag_propagation(mut self, input: ::std::option::Option<crate::types::TagPropagation>) -> Self {
239 self.tag_propagation = input;
240 self
241 }
242 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
243 pub fn get_tag_propagation(&self) -> &::std::option::Option<crate::types::TagPropagation> {
244 &self.tag_propagation
245 }
246 /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
247 pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248 self.vpc_id = ::std::option::Option::Some(input.into());
249 self
250 }
251 /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
252 pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253 self.vpc_id = input;
254 self
255 }
256 /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
257 pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
258 &self.vpc_id
259 }
260 /// Consumes the builder and constructs a [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
261 pub fn build(
262 self,
263 ) -> ::std::result::Result<crate::operation::update_domain::UpdateDomainInput, ::aws_smithy_types::error::operation::BuildError> {
264 ::std::result::Result::Ok(crate::operation::update_domain::UpdateDomainInput {
265 domain_id: self.domain_id,
266 default_user_settings: self.default_user_settings,
267 domain_settings_for_update: self.domain_settings_for_update,
268 app_security_group_management: self.app_security_group_management,
269 default_space_settings: self.default_space_settings,
270 subnet_ids: self.subnet_ids,
271 app_network_access_type: self.app_network_access_type,
272 tag_propagation: self.tag_propagation,
273 vpc_id: self.vpc_id,
274 })
275 }
276}