AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateSubnetInput

import "github.com/aws/aws-sdk-go/service/ec2"

type CreateSubnetInput struct { AvailabilityZone *string `type:"string"` AvailabilityZoneId *string `type:"string"` CidrBlock *string `type:"string" required:"true"` DryRun *bool `locationName:"dryRun" type:"boolean"` Ipv6CidrBlock *string `type:"string"` VpcId *string `type:"string" required:"true"` }

AvailabilityZone

Type: *string

The Availability Zone for the subnet.

Default: AWS selects one for you. If you create more than one subnet in your VPC, we may not necessarily select a different zone for each subnet.

AvailabilityZoneId

Type: *string

The AZ ID of the subnet.

CidrBlock

Type: *string

The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24.

CidrBlock is a required field

DryRun

Type: *bool

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Ipv6CidrBlock

Type: *string

The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

VpcId

Type: *string

The ID of the VPC.

VpcId is a required field

Method

GoString

func (s CreateSubnetInput) GoString() string

GoString returns the string representation

SetAvailabilityZone

func (s *CreateSubnetInput) SetAvailabilityZone(v string) *CreateSubnetInput

SetAvailabilityZone sets the AvailabilityZone field's value.

SetAvailabilityZoneId

func (s *CreateSubnetInput) SetAvailabilityZoneId(v string) *CreateSubnetInput

SetAvailabilityZoneId sets the AvailabilityZoneId field's value.

SetCidrBlock

func (s *CreateSubnetInput) SetCidrBlock(v string) *CreateSubnetInput

SetCidrBlock sets the CidrBlock field's value.

SetDryRun

func (s *CreateSubnetInput) SetDryRun(v bool) *CreateSubnetInput

SetDryRun sets the DryRun field's value.

SetIpv6CidrBlock

func (s *CreateSubnetInput) SetIpv6CidrBlock(v string) *CreateSubnetInput

SetIpv6CidrBlock sets the Ipv6CidrBlock field's value.

SetVpcId

func (s *CreateSubnetInput) SetVpcId(v string) *CreateSubnetInput

SetVpcId sets the VpcId field's value.

String

func (s CreateSubnetInput) String() string

String returns the string representation

Validate

func (s *CreateSubnetInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: