public class CreateVpcRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<CreateVpcRequest>
CreateVpc operation
.
Creates a VPC with the specified CIDR block.
The smallest VPC you can create uses a /28 netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP addresses). To help you decide how big to make your VPC, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide .
By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide .
You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see Dedicated Instances in the Amazon Virtual Private Cloud User Guide .
Constructor and Description |
---|
CreateVpcRequest()
Default constructor for a new CreateVpcRequest object.
|
CreateVpcRequest(java.lang.String cidrBlock)
Constructs a new CreateVpcRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCidrBlock()
The network range for the VPC, in CIDR notation.
|
Request<CreateVpcRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.String |
getInstanceTenancy()
The tenancy options for instances launched into the VPC.
|
int |
hashCode() |
void |
setCidrBlock(java.lang.String cidrBlock)
The network range for the VPC, in CIDR notation.
|
void |
setInstanceTenancy(java.lang.String instanceTenancy)
The tenancy options for instances launched into the VPC.
|
void |
setInstanceTenancy(Tenancy instanceTenancy)
The tenancy options for instances launched into the VPC.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateVpcRequest |
withCidrBlock(java.lang.String cidrBlock)
The network range for the VPC, in CIDR notation.
|
CreateVpcRequest |
withInstanceTenancy(java.lang.String instanceTenancy)
The tenancy options for instances launched into the VPC.
|
CreateVpcRequest |
withInstanceTenancy(Tenancy instanceTenancy)
The tenancy options for instances launched into the VPC.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public CreateVpcRequest()
public CreateVpcRequest(java.lang.String cidrBlock)
cidrBlock
- The network range for the VPC, in CIDR notation. For
example, 10.0.0.0/16
.public java.lang.String getCidrBlock()
10.0.0.0/16
.10.0.0.0/16
.public void setCidrBlock(java.lang.String cidrBlock)
10.0.0.0/16
.cidrBlock
- The network range for the VPC, in CIDR notation. For example,
10.0.0.0/16
.public CreateVpcRequest withCidrBlock(java.lang.String cidrBlock)
10.0.0.0/16
.
Returns a reference to this object so that method calls can be chained together.
cidrBlock
- The network range for the VPC, in CIDR notation. For example,
10.0.0.0/16
.public java.lang.String getInstanceTenancy()
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Constraints:
Allowed Values: default, dedicated, host
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Tenancy
public void setInstanceTenancy(java.lang.String instanceTenancy)
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Constraints:
Allowed Values: default, dedicated, host
instanceTenancy
- The tenancy options for instances launched into the VPC. For
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Tenancy
public CreateVpcRequest withInstanceTenancy(java.lang.String instanceTenancy)
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: default, dedicated, host
instanceTenancy
- The tenancy options for instances launched into the VPC. For
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Tenancy
public void setInstanceTenancy(Tenancy instanceTenancy)
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Constraints:
Allowed Values: default, dedicated, host
instanceTenancy
- The tenancy options for instances launched into the VPC. For
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Tenancy
public CreateVpcRequest withInstanceTenancy(Tenancy instanceTenancy)
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: default, dedicated, host
instanceTenancy
- The tenancy options for instances launched into the VPC. For
default
, instances are launched with shared tenancy by
default. You can launch instances with any tenancy into a shared
tenancy VPC. For dedicated
, instances are launched as
dedicated tenancy instances by default. You can only launch instances
with a tenancy of dedicated
or host
into a
dedicated tenancy VPC. Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default:
default
Tenancy
public Request<CreateVpcRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateVpcRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.