com.amazonaws.services.ec2.model

## クラス CreateSubnetRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.ec2.model.CreateSubnetRequest

- すべての実装されたインタフェース:
    java.io.Serializable

      public class CreateSubnetRequest
      extends AmazonWebServiceRequest
      implements java.io.Serializable

  Container for the parameters to the `CreateSubnet operation`.

  Creates a subnet in an existing VPC. You can create up to 20 subnets in a VPC. If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle. When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. Once you create a subnet, you can't change its CIDR block. The subnet's CIDR block can be the same as the VPC's CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest subnet (and VPC) you can create uses a `/28` netmask (16 IP addresses), and the largest uses a `/18` netmask (16,384 IP addresses).

  IMPORTANT: AWS reserves both the first four and the last IP address in each subnet's CIDR block. They're not available for use.

  関連項目:
    `AmazonEC2.createSubnet(CreateSubnetRequest)`, 直列化された形式

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `CreateSubnetRequest()` Default constructor for a new CreateSubnetRequest object.
    `CreateSubnetRequest(java.lang.String vpcId, java.lang.String cidrBlock)` Constructs a new CreateSubnetRequest object.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getAvailabilityZone()` The Availability Zone to create the subnet in.
    `java.lang.String` | `getCidrBlock()` The CIDR block the subnet is to cover.
    `java.lang.String` | `getVpcId()` The ID of the VPC to create the subnet in.
    `int` | `hashCode()`
    `void` | `setAvailabilityZone(java.lang.String availabilityZone)` The Availability Zone to create the subnet in.
    `void` | `setCidrBlock(java.lang.String cidrBlock)` The CIDR block the subnet is to cover.
    `void` | `setVpcId(java.lang.String vpcId)` The ID of the VPC to create the subnet in.
    `java.lang.String` | `toString()` Returns a string representation of this object; useful for testing and debugging.
    `CreateSubnetRequest` | `withAvailabilityZone(java.lang.String availabilityZone)` The Availability Zone to create the subnet in.
    `CreateSubnetRequest` | `withCidrBlock(java.lang.String cidrBlock)` The CIDR block the subnet is to cover.
    `CreateSubnetRequest` | `withVpcId(java.lang.String vpcId)` The ID of the VPC to create the subnet in.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### CreateSubnetRequest

          public CreateSubnetRequest()

      Default constructor for a new CreateSubnetRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.

    - #### CreateSubnetRequest

          public CreateSubnetRequest(java.lang.String vpcId,
                             java.lang.String cidrBlock)

      Constructs a new CreateSubnetRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      パラメータ:
        `vpcId` - The ID of the VPC to create the subnet in.
        `cidrBlock` - The CIDR block the subnet is to cover.

  - ### メソッドの詳細

    - #### getVpcId

          public java.lang.String getVpcId()

      The ID of the VPC to create the subnet in.
      戻り値:
        The ID of the VPC to create the subnet in.

    - #### setVpcId

          public void setVpcId(java.lang.String vpcId)

      The ID of the VPC to create the subnet in.
      パラメータ:
        `vpcId` - The ID of the VPC to create the subnet in.

    - #### withVpcId

          public CreateSubnetRequest withVpcId(java.lang.String vpcId)

      The ID of the VPC to create the subnet in.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `vpcId` - The ID of the VPC to create the subnet in.

    - #### getCidrBlock

          public java.lang.String getCidrBlock()

      The CIDR block the subnet is to cover.
      戻り値:
        The CIDR block the subnet is to cover.

    - #### setCidrBlock

          public void setCidrBlock(java.lang.String cidrBlock)

      The CIDR block the subnet is to cover.
      パラメータ:
        `cidrBlock` - The CIDR block the subnet is to cover.

    - #### withCidrBlock

          public CreateSubnetRequest withCidrBlock(java.lang.String cidrBlock)

      The CIDR block the subnet is to cover.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `cidrBlock` - The CIDR block the subnet is to cover.

    - #### getAvailabilityZone

          public java.lang.String getAvailabilityZone()

      The Availability Zone to create the subnet in.
      戻り値:
        The Availability Zone to create the subnet in.

    - #### setAvailabilityZone

          public void setAvailabilityZone(java.lang.String availabilityZone)

      The Availability Zone to create the subnet in.
      パラメータ:
        `availabilityZone` - The Availability Zone to create the subnet in.

    - #### withAvailabilityZone

          public CreateSubnetRequest withAvailabilityZone(java.lang.String availabilityZone)

      The Availability Zone to create the subnet in.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `availabilityZone` - The Availability Zone to create the subnet in.

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object; useful for testing and debugging.
      オーバーライド:
        `toString` クラス内 `java.lang.Object`
      戻り値:
        A string representation of this object.
      関連項目:
        `Object.toString()`

    - #### hashCode

          public int hashCode()

      オーバーライド:
        `hashCode` クラス内 `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      オーバーライド:
        `equals` クラス内 `java.lang.Object`