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.

Subnet

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

type Subnet struct { AssignIpv6AddressOnCreation *bool `locationName:"assignIpv6AddressOnCreation" type:"boolean"` AvailabilityZone *string `locationName:"availabilityZone" type:"string"` AvailabilityZoneId *string `locationName:"availabilityZoneId" type:"string"` AvailableIpAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"` CidrBlock *string `locationName:"cidrBlock" type:"string"` DefaultForAz *bool `locationName:"defaultForAz" type:"boolean"` Ipv6CidrBlockAssociationSet []*SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociationSet" locationNameList:"item" type:"list"` MapPublicIpOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"` OwnerId *string `locationName:"ownerId" type:"string"` State *string `locationName:"state" type:"string" enum:"SubnetState"` SubnetArn *string `locationName:"subnetArn" type:"string"` SubnetId *string `locationName:"subnetId" type:"string"` Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` VpcId *string `locationName:"vpcId" type:"string"` }

Describes a subnet.

AssignIpv6AddressOnCreation

Type: *bool

Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives an IPv6 address.

AvailabilityZone

Type: *string

The Availability Zone of the subnet.

AvailabilityZoneId

Type: *string

The AZ ID of the subnet.

AvailableIpAddressCount

Type: *int64

The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

CidrBlock

Type: *string

The IPv4 CIDR block assigned to the subnet.

DefaultForAz

Type: *bool

Indicates whether this is the default subnet for the Availability Zone.

Ipv6CidrBlockAssociationSet

Describes an IPv6 CIDR block associated with a subnet.

MapPublicIpOnLaunch

Type: *bool

Indicates whether instances launched in this subnet receive a public IPv4 address.

OwnerId

Type: *string

The ID of the AWS account that owns the subnet.

State

Type: *string

The current state of the subnet.

SubnetArn

Type: *string

The Amazon Resource Name (ARN) of the subnet.

SubnetId

Type: *string

The ID of the subnet.

Tags

Describes a tag.

VpcId

Type: *string

The ID of the VPC the subnet is in.

Method

GoString

func (s Subnet) GoString() string

GoString returns the string representation

SetAssignIpv6AddressOnCreation

func (s *Subnet) SetAssignIpv6AddressOnCreation(v bool) *Subnet

SetAssignIpv6AddressOnCreation sets the AssignIpv6AddressOnCreation field's value.

SetAvailabilityZone

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

SetAvailabilityZone sets the AvailabilityZone field's value.

SetAvailabilityZoneId

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

SetAvailabilityZoneId sets the AvailabilityZoneId field's value.

SetAvailableIpAddressCount

func (s *Subnet) SetAvailableIpAddressCount(v int64) *Subnet

SetAvailableIpAddressCount sets the AvailableIpAddressCount field's value.

SetCidrBlock

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

SetCidrBlock sets the CidrBlock field's value.

SetDefaultForAz

func (s *Subnet) SetDefaultForAz(v bool) *Subnet

SetDefaultForAz sets the DefaultForAz field's value.

SetIpv6CidrBlockAssociationSet

func (s *Subnet) SetIpv6CidrBlockAssociationSet(v []*SubnetIpv6CidrBlockAssociation) *Subnet

SetIpv6CidrBlockAssociationSet sets the Ipv6CidrBlockAssociationSet field's value.

SetMapPublicIpOnLaunch

func (s *Subnet) SetMapPublicIpOnLaunch(v bool) *Subnet

SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value.

SetOwnerId

func (s *Subnet) SetOwnerId(v string) *Subnet

SetOwnerId sets the OwnerId field's value.

SetState

func (s *Subnet) SetState(v string) *Subnet

SetState sets the State field's value.

SetSubnetArn

func (s *Subnet) SetSubnetArn(v string) *Subnet

SetSubnetArn sets the SubnetArn field's value.

SetSubnetId

func (s *Subnet) SetSubnetId(v string) *Subnet

SetSubnetId sets the SubnetId field's value.

SetTags

func (s *Subnet) SetTags(v []*Tag) *Subnet

SetTags sets the Tags field's value.

SetVpcId

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

SetVpcId sets the VpcId field's value.

String

func (s Subnet) String() string

String returns the string representation

On this page: