aws

package
v0.0.0-...-a846cc2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVPCId

func GetVPCId(ctx context.Context, ec2Client EC2Client, clusterName string) (string, error)

GetVPCId return the VPC ID of the cluster

Types

type EC2Client

type EC2Client interface {
	VPCClient
	SubnetClient
}

EC2Client has a VPCClient and SubnetClient

func NewClient

func NewClient(ctx context.Context, awsRegion, sharedCredFileName string) (EC2Client, error)

type SubnetClient

type SubnetClient interface {
	DescribeSubnets(context.Context, *ec2.DescribeSubnetsInput, ...func(*ec2.Options)) (*ec2.DescribeSubnetsOutput, error)
	CreateTags(context.Context, *ec2.CreateTagsInput, ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error)
	DeleteTags(context.Context, *ec2.DeleteTagsInput, ...func(*ec2.Options)) (*ec2.DeleteTagsOutput, error)
}

SubnetClient can be used to query subnets and perform tagging operations

type VPCClient

type VPCClient interface {
	DescribeVpcs(ctx context.Context, params *ec2.DescribeVpcsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcsOutput, error)
}

VPCClient can be used to query VPCs

Jump to

Keyboard shortcuts

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