mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 14:30:28 -05:00
feat(ec2): carry the remaining launch template data fields (#3493)
* feat(ec2): carry the remaining launch template data fields InstanceMarketOptions, InstanceRequirements and a network interface's ConnectionTrackingSpecification were the last three RequestLaunchTemplateData groups Floci accepted and threw away. A Terraform aws_launch_template that declared any of them read back nothing, so it reported an inconsistent result after apply or diffed forever. Ec2QueryHandler now parses all three off the Query wire and renders them into ResponseLaunchTemplateData, and LaunchTemplateData stores them. All 26 members of InstanceRequirementsRequest are covered, including the nested BaselinePerformanceFactors. CreateLaunchTemplateVersion inherits the new members the same way it inherits the existing ones. * fix(ec2): validate launch template instance requirements and connection tracking InstanceRequirements and ConnectionTrackingSpecification became writable in the previous commit, but nothing checked them. A block carrying only BurstablePerformance was stored, and so was a network interface asking for a one second TCP established timeout. The EC2 service model declares VCpuCount and MemoryMiB required on InstanceRequirementsRequest, and Min required on each of their range shapes, so a request missing any of them now fails with MissingParameter. The connection tracking timeouts have no min or max keys in the model; the ranges live in each member's documentation string, which gives TcpEstablishedTimeout 60 to 432000 seconds, UdpTimeout 30 to 60 and UdpStreamTimeout 60 to 180. A value outside one of those fails with InvalidParameterValue, matching the existing hop limit check. CreateLaunchTemplate and CreateLaunchTemplateVersion both validate before anything is stored. * fix(ec2): reject the launch template combinations InstanceRequirements forbids InstanceRequirements became writable two commits ago, and validation covered the required members and the connection tracking ranges but not the combinations the EC2 API reference rules out. Three of them were storable. The service model documents each rule in a member documentation string rather than in its constraints. RequestLaunchTemplateData says "If you specify InstanceRequirements, you can't specify InstanceType". InstanceRequirementsRequest says "If you specify AllowedInstanceTypes, you can't specify ExcludedInstanceTypes" and "Only one of SpotMaxPricePercentageOverLowestPrice or MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified". All three now fail with InvalidParameterCombination from the shared validation path, so CreateLaunchTemplate and CreateLaunchTemplateVersion are covered alike. CreateLaunchTemplateVersion validates the merged version as well as the request it received. The merge inherits every member the request does not restate and has no way to express removal, so a version naming only InstanceType against a source carrying InstanceRequirements would otherwise store a version holding both. That merged version is what AutoScaling and the fleet APIs read, so it is rejected rather than stored. Omitting SourceVersion starts from empty data and remains the way to move a template between the two selection modes. The instanceRequirementsRoundTrips test set both halves of two of these pairs. Its assertions are unchanged; the members that cannot share a template moved to a second template of their own.
This commit is contained in:
1 parent
bc44fc9106
commit
043167793b
6 files changed
+1272
-6
No files matched your search
@@ -4769,6 +4769,15 @@ public class Ec2QueryHandler {
|
||||
}
|
||||
xml.end("groupSet");
|
||||
}
|
||||
LaunchTemplateData.ConnectionTrackingSpecification tracking =
|
||||
networkInterface.getConnectionTrackingSpecification();
|
||||
if (tracking != null) {
|
||||
xml.start("connectionTrackingSpecification")
|
||||
.elem("tcpEstablishedTimeout", str(tracking.getTcpEstablishedTimeout()))
|
||||
.elem("udpTimeout", str(tracking.getUdpTimeout()))
|
||||
.elem("udpStreamTimeout", str(tracking.getUdpStreamTimeout()))
|
||||
.end("connectionTrackingSpecification");
|
||||
}
|
||||
xml.end("item");
|
||||
}
|
||||
xml.end("networkInterfaceSet");
|
||||
@@ -4816,6 +4825,23 @@ public class Ec2QueryHandler {
|
||||
.end("cpuOptions");
|
||||
}
|
||||
|
||||
LaunchTemplateData.InstanceMarketOptions marketOptions = data.getInstanceMarketOptions();
|
||||
if (marketOptions != null) {
|
||||
xml.start("instanceMarketOptions")
|
||||
.elem("marketType", marketOptions.getMarketType());
|
||||
LaunchTemplateData.SpotOptions spotOptions = marketOptions.getSpotOptions();
|
||||
if (spotOptions != null) {
|
||||
xml.start("spotOptions")
|
||||
.elem("maxPrice", spotOptions.getMaxPrice())
|
||||
.elem("spotInstanceType", spotOptions.getSpotInstanceType())
|
||||
.elem("blockDurationMinutes", str(spotOptions.getBlockDurationMinutes()))
|
||||
.elem("validUntil", spotOptions.getValidUntil())
|
||||
.elem("instanceInterruptionBehavior", spotOptions.getInstanceInterruptionBehavior())
|
||||
.end("spotOptions");
|
||||
}
|
||||
xml.end("instanceMarketOptions");
|
||||
}
|
||||
|
||||
LaunchTemplateData.CreditSpecification creditSpecification = data.getCreditSpecification();
|
||||
if (creditSpecification != null) {
|
||||
xml.start("creditSpecification")
|
||||
@@ -4866,6 +4892,10 @@ public class Ec2QueryHandler {
|
||||
xml.end("capacityReservationSpecification");
|
||||
}
|
||||
|
||||
if (data.getInstanceRequirements() != null) {
|
||||
appendInstanceRequirements(xml, data.getInstanceRequirements());
|
||||
}
|
||||
|
||||
if (!data.getSecurityGroupIds().isEmpty()) {
|
||||
xml.start("securityGroupIdSet");
|
||||
for (String securityGroupId : data.getSecurityGroupIds()) {
|
||||
@@ -4887,6 +4917,79 @@ public class Ec2QueryHandler {
|
||||
return xml.build();
|
||||
}
|
||||
|
||||
/** Renders {@code InstanceRequirements}, whose element names differ from the request's. */
|
||||
private void appendInstanceRequirements(XmlBuilder xml, LaunchTemplateData.InstanceRequirements requirements) {
|
||||
xml.start("instanceRequirements");
|
||||
appendIntRange(xml, "vCpuCount", requirements.getVCpuCount());
|
||||
appendIntRange(xml, "memoryMiB", requirements.getMemoryMiB());
|
||||
appendStringSet(xml, "cpuManufacturerSet", requirements.getCpuManufacturers());
|
||||
appendDoubleRange(xml, "memoryGiBPerVCpu", requirements.getMemoryGiBPerVCpu());
|
||||
appendStringSet(xml, "excludedInstanceTypeSet", requirements.getExcludedInstanceTypes());
|
||||
appendStringSet(xml, "instanceGenerationSet", requirements.getInstanceGenerations());
|
||||
xml.elem("spotMaxPricePercentageOverLowestPrice",
|
||||
str(requirements.getSpotMaxPricePercentageOverLowestPrice()))
|
||||
.elem("onDemandMaxPricePercentageOverLowestPrice",
|
||||
str(requirements.getOnDemandMaxPricePercentageOverLowestPrice()))
|
||||
.elem("bareMetal", requirements.getBareMetal())
|
||||
.elem("burstablePerformance", requirements.getBurstablePerformance())
|
||||
.elem("requireHibernateSupport", str(requirements.getRequireHibernateSupport()));
|
||||
appendIntRange(xml, "networkInterfaceCount", requirements.getNetworkInterfaceCount());
|
||||
xml.elem("localStorage", requirements.getLocalStorage());
|
||||
appendStringSet(xml, "localStorageTypeSet", requirements.getLocalStorageTypes());
|
||||
appendDoubleRange(xml, "totalLocalStorageGB", requirements.getTotalLocalStorageGB());
|
||||
appendIntRange(xml, "baselineEbsBandwidthMbps", requirements.getBaselineEbsBandwidthMbps());
|
||||
appendStringSet(xml, "acceleratorTypeSet", requirements.getAcceleratorTypes());
|
||||
appendIntRange(xml, "acceleratorCount", requirements.getAcceleratorCount());
|
||||
appendStringSet(xml, "acceleratorManufacturerSet", requirements.getAcceleratorManufacturers());
|
||||
appendStringSet(xml, "acceleratorNameSet", requirements.getAcceleratorNames());
|
||||
appendIntRange(xml, "acceleratorTotalMemoryMiB", requirements.getAcceleratorTotalMemoryMiB());
|
||||
appendDoubleRange(xml, "networkBandwidthGbps", requirements.getNetworkBandwidthGbps());
|
||||
appendStringSet(xml, "allowedInstanceTypeSet", requirements.getAllowedInstanceTypes());
|
||||
xml.elem("maxSpotPriceAsPercentageOfOptimalOnDemandPrice",
|
||||
str(requirements.getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice()));
|
||||
LaunchTemplateData.BaselinePerformanceFactors factors = requirements.getBaselinePerformanceFactors();
|
||||
if (factors != null && factors.getCpu() != null) {
|
||||
xml.start("baselinePerformanceFactors").start("cpu").start("referenceSet");
|
||||
for (LaunchTemplateData.PerformanceFactorReference reference : factors.getCpu().getReferences()) {
|
||||
xml.start("item").elem("instanceFamily", reference.getInstanceFamily()).end("item");
|
||||
}
|
||||
xml.end("referenceSet").end("cpu").end("baselinePerformanceFactors");
|
||||
}
|
||||
xml.elem("requireEncryptionInTransit", str(requirements.getRequireEncryptionInTransit()))
|
||||
.end("instanceRequirements");
|
||||
}
|
||||
|
||||
private void appendIntRange(XmlBuilder xml, String element, LaunchTemplateData.IntRange range) {
|
||||
if (range == null) {
|
||||
return;
|
||||
}
|
||||
xml.start(element)
|
||||
.elem("min", str(range.getMin()))
|
||||
.elem("max", str(range.getMax()))
|
||||
.end(element);
|
||||
}
|
||||
|
||||
private void appendDoubleRange(XmlBuilder xml, String element, LaunchTemplateData.DoubleRange range) {
|
||||
if (range == null) {
|
||||
return;
|
||||
}
|
||||
xml.start(element)
|
||||
.elem("min", str(range.getMin()))
|
||||
.elem("max", str(range.getMax()))
|
||||
.end(element);
|
||||
}
|
||||
|
||||
private void appendStringSet(XmlBuilder xml, String element, List<String> values) {
|
||||
if (values.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
xml.start(element);
|
||||
for (String value : values) {
|
||||
xml.elem("item", value);
|
||||
}
|
||||
xml.end(element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses {@code RequestLaunchTemplateData} from the EC2 query wire format. Parameter names are
|
||||
* the ones botocore's EC2 serializer emits — list members carry the model's singular
|
||||
@@ -5015,9 +5118,111 @@ public class Ec2QueryHandler {
|
||||
}
|
||||
data.setCapacityReservationSpecification(spec);
|
||||
}
|
||||
|
||||
if (anyParamStartsWith(p, prefix + ".InstanceMarketOptions.")) {
|
||||
data.setInstanceMarketOptions(parseLaunchTemplateInstanceMarketOptions(
|
||||
p, prefix + ".InstanceMarketOptions."));
|
||||
}
|
||||
|
||||
if (anyParamStartsWith(p, prefix + ".InstanceRequirements.")) {
|
||||
data.setInstanceRequirements(parseLaunchTemplateInstanceRequirements(
|
||||
p, prefix + ".InstanceRequirements."));
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
private LaunchTemplateData.InstanceMarketOptions parseLaunchTemplateInstanceMarketOptions(
|
||||
MultivaluedMap<String, String> p, String prefix) {
|
||||
LaunchTemplateData.InstanceMarketOptions options = new LaunchTemplateData.InstanceMarketOptions();
|
||||
options.setMarketType(p.getFirst(prefix + "MarketType"));
|
||||
String spotPrefix = prefix + "SpotOptions.";
|
||||
if (anyParamStartsWith(p, spotPrefix)) {
|
||||
LaunchTemplateData.SpotOptions spotOptions = new LaunchTemplateData.SpotOptions();
|
||||
spotOptions.setMaxPrice(p.getFirst(spotPrefix + "MaxPrice"));
|
||||
spotOptions.setSpotInstanceType(p.getFirst(spotPrefix + "SpotInstanceType"));
|
||||
spotOptions.setBlockDurationMinutes(intParam(p, spotPrefix + "BlockDurationMinutes"));
|
||||
spotOptions.setValidUntil(p.getFirst(spotPrefix + "ValidUntil"));
|
||||
spotOptions.setInstanceInterruptionBehavior(p.getFirst(spotPrefix + "InstanceInterruptionBehavior"));
|
||||
options.setSpotOptions(spotOptions);
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses {@code InstanceRequirementsRequest}. Its scalar-list members carry a singular
|
||||
* {@code locationName}, so the wire names are {@code CpuManufacturer.N} rather than
|
||||
* {@code CpuManufacturers.N}, and the nested performance-factor references arrive as
|
||||
* {@code BaselinePerformanceFactors.Cpu.Reference.N.InstanceFamily}.
|
||||
*/
|
||||
private LaunchTemplateData.InstanceRequirements parseLaunchTemplateInstanceRequirements(
|
||||
MultivaluedMap<String, String> p, String prefix) {
|
||||
LaunchTemplateData.InstanceRequirements requirements = new LaunchTemplateData.InstanceRequirements();
|
||||
requirements.setVCpuCount(parseIntRange(p, prefix + "VCpuCount."));
|
||||
requirements.setMemoryMiB(parseIntRange(p, prefix + "MemoryMiB."));
|
||||
requirements.setCpuManufacturers(getList(p, prefix + "CpuManufacturer"));
|
||||
requirements.setMemoryGiBPerVCpu(parseDoubleRange(p, prefix + "MemoryGiBPerVCpu."));
|
||||
requirements.setExcludedInstanceTypes(getList(p, prefix + "ExcludedInstanceType"));
|
||||
requirements.setInstanceGenerations(getList(p, prefix + "InstanceGeneration"));
|
||||
requirements.setSpotMaxPricePercentageOverLowestPrice(
|
||||
intParam(p, prefix + "SpotMaxPricePercentageOverLowestPrice"));
|
||||
requirements.setOnDemandMaxPricePercentageOverLowestPrice(
|
||||
intParam(p, prefix + "OnDemandMaxPricePercentageOverLowestPrice"));
|
||||
requirements.setBareMetal(p.getFirst(prefix + "BareMetal"));
|
||||
requirements.setBurstablePerformance(p.getFirst(prefix + "BurstablePerformance"));
|
||||
requirements.setRequireHibernateSupport(boolParam(p, prefix + "RequireHibernateSupport"));
|
||||
requirements.setNetworkInterfaceCount(parseIntRange(p, prefix + "NetworkInterfaceCount."));
|
||||
requirements.setLocalStorage(p.getFirst(prefix + "LocalStorage"));
|
||||
requirements.setLocalStorageTypes(getList(p, prefix + "LocalStorageType"));
|
||||
requirements.setTotalLocalStorageGB(parseDoubleRange(p, prefix + "TotalLocalStorageGB."));
|
||||
requirements.setBaselineEbsBandwidthMbps(parseIntRange(p, prefix + "BaselineEbsBandwidthMbps."));
|
||||
requirements.setAcceleratorTypes(getList(p, prefix + "AcceleratorType"));
|
||||
requirements.setAcceleratorCount(parseIntRange(p, prefix + "AcceleratorCount."));
|
||||
requirements.setAcceleratorManufacturers(getList(p, prefix + "AcceleratorManufacturer"));
|
||||
requirements.setAcceleratorNames(getList(p, prefix + "AcceleratorName"));
|
||||
requirements.setAcceleratorTotalMemoryMiB(parseIntRange(p, prefix + "AcceleratorTotalMemoryMiB."));
|
||||
requirements.setNetworkBandwidthGbps(parseDoubleRange(p, prefix + "NetworkBandwidthGbps."));
|
||||
requirements.setAllowedInstanceTypes(getList(p, prefix + "AllowedInstanceType"));
|
||||
requirements.setMaxSpotPriceAsPercentageOfOptimalOnDemandPrice(
|
||||
intParam(p, prefix + "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice"));
|
||||
requirements.setRequireEncryptionInTransit(boolParam(p, prefix + "RequireEncryptionInTransit"));
|
||||
String cpuPrefix = prefix + "BaselinePerformanceFactors.Cpu.";
|
||||
if (anyParamStartsWith(p, cpuPrefix)) {
|
||||
LaunchTemplateData.CpuPerformanceFactor cpu = new LaunchTemplateData.CpuPerformanceFactor();
|
||||
List<LaunchTemplateData.PerformanceFactorReference> references = new ArrayList<>();
|
||||
for (int i = 1; ; i++) {
|
||||
String instanceFamily = p.getFirst(cpuPrefix + "Reference." + i + ".InstanceFamily");
|
||||
if (instanceFamily == null) {
|
||||
break;
|
||||
}
|
||||
references.add(new LaunchTemplateData.PerformanceFactorReference(instanceFamily));
|
||||
}
|
||||
cpu.setReferences(references);
|
||||
LaunchTemplateData.BaselinePerformanceFactors factors =
|
||||
new LaunchTemplateData.BaselinePerformanceFactors();
|
||||
factors.setCpu(cpu);
|
||||
requirements.setBaselinePerformanceFactors(factors);
|
||||
}
|
||||
return requirements;
|
||||
}
|
||||
|
||||
private LaunchTemplateData.IntRange parseIntRange(MultivaluedMap<String, String> p, String prefix) {
|
||||
Integer min = intParam(p, prefix + "Min");
|
||||
Integer max = intParam(p, prefix + "Max");
|
||||
if (min == null && max == null) {
|
||||
return null;
|
||||
}
|
||||
return new LaunchTemplateData.IntRange(min, max);
|
||||
}
|
||||
|
||||
private LaunchTemplateData.DoubleRange parseDoubleRange(MultivaluedMap<String, String> p, String prefix) {
|
||||
Double min = doubleParam(p, prefix + "Min");
|
||||
Double max = doubleParam(p, prefix + "Max");
|
||||
if (min == null && max == null) {
|
||||
return null;
|
||||
}
|
||||
return new LaunchTemplateData.DoubleRange(min, max);
|
||||
}
|
||||
|
||||
private List<LaunchTemplateData.BlockDeviceMapping> parseLaunchTemplateBlockDeviceMappings(
|
||||
MultivaluedMap<String, String> p, String prefix) {
|
||||
List<LaunchTemplateData.BlockDeviceMapping> mappings = new ArrayList<>();
|
||||
@@ -5068,6 +5273,15 @@ public class Ec2QueryHandler {
|
||||
networkInterface.setSecondaryPrivateIpAddressCount(intParam(p, base + ".SecondaryPrivateIpAddressCount"));
|
||||
networkInterface.setSubnetId(p.getFirst(base + ".SubnetId"));
|
||||
networkInterface.setNetworkCardIndex(intParam(p, base + ".NetworkCardIndex"));
|
||||
String trackingPrefix = base + ".ConnectionTrackingSpecification.";
|
||||
if (anyParamStartsWith(p, trackingPrefix)) {
|
||||
LaunchTemplateData.ConnectionTrackingSpecification tracking =
|
||||
new LaunchTemplateData.ConnectionTrackingSpecification();
|
||||
tracking.setTcpEstablishedTimeout(intParam(p, trackingPrefix + "TcpEstablishedTimeout"));
|
||||
tracking.setUdpTimeout(intParam(p, trackingPrefix + "UdpTimeout"));
|
||||
tracking.setUdpStreamTimeout(intParam(p, trackingPrefix + "UdpStreamTimeout"));
|
||||
networkInterface.setConnectionTrackingSpecification(tracking);
|
||||
}
|
||||
networkInterface.setGroups(getList(p, base + ".SecurityGroupId", base + ".Groups", base + ".GroupId"));
|
||||
interfaces.add(networkInterface);
|
||||
}
|
||||
@@ -5126,6 +5340,18 @@ public class Ec2QueryHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private Double doubleParam(MultivaluedMap<String, String> p, String name) {
|
||||
String value = p.getFirst(name);
|
||||
if (!isSet(value)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Double.valueOf(value);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new AwsException("InvalidParameterValue", name + " is not a valid number.", 400);
|
||||
}
|
||||
}
|
||||
|
||||
private static String str(Object value) {
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
@@ -5155,6 +5155,7 @@ public class Ec2Service implements ContainerTeardown, ResourceProvider {
|
||||
if (name == null || name.isBlank()) {
|
||||
throw new AwsException("MissingParameter", "The request must contain the parameter LaunchTemplateName", 400);
|
||||
}
|
||||
validateLaunchTemplateData(data);
|
||||
boolean exists = launchTemplates.scan(k -> true).stream()
|
||||
.anyMatch(lt -> lt.getRegion().equals(region) && name.equals(lt.getLaunchTemplateName()));
|
||||
if (exists) {
|
||||
@@ -5182,6 +5183,89 @@ public class Ec2Service implements ContainerTeardown, ResourceProvider {
|
||||
return launchTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request-side constraints EC2 applies to {@code RequestLaunchTemplateData} before a template
|
||||
* or a version is stored. {@code InstanceRequirementsRequest} declares {@code VCpuCount} and
|
||||
* {@code MemoryMiB} as required members, each of which in turn requires its {@code Min}, and
|
||||
* the connection tracking timeouts carry the ranges documented on
|
||||
* {@code ConnectionTrackingSpecificationRequest}. The remaining rules live only in the member
|
||||
* documentation rather than in the model constraints: "If you specify InstanceRequirements,
|
||||
* you can't specify InstanceType", "If you specify AllowedInstanceTypes, you can't specify
|
||||
* ExcludedInstanceTypes", and "Only one of SpotMaxPricePercentageOverLowestPrice or
|
||||
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified".
|
||||
*/
|
||||
private static void validateLaunchTemplateData(LaunchTemplateData data) {
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
requireInstanceTypeOrInstanceRequirements(data);
|
||||
validateInstanceRequirements(data.getInstanceRequirements());
|
||||
for (LaunchTemplateData.NetworkInterface networkInterface : data.getNetworkInterfaces()) {
|
||||
validateConnectionTracking(networkInterface.getConnectionTrackingSpecification());
|
||||
}
|
||||
}
|
||||
|
||||
private static void requireInstanceTypeOrInstanceRequirements(LaunchTemplateData data) {
|
||||
if (data.getInstanceRequirements() == null || !isSet(data.getInstanceType())) {
|
||||
return;
|
||||
}
|
||||
throw new AwsException("InvalidParameterCombination",
|
||||
"InstanceRequirements cannot be combined with InstanceType. A launch template "
|
||||
+ "selects instance types by attribute or by name, not by both.", 400);
|
||||
}
|
||||
|
||||
private static void validateInstanceRequirements(LaunchTemplateData.InstanceRequirements requirements) {
|
||||
if (requirements == null) {
|
||||
return;
|
||||
}
|
||||
requireInstanceRequirementsRange("VCpuCount", requirements.getVCpuCount());
|
||||
requireInstanceRequirementsRange("MemoryMiB", requirements.getMemoryMiB());
|
||||
requireOnlyOneOf("AllowedInstanceTypes", !requirements.getAllowedInstanceTypes().isEmpty(),
|
||||
"ExcludedInstanceTypes", !requirements.getExcludedInstanceTypes().isEmpty());
|
||||
requireOnlyOneOf("SpotMaxPricePercentageOverLowestPrice",
|
||||
requirements.getSpotMaxPricePercentageOverLowestPrice() != null,
|
||||
"MaxSpotPriceAsPercentageOfOptimalOnDemandPrice",
|
||||
requirements.getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice() != null);
|
||||
}
|
||||
|
||||
private static void requireOnlyOneOf(String parameter, boolean present, String other, boolean otherPresent) {
|
||||
if (!present || !otherPresent) {
|
||||
return;
|
||||
}
|
||||
throw new AwsException("InvalidParameterCombination",
|
||||
"Only one of InstanceRequirements." + parameter + " or InstanceRequirements." + other
|
||||
+ " can be specified.", 400);
|
||||
}
|
||||
|
||||
private static void requireInstanceRequirementsRange(String parameter, LaunchTemplateData.IntRange range) {
|
||||
if (range == null) {
|
||||
throw new AwsException("MissingParameter",
|
||||
"The request must contain the parameter InstanceRequirements." + parameter, 400);
|
||||
}
|
||||
if (range.getMin() == null) {
|
||||
throw new AwsException("MissingParameter",
|
||||
"The request must contain the parameter InstanceRequirements." + parameter + ".Min", 400);
|
||||
}
|
||||
}
|
||||
|
||||
private static void validateConnectionTracking(LaunchTemplateData.ConnectionTrackingSpecification tracking) {
|
||||
if (tracking == null) {
|
||||
return;
|
||||
}
|
||||
requireTimeoutInRange("TcpEstablishedTimeout", tracking.getTcpEstablishedTimeout(), 60, 432000);
|
||||
requireTimeoutInRange("UdpTimeout", tracking.getUdpTimeout(), 30, 60);
|
||||
requireTimeoutInRange("UdpStreamTimeout", tracking.getUdpStreamTimeout(), 60, 180);
|
||||
}
|
||||
|
||||
private static void requireTimeoutInRange(String parameter, Integer value, int min, int max) {
|
||||
if (value == null || (value >= min && value <= max)) {
|
||||
return;
|
||||
}
|
||||
throw new AwsException("InvalidParameterValue",
|
||||
"Value (" + value + ") for parameter " + parameter + " is invalid. Valid values are between "
|
||||
+ min + " and " + max + ".", 400);
|
||||
}
|
||||
|
||||
public LaunchTemplate createLaunchTemplateVersion(String region, String id, String name,
|
||||
String sourceVersion, LaunchTemplateData data) {
|
||||
return createLaunchTemplateVersion(region, id, name, sourceVersion, data, null);
|
||||
@@ -5193,11 +5277,21 @@ public class Ec2Service implements ContainerTeardown, ResourceProvider {
|
||||
* {@link LaunchTemplateData}, populated only by whatever fields this request itself supplies.
|
||||
* Only an explicit {@code SourceVersion} (including {@code $Latest} / {@code $Default}) causes
|
||||
* inheritance.
|
||||
*
|
||||
* <p>The request is validated twice, and both passes matter. The first pass covers what the
|
||||
* caller actually sent. The second covers the merged result, because that is the data the
|
||||
* version stores and the data AutoScaling and the fleet APIs later read. {@link
|
||||
* LaunchTemplateData#mergedWith} has no way to express removal, so a version that names only
|
||||
* {@code InstanceType} against a source carrying {@code InstanceRequirements} merges into a
|
||||
* version holding both, which EC2 does not allow. That merged version is rejected rather than
|
||||
* stored. A caller moving a template between attribute-based and named instance type selection
|
||||
* omits {@code SourceVersion}, which starts the new version from empty data.</p>
|
||||
*/
|
||||
public LaunchTemplate createLaunchTemplateVersion(String region, String id, String name,
|
||||
String sourceVersion, LaunchTemplateData data,
|
||||
String versionDescription) {
|
||||
ensureDefaultResources(region);
|
||||
validateLaunchTemplateData(data);
|
||||
LaunchTemplate launchTemplate = findLaunchTemplate(region, id, name);
|
||||
ensureLaunchTemplateVersions(launchTemplate);
|
||||
int latestVersion = parseLaunchTemplateVersion(launchTemplate.getLatestVersionNumber()) + 1;
|
||||
@@ -5209,6 +5303,7 @@ public class Ec2Service implements ContainerTeardown, ResourceProvider {
|
||||
resolveLaunchTemplateVersion(launchTemplate, sourceVersion, launchTemplate.getLatestVersionNumber()));
|
||||
}
|
||||
LaunchTemplateData merged = source.mergedWith(data != null ? data : new LaunchTemplateData());
|
||||
validateLaunchTemplateData(merged);
|
||||
launchTemplate.setLatestVersionNumber(String.valueOf(latestVersion));
|
||||
launchTemplate.getVersions().put(String.valueOf(latestVersion), merged);
|
||||
launchTemplate.setData(new LaunchTemplateData(merged));
|
||||
|
||||
@@ -45,6 +45,8 @@ public class LaunchTemplateData {
|
||||
private MaintenanceOptions maintenanceOptions;
|
||||
private PrivateDnsNameOptions privateDnsNameOptions;
|
||||
private CapacityReservationSpecification capacityReservationSpecification;
|
||||
private InstanceMarketOptions instanceMarketOptions;
|
||||
private InstanceRequirements instanceRequirements;
|
||||
private List<String> securityGroupIds = new ArrayList<>();
|
||||
private List<BlockDeviceMapping> blockDeviceMappings = new ArrayList<>();
|
||||
private List<NetworkInterface> networkInterfaces = new ArrayList<>();
|
||||
@@ -75,6 +77,8 @@ public class LaunchTemplateData {
|
||||
this.maintenanceOptions = source.maintenanceOptions;
|
||||
this.privateDnsNameOptions = source.privateDnsNameOptions;
|
||||
this.capacityReservationSpecification = source.capacityReservationSpecification;
|
||||
this.instanceMarketOptions = source.instanceMarketOptions;
|
||||
this.instanceRequirements = source.instanceRequirements;
|
||||
this.securityGroupIds = new ArrayList<>(source.securityGroupIds);
|
||||
this.blockDeviceMappings = new ArrayList<>(source.blockDeviceMappings);
|
||||
this.networkInterfaces = new ArrayList<>(source.networkInterfaces);
|
||||
@@ -151,6 +155,12 @@ public class LaunchTemplateData {
|
||||
if (override.capacityReservationSpecification != null) {
|
||||
merged.capacityReservationSpecification = override.capacityReservationSpecification;
|
||||
}
|
||||
if (override.instanceMarketOptions != null) {
|
||||
merged.instanceMarketOptions = override.instanceMarketOptions;
|
||||
}
|
||||
if (override.instanceRequirements != null) {
|
||||
merged.instanceRequirements = override.instanceRequirements;
|
||||
}
|
||||
if (!override.securityGroupIds.isEmpty()) {
|
||||
merged.securityGroupIds = new ArrayList<>(override.securityGroupIds);
|
||||
}
|
||||
@@ -244,6 +254,16 @@ public class LaunchTemplateData {
|
||||
this.capacityReservationSpecification = capacityReservationSpecification;
|
||||
}
|
||||
|
||||
public InstanceMarketOptions getInstanceMarketOptions() { return instanceMarketOptions; }
|
||||
public void setInstanceMarketOptions(InstanceMarketOptions instanceMarketOptions) {
|
||||
this.instanceMarketOptions = instanceMarketOptions;
|
||||
}
|
||||
|
||||
public InstanceRequirements getInstanceRequirements() { return instanceRequirements; }
|
||||
public void setInstanceRequirements(InstanceRequirements instanceRequirements) {
|
||||
this.instanceRequirements = instanceRequirements;
|
||||
}
|
||||
|
||||
public List<String> getSecurityGroupIds() { return securityGroupIds; }
|
||||
public void setSecurityGroupIds(List<String> securityGroupIds) {
|
||||
this.securityGroupIds = securityGroupIds != null ? new ArrayList<>(securityGroupIds) : new ArrayList<>();
|
||||
@@ -497,6 +517,7 @@ public class LaunchTemplateData {
|
||||
private Integer secondaryPrivateIpAddressCount;
|
||||
private String subnetId;
|
||||
private Integer networkCardIndex;
|
||||
private ConnectionTrackingSpecification connectionTrackingSpecification;
|
||||
private List<String> groups = new ArrayList<>();
|
||||
|
||||
public Boolean getAssociatePublicIpAddress() { return associatePublicIpAddress; }
|
||||
@@ -541,12 +562,43 @@ public class LaunchTemplateData {
|
||||
public Integer getNetworkCardIndex() { return networkCardIndex; }
|
||||
public void setNetworkCardIndex(Integer networkCardIndex) { this.networkCardIndex = networkCardIndex; }
|
||||
|
||||
public ConnectionTrackingSpecification getConnectionTrackingSpecification() {
|
||||
return connectionTrackingSpecification;
|
||||
}
|
||||
public void setConnectionTrackingSpecification(ConnectionTrackingSpecification spec) {
|
||||
this.connectionTrackingSpecification = spec;
|
||||
}
|
||||
|
||||
public List<String> getGroups() { return groups; }
|
||||
public void setGroups(List<String> groups) {
|
||||
this.groups = groups != null ? new ArrayList<>(groups) : new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The idle-timeout overrides EC2 applies to an interface's connection tracking. Sent as
|
||||
* {@code ConnectionTrackingSpecificationRequest} and read back as
|
||||
* {@code ConnectionTrackingSpecification}; both carry the same three members.
|
||||
*/
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class ConnectionTrackingSpecification {
|
||||
private Integer tcpEstablishedTimeout;
|
||||
private Integer udpTimeout;
|
||||
private Integer udpStreamTimeout;
|
||||
|
||||
public Integer getTcpEstablishedTimeout() { return tcpEstablishedTimeout; }
|
||||
public void setTcpEstablishedTimeout(Integer tcpEstablishedTimeout) {
|
||||
this.tcpEstablishedTimeout = tcpEstablishedTimeout;
|
||||
}
|
||||
|
||||
public Integer getUdpTimeout() { return udpTimeout; }
|
||||
public void setUdpTimeout(Integer udpTimeout) { this.udpTimeout = udpTimeout; }
|
||||
|
||||
public Integer getUdpStreamTimeout() { return udpStreamTimeout; }
|
||||
public void setUdpStreamTimeout(Integer udpStreamTimeout) { this.udpStreamTimeout = udpStreamTimeout; }
|
||||
}
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class TagSpecification {
|
||||
@@ -730,4 +782,254 @@ public class LaunchTemplateData {
|
||||
this.capacityReservationResourceGroupArn = capacityReservationResourceGroupArn;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attribute-based instance type selection. Every member of the service model's
|
||||
* {@code InstanceRequirementsRequest} is carried, including the nested
|
||||
* {@code BaselinePerformanceFactors}.
|
||||
*/
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class InstanceRequirements {
|
||||
private IntRange vCpuCount;
|
||||
private IntRange memoryMiB;
|
||||
private List<String> cpuManufacturers = new ArrayList<>();
|
||||
private DoubleRange memoryGiBPerVCpu;
|
||||
private List<String> excludedInstanceTypes = new ArrayList<>();
|
||||
private List<String> instanceGenerations = new ArrayList<>();
|
||||
private Integer spotMaxPricePercentageOverLowestPrice;
|
||||
private Integer onDemandMaxPricePercentageOverLowestPrice;
|
||||
private String bareMetal;
|
||||
private String burstablePerformance;
|
||||
private Boolean requireHibernateSupport;
|
||||
private IntRange networkInterfaceCount;
|
||||
private String localStorage;
|
||||
private List<String> localStorageTypes = new ArrayList<>();
|
||||
private DoubleRange totalLocalStorageGB;
|
||||
private IntRange baselineEbsBandwidthMbps;
|
||||
private List<String> acceleratorTypes = new ArrayList<>();
|
||||
private IntRange acceleratorCount;
|
||||
private List<String> acceleratorManufacturers = new ArrayList<>();
|
||||
private List<String> acceleratorNames = new ArrayList<>();
|
||||
private IntRange acceleratorTotalMemoryMiB;
|
||||
private DoubleRange networkBandwidthGbps;
|
||||
private List<String> allowedInstanceTypes = new ArrayList<>();
|
||||
private Integer maxSpotPriceAsPercentageOfOptimalOnDemandPrice;
|
||||
private BaselinePerformanceFactors baselinePerformanceFactors;
|
||||
private Boolean requireEncryptionInTransit;
|
||||
|
||||
public IntRange getVCpuCount() { return vCpuCount; }
|
||||
public void setVCpuCount(IntRange vCpuCount) { this.vCpuCount = vCpuCount; }
|
||||
|
||||
public IntRange getMemoryMiB() { return memoryMiB; }
|
||||
public void setMemoryMiB(IntRange memoryMiB) { this.memoryMiB = memoryMiB; }
|
||||
|
||||
public List<String> getCpuManufacturers() { return cpuManufacturers; }
|
||||
public void setCpuManufacturers(List<String> cpuManufacturers) {
|
||||
this.cpuManufacturers = cpuManufacturers != null ? new ArrayList<>(cpuManufacturers) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public DoubleRange getMemoryGiBPerVCpu() { return memoryGiBPerVCpu; }
|
||||
public void setMemoryGiBPerVCpu(DoubleRange memoryGiBPerVCpu) { this.memoryGiBPerVCpu = memoryGiBPerVCpu; }
|
||||
|
||||
public List<String> getExcludedInstanceTypes() { return excludedInstanceTypes; }
|
||||
public void setExcludedInstanceTypes(List<String> excludedInstanceTypes) {
|
||||
this.excludedInstanceTypes = excludedInstanceTypes != null ? new ArrayList<>(excludedInstanceTypes) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public List<String> getInstanceGenerations() { return instanceGenerations; }
|
||||
public void setInstanceGenerations(List<String> instanceGenerations) {
|
||||
this.instanceGenerations = instanceGenerations != null ? new ArrayList<>(instanceGenerations) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public Integer getSpotMaxPricePercentageOverLowestPrice() { return spotMaxPricePercentageOverLowestPrice; }
|
||||
public void setSpotMaxPricePercentageOverLowestPrice(Integer spotMaxPricePercentageOverLowestPrice) { this.spotMaxPricePercentageOverLowestPrice = spotMaxPricePercentageOverLowestPrice; }
|
||||
|
||||
public Integer getOnDemandMaxPricePercentageOverLowestPrice() { return onDemandMaxPricePercentageOverLowestPrice; }
|
||||
public void setOnDemandMaxPricePercentageOverLowestPrice(Integer onDemandMaxPricePercentageOverLowestPrice) { this.onDemandMaxPricePercentageOverLowestPrice = onDemandMaxPricePercentageOverLowestPrice; }
|
||||
|
||||
public String getBareMetal() { return bareMetal; }
|
||||
public void setBareMetal(String bareMetal) { this.bareMetal = bareMetal; }
|
||||
|
||||
public String getBurstablePerformance() { return burstablePerformance; }
|
||||
public void setBurstablePerformance(String burstablePerformance) { this.burstablePerformance = burstablePerformance; }
|
||||
|
||||
public Boolean getRequireHibernateSupport() { return requireHibernateSupport; }
|
||||
public void setRequireHibernateSupport(Boolean requireHibernateSupport) { this.requireHibernateSupport = requireHibernateSupport; }
|
||||
|
||||
public IntRange getNetworkInterfaceCount() { return networkInterfaceCount; }
|
||||
public void setNetworkInterfaceCount(IntRange networkInterfaceCount) { this.networkInterfaceCount = networkInterfaceCount; }
|
||||
|
||||
public String getLocalStorage() { return localStorage; }
|
||||
public void setLocalStorage(String localStorage) { this.localStorage = localStorage; }
|
||||
|
||||
public List<String> getLocalStorageTypes() { return localStorageTypes; }
|
||||
public void setLocalStorageTypes(List<String> localStorageTypes) {
|
||||
this.localStorageTypes = localStorageTypes != null ? new ArrayList<>(localStorageTypes) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public DoubleRange getTotalLocalStorageGB() { return totalLocalStorageGB; }
|
||||
public void setTotalLocalStorageGB(DoubleRange totalLocalStorageGB) { this.totalLocalStorageGB = totalLocalStorageGB; }
|
||||
|
||||
public IntRange getBaselineEbsBandwidthMbps() { return baselineEbsBandwidthMbps; }
|
||||
public void setBaselineEbsBandwidthMbps(IntRange baselineEbsBandwidthMbps) { this.baselineEbsBandwidthMbps = baselineEbsBandwidthMbps; }
|
||||
|
||||
public List<String> getAcceleratorTypes() { return acceleratorTypes; }
|
||||
public void setAcceleratorTypes(List<String> acceleratorTypes) {
|
||||
this.acceleratorTypes = acceleratorTypes != null ? new ArrayList<>(acceleratorTypes) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public IntRange getAcceleratorCount() { return acceleratorCount; }
|
||||
public void setAcceleratorCount(IntRange acceleratorCount) { this.acceleratorCount = acceleratorCount; }
|
||||
|
||||
public List<String> getAcceleratorManufacturers() { return acceleratorManufacturers; }
|
||||
public void setAcceleratorManufacturers(List<String> acceleratorManufacturers) {
|
||||
this.acceleratorManufacturers = acceleratorManufacturers != null ? new ArrayList<>(acceleratorManufacturers) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public List<String> getAcceleratorNames() { return acceleratorNames; }
|
||||
public void setAcceleratorNames(List<String> acceleratorNames) {
|
||||
this.acceleratorNames = acceleratorNames != null ? new ArrayList<>(acceleratorNames) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public IntRange getAcceleratorTotalMemoryMiB() { return acceleratorTotalMemoryMiB; }
|
||||
public void setAcceleratorTotalMemoryMiB(IntRange acceleratorTotalMemoryMiB) { this.acceleratorTotalMemoryMiB = acceleratorTotalMemoryMiB; }
|
||||
|
||||
public DoubleRange getNetworkBandwidthGbps() { return networkBandwidthGbps; }
|
||||
public void setNetworkBandwidthGbps(DoubleRange networkBandwidthGbps) { this.networkBandwidthGbps = networkBandwidthGbps; }
|
||||
|
||||
public List<String> getAllowedInstanceTypes() { return allowedInstanceTypes; }
|
||||
public void setAllowedInstanceTypes(List<String> allowedInstanceTypes) {
|
||||
this.allowedInstanceTypes = allowedInstanceTypes != null ? new ArrayList<>(allowedInstanceTypes) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public Integer getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice() { return maxSpotPriceAsPercentageOfOptimalOnDemandPrice; }
|
||||
public void setMaxSpotPriceAsPercentageOfOptimalOnDemandPrice(Integer maxSpotPriceAsPercentageOfOptimalOnDemandPrice) { this.maxSpotPriceAsPercentageOfOptimalOnDemandPrice = maxSpotPriceAsPercentageOfOptimalOnDemandPrice; }
|
||||
|
||||
public BaselinePerformanceFactors getBaselinePerformanceFactors() { return baselinePerformanceFactors; }
|
||||
public void setBaselinePerformanceFactors(BaselinePerformanceFactors baselinePerformanceFactors) { this.baselinePerformanceFactors = baselinePerformanceFactors; }
|
||||
|
||||
public Boolean getRequireEncryptionInTransit() { return requireEncryptionInTransit; }
|
||||
public void setRequireEncryptionInTransit(Boolean requireEncryptionInTransit) { this.requireEncryptionInTransit = requireEncryptionInTransit; }
|
||||
}
|
||||
|
||||
/** {@code VCpuCountRangeRequest} and the other whole-number Min/Max ranges. */
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class IntRange {
|
||||
private Integer min;
|
||||
private Integer max;
|
||||
|
||||
public IntRange() {}
|
||||
|
||||
public IntRange(Integer min, Integer max) {
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
public Integer getMin() { return min; }
|
||||
public void setMin(Integer min) { this.min = min; }
|
||||
|
||||
public Integer getMax() { return max; }
|
||||
public void setMax(Integer max) { this.max = max; }
|
||||
}
|
||||
|
||||
/** {@code MemoryGiBPerVCpuRequest} and the other fractional Min/Max ranges. */
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class DoubleRange {
|
||||
private Double min;
|
||||
private Double max;
|
||||
|
||||
public DoubleRange() {}
|
||||
|
||||
public DoubleRange(Double min, Double max) {
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
public Double getMin() { return min; }
|
||||
public void setMin(Double min) { this.min = min; }
|
||||
|
||||
public Double getMax() { return max; }
|
||||
public void setMax(Double max) { this.max = max; }
|
||||
}
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class BaselinePerformanceFactors {
|
||||
private CpuPerformanceFactor cpu;
|
||||
|
||||
public CpuPerformanceFactor getCpu() { return cpu; }
|
||||
public void setCpu(CpuPerformanceFactor cpu) { this.cpu = cpu; }
|
||||
}
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class CpuPerformanceFactor {
|
||||
private List<PerformanceFactorReference> references = new ArrayList<>();
|
||||
|
||||
public List<PerformanceFactorReference> getReferences() { return references; }
|
||||
public void setReferences(List<PerformanceFactorReference> references) {
|
||||
this.references = references != null ? new ArrayList<>(references) : new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class PerformanceFactorReference {
|
||||
private String instanceFamily;
|
||||
|
||||
public PerformanceFactorReference() {}
|
||||
|
||||
public PerformanceFactorReference(String instanceFamily) {
|
||||
this.instanceFamily = instanceFamily;
|
||||
}
|
||||
|
||||
public String getInstanceFamily() { return instanceFamily; }
|
||||
public void setInstanceFamily(String instanceFamily) { this.instanceFamily = instanceFamily; }
|
||||
}
|
||||
|
||||
/** The spot request block. Sent as {@code LaunchTemplateInstanceMarketOptionsRequest}. */
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class InstanceMarketOptions {
|
||||
private String marketType;
|
||||
private SpotOptions spotOptions;
|
||||
|
||||
public String getMarketType() { return marketType; }
|
||||
public void setMarketType(String marketType) { this.marketType = marketType; }
|
||||
|
||||
public SpotOptions getSpotOptions() { return spotOptions; }
|
||||
public void setSpotOptions(SpotOptions spotOptions) { this.spotOptions = spotOptions; }
|
||||
}
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class SpotOptions {
|
||||
private String maxPrice;
|
||||
private String spotInstanceType;
|
||||
private Integer blockDurationMinutes;
|
||||
private String validUntil;
|
||||
private String instanceInterruptionBehavior;
|
||||
|
||||
public String getMaxPrice() { return maxPrice; }
|
||||
public void setMaxPrice(String maxPrice) { this.maxPrice = maxPrice; }
|
||||
|
||||
public String getSpotInstanceType() { return spotInstanceType; }
|
||||
public void setSpotInstanceType(String spotInstanceType) { this.spotInstanceType = spotInstanceType; }
|
||||
|
||||
public Integer getBlockDurationMinutes() { return blockDurationMinutes; }
|
||||
public void setBlockDurationMinutes(Integer blockDurationMinutes) {
|
||||
this.blockDurationMinutes = blockDurationMinutes;
|
||||
}
|
||||
|
||||
public String getValidUntil() { return validUntil; }
|
||||
public void setValidUntil(String validUntil) { this.validUntil = validUntil; }
|
||||
|
||||
public String getInstanceInterruptionBehavior() { return instanceInterruptionBehavior; }
|
||||
public void setInstanceInterruptionBehavior(String instanceInterruptionBehavior) {
|
||||
this.instanceInterruptionBehavior = instanceInterruptionBehavior;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user