/*
* 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.ModifySubnetAttributeRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModifySubnetAttributeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest
* Specify
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an
* IPv6 address if it's created using version
* Specify
* The ID of the subnet.
*
* Specify
* When this value is
* The customer-owned IPv4 address pool associated with the subnet.
*
* You must set this value when you specify
* Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic
* IPv6 addresses for IPv4-only destinations.
*
* The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6)
* subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID
* (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name).
*
* Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
*
* Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
*
* Indicates the device position for local network interfaces in this subnet. For example,
* Specify
* Specify
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an
* IPv6 address if it's created using version true
to indicate that network interfaces created in the specified subnet should be assigned
* an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the
* instance therefore receives an IPv6 address).
* 2016-11-15
or later of the Amazon EC2 API.
* true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a public IPv4 address.
* true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a customer-owned IPv4 address.
* true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
* true
for MapCustomerOwnedIpOnLaunch
.
* 1
indicates
* local network interfaces in this subnet are the secondary network interface (eth1). A local network interface
* cannot be the primary network interface (eth0).
* true
to indicate that local network interfaces at the current position should be disabled.
* true
to indicate that network interfaces created in the specified subnet should be assigned
* an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the
* instance therefore receives an IPv6 address).
* 2016-11-15
or later of the Amazon EC2 API.
* true
to indicate that network interfaces created in the specified subnet should be
* assigned an IPv6 address. This includes a network interface that's created when launching an instance into
* the subnet (the instance therefore receives an IPv6 address).
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only
* receives an IPv6 address if it's created using version 2016-11-15
or later of the Amazon EC2
* API.
*/
public void setAssignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) {
this.assignIpv6AddressOnCreation = assignIpv6AddressOnCreation;
}
/**
*
* Specify true
to indicate that network interfaces created in the specified subnet should be assigned
* an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the
* instance therefore receives an IPv6 address).
*
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an
* IPv6 address if it's created using version 2016-11-15
or later of the Amazon EC2 API.
*
true
to indicate that network interfaces created in the specified subnet should be
* assigned an IPv6 address. This includes a network interface that's created when launching an instance
* into the subnet (the instance therefore receives an IPv6 address).
*
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only
* receives an IPv6 address if it's created using version 2016-11-15
or later of the Amazon EC2
* API.
*/
public Boolean getAssignIpv6AddressOnCreation() {
return this.assignIpv6AddressOnCreation;
}
/**
*
* Specify true
to indicate that network interfaces created in the specified subnet should be assigned
* an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the
* instance therefore receives an IPv6 address).
*
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an
* IPv6 address if it's created using version 2016-11-15
or later of the Amazon EC2 API.
*
true
to indicate that network interfaces created in the specified subnet should be
* assigned an IPv6 address. This includes a network interface that's created when launching an instance into
* the subnet (the instance therefore receives an IPv6 address).
*
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only
* receives an IPv6 address if it's created using version 2016-11-15
or later of the Amazon EC2
* API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifySubnetAttributeRequest withAssignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) {
setAssignIpv6AddressOnCreation(assignIpv6AddressOnCreation);
return this;
}
/**
*
* Specify true
to indicate that network interfaces created in the specified subnet should be assigned
* an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the
* instance therefore receives an IPv6 address).
*
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an
* IPv6 address if it's created using version 2016-11-15
or later of the Amazon EC2 API.
*
true
to indicate that network interfaces created in the specified subnet should be
* assigned an IPv6 address. This includes a network interface that's created when launching an instance
* into the subnet (the instance therefore receives an IPv6 address).
*
* If you enable the IPv6 addressing feature for your subnet, your network interface or instance only
* receives an IPv6 address if it's created using version 2016-11-15
or later of the Amazon EC2
* API.
*/
public Boolean isAssignIpv6AddressOnCreation() {
return this.assignIpv6AddressOnCreation;
}
/**
*
* Specify true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a public IPv4 address.
*
true
to indicate that network interfaces attached to instances created in the
* specified subnet should be assigned a public IPv4 address.
*/
public void setMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) {
this.mapPublicIpOnLaunch = mapPublicIpOnLaunch;
}
/**
*
* Specify true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a public IPv4 address.
*
true
to indicate that network interfaces attached to instances created in the
* specified subnet should be assigned a public IPv4 address.
*/
public Boolean getMapPublicIpOnLaunch() {
return this.mapPublicIpOnLaunch;
}
/**
*
* Specify true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a public IPv4 address.
*
true
to indicate that network interfaces attached to instances created in the
* specified subnet should be assigned a public IPv4 address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifySubnetAttributeRequest withMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) {
setMapPublicIpOnLaunch(mapPublicIpOnLaunch);
return this;
}
/**
*
* Specify true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a public IPv4 address.
*
true
to indicate that network interfaces attached to instances created in the
* specified subnet should be assigned a public IPv4 address.
*/
public Boolean isMapPublicIpOnLaunch() {
return this.mapPublicIpOnLaunch;
}
/**
* * The ID of the subnet. *
* * @param subnetId * The ID of the subnet. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** ** The ID of the subnet. *
* * @return The ID of the subnet. */ public String getSubnetId() { return this.subnetId; } /** ** The ID of the subnet. *
* * @param subnetId * The ID of the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifySubnetAttributeRequest withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** *
* Specify true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a customer-owned IPv4 address.
*
* When this value is true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
*
true
to indicate that network interfaces attached to instances created in the
* specified subnet should be assigned a customer-owned IPv4 address.
*
* When this value is true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
*/
public void setMapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch) {
this.mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunch;
}
/**
*
* Specify true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a customer-owned IPv4 address.
*
* When this value is true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
*
true
to indicate that network interfaces attached to instances created in the
* specified subnet should be assigned a customer-owned IPv4 address.
*
* When this value is true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
*/
public Boolean getMapCustomerOwnedIpOnLaunch() {
return this.mapCustomerOwnedIpOnLaunch;
}
/**
*
* Specify true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a customer-owned IPv4 address.
*
* When this value is true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
*
true
to indicate that network interfaces attached to instances created in the
* specified subnet should be assigned a customer-owned IPv4 address.
*
* When this value is true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifySubnetAttributeRequest withMapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch) {
setMapCustomerOwnedIpOnLaunch(mapCustomerOwnedIpOnLaunch);
return this;
}
/**
*
* Specify true
to indicate that network interfaces attached to instances created in the specified
* subnet should be assigned a customer-owned IPv4 address.
*
* When this value is true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
*
true
to indicate that network interfaces attached to instances created in the
* specified subnet should be assigned a customer-owned IPv4 address.
*
* When this value is true
, you must specify the customer-owned IP pool using
* CustomerOwnedIpv4Pool
.
*/
public Boolean isMapCustomerOwnedIpOnLaunch() {
return this.mapCustomerOwnedIpOnLaunch;
}
/**
*
* The customer-owned IPv4 address pool associated with the subnet. *
*
* You must set this value when you specify true
for MapCustomerOwnedIpOnLaunch
.
*
* You must set this value when you specify true
for MapCustomerOwnedIpOnLaunch
.
*/
public void setCustomerOwnedIpv4Pool(String customerOwnedIpv4Pool) {
this.customerOwnedIpv4Pool = customerOwnedIpv4Pool;
}
/**
*
* The customer-owned IPv4 address pool associated with the subnet. *
*
* You must set this value when you specify true
for MapCustomerOwnedIpOnLaunch
.
*
* You must set this value when you specify true
for MapCustomerOwnedIpOnLaunch
.
*/
public String getCustomerOwnedIpv4Pool() {
return this.customerOwnedIpv4Pool;
}
/**
*
* The customer-owned IPv4 address pool associated with the subnet. *
*
* You must set this value when you specify true
for MapCustomerOwnedIpOnLaunch
.
*
* You must set this value when you specify true
for MapCustomerOwnedIpOnLaunch
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifySubnetAttributeRequest withCustomerOwnedIpv4Pool(String customerOwnedIpv4Pool) {
setCustomerOwnedIpv4Pool(customerOwnedIpv4Pool);
return this;
}
/**
*
* Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *
* * @param enableDns64 * Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return * synthetic IPv6 addresses for IPv4-only destinations. */ public void setEnableDns64(Boolean enableDns64) { this.enableDns64 = enableDns64; } /** ** Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *
* * @return Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return * synthetic IPv6 addresses for IPv4-only destinations. */ public Boolean getEnableDns64() { return this.enableDns64; } /** ** Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *
* * @param enableDns64 * Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return * synthetic IPv6 addresses for IPv4-only destinations. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifySubnetAttributeRequest withEnableDns64(Boolean enableDns64) { setEnableDns64(enableDns64); return this; } /** ** Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic * IPv6 addresses for IPv4-only destinations. *
* * @return Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return * synthetic IPv6 addresses for IPv4-only destinations. */ public Boolean isEnableDns64() { return this.enableDns64; } /** ** The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) * subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID * (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name). *
* * @param privateDnsHostnameTypeOnLaunch * The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 * and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the * instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID * (resource-name). * @see HostnameType */ public void setPrivateDnsHostnameTypeOnLaunch(String privateDnsHostnameTypeOnLaunch) { this.privateDnsHostnameTypeOnLaunch = privateDnsHostnameTypeOnLaunch; } /** ** The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) * subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID * (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name). *
* * @return The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 * and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the * instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID * (resource-name). * @see HostnameType */ public String getPrivateDnsHostnameTypeOnLaunch() { return this.privateDnsHostnameTypeOnLaunch; } /** ** The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) * subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID * (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name). *
* * @param privateDnsHostnameTypeOnLaunch * The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 * and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the * instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID * (resource-name). * @return Returns a reference to this object so that method calls can be chained together. * @see HostnameType */ public ModifySubnetAttributeRequest withPrivateDnsHostnameTypeOnLaunch(String privateDnsHostnameTypeOnLaunch) { setPrivateDnsHostnameTypeOnLaunch(privateDnsHostnameTypeOnLaunch); return this; } /** ** The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) * subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID * (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name). *
* * @param privateDnsHostnameTypeOnLaunch * The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 * and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the * instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID * (resource-name). * @return Returns a reference to this object so that method calls can be chained together. * @see HostnameType */ public ModifySubnetAttributeRequest withPrivateDnsHostnameTypeOnLaunch(HostnameType privateDnsHostnameTypeOnLaunch) { this.privateDnsHostnameTypeOnLaunch = privateDnsHostnameTypeOnLaunch.toString(); return this; } /** ** Indicates whether to respond to DNS queries for instance hostnames with DNS A records. *
* * @param enableResourceNameDnsARecordOnLaunch * Indicates whether to respond to DNS queries for instance hostnames with DNS A records. */ public void setEnableResourceNameDnsARecordOnLaunch(Boolean enableResourceNameDnsARecordOnLaunch) { this.enableResourceNameDnsARecordOnLaunch = enableResourceNameDnsARecordOnLaunch; } /** ** Indicates whether to respond to DNS queries for instance hostnames with DNS A records. *
* * @return Indicates whether to respond to DNS queries for instance hostnames with DNS A records. */ public Boolean getEnableResourceNameDnsARecordOnLaunch() { return this.enableResourceNameDnsARecordOnLaunch; } /** ** Indicates whether to respond to DNS queries for instance hostnames with DNS A records. *
* * @param enableResourceNameDnsARecordOnLaunch * Indicates whether to respond to DNS queries for instance hostnames with DNS A records. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifySubnetAttributeRequest withEnableResourceNameDnsARecordOnLaunch(Boolean enableResourceNameDnsARecordOnLaunch) { setEnableResourceNameDnsARecordOnLaunch(enableResourceNameDnsARecordOnLaunch); return this; } /** ** Indicates whether to respond to DNS queries for instance hostnames with DNS A records. *
* * @return Indicates whether to respond to DNS queries for instance hostnames with DNS A records. */ public Boolean isEnableResourceNameDnsARecordOnLaunch() { return this.enableResourceNameDnsARecordOnLaunch; } /** ** Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. *
* * @param enableResourceNameDnsAAAARecordOnLaunch * Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. */ public void setEnableResourceNameDnsAAAARecordOnLaunch(Boolean enableResourceNameDnsAAAARecordOnLaunch) { this.enableResourceNameDnsAAAARecordOnLaunch = enableResourceNameDnsAAAARecordOnLaunch; } /** ** Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. *
* * @return Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. */ public Boolean getEnableResourceNameDnsAAAARecordOnLaunch() { return this.enableResourceNameDnsAAAARecordOnLaunch; } /** ** Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. *
* * @param enableResourceNameDnsAAAARecordOnLaunch * Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifySubnetAttributeRequest withEnableResourceNameDnsAAAARecordOnLaunch(Boolean enableResourceNameDnsAAAARecordOnLaunch) { setEnableResourceNameDnsAAAARecordOnLaunch(enableResourceNameDnsAAAARecordOnLaunch); return this; } /** ** Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. *
* * @return Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. */ public Boolean isEnableResourceNameDnsAAAARecordOnLaunch() { return this.enableResourceNameDnsAAAARecordOnLaunch; } /** *
* Indicates the device position for local network interfaces in this subnet. For example, 1
indicates
* local network interfaces in this subnet are the secondary network interface (eth1). A local network interface
* cannot be the primary network interface (eth0).
*
1
* indicates local network interfaces in this subnet are the secondary network interface (eth1). A local
* network interface cannot be the primary network interface (eth0).
*/
public void setEnableLniAtDeviceIndex(Integer enableLniAtDeviceIndex) {
this.enableLniAtDeviceIndex = enableLniAtDeviceIndex;
}
/**
*
* Indicates the device position for local network interfaces in this subnet. For example, 1
indicates
* local network interfaces in this subnet are the secondary network interface (eth1). A local network interface
* cannot be the primary network interface (eth0).
*
1
* indicates local network interfaces in this subnet are the secondary network interface (eth1). A local
* network interface cannot be the primary network interface (eth0).
*/
public Integer getEnableLniAtDeviceIndex() {
return this.enableLniAtDeviceIndex;
}
/**
*
* Indicates the device position for local network interfaces in this subnet. For example, 1
indicates
* local network interfaces in this subnet are the secondary network interface (eth1). A local network interface
* cannot be the primary network interface (eth0).
*
1
* indicates local network interfaces in this subnet are the secondary network interface (eth1). A local
* network interface cannot be the primary network interface (eth0).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifySubnetAttributeRequest withEnableLniAtDeviceIndex(Integer enableLniAtDeviceIndex) {
setEnableLniAtDeviceIndex(enableLniAtDeviceIndex);
return this;
}
/**
*
* Specify true
to indicate that local network interfaces at the current position should be disabled.
*
true
to indicate that local network interfaces at the current position should be
* disabled.
*/
public void setDisableLniAtDeviceIndex(Boolean disableLniAtDeviceIndex) {
this.disableLniAtDeviceIndex = disableLniAtDeviceIndex;
}
/**
*
* Specify true
to indicate that local network interfaces at the current position should be disabled.
*
true
to indicate that local network interfaces at the current position should be
* disabled.
*/
public Boolean getDisableLniAtDeviceIndex() {
return this.disableLniAtDeviceIndex;
}
/**
*
* Specify true
to indicate that local network interfaces at the current position should be disabled.
*
true
to indicate that local network interfaces at the current position should be
* disabled.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifySubnetAttributeRequest withDisableLniAtDeviceIndex(Boolean disableLniAtDeviceIndex) {
setDisableLniAtDeviceIndex(disableLniAtDeviceIndex);
return this;
}
/**
*
* Specify true
to indicate that local network interfaces at the current position should be disabled.
*
true
to indicate that local network interfaces at the current position should be
* disabled.
*/
public Boolean isDisableLniAtDeviceIndex() {
return this.disableLniAtDeviceIndex;
}
/**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/
@Override
public Request