com.amazonaws.services.sagemaker.model.UpdateDomainRequest Maven / Gradle / Ivy
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.sagemaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateDomainRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of the domain to be updated.
*
*/
private String domainId;
/**
*
* A collection of settings.
*
*/
private UserSettings defaultUserSettings;
/**
*
* A collection of DomainSettings
configuration values to update.
*
*/
private DomainSettingsForUpdate domainSettingsForUpdate;
/**
*
* The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is VPCOnly
* and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided. If setting up
* the domain for use with RStudio, this value must be set to Service
.
*
*/
private String appSecurityGroupManagement;
/**
*
* The default settings used to create a space within the domain.
*
*/
private DefaultSpaceSettings defaultSpaceSettings;
/**
*
* The VPC subnets that Studio uses for communication.
*
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
*
*/
private java.util.List subnetIds;
/**
*
* Specifies the VPC used for non-EFS traffic.
*
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows
* direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
, Pending
,
* or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of the same
* request.
*
*/
private String appNetworkAccessType;
/**
*
* The ID of the domain to be updated.
*
*
* @param domainId
* The ID of the domain to be updated.
*/
public void setDomainId(String domainId) {
this.domainId = domainId;
}
/**
*
* The ID of the domain to be updated.
*
*
* @return The ID of the domain to be updated.
*/
public String getDomainId() {
return this.domainId;
}
/**
*
* The ID of the domain to be updated.
*
*
* @param domainId
* The ID of the domain to be updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDomainRequest withDomainId(String domainId) {
setDomainId(domainId);
return this;
}
/**
*
* A collection of settings.
*
*
* @param defaultUserSettings
* A collection of settings.
*/
public void setDefaultUserSettings(UserSettings defaultUserSettings) {
this.defaultUserSettings = defaultUserSettings;
}
/**
*
* A collection of settings.
*
*
* @return A collection of settings.
*/
public UserSettings getDefaultUserSettings() {
return this.defaultUserSettings;
}
/**
*
* A collection of settings.
*
*
* @param defaultUserSettings
* A collection of settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDomainRequest withDefaultUserSettings(UserSettings defaultUserSettings) {
setDefaultUserSettings(defaultUserSettings);
return this;
}
/**
*
* A collection of DomainSettings
configuration values to update.
*
*
* @param domainSettingsForUpdate
* A collection of DomainSettings
configuration values to update.
*/
public void setDomainSettingsForUpdate(DomainSettingsForUpdate domainSettingsForUpdate) {
this.domainSettingsForUpdate = domainSettingsForUpdate;
}
/**
*
* A collection of DomainSettings
configuration values to update.
*
*
* @return A collection of DomainSettings
configuration values to update.
*/
public DomainSettingsForUpdate getDomainSettingsForUpdate() {
return this.domainSettingsForUpdate;
}
/**
*
* A collection of DomainSettings
configuration values to update.
*
*
* @param domainSettingsForUpdate
* A collection of DomainSettings
configuration values to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDomainRequest withDomainSettingsForUpdate(DomainSettingsForUpdate domainSettingsForUpdate) {
setDomainSettingsForUpdate(domainSettingsForUpdate);
return this;
}
/**
*
* The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is VPCOnly
* and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided. If setting up
* the domain for use with RStudio, this value must be set to Service
.
*
*
* @param appSecurityGroupManagement
* The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is
* VPCOnly
and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
* is provided. If setting up the domain for use with RStudio, this value must be set to Service
* .
* @see AppSecurityGroupManagement
*/
public void setAppSecurityGroupManagement(String appSecurityGroupManagement) {
this.appSecurityGroupManagement = appSecurityGroupManagement;
}
/**
*
* The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is VPCOnly
* and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided. If setting up
* the domain for use with RStudio, this value must be set to Service
.
*
*
* @return The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is
* VPCOnly
and
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided. If setting
* up the domain for use with RStudio, this value must be set to Service
.
* @see AppSecurityGroupManagement
*/
public String getAppSecurityGroupManagement() {
return this.appSecurityGroupManagement;
}
/**
*
* The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is VPCOnly
* and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided. If setting up
* the domain for use with RStudio, this value must be set to Service
.
*
*
* @param appSecurityGroupManagement
* The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is
* VPCOnly
and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
* is provided. If setting up the domain for use with RStudio, this value must be set to Service
* .
* @return Returns a reference to this object so that method calls can be chained together.
* @see AppSecurityGroupManagement
*/
public UpdateDomainRequest withAppSecurityGroupManagement(String appSecurityGroupManagement) {
setAppSecurityGroupManagement(appSecurityGroupManagement);
return this;
}
/**
*
* The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is VPCOnly
* and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided. If setting up
* the domain for use with RStudio, this value must be set to Service
.
*
*
* @param appSecurityGroupManagement
* The entity that creates and manages the required security groups for inter-app communication in
* VPCOnly
mode. Required when CreateDomain.AppNetworkAccessType
is
* VPCOnly
and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
* is provided. If setting up the domain for use with RStudio, this value must be set to Service
* .
* @return Returns a reference to this object so that method calls can be chained together.
* @see AppSecurityGroupManagement
*/
public UpdateDomainRequest withAppSecurityGroupManagement(AppSecurityGroupManagement appSecurityGroupManagement) {
this.appSecurityGroupManagement = appSecurityGroupManagement.toString();
return this;
}
/**
*
* The default settings used to create a space within the domain.
*
*
* @param defaultSpaceSettings
* The default settings used to create a space within the domain.
*/
public void setDefaultSpaceSettings(DefaultSpaceSettings defaultSpaceSettings) {
this.defaultSpaceSettings = defaultSpaceSettings;
}
/**
*
* The default settings used to create a space within the domain.
*
*
* @return The default settings used to create a space within the domain.
*/
public DefaultSpaceSettings getDefaultSpaceSettings() {
return this.defaultSpaceSettings;
}
/**
*
* The default settings used to create a space within the domain.
*
*
* @param defaultSpaceSettings
* The default settings used to create a space within the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDomainRequest withDefaultSpaceSettings(DefaultSpaceSettings defaultSpaceSettings) {
setDefaultSpaceSettings(defaultSpaceSettings);
return this;
}
/**
*
* The VPC subnets that Studio uses for communication.
*
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
*
*
* @return The VPC subnets that Studio uses for communication.
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
*/
public java.util.List getSubnetIds() {
return subnetIds;
}
/**
*
* The VPC subnets that Studio uses for communication.
*
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
*
*
* @param subnetIds
* The VPC subnets that Studio uses for communication.
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
*/
public void setSubnetIds(java.util.Collection subnetIds) {
if (subnetIds == null) {
this.subnetIds = null;
return;
}
this.subnetIds = new java.util.ArrayList(subnetIds);
}
/**
*
* The VPC subnets that Studio uses for communication.
*
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubnetIds(java.util.Collection)} or {@link #withSubnetIds(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param subnetIds
* The VPC subnets that Studio uses for communication.
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDomainRequest withSubnetIds(String... subnetIds) {
if (this.subnetIds == null) {
setSubnetIds(new java.util.ArrayList(subnetIds.length));
}
for (String ele : subnetIds) {
this.subnetIds.add(ele);
}
return this;
}
/**
*
* The VPC subnets that Studio uses for communication.
*
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
*
*
* @param subnetIds
* The VPC subnets that Studio uses for communication.
*
* If removing subnets, ensure there are no apps in the InService
, Pending
, or
* Deleting
state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDomainRequest withSubnetIds(java.util.Collection subnetIds) {
setSubnetIds(subnetIds);
return this;
}
/**
*
* Specifies the VPC used for non-EFS traffic.
*
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows
* direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
, Pending
,
* or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of the same
* request.
*
*
* @param appNetworkAccessType
* Specifies the VPC used for non-EFS traffic.
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which
* allows direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
,
* Pending
, or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of
* the same request.
* @see AppNetworkAccessType
*/
public void setAppNetworkAccessType(String appNetworkAccessType) {
this.appNetworkAccessType = appNetworkAccessType;
}
/**
*
* Specifies the VPC used for non-EFS traffic.
*
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows
* direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
, Pending
,
* or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of the same
* request.
*
*
* @return Specifies the VPC used for non-EFS traffic.
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which
* allows direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
,
* Pending
, or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of
* the same request.
* @see AppNetworkAccessType
*/
public String getAppNetworkAccessType() {
return this.appNetworkAccessType;
}
/**
*
* Specifies the VPC used for non-EFS traffic.
*
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows
* direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
, Pending
,
* or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of the same
* request.
*
*
* @param appNetworkAccessType
* Specifies the VPC used for non-EFS traffic.
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which
* allows direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
,
* Pending
, or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of
* the same request.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AppNetworkAccessType
*/
public UpdateDomainRequest withAppNetworkAccessType(String appNetworkAccessType) {
setAppNetworkAccessType(appNetworkAccessType);
return this;
}
/**
*
* Specifies the VPC used for non-EFS traffic.
*
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows
* direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
, Pending
,
* or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of the same
* request.
*
*
* @param appNetworkAccessType
* Specifies the VPC used for non-EFS traffic.
*
* -
*
* PublicInternetOnly
- Non-EFS traffic is through a VPC managed by Amazon SageMaker, which
* allows direct internet access.
*
*
* -
*
* VpcOnly
- All Studio traffic is through the specified VPC and subnets.
*
*
*
*
* This configuration can only be modified if there are no apps in the InService
,
* Pending
, or Deleting
state. The configuration cannot be updated if
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is already set or
* DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn
is provided as part of
* the same request.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AppNetworkAccessType
*/
public UpdateDomainRequest withAppNetworkAccessType(AppNetworkAccessType appNetworkAccessType) {
this.appNetworkAccessType = appNetworkAccessType.toString();
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getDomainId() != null)
sb.append("DomainId: ").append(getDomainId()).append(",");
if (getDefaultUserSettings() != null)
sb.append("DefaultUserSettings: ").append(getDefaultUserSettings()).append(",");
if (getDomainSettingsForUpdate() != null)
sb.append("DomainSettingsForUpdate: ").append(getDomainSettingsForUpdate()).append(",");
if (getAppSecurityGroupManagement() != null)
sb.append("AppSecurityGroupManagement: ").append(getAppSecurityGroupManagement()).append(",");
if (getDefaultSpaceSettings() != null)
sb.append("DefaultSpaceSettings: ").append(getDefaultSpaceSettings()).append(",");
if (getSubnetIds() != null)
sb.append("SubnetIds: ").append(getSubnetIds()).append(",");
if (getAppNetworkAccessType() != null)
sb.append("AppNetworkAccessType: ").append(getAppNetworkAccessType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateDomainRequest == false)
return false;
UpdateDomainRequest other = (UpdateDomainRequest) obj;
if (other.getDomainId() == null ^ this.getDomainId() == null)
return false;
if (other.getDomainId() != null && other.getDomainId().equals(this.getDomainId()) == false)
return false;
if (other.getDefaultUserSettings() == null ^ this.getDefaultUserSettings() == null)
return false;
if (other.getDefaultUserSettings() != null && other.getDefaultUserSettings().equals(this.getDefaultUserSettings()) == false)
return false;
if (other.getDomainSettingsForUpdate() == null ^ this.getDomainSettingsForUpdate() == null)
return false;
if (other.getDomainSettingsForUpdate() != null && other.getDomainSettingsForUpdate().equals(this.getDomainSettingsForUpdate()) == false)
return false;
if (other.getAppSecurityGroupManagement() == null ^ this.getAppSecurityGroupManagement() == null)
return false;
if (other.getAppSecurityGroupManagement() != null && other.getAppSecurityGroupManagement().equals(this.getAppSecurityGroupManagement()) == false)
return false;
if (other.getDefaultSpaceSettings() == null ^ this.getDefaultSpaceSettings() == null)
return false;
if (other.getDefaultSpaceSettings() != null && other.getDefaultSpaceSettings().equals(this.getDefaultSpaceSettings()) == false)
return false;
if (other.getSubnetIds() == null ^ this.getSubnetIds() == null)
return false;
if (other.getSubnetIds() != null && other.getSubnetIds().equals(this.getSubnetIds()) == false)
return false;
if (other.getAppNetworkAccessType() == null ^ this.getAppNetworkAccessType() == null)
return false;
if (other.getAppNetworkAccessType() != null && other.getAppNetworkAccessType().equals(this.getAppNetworkAccessType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDomainId() == null) ? 0 : getDomainId().hashCode());
hashCode = prime * hashCode + ((getDefaultUserSettings() == null) ? 0 : getDefaultUserSettings().hashCode());
hashCode = prime * hashCode + ((getDomainSettingsForUpdate() == null) ? 0 : getDomainSettingsForUpdate().hashCode());
hashCode = prime * hashCode + ((getAppSecurityGroupManagement() == null) ? 0 : getAppSecurityGroupManagement().hashCode());
hashCode = prime * hashCode + ((getDefaultSpaceSettings() == null) ? 0 : getDefaultSpaceSettings().hashCode());
hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode());
hashCode = prime * hashCode + ((getAppNetworkAccessType() == null) ? 0 : getAppNetworkAccessType().hashCode());
return hashCode;
}
@Override
public UpdateDomainRequest clone() {
return (UpdateDomainRequest) super.clone();
}
}