/* * Copyright 2018-2023 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.elasticbeanstalk.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* Request to update an environment. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateEnvironmentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** The name of the application with which the environment is associated. *
*/ private String applicationName; /** ** The ID of the environment to update. *
*
* If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic
* Beanstalk returns MissingRequiredParameter
error.
*
* The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an
* InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic
* Beanstalk returns MissingRequiredParameter
error.
*
* The name of the group to which the target environment belongs. Specify a group name only if the environment's * name is specified in an environment manifest and not with the environment name or environment ID parameters. See * Environment * Manifest (env.yaml) for details. *
*/ private String groupName; /** ** If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. *
*/ private String description; /** ** This specifies the tier to use to update the environment. *
*
* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns
* InvalidParameterValue
error.
*
* If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment.
* If no such application version is found, returns an InvalidParameterValue
error.
*
* If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If
* no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue
* error.
*
* This specifies the platform version that the environment will run after the environment is updated. *
*/ private String solutionStackName; /** ** The ARN of the platform, if used. *
*/ private String platformArn; /** ** If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *
*/ private com.amazonaws.internal.SdkInternalList* A list of custom user-defined configuration options to remove from the configuration set for this environment. *
*/ private com.amazonaws.internal.SdkInternalList* The name of the application with which the environment is associated. *
* * @param applicationName * The name of the application with which the environment is associated. */ public void setApplicationName(String applicationName) { this.applicationName = applicationName; } /** ** The name of the application with which the environment is associated. *
* * @return The name of the application with which the environment is associated. */ public String getApplicationName() { return this.applicationName; } /** ** The name of the application with which the environment is associated. *
* * @param applicationName * The name of the application with which the environment is associated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withApplicationName(String applicationName) { setApplicationName(applicationName); return this; } /** ** The ID of the environment to update. *
*
* If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic
* Beanstalk returns MissingRequiredParameter
error.
*
* If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue
* error.
*
* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS
* Elastic Beanstalk returns MissingRequiredParameter
error.
*/
public void setEnvironmentId(String environmentId) {
this.environmentId = environmentId;
}
/**
*
* The ID of the environment to update. *
*
* If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic
* Beanstalk returns MissingRequiredParameter
error.
*
* If no environment with this ID exists, AWS Elastic Beanstalk returns an
* InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS
* Elastic Beanstalk returns MissingRequiredParameter
error.
*/
public String getEnvironmentId() {
return this.environmentId;
}
/**
*
* The ID of the environment to update. *
*
* If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic
* Beanstalk returns MissingRequiredParameter
error.
*
* If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue
* error.
*
* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS
* Elastic Beanstalk returns MissingRequiredParameter
error.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withEnvironmentId(String environmentId) {
setEnvironmentId(environmentId);
return this;
}
/**
*
* The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an
* InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic
* Beanstalk returns MissingRequiredParameter
error.
*
InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS
* Elastic Beanstalk returns MissingRequiredParameter
error.
*/
public void setEnvironmentName(String environmentName) {
this.environmentName = environmentName;
}
/**
*
* The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an
* InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic
* Beanstalk returns MissingRequiredParameter
error.
*
InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS
* Elastic Beanstalk returns MissingRequiredParameter
error.
*/
public String getEnvironmentName() {
return this.environmentName;
}
/**
*
* The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an
* InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic
* Beanstalk returns MissingRequiredParameter
error.
*
InvalidParameterValue
error.
*
* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS
* Elastic Beanstalk returns MissingRequiredParameter
error.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withEnvironmentName(String environmentName) {
setEnvironmentName(environmentName);
return this;
}
/**
*
* The name of the group to which the target environment belongs. Specify a group name only if the environment's * name is specified in an environment manifest and not with the environment name or environment ID parameters. See * Environment * Manifest (env.yaml) for details. *
* * @param groupName * The name of the group to which the target environment belongs. Specify a group name only if the * environment's name is specified in an environment manifest and not with the environment name or * environment ID parameters. See Environment * Manifest (env.yaml) for details. */ public void setGroupName(String groupName) { this.groupName = groupName; } /** ** The name of the group to which the target environment belongs. Specify a group name only if the environment's * name is specified in an environment manifest and not with the environment name or environment ID parameters. See * Environment * Manifest (env.yaml) for details. *
* * @return The name of the group to which the target environment belongs. Specify a group name only if the * environment's name is specified in an environment manifest and not with the environment name or * environment ID parameters. See Environment * Manifest (env.yaml) for details. */ public String getGroupName() { return this.groupName; } /** ** The name of the group to which the target environment belongs. Specify a group name only if the environment's * name is specified in an environment manifest and not with the environment name or environment ID parameters. See * Environment * Manifest (env.yaml) for details. *
* * @param groupName * The name of the group to which the target environment belongs. Specify a group name only if the * environment's name is specified in an environment manifest and not with the environment name or * environment ID parameters. See Environment * Manifest (env.yaml) for details. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withGroupName(String groupName) { setGroupName(groupName); return this; } /** ** If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. *
* * @param description * If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. */ public void setDescription(String description) { this.description = description; } /** ** If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. *
* * @return If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. */ public String getDescription() { return this.description; } /** ** If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. *
* * @param description * If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withDescription(String description) { setDescription(description); return this; } /** ** This specifies the tier to use to update the environment. *
*
* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns
* InvalidParameterValue
error.
*
* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns
* InvalidParameterValue
error.
*/
public void setTier(EnvironmentTier tier) {
this.tier = tier;
}
/**
*
* This specifies the tier to use to update the environment. *
*
* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns
* InvalidParameterValue
error.
*
* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns
* InvalidParameterValue
error.
*/
public EnvironmentTier getTier() {
return this.tier;
}
/**
*
* This specifies the tier to use to update the environment. *
*
* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns
* InvalidParameterValue
error.
*
* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns
* InvalidParameterValue
error.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withTier(EnvironmentTier tier) {
setTier(tier);
return this;
}
/**
*
* If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment.
* If no such application version is found, returns an InvalidParameterValue
error.
*
InvalidParameterValue
error.
*/
public void setVersionLabel(String versionLabel) {
this.versionLabel = versionLabel;
}
/**
*
* If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment.
* If no such application version is found, returns an InvalidParameterValue
error.
*
InvalidParameterValue
* error.
*/
public String getVersionLabel() {
return this.versionLabel;
}
/**
*
* If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment.
* If no such application version is found, returns an InvalidParameterValue
error.
*
InvalidParameterValue
error.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withVersionLabel(String versionLabel) {
setVersionLabel(versionLabel);
return this;
}
/**
*
* If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If
* no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue
* error.
*
InvalidParameterValue
error.
*/
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
/**
*
* If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If
* no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue
* error.
*
InvalidParameterValue
error.
*/
public String getTemplateName() {
return this.templateName;
}
/**
*
* If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If
* no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue
* error.
*
InvalidParameterValue
error.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withTemplateName(String templateName) {
setTemplateName(templateName);
return this;
}
/**
* * This specifies the platform version that the environment will run after the environment is updated. *
* * @param solutionStackName * This specifies the platform version that the environment will run after the environment is updated. */ public void setSolutionStackName(String solutionStackName) { this.solutionStackName = solutionStackName; } /** ** This specifies the platform version that the environment will run after the environment is updated. *
* * @return This specifies the platform version that the environment will run after the environment is updated. */ public String getSolutionStackName() { return this.solutionStackName; } /** ** This specifies the platform version that the environment will run after the environment is updated. *
* * @param solutionStackName * This specifies the platform version that the environment will run after the environment is updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withSolutionStackName(String solutionStackName) { setSolutionStackName(solutionStackName); return this; } /** ** The ARN of the platform, if used. *
* * @param platformArn * The ARN of the platform, if used. */ public void setPlatformArn(String platformArn) { this.platformArn = platformArn; } /** ** The ARN of the platform, if used. *
* * @return The ARN of the platform, if used. */ public String getPlatformArn() { return this.platformArn; } /** ** The ARN of the platform, if used. *
* * @param platformArn * The ARN of the platform, if used. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withPlatformArn(String platformArn) { setPlatformArn(platformArn); return this; } /** ** If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *
* * @return If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment * and sets the specified configuration options to the requested value. */ public java.util.List* If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *
* * @param optionSettings * If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment * and sets the specified configuration options to the requested value. */ public void setOptionSettings(java.util.Collection* If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setOptionSettings(java.util.Collection)} or {@link #withOptionSettings(java.util.Collection)} if you want * to override the existing values. *
* * @param optionSettings * If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment * and sets the specified configuration options to the requested value. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withOptionSettings(ConfigurationOptionSetting... optionSettings) { if (this.optionSettings == null) { setOptionSettings(new com.amazonaws.internal.SdkInternalList* If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *
* * @param optionSettings * If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment * and sets the specified configuration options to the requested value. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withOptionSettings(java.util.Collection* A list of custom user-defined configuration options to remove from the configuration set for this environment. *
* * @return A list of custom user-defined configuration options to remove from the configuration set for this * environment. */ public java.util.List* A list of custom user-defined configuration options to remove from the configuration set for this environment. *
* * @param optionsToRemove * A list of custom user-defined configuration options to remove from the configuration set for this * environment. */ public void setOptionsToRemove(java.util.Collection* A list of custom user-defined configuration options to remove from the configuration set for this environment. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setOptionsToRemove(java.util.Collection)} or {@link #withOptionsToRemove(java.util.Collection)} if you * want to override the existing values. *
* * @param optionsToRemove * A list of custom user-defined configuration options to remove from the configuration set for this * environment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withOptionsToRemove(OptionSpecification... optionsToRemove) { if (this.optionsToRemove == null) { setOptionsToRemove(new com.amazonaws.internal.SdkInternalList* A list of custom user-defined configuration options to remove from the configuration set for this environment. *
* * @param optionsToRemove * A list of custom user-defined configuration options to remove from the configuration set for this * environment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEnvironmentRequest withOptionsToRemove(java.util.Collection