ecs

package
v0.0.0-...-955c50f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// IdentityType is the identity type for ECS
	IdentityType = "ECS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	Log log.T
}

Identity is the struct defining the IAgentIdentityInner for ECS metadata service

func NewECSIdentity

func NewECSIdentity(log log.T) *Identity

NewECSIdentity initializes the ecs identity

func (*Identity) AvailabilityZone

func (e *Identity) AvailabilityZone() (string, error)

AvailabilityZone returns the managed instance availabilityZone

func (*Identity) AvailabilityZoneId

func (e *Identity) AvailabilityZoneId() (string, error)

AvailabilityZoneId returns empty if the managed instance is not EC2

func (*Identity) Credentials

func (e *Identity) Credentials() *credentials.Credentials

Credentials returns the managed instance credentials

func (*Identity) IdentityType

func (e *Identity) IdentityType() string

IdentityType returns the identity type of the managed instance

func (*Identity) InstanceID

func (e *Identity) InstanceID() (string, error)

InstanceID returns the ecs Instance ID

func (*Identity) InstanceType

func (e *Identity) InstanceType() (string, error)

InstanceType returns the managed instance instanceType

func (*Identity) IsIdentityEnvironment

func (e *Identity) IsIdentityEnvironment() bool

IsIdentityEnvironment returns if instance has managed instance registration

func (*Identity) Region

func (e *Identity) Region() (string, error)

Region returns the ecs region

func (*Identity) VpcPrimaryCIDRBlock

func (e *Identity) VpcPrimaryCIDRBlock() (map[string][]string, error)

VpcPrimaryCIDRBlock returns ipv4, ipv6 VPC CIDR block addresses if exists

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL