1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateDomainInput {
/// <p>A name for the domain.</p>
#[doc(hidden)]
pub domain_name: std::option::Option<std::string::String>,
/// <p>The mode of authentication that members use to access the domain.</p>
#[doc(hidden)]
pub auth_mode: std::option::Option<crate::types::AuthMode>,
/// <p>The default settings to use to create a user profile when <code>UserSettings</code> isn't specified in the call to the <code>CreateUserProfile</code> API.</p>
/// <p> <code>SecurityGroups</code> is aggregated when specified in both calls. For all other settings in <code>UserSettings</code>, the values specified in <code>CreateUserProfile</code> take precedence over those specified in <code>CreateDomain</code>.</p>
#[doc(hidden)]
pub default_user_settings: std::option::Option<crate::types::UserSettings>,
/// <p>The VPC subnets that Studio uses for communication.</p>
#[doc(hidden)]
pub subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>The ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.</p>
#[doc(hidden)]
pub vpc_id: std::option::Option<std::string::String>,
/// <p>Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the <code>Search</code> API.</p>
/// <p>Tags that you specify for the Domain are also added to all Apps that the Domain launches.</p>
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
/// <p>Specifies the VPC used for non-EFS traffic. The default value is <code>PublicInternetOnly</code>.</p>
/// <ul>
/// <li> <p> <code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows direct internet access</p> </li>
/// <li> <p> <code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets</p> </li>
/// </ul>
#[doc(hidden)]
pub app_network_access_type: std::option::Option<crate::types::AppNetworkAccessType>,
/// <p>Use <code>KmsKeyId</code>.</p>
#[deprecated(note = "This property is deprecated, use KmsKeyId instead.")]
#[doc(hidden)]
pub home_efs_file_system_kms_key_id: std::option::Option<std::string::String>,
/// <p>SageMaker uses Amazon Web Services KMS to encrypt the EFS volume attached to the domain with an Amazon Web Services managed key by default. For more control, specify a customer managed key.</p>
#[doc(hidden)]
pub kms_key_id: std::option::Option<std::string::String>,
/// <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.</p>
#[doc(hidden)]
pub app_security_group_management:
std::option::Option<crate::types::AppSecurityGroupManagement>,
/// <p>A collection of <code>Domain</code> settings.</p>
#[doc(hidden)]
pub domain_settings: std::option::Option<crate::types::DomainSettings>,
/// <p>The default settings used to create a space.</p>
#[doc(hidden)]
pub default_space_settings: std::option::Option<crate::types::DefaultSpaceSettings>,
}
impl CreateDomainInput {
/// <p>A name for the domain.</p>
pub fn domain_name(&self) -> std::option::Option<&str> {
self.domain_name.as_deref()
}
/// <p>The mode of authentication that members use to access the domain.</p>
pub fn auth_mode(&self) -> std::option::Option<&crate::types::AuthMode> {
self.auth_mode.as_ref()
}
/// <p>The default settings to use to create a user profile when <code>UserSettings</code> isn't specified in the call to the <code>CreateUserProfile</code> API.</p>
/// <p> <code>SecurityGroups</code> is aggregated when specified in both calls. For all other settings in <code>UserSettings</code>, the values specified in <code>CreateUserProfile</code> take precedence over those specified in <code>CreateDomain</code>.</p>
pub fn default_user_settings(&self) -> std::option::Option<&crate::types::UserSettings> {
self.default_user_settings.as_ref()
}
/// <p>The VPC subnets that Studio uses for communication.</p>
pub fn subnet_ids(&self) -> std::option::Option<&[std::string::String]> {
self.subnet_ids.as_deref()
}
/// <p>The ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.</p>
pub fn vpc_id(&self) -> std::option::Option<&str> {
self.vpc_id.as_deref()
}
/// <p>Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the <code>Search</code> API.</p>
/// <p>Tags that you specify for the Domain are also added to all Apps that the Domain launches.</p>
pub fn tags(&self) -> std::option::Option<&[crate::types::Tag]> {
self.tags.as_deref()
}
/// <p>Specifies the VPC used for non-EFS traffic. The default value is <code>PublicInternetOnly</code>.</p>
/// <ul>
/// <li> <p> <code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows direct internet access</p> </li>
/// <li> <p> <code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets</p> </li>
/// </ul>
pub fn app_network_access_type(
&self,
) -> std::option::Option<&crate::types::AppNetworkAccessType> {
self.app_network_access_type.as_ref()
}
/// <p>Use <code>KmsKeyId</code>.</p>
#[deprecated(note = "This property is deprecated, use KmsKeyId instead.")]
pub fn home_efs_file_system_kms_key_id(&self) -> std::option::Option<&str> {
self.home_efs_file_system_kms_key_id.as_deref()
}
/// <p>SageMaker uses Amazon Web Services KMS to encrypt the EFS volume attached to the domain with an Amazon Web Services managed key by default. For more control, specify a customer managed key.</p>
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
/// <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.</p>
pub fn app_security_group_management(
&self,
) -> std::option::Option<&crate::types::AppSecurityGroupManagement> {
self.app_security_group_management.as_ref()
}
/// <p>A collection of <code>Domain</code> settings.</p>
pub fn domain_settings(&self) -> std::option::Option<&crate::types::DomainSettings> {
self.domain_settings.as_ref()
}
/// <p>The default settings used to create a space.</p>
pub fn default_space_settings(
&self,
) -> std::option::Option<&crate::types::DefaultSpaceSettings> {
self.default_space_settings.as_ref()
}
}
impl CreateDomainInput {
/// Creates a new builder-style object to manufacture [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
pub fn builder() -> crate::operation::create_domain::builders::CreateDomainInputBuilder {
crate::operation::create_domain::builders::CreateDomainInputBuilder::default()
}
}
/// A builder for [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateDomainInputBuilder {
pub(crate) domain_name: std::option::Option<std::string::String>,
pub(crate) auth_mode: std::option::Option<crate::types::AuthMode>,
pub(crate) default_user_settings: std::option::Option<crate::types::UserSettings>,
pub(crate) subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) vpc_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
pub(crate) app_network_access_type: std::option::Option<crate::types::AppNetworkAccessType>,
pub(crate) home_efs_file_system_kms_key_id: std::option::Option<std::string::String>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
pub(crate) app_security_group_management:
std::option::Option<crate::types::AppSecurityGroupManagement>,
pub(crate) domain_settings: std::option::Option<crate::types::DomainSettings>,
pub(crate) default_space_settings: std::option::Option<crate::types::DefaultSpaceSettings>,
}
impl CreateDomainInputBuilder {
/// <p>A name for the domain.</p>
pub fn domain_name(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_name = Some(input.into());
self
}
/// <p>A name for the domain.</p>
pub fn set_domain_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_name = input;
self
}
/// <p>The mode of authentication that members use to access the domain.</p>
pub fn auth_mode(mut self, input: crate::types::AuthMode) -> Self {
self.auth_mode = Some(input);
self
}
/// <p>The mode of authentication that members use to access the domain.</p>
pub fn set_auth_mode(mut self, input: std::option::Option<crate::types::AuthMode>) -> Self {
self.auth_mode = input;
self
}
/// <p>The default settings to use to create a user profile when <code>UserSettings</code> isn't specified in the call to the <code>CreateUserProfile</code> API.</p>
/// <p> <code>SecurityGroups</code> is aggregated when specified in both calls. For all other settings in <code>UserSettings</code>, the values specified in <code>CreateUserProfile</code> take precedence over those specified in <code>CreateDomain</code>.</p>
pub fn default_user_settings(mut self, input: crate::types::UserSettings) -> Self {
self.default_user_settings = Some(input);
self
}
/// <p>The default settings to use to create a user profile when <code>UserSettings</code> isn't specified in the call to the <code>CreateUserProfile</code> API.</p>
/// <p> <code>SecurityGroups</code> is aggregated when specified in both calls. For all other settings in <code>UserSettings</code>, the values specified in <code>CreateUserProfile</code> take precedence over those specified in <code>CreateDomain</code>.</p>
pub fn set_default_user_settings(
mut self,
input: std::option::Option<crate::types::UserSettings>,
) -> Self {
self.default_user_settings = input;
self
}
/// Appends an item to `subnet_ids`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>The VPC subnets that Studio uses for communication.</p>
pub fn subnet_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.subnet_ids.unwrap_or_default();
v.push(input.into());
self.subnet_ids = Some(v);
self
}
/// <p>The VPC subnets that Studio uses for communication.</p>
pub fn set_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.subnet_ids = input;
self
}
/// <p>The ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.</p>
pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
self.vpc_id = Some(input.into());
self
}
/// <p>The ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.vpc_id = input;
self
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the <code>Search</code> API.</p>
/// <p>Tags that you specify for the Domain are also added to all Apps that the Domain launches.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
/// <p>Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the <code>Search</code> API.</p>
/// <p>Tags that you specify for the Domain are also added to all Apps that the Domain launches.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Tag>>,
) -> Self {
self.tags = input;
self
}
/// <p>Specifies the VPC used for non-EFS traffic. The default value is <code>PublicInternetOnly</code>.</p>
/// <ul>
/// <li> <p> <code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows direct internet access</p> </li>
/// <li> <p> <code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets</p> </li>
/// </ul>
pub fn app_network_access_type(mut self, input: crate::types::AppNetworkAccessType) -> Self {
self.app_network_access_type = Some(input);
self
}
/// <p>Specifies the VPC used for non-EFS traffic. The default value is <code>PublicInternetOnly</code>.</p>
/// <ul>
/// <li> <p> <code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows direct internet access</p> </li>
/// <li> <p> <code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets</p> </li>
/// </ul>
pub fn set_app_network_access_type(
mut self,
input: std::option::Option<crate::types::AppNetworkAccessType>,
) -> Self {
self.app_network_access_type = input;
self
}
/// <p>Use <code>KmsKeyId</code>.</p>
#[deprecated(note = "This property is deprecated, use KmsKeyId instead.")]
pub fn home_efs_file_system_kms_key_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.home_efs_file_system_kms_key_id = Some(input.into());
self
}
/// <p>Use <code>KmsKeyId</code>.</p>
#[deprecated(note = "This property is deprecated, use KmsKeyId instead.")]
pub fn set_home_efs_file_system_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.home_efs_file_system_kms_key_id = input;
self
}
/// <p>SageMaker uses Amazon Web Services KMS to encrypt the EFS volume attached to the domain with an Amazon Web Services managed key by default. For more control, specify a customer managed key.</p>
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
/// <p>SageMaker uses Amazon Web Services KMS to encrypt the EFS volume attached to the domain with an Amazon Web Services managed key by default. For more control, specify a customer managed key.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
/// <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.</p>
pub fn app_security_group_management(
mut self,
input: crate::types::AppSecurityGroupManagement,
) -> Self {
self.app_security_group_management = Some(input);
self
}
/// <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.</p>
pub fn set_app_security_group_management(
mut self,
input: std::option::Option<crate::types::AppSecurityGroupManagement>,
) -> Self {
self.app_security_group_management = input;
self
}
/// <p>A collection of <code>Domain</code> settings.</p>
pub fn domain_settings(mut self, input: crate::types::DomainSettings) -> Self {
self.domain_settings = Some(input);
self
}
/// <p>A collection of <code>Domain</code> settings.</p>
pub fn set_domain_settings(
mut self,
input: std::option::Option<crate::types::DomainSettings>,
) -> Self {
self.domain_settings = input;
self
}
/// <p>The default settings used to create a space.</p>
pub fn default_space_settings(mut self, input: crate::types::DefaultSpaceSettings) -> Self {
self.default_space_settings = Some(input);
self
}
/// <p>The default settings used to create a space.</p>
pub fn set_default_space_settings(
mut self,
input: std::option::Option<crate::types::DefaultSpaceSettings>,
) -> Self {
self.default_space_settings = input;
self
}
/// Consumes the builder and constructs a [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
pub fn build(
self,
) -> Result<
crate::operation::create_domain::CreateDomainInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::create_domain::CreateDomainInput {
domain_name: self.domain_name,
auth_mode: self.auth_mode,
default_user_settings: self.default_user_settings,
subnet_ids: self.subnet_ids,
vpc_id: self.vpc_id,
tags: self.tags,
app_network_access_type: self.app_network_access_type,
home_efs_file_system_kms_key_id: self.home_efs_file_system_kms_key_id,
kms_key_id: self.kms_key_id,
app_security_group_management: self.app_security_group_management,
domain_settings: self.domain_settings,
default_space_settings: self.default_space_settings,
})
}
}