ec2

package
v1.6.2-rc Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGroupECS

type APIGroupECS interface {
	// DescribeInstances describe Instances according to input
	DescribeInstances(input *ecs.DescribeInstancesInput) (*ecs.DescribeInstancesOutput, error)

	// DescribeInstanceTypes describe InstanceTypes according to input
	DescribeInstanceTypes(input *ecs.DescribeInstanceTypesInput) (*DescribeInstanceTypesOutput, error)
}

type APIGroupENI

type APIGroupENI interface {
	// CreateNetworkInterface create a NetworkInterface
	CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*vpc.CreateNetworkInterfaceOutput, error)

	// AttachNetworkInterface attach a NetworkInterface which status is available to ecs instance
	AttachNetworkInterface(input *vpc.AttachNetworkInterfaceInput) (*vpc.AttachNetworkInterfaceOutput, error)

	// DetachNetworkInterface detach a NetworkInterface which status is inuse from ecs instance
	DetachNetworkInterface(input *vpc.DetachNetworkInterfaceInput) (*vpc.DetachNetworkInterfaceOutput, error)

	// DeleteNetworkInterface delete a NetworkInterface which status is available
	DeleteNetworkInterface(input *vpc.DeleteNetworkInterfaceInput) (*vpc.DeleteNetworkInterfaceOutput, error)

	// DescribeNetworkInterfaces describe NetworkInterfaces according to input
	DescribeNetworkInterfaces(input *vpc.DescribeNetworkInterfacesInput) (*DescribeNetworkInterfacesOutput, error)

	// DescribeNetworkInterfaceAttributes return attributes of specified NetworkInterface
	DescribeNetworkInterfaceAttributes(input *vpc.DescribeNetworkInterfaceAttributesInput) (*DescribeNetworkInterfaceAttributesOutput, error)

	// AssignPrivateIpAddress assign private ipv4 addresses for specified NetworkInterface
	AssignPrivateIpAddress(input *vpc.AssignPrivateIpAddressesInput) (*vpc.AssignPrivateIpAddressesOutput, error)

	// UnAssignPrivateIpAddress unAssign private ipv4 addresses for specified NetworkInterface
	UnAssignPrivateIpAddress(input *vpc.UnassignPrivateIpAddressesInput) (*vpc.UnassignPrivateIpAddressesOutput, error)

	// AssignIpv6Addresses assign private ipv6 addresses for specified NetworkInterface
	AssignIpv6Addresses(input *AssignIpv6AddressesInput) (*AssignIpv6AddressesOutput, error)

	// UnassignIpv6Addresses unAssign private ipv6 addresses for specified NetworkInterface
	UnassignIpv6Addresses(input *UnassignIpv6AddressesInput) (*UnassignIpv6AddressesOutput, error)
}

type APIGroupSubnet

type APIGroupSubnet interface {
	// DescribeSubnets describe Subnets according to input
	DescribeSubnets(input *vpc.DescribeSubnetsInput) (*DescribeSubnetsOutput, error)

	// DescribeSubnetAttributes return attributes of specified Subnet
	DescribeSubnetAttributes(input *vpc.DescribeSubnetAttributesInput) (*DescribeSubnetAttributesOutput, error)
}

type AssignIpv6AddressesInput

type AssignIpv6AddressesInput struct {
	Ipv6Address []*string `type:"list"`

	Ipv6AddressCount *int64 `type:"integer"`

	// NetworkInterfaceId is a required field
	NetworkInterfaceId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

type AssignIpv6AddressesOutput

type AssignIpv6AddressesOutput struct {
	Metadata *response.ResponseMetadata

	Ipv6Set []*string `type:"list"`

	NetworkInterfaceId *string `type:"string"`

	RequestId *string `type:"string"`
	// contains filtered or unexported fields
}

type ClientSet

type ClientSet struct {
	VpcSvc *vpc.VPC
	EcsSvc *ecs.ECS
	// contains filtered or unexported fields
}

func NewClient

func NewClient(region, endpoint string, credentialProvider credential.Provider) *ClientSet

func (*ClientSet) AssignIpv6Addresses

func (c *ClientSet) AssignIpv6Addresses(input *AssignIpv6AddressesInput) (*AssignIpv6AddressesOutput, error)

func (*ClientSet) AssignPrivateIpAddress

func (*ClientSet) AttachNetworkInterface

func (c *ClientSet) AttachNetworkInterface(input *vpc.AttachNetworkInterfaceInput) (*vpc.AttachNetworkInterfaceOutput, error)

func (*ClientSet) CreateNetworkInterface

func (c *ClientSet) CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*vpc.CreateNetworkInterfaceOutput, error)

func (*ClientSet) DeleteNetworkInterface

func (c *ClientSet) DeleteNetworkInterface(input *vpc.DeleteNetworkInterfaceInput) (*vpc.DeleteNetworkInterfaceOutput, error)

func (*ClientSet) DescribeInstanceTypes

func (c *ClientSet) DescribeInstanceTypes(input *ecs.DescribeInstanceTypesInput) (*DescribeInstanceTypesOutput, error)

func (*ClientSet) DescribeInstances

func (c *ClientSet) DescribeInstances(input *ecs.DescribeInstancesInput) (*ecs.DescribeInstancesOutput, error)

func (*ClientSet) DescribeNetworkInterfaces

func (c *ClientSet) DescribeNetworkInterfaces(input *vpc.DescribeNetworkInterfacesInput) (*DescribeNetworkInterfacesOutput, error)

func (*ClientSet) DescribeSubnetAttributes

func (c *ClientSet) DescribeSubnetAttributes(input *vpc.DescribeSubnetAttributesInput) (*DescribeSubnetAttributesOutput, error)

func (*ClientSet) DescribeSubnets

func (c *ClientSet) DescribeSubnets(input *vpc.DescribeSubnetsInput) (*DescribeSubnetsOutput, error)

func (*ClientSet) DetachNetworkInterface

func (c *ClientSet) DetachNetworkInterface(input *vpc.DetachNetworkInterfaceInput) (*vpc.DetachNetworkInterfaceOutput, error)

func (*ClientSet) UnAssignPrivateIpAddress

func (*ClientSet) UnassignIpv6Addresses

func (c *ClientSet) UnassignIpv6Addresses(input *UnassignIpv6AddressesInput) (*UnassignIpv6AddressesOutput, error)

type CreateNetworkInterfaceInput

type CreateNetworkInterfaceInput struct {
	ClientToken *string `type:"string"`

	Description *string `min:"1" max:"255" type:"string"`

	NetworkInterfaceName *string `min:"1" max:"128" type:"string"`

	PortSecurityEnabled *bool `type:"boolean"`

	PrimaryIpAddress *string `type:"string"`

	PrivateIpAddress []*string `type:"list"`

	ProjectName *string `type:"string"`

	SecondaryPrivateIpAddressCount *int64 `type:"integer"`

	// SecurityGroupIds is a required field
	SecurityGroupIds []*string `type:"list" required:"true"`

	// SubnetId is a required field
	SubnetId *string `type:"string" required:"true"`

	Tags []*vpc.TagForCreateNetworkInterfaceInput `type:"list"`

	Type *string `type:"string" enum:"TypeForCreateNetworkInterfaceInput"`
	// contains filtered or unexported fields
}

type DescribeInstanceTypesOutput

type DescribeInstanceTypesOutput struct {
	Metadata *response.ResponseMetadata

	InstanceTypes []*InstanceTypeForDescribeInstanceTypesOutput `type:"list"`

	NextToken *string `type:"string"`

	PageNumber *int32 `type:"int32"`

	PageSize *int32 `type:"int32"`

	TotalCount *int32 `type:"int32"`
	// contains filtered or unexported fields
}

type DescribeNetworkInterfaceAttributesOutput

type DescribeNetworkInterfaceAttributesOutput struct {
	Metadata *response.ResponseMetadata

	AccountId *string `type:"string"`

	CreatedAt *string `type:"string"`

	Description *string `type:"string"`

	DeviceId *string `type:"string"`

	IPv6Sets []*string `type:"list"`

	MacAddress *string `type:"string"`

	NetworkInterfaceId *string `type:"string"`

	NetworkInterfaceName *string `type:"string"`

	PortSecurityEnabled *bool `type:"boolean"`

	PrimaryIpAddress *string `type:"string"`

	PrivateIpAddresses []*string `type:"list"`

	PrivateIpSets *vpc.PrivateIpSetsForDescribeNetworkInterfaceAttributesOutput `type:"structure"`

	ProjectName *string `type:"string"`

	RequestId *string `type:"string"`

	SecurityGroupIds []*string `type:"list"`

	ServiceManaged *bool `type:"boolean"`

	Status *string `type:"string"`

	SubnetId *string `type:"string"`

	Tags []*vpc.TagForDescribeNetworkInterfaceAttributesOutput `type:"list"`

	Type *string `type:"string"`

	UpdatedAt *string `type:"string"`

	VpcId *string `type:"string"`

	VpcName *string `type:"string"`

	ZoneId *string `type:"string"`
	// contains filtered or unexported fields
}

type DescribeNetworkInterfacesOutput

type DescribeNetworkInterfacesOutput struct {
	Metadata *response.ResponseMetadata

	NetworkInterfaceSets []*NetworkInterfaceSetForDescribeNetworkInterfacesOutput `type:"list"`

	PageNumber *int64 `type:"integer"`

	PageSize *int64 `type:"integer"`

	RequestId *string `type:"string"`

	TotalCount *int64 `type:"integer"`
	// contains filtered or unexported fields
}

type DescribeSubnetAttributesOutput

type DescribeSubnetAttributesOutput struct {
	Metadata *response.ResponseMetadata

	AccountId *string `type:"string"`

	AvailableIpAddressCount *int64 `type:"integer"`

	CidrBlock *string `type:"string"`

	CreationTime *string `type:"string"`

	Description *string `type:"string"`

	Ipv6CidrBlock *string `type:"string"`

	NetworkAclId *string `type:"string"`

	ProjectName *string `type:"string"`

	RequestId *string `type:"string"`

	RouteTable *vpc.RouteTableForDescribeSubnetAttributesOutput `type:"structure"`

	Status *string `type:"string"`

	SubnetId *string `type:"string"`

	SubnetName *string `type:"string"`

	TotalIpv4Count *int64 `type:"integer"`

	UpdateTime *string `type:"string"`

	VpcId *string `type:"string"`

	ZoneId *string `type:"string"`
	// contains filtered or unexported fields
}

type DescribeSubnetsOutput

type DescribeSubnetsOutput struct {
	Metadata *response.ResponseMetadata

	PageNumber *int64 `type:"integer"`

	PageSize *int64 `type:"integer"`

	RequestId *string `type:"string"`

	Subnets []*SubnetForDescribeSubnetsOutput `type:"list"`

	TotalCount *int64 `type:"integer"`
	// contains filtered or unexported fields
}

type EC2

type EC2 interface {
	APIGroupENI
	APIGroupSubnet
	APIGroupECS
}

type InstanceTypeForDescribeInstanceTypesOutput

type InstanceTypeForDescribeInstanceTypesOutput struct {
	Architecture *string `type:"string"`

	BaselineCredit *int64 `type:"int64"`

	ComputeFactor *int32 `type:"int32"`

	Cpu *int32 `type:"int32"`

	Gpu *ecs.GpuForDescribeInstanceTypesOutput `type:"structure"`

	Id *string `type:"string"`

	InitialCredit *int64 `type:"int64"`

	InstanceTypeFamily *string `type:"string"`

	InstanceTypeId *string `type:"string"`

	IsSupportRiCreate *bool `type:"boolean"`

	IsSupportRiModify *bool `type:"boolean"`

	IsSupportSpot *bool `type:"boolean"`

	LocalVolumes []*ecs.LocalVolumeForDescribeInstanceTypesOutput `type:"list"`

	Mem *int32 `type:"int32"`

	Memory *ecs.MemoryForDescribeInstanceTypesOutput `type:"structure"`

	NetKppsQuota *int32 `type:"int32"`

	NetMbpsQuota *int32 `type:"int32"`

	NetSessionQuota *int32 `type:"int32"`

	Network *ecs.NetworkForDescribeInstanceTypesOutput `type:"structure"`

	NetworkInterfaceNumQuota *int32 `type:"int32"`

	NetworkInterfaceTotalNumQuota *int32 `type:"int32"`

	PrivateIpQuota *int32 `type:"int32"`

	Processor *ecs.ProcessorForDescribeInstanceTypesOutput `type:"structure"`

	Rdma *ecs.RdmaForDescribeInstanceTypesOutput `type:"structure"`

	TrunkNetworkInterfaceSupported *bool `type:"boolean"`

	Type *string `type:"string"`

	Volume *ecs.VolumeForDescribeInstanceTypesOutput `type:"structure"`

	VolumeTypes []*string `type:"list"`
	// contains filtered or unexported fields
}

type NetworkInterfaceSetForDescribeNetworkInterfacesOutput

type NetworkInterfaceSetForDescribeNetworkInterfacesOutput struct {
	AccountId *string `type:"string"`

	AssociatedElasticIp *vpc.AssociatedElasticIpForDescribeNetworkInterfacesOutput `type:"structure"`

	CreatedAt *string `type:"string"`

	Description *string `type:"string"`

	DeviceId *string `type:"string"`

	IPv6Sets []*string `type:"list"`

	MacAddress *string `type:"string"`

	NetworkInterfaceId *string `type:"string"`

	NetworkInterfaceName *string `type:"string"`

	PortSecurityEnabled *bool `type:"boolean"`

	PrimaryIpAddress *string `type:"string"`

	PrivateIpAddresses []*string `type:"list"`

	PrivateIpSets *vpc.PrivateIpSetsForDescribeNetworkInterfacesOutput `type:"structure"`

	ProjectName *string `type:"string"`

	SecurityGroupIds []*string `type:"list"`

	ServiceManaged *bool `type:"boolean"`

	Status *string `type:"string"`

	SubnetId *string `type:"string"`

	Tags []*vpc.TagForDescribeNetworkInterfacesOutput `type:"list"`

	Type *string `type:"string"`

	UpdatedAt *string `type:"string"`

	VpcId *string `type:"string"`

	VpcName *string `type:"string"`

	ZoneId *string `type:"string"`
	// contains filtered or unexported fields
}

type SubnetForDescribeSubnetsOutput

type SubnetForDescribeSubnetsOutput struct {
	AccountId *string `type:"string"`

	AvailableIpAddressCount *int64 `type:"integer"`

	CidrBlock *string `type:"string"`

	CreationTime *string `type:"string"`

	Description *string `type:"string"`

	Ipv6CidrBlock *string `type:"string"`

	NetworkAclId *string `type:"string"`

	ProjectName *string `type:"string"`

	RouteTable *vpc.RouteTableForDescribeSubnetsOutput `type:"structure"`

	Status *string `type:"string"`

	SubnetId *string `type:"string"`

	SubnetName *string `type:"string"`

	TotalIpv4Count *int64 `type:"integer"`

	UpdateTime *string `type:"string"`

	VpcId *string `type:"string"`

	ZoneId *string `type:"string"`
	// contains filtered or unexported fields
}

type UnassignIpv6AddressesInput

type UnassignIpv6AddressesInput struct {

	// Ipv6Address is a required field
	Ipv6Address []*string `type:"list" required:"true"`

	// NetworkInterfaceId is a required field
	NetworkInterfaceId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

type UnassignIpv6AddressesOutput

type UnassignIpv6AddressesOutput struct {
	Metadata *response.ResponseMetadata

	RequestId *string `type:"string"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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