software.amazon.awssdk.services.rds.model.CreateBlueGreenDeploymentRequest Maven / Gradle / Ivy
/*
* Copyright 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 software.amazon.awssdk.services.rds.model;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class CreateBlueGreenDeploymentRequest extends RdsRequest implements
ToCopyableBuilder {
private static final SdkField BLUE_GREEN_DEPLOYMENT_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("BlueGreenDeploymentName").getter(getter(CreateBlueGreenDeploymentRequest::blueGreenDeploymentName))
.setter(setter(Builder::blueGreenDeploymentName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BlueGreenDeploymentName").build())
.build();
private static final SdkField SOURCE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Source")
.getter(getter(CreateBlueGreenDeploymentRequest::source)).setter(setter(Builder::source))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Source").build()).build();
private static final SdkField TARGET_ENGINE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TargetEngineVersion").getter(getter(CreateBlueGreenDeploymentRequest::targetEngineVersion))
.setter(setter(Builder::targetEngineVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetEngineVersion").build())
.build();
private static final SdkField TARGET_DB_PARAMETER_GROUP_NAME_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("TargetDBParameterGroupName")
.getter(getter(CreateBlueGreenDeploymentRequest::targetDBParameterGroupName))
.setter(setter(Builder::targetDBParameterGroupName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetDBParameterGroupName").build())
.build();
private static final SdkField TARGET_DB_CLUSTER_PARAMETER_GROUP_NAME_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("TargetDBClusterParameterGroupName")
.getter(getter(CreateBlueGreenDeploymentRequest::targetDBClusterParameterGroupName))
.setter(setter(Builder::targetDBClusterParameterGroupName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetDBClusterParameterGroupName")
.build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Tags")
.getter(getter(CreateBlueGreenDeploymentRequest::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
ListTrait
.builder()
.memberLocationName("Tag")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Tag::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("Tag").build()).build()).build()).build();
private static final SdkField TARGET_DB_INSTANCE_CLASS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TargetDBInstanceClass").getter(getter(CreateBlueGreenDeploymentRequest::targetDBInstanceClass))
.setter(setter(Builder::targetDBInstanceClass))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetDBInstanceClass").build())
.build();
private static final SdkField UPGRADE_TARGET_STORAGE_CONFIG_FIELD = SdkField
. builder(MarshallingType.BOOLEAN)
.memberName("UpgradeTargetStorageConfig")
.getter(getter(CreateBlueGreenDeploymentRequest::upgradeTargetStorageConfig))
.setter(setter(Builder::upgradeTargetStorageConfig))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpgradeTargetStorageConfig").build())
.build();
private static final SdkField TARGET_IOPS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("TargetIops").getter(getter(CreateBlueGreenDeploymentRequest::targetIops))
.setter(setter(Builder::targetIops))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetIops").build()).build();
private static final SdkField TARGET_STORAGE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TargetStorageType").getter(getter(CreateBlueGreenDeploymentRequest::targetStorageType))
.setter(setter(Builder::targetStorageType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetStorageType").build()).build();
private static final SdkField TARGET_ALLOCATED_STORAGE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("TargetAllocatedStorage").getter(getter(CreateBlueGreenDeploymentRequest::targetAllocatedStorage))
.setter(setter(Builder::targetAllocatedStorage))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetAllocatedStorage").build())
.build();
private static final SdkField TARGET_STORAGE_THROUGHPUT_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("TargetStorageThroughput").getter(getter(CreateBlueGreenDeploymentRequest::targetStorageThroughput))
.setter(setter(Builder::targetStorageThroughput))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetStorageThroughput").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
BLUE_GREEN_DEPLOYMENT_NAME_FIELD, SOURCE_FIELD, TARGET_ENGINE_VERSION_FIELD, TARGET_DB_PARAMETER_GROUP_NAME_FIELD,
TARGET_DB_CLUSTER_PARAMETER_GROUP_NAME_FIELD, TAGS_FIELD, TARGET_DB_INSTANCE_CLASS_FIELD,
UPGRADE_TARGET_STORAGE_CONFIG_FIELD, TARGET_IOPS_FIELD, TARGET_STORAGE_TYPE_FIELD, TARGET_ALLOCATED_STORAGE_FIELD,
TARGET_STORAGE_THROUGHPUT_FIELD));
private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();
private final String blueGreenDeploymentName;
private final String source;
private final String targetEngineVersion;
private final String targetDBParameterGroupName;
private final String targetDBClusterParameterGroupName;
private final List tags;
private final String targetDBInstanceClass;
private final Boolean upgradeTargetStorageConfig;
private final Integer targetIops;
private final String targetStorageType;
private final Integer targetAllocatedStorage;
private final Integer targetStorageThroughput;
private CreateBlueGreenDeploymentRequest(BuilderImpl builder) {
super(builder);
this.blueGreenDeploymentName = builder.blueGreenDeploymentName;
this.source = builder.source;
this.targetEngineVersion = builder.targetEngineVersion;
this.targetDBParameterGroupName = builder.targetDBParameterGroupName;
this.targetDBClusterParameterGroupName = builder.targetDBClusterParameterGroupName;
this.tags = builder.tags;
this.targetDBInstanceClass = builder.targetDBInstanceClass;
this.upgradeTargetStorageConfig = builder.upgradeTargetStorageConfig;
this.targetIops = builder.targetIops;
this.targetStorageType = builder.targetStorageType;
this.targetAllocatedStorage = builder.targetAllocatedStorage;
this.targetStorageThroughput = builder.targetStorageThroughput;
}
/**
*
* The name of the blue/green deployment.
*
*
* Constraints:
*
*
* -
*
* Can't be the same as an existing blue/green deployment name in the same account and Amazon Web Services Region.
*
*
*
*
* @return The name of the blue/green deployment.
*
* Constraints:
*
*
* -
*
* Can't be the same as an existing blue/green deployment name in the same account and Amazon Web Services
* Region.
*
*
*/
public final String blueGreenDeploymentName() {
return blueGreenDeploymentName;
}
/**
*
* The Amazon Resource Name (ARN) of the source production database.
*
*
* Specify the database that you want to clone. The blue/green deployment creates this database in the green
* environment. You can make updates to the database in the green environment, such as an engine version upgrade.
* When you are ready, you can switch the database in the green environment to be the production database.
*
*
* @return The Amazon Resource Name (ARN) of the source production database.
*
* Specify the database that you want to clone. The blue/green deployment creates this database in the green
* environment. You can make updates to the database in the green environment, such as an engine version
* upgrade. When you are ready, you can switch the database in the green environment to be the production
* database.
*/
public final String source() {
return source;
}
/**
*
* The engine version of the database in the green environment.
*
*
* Specify the engine version to upgrade to in the green environment.
*
*
* @return The engine version of the database in the green environment.
*
* Specify the engine version to upgrade to in the green environment.
*/
public final String targetEngineVersion() {
return targetEngineVersion;
}
/**
*
* The DB parameter group associated with the DB instance in the green environment.
*
*
* To test parameter changes, specify a DB parameter group that is different from the one associated with the source
* DB instance.
*
*
* @return The DB parameter group associated with the DB instance in the green environment.
*
* To test parameter changes, specify a DB parameter group that is different from the one associated with
* the source DB instance.
*/
public final String targetDBParameterGroupName() {
return targetDBParameterGroupName;
}
/**
*
* The DB cluster parameter group associated with the Aurora DB cluster in the green environment.
*
*
* To test parameter changes, specify a DB cluster parameter group that is different from the one associated with
* the source DB cluster.
*
*
* @return The DB cluster parameter group associated with the Aurora DB cluster in the green environment.
*
* To test parameter changes, specify a DB cluster parameter group that is different from the one associated
* with the source DB cluster.
*/
public final String targetDBClusterParameterGroupName() {
return targetDBClusterParameterGroupName;
}
/**
* For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that
* the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful
* because the SDK will never return a null collection or map, but you may need to differentiate between the service
* returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
* if a value for the property was specified in the request builder, and false if a value was not specified.
*/
public final boolean hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructList);
}
/**
*
* Tags to assign to the blue/green deployment.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTags} method.
*
*
* @return Tags to assign to the blue/green deployment.
*/
public final List tags() {
return tags;
}
/**
*
* Specify the DB instance class for the databases in the green environment.
*
*
* This parameter only applies to RDS DB instances, because DB instances within an Aurora DB cluster can have
* multiple different instance classes. If you're creating a blue/green deployment from an Aurora DB cluster, don't
* specify this parameter. After the green environment is created, you can individually modify the instance classes
* of the DB instances within the green DB cluster.
*
*
* @return Specify the DB instance class for the databases in the green environment.
*
* This parameter only applies to RDS DB instances, because DB instances within an Aurora DB cluster can
* have multiple different instance classes. If you're creating a blue/green deployment from an Aurora DB
* cluster, don't specify this parameter. After the green environment is created, you can individually
* modify the instance classes of the DB instances within the green DB cluster.
*/
public final String targetDBInstanceClass() {
return targetDBInstanceClass;
}
/**
*
* Whether to upgrade the storage file system configuration on the green database. This option migrates the green DB
* instance from the older 32-bit file system to the preferred configuration. For more information, see Upgrading the storage file system for a DB instance.
*
*
* @return Whether to upgrade the storage file system configuration on the green database. This option migrates the
* green DB instance from the older 32-bit file system to the preferred configuration. For more information,
* see Upgrading the storage file system for a DB instance.
*/
public final Boolean upgradeTargetStorageConfig() {
return upgradeTargetStorageConfig;
}
/**
*
* The amount of Provisioned IOPS (input/output operations per second) to allocate for the green DB instance. For
* information about valid IOPS values, see Amazon RDS DB instance
* storage in the Amazon RDS User Guide.
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*
*
* @return The amount of Provisioned IOPS (input/output operations per second) to allocate for the green DB
* instance. For information about valid IOPS values, see Amazon RDS DB instance
* storage in the Amazon RDS User Guide.
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*/
public final Integer targetIops() {
return targetIops;
}
/**
*
* The storage type to associate with the green DB instance.
*
*
* Valid Values: gp2 | gp3 | io1 | io2
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*
*
* @return The storage type to associate with the green DB instance.
*
* Valid Values: gp2 | gp3 | io1 | io2
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*/
public final String targetStorageType() {
return targetStorageType;
}
/**
*
* The amount of storage in gibibytes (GiB) to allocate for the green DB instance. You can choose to increase or
* decrease the allocated storage on the green DB instance.
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*
*
* @return The amount of storage in gibibytes (GiB) to allocate for the green DB instance. You can choose to
* increase or decrease the allocated storage on the green DB instance.
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*/
public final Integer targetAllocatedStorage() {
return targetAllocatedStorage;
}
/**
*
* The storage throughput value for the green DB instance.
*
*
* This setting applies only to the gp3
storage type.
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*
*
* @return The storage throughput value for the green DB instance.
*
* This setting applies only to the gp3
storage type.
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*/
public final Integer targetStorageThroughput() {
return targetStorageThroughput;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(blueGreenDeploymentName());
hashCode = 31 * hashCode + Objects.hashCode(source());
hashCode = 31 * hashCode + Objects.hashCode(targetEngineVersion());
hashCode = 31 * hashCode + Objects.hashCode(targetDBParameterGroupName());
hashCode = 31 * hashCode + Objects.hashCode(targetDBClusterParameterGroupName());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(targetDBInstanceClass());
hashCode = 31 * hashCode + Objects.hashCode(upgradeTargetStorageConfig());
hashCode = 31 * hashCode + Objects.hashCode(targetIops());
hashCode = 31 * hashCode + Objects.hashCode(targetStorageType());
hashCode = 31 * hashCode + Objects.hashCode(targetAllocatedStorage());
hashCode = 31 * hashCode + Objects.hashCode(targetStorageThroughput());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateBlueGreenDeploymentRequest)) {
return false;
}
CreateBlueGreenDeploymentRequest other = (CreateBlueGreenDeploymentRequest) obj;
return Objects.equals(blueGreenDeploymentName(), other.blueGreenDeploymentName())
&& Objects.equals(source(), other.source()) && Objects.equals(targetEngineVersion(), other.targetEngineVersion())
&& Objects.equals(targetDBParameterGroupName(), other.targetDBParameterGroupName())
&& Objects.equals(targetDBClusterParameterGroupName(), other.targetDBClusterParameterGroupName())
&& hasTags() == other.hasTags() && Objects.equals(tags(), other.tags())
&& Objects.equals(targetDBInstanceClass(), other.targetDBInstanceClass())
&& Objects.equals(upgradeTargetStorageConfig(), other.upgradeTargetStorageConfig())
&& Objects.equals(targetIops(), other.targetIops())
&& Objects.equals(targetStorageType(), other.targetStorageType())
&& Objects.equals(targetAllocatedStorage(), other.targetAllocatedStorage())
&& Objects.equals(targetStorageThroughput(), other.targetStorageThroughput());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("CreateBlueGreenDeploymentRequest").add("BlueGreenDeploymentName", blueGreenDeploymentName())
.add("Source", source()).add("TargetEngineVersion", targetEngineVersion())
.add("TargetDBParameterGroupName", targetDBParameterGroupName())
.add("TargetDBClusterParameterGroupName", targetDBClusterParameterGroupName())
.add("Tags", hasTags() ? tags() : null).add("TargetDBInstanceClass", targetDBInstanceClass())
.add("UpgradeTargetStorageConfig", upgradeTargetStorageConfig()).add("TargetIops", targetIops())
.add("TargetStorageType", targetStorageType()).add("TargetAllocatedStorage", targetAllocatedStorage())
.add("TargetStorageThroughput", targetStorageThroughput()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "BlueGreenDeploymentName":
return Optional.ofNullable(clazz.cast(blueGreenDeploymentName()));
case "Source":
return Optional.ofNullable(clazz.cast(source()));
case "TargetEngineVersion":
return Optional.ofNullable(clazz.cast(targetEngineVersion()));
case "TargetDBParameterGroupName":
return Optional.ofNullable(clazz.cast(targetDBParameterGroupName()));
case "TargetDBClusterParameterGroupName":
return Optional.ofNullable(clazz.cast(targetDBClusterParameterGroupName()));
case "Tags":
return Optional.ofNullable(clazz.cast(tags()));
case "TargetDBInstanceClass":
return Optional.ofNullable(clazz.cast(targetDBInstanceClass()));
case "UpgradeTargetStorageConfig":
return Optional.ofNullable(clazz.cast(upgradeTargetStorageConfig()));
case "TargetIops":
return Optional.ofNullable(clazz.cast(targetIops()));
case "TargetStorageType":
return Optional.ofNullable(clazz.cast(targetStorageType()));
case "TargetAllocatedStorage":
return Optional.ofNullable(clazz.cast(targetAllocatedStorage()));
case "TargetStorageThroughput":
return Optional.ofNullable(clazz.cast(targetStorageThroughput()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Map> memberNameToFieldInitializer() {
Map> map = new HashMap<>();
map.put("BlueGreenDeploymentName", BLUE_GREEN_DEPLOYMENT_NAME_FIELD);
map.put("Source", SOURCE_FIELD);
map.put("TargetEngineVersion", TARGET_ENGINE_VERSION_FIELD);
map.put("TargetDBParameterGroupName", TARGET_DB_PARAMETER_GROUP_NAME_FIELD);
map.put("TargetDBClusterParameterGroupName", TARGET_DB_CLUSTER_PARAMETER_GROUP_NAME_FIELD);
map.put("Tags", TAGS_FIELD);
map.put("TargetDBInstanceClass", TARGET_DB_INSTANCE_CLASS_FIELD);
map.put("UpgradeTargetStorageConfig", UPGRADE_TARGET_STORAGE_CONFIG_FIELD);
map.put("TargetIops", TARGET_IOPS_FIELD);
map.put("TargetStorageType", TARGET_STORAGE_TYPE_FIELD);
map.put("TargetAllocatedStorage", TARGET_ALLOCATED_STORAGE_FIELD);
map.put("TargetStorageThroughput", TARGET_STORAGE_THROUGHPUT_FIELD);
return Collections.unmodifiableMap(map);
}
private static Function
*
* Constraints:
*
*
* -
*
* Can't be the same as an existing blue/green deployment name in the same account and Amazon Web
* Services Region.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder blueGreenDeploymentName(String blueGreenDeploymentName);
/**
*
* The Amazon Resource Name (ARN) of the source production database.
*
*
* Specify the database that you want to clone. The blue/green deployment creates this database in the green
* environment. You can make updates to the database in the green environment, such as an engine version
* upgrade. When you are ready, you can switch the database in the green environment to be the production
* database.
*
*
* @param source
* The Amazon Resource Name (ARN) of the source production database.
*
* Specify the database that you want to clone. The blue/green deployment creates this database in the
* green environment. You can make updates to the database in the green environment, such as an engine
* version upgrade. When you are ready, you can switch the database in the green environment to be the
* production database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder source(String source);
/**
*
* The engine version of the database in the green environment.
*
*
* Specify the engine version to upgrade to in the green environment.
*
*
* @param targetEngineVersion
* The engine version of the database in the green environment.
*
* Specify the engine version to upgrade to in the green environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetEngineVersion(String targetEngineVersion);
/**
*
* The DB parameter group associated with the DB instance in the green environment.
*
*
* To test parameter changes, specify a DB parameter group that is different from the one associated with the
* source DB instance.
*
*
* @param targetDBParameterGroupName
* The DB parameter group associated with the DB instance in the green environment.
*
* To test parameter changes, specify a DB parameter group that is different from the one associated with
* the source DB instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetDBParameterGroupName(String targetDBParameterGroupName);
/**
*
* The DB cluster parameter group associated with the Aurora DB cluster in the green environment.
*
*
* To test parameter changes, specify a DB cluster parameter group that is different from the one associated
* with the source DB cluster.
*
*
* @param targetDBClusterParameterGroupName
* The DB cluster parameter group associated with the Aurora DB cluster in the green environment.
*
* To test parameter changes, specify a DB cluster parameter group that is different from the one
* associated with the source DB cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetDBClusterParameterGroupName(String targetDBClusterParameterGroupName);
/**
*
* Tags to assign to the blue/green deployment.
*
*
* @param tags
* Tags to assign to the blue/green deployment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Collection tags);
/**
*
* Tags to assign to the blue/green deployment.
*
*
* @param tags
* Tags to assign to the blue/green deployment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Tag... tags);
/**
*
* Tags to assign to the blue/green deployment.
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.rds.model.Tag.Builder} avoiding the need to create one manually via
* {@link software.amazon.awssdk.services.rds.model.Tag#builder()}.
*
*
* When the {@link Consumer} completes, {@link software.amazon.awssdk.services.rds.model.Tag.Builder#build()} is
* called immediately and its result is passed to {@link #tags(List)}.
*
* @param tags
* a consumer that will call methods on {@link software.amazon.awssdk.services.rds.model.Tag.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #tags(java.util.Collection)
*/
Builder tags(Consumer... tags);
/**
*
* Specify the DB instance class for the databases in the green environment.
*
*
* This parameter only applies to RDS DB instances, because DB instances within an Aurora DB cluster can have
* multiple different instance classes. If you're creating a blue/green deployment from an Aurora DB cluster,
* don't specify this parameter. After the green environment is created, you can individually modify the
* instance classes of the DB instances within the green DB cluster.
*
*
* @param targetDBInstanceClass
* Specify the DB instance class for the databases in the green environment.
*
* This parameter only applies to RDS DB instances, because DB instances within an Aurora DB cluster can
* have multiple different instance classes. If you're creating a blue/green deployment from an Aurora DB
* cluster, don't specify this parameter. After the green environment is created, you can individually
* modify the instance classes of the DB instances within the green DB cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetDBInstanceClass(String targetDBInstanceClass);
/**
*
* Whether to upgrade the storage file system configuration on the green database. This option migrates the
* green DB instance from the older 32-bit file system to the preferred configuration. For more information, see
* Upgrading the storage file system for a DB instance.
*
*
* @param upgradeTargetStorageConfig
* Whether to upgrade the storage file system configuration on the green database. This option migrates
* the green DB instance from the older 32-bit file system to the preferred configuration. For more
* information, see Upgrading the storage file system for a DB instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder upgradeTargetStorageConfig(Boolean upgradeTargetStorageConfig);
/**
*
* The amount of Provisioned IOPS (input/output operations per second) to allocate for the green DB instance.
* For information about valid IOPS values, see Amazon RDS DB instance
* storage in the Amazon RDS User Guide.
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*
*
* @param targetIops
* The amount of Provisioned IOPS (input/output operations per second) to allocate for the green DB
* instance. For information about valid IOPS values, see Amazon RDS DB instance
* storage in the Amazon RDS User Guide.
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetIops(Integer targetIops);
/**
*
* The storage type to associate with the green DB instance.
*
*
* Valid Values: gp2 | gp3 | io1 | io2
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*
*
* @param targetStorageType
* The storage type to associate with the green DB instance.
*
* Valid Values: gp2 | gp3 | io1 | io2
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetStorageType(String targetStorageType);
/**
*
* The amount of storage in gibibytes (GiB) to allocate for the green DB instance. You can choose to increase or
* decrease the allocated storage on the green DB instance.
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*
*
* @param targetAllocatedStorage
* The amount of storage in gibibytes (GiB) to allocate for the green DB instance. You can choose to
* increase or decrease the allocated storage on the green DB instance.
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetAllocatedStorage(Integer targetAllocatedStorage);
/**
*
* The storage throughput value for the green DB instance.
*
*
* This setting applies only to the gp3
storage type.
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
*
*
* @param targetStorageThroughput
* The storage throughput value for the green DB instance.
*
* This setting applies only to the gp3
storage type.
*
*
* This setting doesn't apply to Amazon Aurora blue/green deployments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetStorageThroughput(Integer targetStorageThroughput);
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends RdsRequest.BuilderImpl implements Builder {
private String blueGreenDeploymentName;
private String source;
private String targetEngineVersion;
private String targetDBParameterGroupName;
private String targetDBClusterParameterGroupName;
private List tags = DefaultSdkAutoConstructList.getInstance();
private String targetDBInstanceClass;
private Boolean upgradeTargetStorageConfig;
private Integer targetIops;
private String targetStorageType;
private Integer targetAllocatedStorage;
private Integer targetStorageThroughput;
private BuilderImpl() {
}
private BuilderImpl(CreateBlueGreenDeploymentRequest model) {
super(model);
blueGreenDeploymentName(model.blueGreenDeploymentName);
source(model.source);
targetEngineVersion(model.targetEngineVersion);
targetDBParameterGroupName(model.targetDBParameterGroupName);
targetDBClusterParameterGroupName(model.targetDBClusterParameterGroupName);
tags(model.tags);
targetDBInstanceClass(model.targetDBInstanceClass);
upgradeTargetStorageConfig(model.upgradeTargetStorageConfig);
targetIops(model.targetIops);
targetStorageType(model.targetStorageType);
targetAllocatedStorage(model.targetAllocatedStorage);
targetStorageThroughput(model.targetStorageThroughput);
}
public final String getBlueGreenDeploymentName() {
return blueGreenDeploymentName;
}
public final void setBlueGreenDeploymentName(String blueGreenDeploymentName) {
this.blueGreenDeploymentName = blueGreenDeploymentName;
}
@Override
public final Builder blueGreenDeploymentName(String blueGreenDeploymentName) {
this.blueGreenDeploymentName = blueGreenDeploymentName;
return this;
}
public final String getSource() {
return source;
}
public final void setSource(String source) {
this.source = source;
}
@Override
public final Builder source(String source) {
this.source = source;
return this;
}
public final String getTargetEngineVersion() {
return targetEngineVersion;
}
public final void setTargetEngineVersion(String targetEngineVersion) {
this.targetEngineVersion = targetEngineVersion;
}
@Override
public final Builder targetEngineVersion(String targetEngineVersion) {
this.targetEngineVersion = targetEngineVersion;
return this;
}
public final String getTargetDBParameterGroupName() {
return targetDBParameterGroupName;
}
public final void setTargetDBParameterGroupName(String targetDBParameterGroupName) {
this.targetDBParameterGroupName = targetDBParameterGroupName;
}
@Override
public final Builder targetDBParameterGroupName(String targetDBParameterGroupName) {
this.targetDBParameterGroupName = targetDBParameterGroupName;
return this;
}
public final String getTargetDBClusterParameterGroupName() {
return targetDBClusterParameterGroupName;
}
public final void setTargetDBClusterParameterGroupName(String targetDBClusterParameterGroupName) {
this.targetDBClusterParameterGroupName = targetDBClusterParameterGroupName;
}
@Override
public final Builder targetDBClusterParameterGroupName(String targetDBClusterParameterGroupName) {
this.targetDBClusterParameterGroupName = targetDBClusterParameterGroupName;
return this;
}
public final List getTags() {
List result = TagListCopier.copyToBuilder(this.tags);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setTags(Collection tags) {
this.tags = TagListCopier.copyFromBuilder(tags);
}
@Override
public final Builder tags(Collection tags) {
this.tags = TagListCopier.copy(tags);
return this;
}
@Override
@SafeVarargs
public final Builder tags(Tag... tags) {
tags(Arrays.asList(tags));
return this;
}
@Override
@SafeVarargs
public final Builder tags(Consumer... tags) {
tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList()));
return this;
}
public final String getTargetDBInstanceClass() {
return targetDBInstanceClass;
}
public final void setTargetDBInstanceClass(String targetDBInstanceClass) {
this.targetDBInstanceClass = targetDBInstanceClass;
}
@Override
public final Builder targetDBInstanceClass(String targetDBInstanceClass) {
this.targetDBInstanceClass = targetDBInstanceClass;
return this;
}
public final Boolean getUpgradeTargetStorageConfig() {
return upgradeTargetStorageConfig;
}
public final void setUpgradeTargetStorageConfig(Boolean upgradeTargetStorageConfig) {
this.upgradeTargetStorageConfig = upgradeTargetStorageConfig;
}
@Override
public final Builder upgradeTargetStorageConfig(Boolean upgradeTargetStorageConfig) {
this.upgradeTargetStorageConfig = upgradeTargetStorageConfig;
return this;
}
public final Integer getTargetIops() {
return targetIops;
}
public final void setTargetIops(Integer targetIops) {
this.targetIops = targetIops;
}
@Override
public final Builder targetIops(Integer targetIops) {
this.targetIops = targetIops;
return this;
}
public final String getTargetStorageType() {
return targetStorageType;
}
public final void setTargetStorageType(String targetStorageType) {
this.targetStorageType = targetStorageType;
}
@Override
public final Builder targetStorageType(String targetStorageType) {
this.targetStorageType = targetStorageType;
return this;
}
public final Integer getTargetAllocatedStorage() {
return targetAllocatedStorage;
}
public final void setTargetAllocatedStorage(Integer targetAllocatedStorage) {
this.targetAllocatedStorage = targetAllocatedStorage;
}
@Override
public final Builder targetAllocatedStorage(Integer targetAllocatedStorage) {
this.targetAllocatedStorage = targetAllocatedStorage;
return this;
}
public final Integer getTargetStorageThroughput() {
return targetStorageThroughput;
}
public final void setTargetStorageThroughput(Integer targetStorageThroughput) {
this.targetStorageThroughput = targetStorageThroughput;
}
@Override
public final Builder targetStorageThroughput(Integer targetStorageThroughput) {
this.targetStorageThroughput = targetStorageThroughput;
return this;
}
@Override
public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public CreateBlueGreenDeploymentRequest build() {
return new CreateBlueGreenDeploymentRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
@Override
public Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
}
}