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}
31impl UpdateDomainInput {
32 /// <p>The ID of the domain to be updated.</p>
33 pub fn domain_id(&self) -> ::std::option::Option<&str> {
34 self.domain_id.as_deref()
35 }
36 /// <p>A collection of settings.</p>
37 pub fn default_user_settings(&self) -> ::std::option::Option<&crate::types::UserSettings> {
38 self.default_user_settings.as_ref()
39 }
40 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
41 pub fn domain_settings_for_update(&self) -> ::std::option::Option<&crate::types::DomainSettingsForUpdate> {
42 self.domain_settings_for_update.as_ref()
43 }
44 /// <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>
45 pub fn app_security_group_management(&self) -> ::std::option::Option<&crate::types::AppSecurityGroupManagement> {
46 self.app_security_group_management.as_ref()
47 }
48 /// <p>The default settings for shared spaces that users create in the domain.</p>
49 pub fn default_space_settings(&self) -> ::std::option::Option<&crate::types::DefaultSpaceSettings> {
50 self.default_space_settings.as_ref()
51 }
52 /// <p>The VPC subnets that Studio uses for communication.</p>
53 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
54 ///
55 /// 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()`.
56 pub fn subnet_ids(&self) -> &[::std::string::String] {
57 self.subnet_ids.as_deref().unwrap_or_default()
58 }
59 /// <p>Specifies the VPC used for non-EFS traffic.</p>
60 /// <ul>
61 /// <li>
62 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
63 /// <li>
64 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
65 /// </ul>
66 /// <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>
67 pub fn app_network_access_type(&self) -> ::std::option::Option<&crate::types::AppNetworkAccessType> {
68 self.app_network_access_type.as_ref()
69 }
70 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
71 pub fn tag_propagation(&self) -> ::std::option::Option<&crate::types::TagPropagation> {
72 self.tag_propagation.as_ref()
73 }
74}
75impl UpdateDomainInput {
76 /// Creates a new builder-style object to manufacture [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
77 pub fn builder() -> crate::operation::update_domain::builders::UpdateDomainInputBuilder {
78 crate::operation::update_domain::builders::UpdateDomainInputBuilder::default()
79 }
80}
81
82/// A builder for [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct UpdateDomainInputBuilder {
86 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
87 pub(crate) default_user_settings: ::std::option::Option<crate::types::UserSettings>,
88 pub(crate) domain_settings_for_update: ::std::option::Option<crate::types::DomainSettingsForUpdate>,
89 pub(crate) app_security_group_management: ::std::option::Option<crate::types::AppSecurityGroupManagement>,
90 pub(crate) default_space_settings: ::std::option::Option<crate::types::DefaultSpaceSettings>,
91 pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
92 pub(crate) app_network_access_type: ::std::option::Option<crate::types::AppNetworkAccessType>,
93 pub(crate) tag_propagation: ::std::option::Option<crate::types::TagPropagation>,
94}
95impl UpdateDomainInputBuilder {
96 /// <p>The ID of the domain to be updated.</p>
97 /// This field is required.
98 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.domain_id = ::std::option::Option::Some(input.into());
100 self
101 }
102 /// <p>The ID of the domain to be updated.</p>
103 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.domain_id = input;
105 self
106 }
107 /// <p>The ID of the domain to be updated.</p>
108 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
109 &self.domain_id
110 }
111 /// <p>A collection of settings.</p>
112 pub fn default_user_settings(mut self, input: crate::types::UserSettings) -> Self {
113 self.default_user_settings = ::std::option::Option::Some(input);
114 self
115 }
116 /// <p>A collection of settings.</p>
117 pub fn set_default_user_settings(mut self, input: ::std::option::Option<crate::types::UserSettings>) -> Self {
118 self.default_user_settings = input;
119 self
120 }
121 /// <p>A collection of settings.</p>
122 pub fn get_default_user_settings(&self) -> &::std::option::Option<crate::types::UserSettings> {
123 &self.default_user_settings
124 }
125 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
126 pub fn domain_settings_for_update(mut self, input: crate::types::DomainSettingsForUpdate) -> Self {
127 self.domain_settings_for_update = ::std::option::Option::Some(input);
128 self
129 }
130 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
131 pub fn set_domain_settings_for_update(mut self, input: ::std::option::Option<crate::types::DomainSettingsForUpdate>) -> Self {
132 self.domain_settings_for_update = input;
133 self
134 }
135 /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
136 pub fn get_domain_settings_for_update(&self) -> &::std::option::Option<crate::types::DomainSettingsForUpdate> {
137 &self.domain_settings_for_update
138 }
139 /// <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>
140 pub fn app_security_group_management(mut self, input: crate::types::AppSecurityGroupManagement) -> Self {
141 self.app_security_group_management = ::std::option::Option::Some(input);
142 self
143 }
144 /// <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>
145 pub fn set_app_security_group_management(mut self, input: ::std::option::Option<crate::types::AppSecurityGroupManagement>) -> Self {
146 self.app_security_group_management = input;
147 self
148 }
149 /// <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>
150 pub fn get_app_security_group_management(&self) -> &::std::option::Option<crate::types::AppSecurityGroupManagement> {
151 &self.app_security_group_management
152 }
153 /// <p>The default settings for shared spaces that users create in the domain.</p>
154 pub fn default_space_settings(mut self, input: crate::types::DefaultSpaceSettings) -> Self {
155 self.default_space_settings = ::std::option::Option::Some(input);
156 self
157 }
158 /// <p>The default settings for shared spaces that users create in the domain.</p>
159 pub fn set_default_space_settings(mut self, input: ::std::option::Option<crate::types::DefaultSpaceSettings>) -> Self {
160 self.default_space_settings = input;
161 self
162 }
163 /// <p>The default settings for shared spaces that users create in the domain.</p>
164 pub fn get_default_space_settings(&self) -> &::std::option::Option<crate::types::DefaultSpaceSettings> {
165 &self.default_space_settings
166 }
167 /// Appends an item to `subnet_ids`.
168 ///
169 /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
170 ///
171 /// <p>The VPC subnets that Studio uses for communication.</p>
172 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
173 pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174 let mut v = self.subnet_ids.unwrap_or_default();
175 v.push(input.into());
176 self.subnet_ids = ::std::option::Option::Some(v);
177 self
178 }
179 /// <p>The VPC subnets that Studio uses for communication.</p>
180 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
181 pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
182 self.subnet_ids = input;
183 self
184 }
185 /// <p>The VPC subnets that Studio uses for communication.</p>
186 /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
187 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
188 &self.subnet_ids
189 }
190 /// <p>Specifies the VPC used for non-EFS traffic.</p>
191 /// <ul>
192 /// <li>
193 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
194 /// <li>
195 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
196 /// </ul>
197 /// <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>
198 pub fn app_network_access_type(mut self, input: crate::types::AppNetworkAccessType) -> Self {
199 self.app_network_access_type = ::std::option::Option::Some(input);
200 self
201 }
202 /// <p>Specifies the VPC used for non-EFS traffic.</p>
203 /// <ul>
204 /// <li>
205 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
206 /// <li>
207 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
208 /// </ul>
209 /// <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>
210 pub fn set_app_network_access_type(mut self, input: ::std::option::Option<crate::types::AppNetworkAccessType>) -> Self {
211 self.app_network_access_type = input;
212 self
213 }
214 /// <p>Specifies the VPC used for non-EFS traffic.</p>
215 /// <ul>
216 /// <li>
217 /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
218 /// <li>
219 /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
220 /// </ul>
221 /// <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>
222 pub fn get_app_network_access_type(&self) -> &::std::option::Option<crate::types::AppNetworkAccessType> {
223 &self.app_network_access_type
224 }
225 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
226 pub fn tag_propagation(mut self, input: crate::types::TagPropagation) -> Self {
227 self.tag_propagation = ::std::option::Option::Some(input);
228 self
229 }
230 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
231 pub fn set_tag_propagation(mut self, input: ::std::option::Option<crate::types::TagPropagation>) -> Self {
232 self.tag_propagation = input;
233 self
234 }
235 /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
236 pub fn get_tag_propagation(&self) -> &::std::option::Option<crate::types::TagPropagation> {
237 &self.tag_propagation
238 }
239 /// Consumes the builder and constructs a [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
240 pub fn build(
241 self,
242 ) -> ::std::result::Result<crate::operation::update_domain::UpdateDomainInput, ::aws_smithy_types::error::operation::BuildError> {
243 ::std::result::Result::Ok(crate::operation::update_domain::UpdateDomainInput {
244 domain_id: self.domain_id,
245 default_user_settings: self.default_user_settings,
246 domain_settings_for_update: self.domain_settings_for_update,
247 app_security_group_management: self.app_security_group_management,
248 default_space_settings: self.default_space_settings,
249 subnet_ids: self.subnet_ids,
250 app_network_access_type: self.app_network_access_type,
251 tag_propagation: self.tag_propagation,
252 })
253 }
254}