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.

InstancePortState

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

type InstancePortState struct { FromPort *int64 `locationName:"fromPort" type:"integer"` Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` State *string `locationName:"state" type:"string" enum:"PortState"` ToPort *int64 `locationName:"toPort" type:"integer"` }

Describes the port state.

FromPort

Type: *int64

The first port in the range.

Protocol

Type: *string

The protocol being used. Can be one of the following.

  • tcp - Transmission Control Protocol (TCP) provides reliable, ordered, and error-checked delivery of streamed data between applications running on hosts communicating by an IP network. If you have an application that doesn't require reliable data stream service, use UDP instead.

  • udp - With User Datagram Protocol (UDP), computer applications can send messages (or datagrams) to other hosts on an Internet Protocol (IP) network. Prior communications are not required to set up transmission channels or data paths. Applications that don't require reliable data stream service can use UDP, which provides a connectionless datagram service that emphasizes reduced latency over reliability. If you do require reliable data stream service, use TCP instead.

State

Type: *string

Specifies whether the instance port is open or closed.

ToPort

Type: *int64

The last port in the range.

Method

GoString

func (s InstancePortState) GoString() string

GoString returns the string representation

SetFromPort

func (s *InstancePortState) SetFromPort(v int64) *InstancePortState

SetFromPort sets the FromPort field's value.

SetProtocol

func (s *InstancePortState) SetProtocol(v string) *InstancePortState

SetProtocol sets the Protocol field's value.

SetState

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

SetState sets the State field's value.

SetToPort

func (s *InstancePortState) SetToPort(v int64) *InstancePortState

SetToPort sets the ToPort field's value.

String

func (s InstancePortState) String() string

String returns the string representation

On this page: