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.

CreateNetworkInterfaceInput

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

type CreateNetworkInterfaceInput struct { Description *string `locationName:"description" type:"string"` DryRun *bool `locationName:"dryRun" type:"boolean"` Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6Addresses" locationNameList:"item" type:"list"` PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"` SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` SubnetId *string `locationName:"subnetId" type:"string" required:"true"` }

Contains the parameters for CreateNetworkInterface.

Description

Type: *string

A description for the network interface.

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.

Groups

Type: []*string

The IDs of one or more security groups.

Ipv6AddressCount

Type: *int64

The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the AssignIpv6AddressOnCreation attribute set to true, you can specify 0 to override this setting.

Ipv6Addresses

Describes an IPv6 address.

PrivateIpAddress

Type: *string

The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).

PrivateIpAddresses

Describes a secondary private IPv4 address for a network interface.

SecondaryPrivateIpAddressCount

Type: *int64

The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses.

The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) in the Amazon Virtual Private Cloud User Guide.

SubnetId

Type: *string

The ID of the subnet to associate with the network interface.

SubnetId is a required field

Method

GoString

func (s CreateNetworkInterfaceInput) GoString() string

GoString returns the string representation

SetDescription

func (s *CreateNetworkInterfaceInput) SetDescription(v string) *CreateNetworkInterfaceInput

SetDescription sets the Description field's value.

SetDryRun

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

SetDryRun sets the DryRun field's value.

SetGroups

func (s *CreateNetworkInterfaceInput) SetGroups(v []*string) *CreateNetworkInterfaceInput

SetGroups sets the Groups field's value.

SetIpv6AddressCount

func (s *CreateNetworkInterfaceInput) SetIpv6AddressCount(v int64) *CreateNetworkInterfaceInput

SetIpv6AddressCount sets the Ipv6AddressCount field's value.

SetIpv6Addresses

func (s *CreateNetworkInterfaceInput) SetIpv6Addresses(v []*InstanceIpv6Address) *CreateNetworkInterfaceInput

SetIpv6Addresses sets the Ipv6Addresses field's value.

SetPrivateIpAddress

func (s *CreateNetworkInterfaceInput) SetPrivateIpAddress(v string) *CreateNetworkInterfaceInput

SetPrivateIpAddress sets the PrivateIpAddress field's value.

SetPrivateIpAddresses

func (s *CreateNetworkInterfaceInput) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *CreateNetworkInterfaceInput

SetPrivateIpAddresses sets the PrivateIpAddresses field's value.

SetSecondaryPrivateIpAddressCount

func (s *CreateNetworkInterfaceInput) SetSecondaryPrivateIpAddressCount(v int64) *CreateNetworkInterfaceInput

SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value.

SetSubnetId

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

SetSubnetId sets the SubnetId field's value.

String

func (s CreateNetworkInterfaceInput) String() string

String returns the string representation

Validate

func (s *CreateNetworkInterfaceInput) Validate() error

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

On this page: