cldaws

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 12 Imported by: 0

README

No project-related code here please. This code is intended to run as part of the alternative (commercial?) deployment mechanism, not capideploy tool.

Documentation

Index

Constants

View Source
const InitVolumeAttachmentFunc string = `` /* 1533-byte string literal not displayed */

Variables

This section is empty.

Functions

func AllocateFloatingIpByName

func AllocateFloatingIpByName(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, ipName string) (string, error)

func AssignAwsFloatingIp

func AssignAwsFloatingIp(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, instanceId string, ipAddress string) (string, error)

func AssociateInstanceProfile

func AssociateInstanceProfile(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, instanceId string, instanceProfileName string) error

func AssociateRouteTableWithSubnet

func AssociateRouteTableWithSubnet(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, routeTableId string, subnetId string) (string, error)

func AttachInternetGatewayToVpc

func AttachInternetGatewayToVpc(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, internetGatewayId string, vpcId string) error

func AttachVolume

func AttachVolume(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, volId string, instanceId string, suggestedDevice string, timeoutSeconds int) (string, error)

func AuthorizeSecurityGroupIngress

func AuthorizeSecurityGroupIngress(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, securityGroupId string, ipProtocol string, port int32, cidr string) error

func CreateImageFromInstance

func CreateImageFromInstance(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, imageName string, instanceId string, timeoutSeconds int) (string, error)

aws ec2 create-image --region "us-east-1" --instance-id i-03c10fd5566a08476 --name ami-i-03c10fd5566a08476 --no-reboot

func CreateInstance

func CreateInstance(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder,
	instanceTypeString string,
	imageId string,
	instName string,
	privateIpAddress string,
	securityGroupId string,
	rootKeyName string,
	subnetId string,
	blockDeviceMappings []types.BlockDeviceMapping,
	timeoutSeconds int) (string, error)

func CreateInternetGateway

func CreateInternetGateway(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, internetGatewayName string) (string, error)

func CreateInternetGatewayRoute

func CreateInternetGatewayRoute(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, routeTableId string, destinationCidrBlock string, internetGatewayId string) error

func CreateNatGateway

func CreateNatGateway(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, natGatewayName string, subnetId string, publicIpAllocationId string, timeoutSeconds int) (string, error)

func CreateNatGatewayRoute

func CreateNatGatewayRoute(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, routeTableId string, destinationCidrBlock string, natGatewayId string) error

func CreateRouteTableForVpc

func CreateRouteTableForVpc(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, routeTableName string, vpcId string) (string, error)

func CreateSecurityGroup

func CreateSecurityGroup(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, securityGroupName string, vpcId string) (string, error)

func CreateSubnet

func CreateSubnet(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, vpcId string, subnetName string, cidr string, availabilityZone string) (string, error)

func CreateVolume

func CreateVolume(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, volName string, availabilityZone string, size int32, volTypeString string) (string, error)

func CreateVpc

func CreateVpc(ec2Client *ec2.Client, goCtx context.Context, tags map[string]string, lb *l.LogBuilder, vpcName string, cidrBlock string, timeoutSeconds int) (string, error)

func DeleteInstance

func DeleteInstance(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, instanceId string, timeoutSeconds int) error

func DeleteInternetGateway

func DeleteInternetGateway(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, internetGatewayId string) error

func DeleteNatGateway

func DeleteNatGateway(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, natGatewayId string, timeoutSeconds int) error

func DeleteRouteTable

func DeleteRouteTable(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, routeTableId string) error

func DeleteSecurityGroup

func DeleteSecurityGroup(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, securityGroupId string) error

func DeleteSnapshot

func DeleteSnapshot(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, volSnapshotId string) error

func DeleteSubnet

func DeleteSubnet(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, subnetId string) error

func DeleteVolume

func DeleteVolume(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, volId string) error

func DeleteVpc

func DeleteVpc(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, vpcId string) error

func DeregisterImage

func DeregisterImage(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, imageId string) error

func DetachInternetGatewayFromVpc

func DetachInternetGatewayFromVpc(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, internetGatewayId string, vpcId string) error

func DetachVolume

func DetachVolume(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, volId string, instanceId string, attachedDevice string, timeoutSeconds int) error

func GetImageInfoById

func GetImageInfoById(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, imageId string) (types.ImageState, []types.BlockDeviceMapping, error)

func GetImageInfoByName

func GetImageInfoByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, imageName string) (string, types.ImageState, []types.BlockDeviceMapping, error)

func GetInstanceIdAndStateByHostName

func GetInstanceIdAndStateByHostName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, instName string) (string, types.InstanceStateName, error)

func GetInstanceType

func GetInstanceType(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, flavorName string) (string, error)

func GetInternetGatewayIdByName

func GetInternetGatewayIdByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, internetGatewayName string) (string, error)

func GetInternetGatewayVpcAttachmentById

func GetInternetGatewayVpcAttachmentById(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, internetGatewayId string) (string, types.AttachmentStatus, error)

func GetNatGatewayIdAndStateByName

func GetNatGatewayIdAndStateByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, natGatewayName string) (string, types.NatGatewayState, error)

func GetPublicIpAddressAllocationAssociatedInstanceByName

func GetPublicIpAddressAllocationAssociatedInstanceByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, ipName string) (string, string, string, error)

func GetResourcesByTag

func GetResourcesByTag(tClient *tagging.Client, ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, region string, tagFilters []taggingTypes.TagFilter, readState bool) ([]*cld.Resource, error)

func GetRouteTableByName

func GetRouteTableByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, routeTableName string) (string, string, string, error)

func GetSecurityGroupIdByName

func GetSecurityGroupIdByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, securityGroupName string) (string, error)

func GetSubnetIdByName

func GetSubnetIdByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, subnetName string) (string, error)

func GetVolumeAttachedDeviceById

func GetVolumeAttachedDeviceById(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, volId string) (string, types.VolumeAttachmentState, error)

func GetVolumeIdByName

func GetVolumeIdByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, volName string) (string, error)

func GetVpcDefaultRouteTable

func GetVpcDefaultRouteTable(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, vpcId string) (string, string, error)

func GetVpcIdByName

func GetVpcIdByName(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, vpcName string) (string, error)

func ReleaseFloatingIpByAllocationId

func ReleaseFloatingIpByAllocationId(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, allocationId string) error

func StopInstance

func StopInstance(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, instanceId string, timeoutSeconds int) error

func TagResource

func TagResource(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, resourceId string, tagName string, tagMap map[string]string) error

func VerifyKeypair

func VerifyKeypair(ec2Client *ec2.Client, goCtx context.Context, lb *l.LogBuilder, keypairName string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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