ec2

package
v0.50.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AddressAddressNotFound address not found
	AddressAddressNotFound = "InvalidAddress.NotFound"
	// AddressAllocationNotFound addreess not found by allocation
	AddressAllocationNotFound = "InvalidAllocationID.NotFound"
)
View Source
const (
	// InternetGatewayIDNotFound is the code that is returned by ec2 when the given InternetGatewayID is not valid
	InternetGatewayIDNotFound = "InvalidInternetGatewayID.NotFound"
	// InternetGatewayAlreadyAttached is code for error returned by AWS API
	// for AttachInternetGatewayRequest when an InternetGatway is already attached to specified VPC in the request.
	InternetGatewayAlreadyAttached = "Resource.AlreadyAssociated"
)
View Source
const (
	// DefaultLocalGatewayID is the id for local gateway
	DefaultLocalGatewayID = "local"

	// RouteTableIDNotFound is the code that is returned by ec2 when the given SubnetID is invalid
	RouteTableIDNotFound = "InvalidRouteTableID.NotFound"

	// RouteNotFound is the code that is returned when the given route is not found
	RouteNotFound = "InvalidRoute.NotFound"

	// AssociationIDNotFound is the code that is returned when then given AssociationID is invalid
	AssociationIDNotFound = "InvalidAssociationID.NotFound"
)
View Source
const (
	// InvalidGroupNotFound is the code that is returned by ec2 when the given VPCID is not valid
	InvalidGroupNotFound = "InvalidGroup.NotFound"

	// InvalidPermissionDuplicate is returned when you try to Authorize for a rule that already exists.
	InvalidPermissionDuplicate = "InvalidPermission.Duplicate"
)
View Source
const (
	// FlowLogNotFound is the code that is returned by ec2 when the given FlowLogId is not valid
	FlowLogNotFound = "InvalidFlowLogId.NotFound"
)
View Source
const (
	// InstanceNotFound is the code that is returned by ec2 when the given InstanceID is not valid
	InstanceNotFound = "InvalidInstanceID.NotFound"
)
View Source
const (
	// NatGatewayNotFound is the code that is returned by ec2 when the given NATGatewayID is not valid
	// ref: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html#api-error-codes-table-client
	NatGatewayNotFound = "NatGatewayNotFound"
)
View Source
const (
	// SubnetIDNotFound is the code that is returned by ec2 when the given SubnetID is not valid
	SubnetIDNotFound = "InvalidSubnetID.NotFound"
)
View Source
const (
	// VPCIDNotFound is the code that is returned by ec2 when the given VPCID is not valid
	VPCIDNotFound = "InvalidVpcID.NotFound"
)

Variables

This section is empty.

Functions

func BuildFromEC2Tags

func BuildFromEC2Tags(tags []ec2types.Tag) []v1beta1.Tag

BuildFromEC2Tags returns a list of tags, off of the given ec2 tags

func BuildFromEC2TagsManualV1alpha1 added in v0.45.0

func BuildFromEC2TagsManualV1alpha1(tags []types.Tag) []svcapitypes.Tag

BuildFromEC2Tags returns a list of tags, off of the given ec2 tags

func BuildFromEC2TagsV1Beta1 added in v0.45.0

func BuildFromEC2TagsV1Beta1(tags []ec2types.Tag) []svcapitypes.Tag

BuildFromEC2Tags returns a list of tags, off of the given ec2 tags

func CIDRBlocksEqual added in v0.43.0

func CIDRBlocksEqual(cidr1, cidr2 string) bool

CIDRBlocksEqual returns whether or not two CIDR blocks are equal: - Both CIDR blocks parse to an IP address and network - The string representation of the IP addresses are equal - The string representation of the networks are equal

func CompareGroupIDs added in v0.45.0

func CompareGroupIDs(groupIDs []string, ec2Groups []types.GroupIdentifier) bool

CompareGroupIDs compares slices of group IDs and ec2.GroupIdentifier

func CompareGroupNames added in v0.45.0

func CompareGroupNames(groupNames []string, ec2Groups []types.GroupIdentifier) bool

CompareGroupNames compares slices of group names and ec2.GroupIdentifier

func CompareTags

func CompareTags(spec []svcapitypes.Tag, current []ec2types.Tag) bool

CompareTags compares arrays of v1beta1.Tag and ec2types.Tag

func CompareTagsManualV1alpha1 added in v0.45.0

func CompareTagsManualV1alpha1(tags []svcapitypes.Tag, ec2Tags []types.Tag) bool

CompareTags compares arrays of manualv1alpha1.Tag and ec2.Tag

func CreateRTPatch

CreateRTPatch creates a *v1beta1.RouteTableParameters that has only the changed values between the target *v1beta1.RouteTableParameters and the current *ec2.RouteTable

func DiffEC2Tags added in v0.43.0

func DiffEC2Tags(local []ec2type.Tag, remote []ec2type.Tag) (add []ec2type.Tag, remove []ec2type.Tag)

DiffEC2Tags returns []ec2type.Tag that should be added or removed.

func DiffPermissions

func DiffPermissions(want, have []ec2types.IpPermission) (add, remove []ec2types.IpPermission)

DiffPermissions compares two permission sets, and returns the rules to add and remove to make them identical

func FindCIDRAssociation

func FindCIDRAssociation(associationID string, vpc ec2types.Vpc) (*ec2types.VpcCidrBlockAssociation, *ec2types.VpcIpv6CidrBlockAssociation)

FindCIDRAssociation will find the matching CIDRAssociation in the ec2.VPC or return nil

func FindVPCCIDRBlockStatus

func FindVPCCIDRBlockStatus(associationID string, vpc ec2types.Vpc) (ec2types.VpcCidrBlockStateCode, error)

FindVPCCIDRBlockStatus is used to grab ec2.VpcCidrBlockStateCode from ec2types.Vpc.

func FromTimePtr

func FromTimePtr(t *time.Time) *metav1.Time

FromTimePtr is a helper for converting a *time.Time to a *metav1.Time

func GenerateAddressObservation

func GenerateAddressObservation(address ec2types.Address) v1beta1.AddressObservation

GenerateAddressObservation is used to produce v1beta1.AddressObservation from ec2.Subnet

func GenerateCPUOptionsRequest

func GenerateCPUOptionsRequest(opts *types.CpuOptions) *manualv1alpha1.CPUOptionsRequest

GenerateCPUOptionsRequest converts a CpuOptions into a internal CpuOptionsRequest

func GenerateCapacityReservationSpecResponse

GenerateCapacityReservationSpecResponse converts a ec2.CapacityReservationSpecificationResponse into an internal CapacityReservationSpecificationResponse

func GenerateDescribeInstancesByExternalTags

func GenerateDescribeInstancesByExternalTags(extTags map[string]string) *ec2.DescribeInstancesInput

GenerateDescribeInstancesByExternalTags generates a ec2.DescribeInstancesInput that is used to query for Instances by the external labels.

func GenerateEC2BlockDeviceMappings

func GenerateEC2BlockDeviceMappings(mappings []manualv1alpha1.BlockDeviceMapping) []types.BlockDeviceMapping

GenerateEC2BlockDeviceMappings coverts an internal slice of BlockDeviceMapping into a slice of ec2.BlockDeviceMapping

func GenerateEC2CPUOptions

func GenerateEC2CPUOptions(opts *manualv1alpha1.CPUOptionsRequest) *types.CpuOptionsRequest

GenerateEC2CPUOptions converts an internal CPUOptionsRequest into a ec2.CpuOptionsRequest

func GenerateEC2CapacityReservationSpecs

GenerateEC2CapacityReservationSpecs coverts an internal CapacityReservationSpecification into a ec2.CapacityReservationSpecification

func GenerateEC2CreditSpec

GenerateEC2CreditSpec converts an internal CreditSpecificationRequest into a ec2.CreditSpecificationRequest

func GenerateEC2ElasticGPUSpecs

func GenerateEC2ElasticGPUSpecs(specs []manualv1alpha1.ElasticGPUSpecification) []types.ElasticGpuSpecification

GenerateEC2ElasticGPUSpecs coverts an internal slice of ElasticGPUSpecification into a slice of ec2.ElasticGpuSpecification

func GenerateEC2ElasticInferenceAccelerators

func GenerateEC2ElasticInferenceAccelerators(accs []manualv1alpha1.ElasticInferenceAccelerator) []types.ElasticInferenceAccelerator

GenerateEC2ElasticInferenceAccelerators coverts an internal slice of ElasticInferenceAccelerator into a slice of ec2.ElasticInferenceAccelerator

func GenerateEC2HibernationOptions

func GenerateEC2HibernationOptions(opts *manualv1alpha1.HibernationOptionsRequest) *types.HibernationOptionsRequest

GenerateEC2HibernationOptions converts an internal HibernationOptionsRequest into a ec2.HibernationOptionsRequest

func GenerateEC2IAMInstanceProfileSpecification

func GenerateEC2IAMInstanceProfileSpecification(spec *manualv1alpha1.IAMInstanceProfileSpecification) *types.IamInstanceProfileSpecification

GenerateEC2IAMInstanceProfileSpecification converts an internal IamInstanceProfileSpecification into a ec2.IamInstanceProfileSpecification

func GenerateEC2InstanceIPV6Addresses

func GenerateEC2InstanceIPV6Addresses(addrs []manualv1alpha1.InstanceIPv6Address) []types.InstanceIpv6Address

GenerateEC2InstanceIPV6Addresses coverts an internal slice of InstanceIPV6Address into a slice of ec2.InstanceIpv6Address

func GenerateEC2InstanceMarketOptionsRequest

func GenerateEC2InstanceMarketOptionsRequest(opts *manualv1alpha1.InstanceMarketOptionsRequest) *types.InstanceMarketOptionsRequest

GenerateEC2InstanceMarketOptionsRequest converts an internal InstanceMarketOptionsRequest into a ec2.InstanceMarketOptionsRequest

func GenerateEC2InstanceMetadataOptionsRequest

func GenerateEC2InstanceMetadataOptionsRequest(opts *manualv1alpha1.InstanceMetadataOptionsRequest) *types.InstanceMetadataOptionsRequest

GenerateEC2InstanceMetadataOptionsRequest converts an internal InstanceMetadataOptionsRequest into a ec2.InstanceMetadataOptionsRequest

func GenerateEC2InstanceNetworkInterfaceSpecs

func GenerateEC2InstanceNetworkInterfaceSpecs(specs []manualv1alpha1.InstanceNetworkInterfaceSpecification) []types.InstanceNetworkInterfaceSpecification

GenerateEC2InstanceNetworkInterfaceSpecs coverts an internal slice of InstanceNetworkInterfaceSpecification into a slice of ec2.InstanceNetworkInterfaceSpecification

func GenerateEC2Ipv6PrefixSpecificationRequest added in v0.42.0

func GenerateEC2Ipv6PrefixSpecificationRequest(prefixes []manualv1alpha1.Ipv6PrefixSpecificationRequest) []types.Ipv6PrefixSpecificationRequest

GenerateEC2Ipv6PrefixSpecificationRequest coverts an internal slice of Ipv6PrefixSpecificationRequest into a slice of ec2.Ipv6PrefixSpecificationRequest

func GenerateEC2LaunchTemplateSpec

GenerateEC2LaunchTemplateSpec converts internal LaunchTemplateSpecification into ec2.LaunchTemplateSpecification

func GenerateEC2LicenseConfigurationRequest

func GenerateEC2LicenseConfigurationRequest(reqs []manualv1alpha1.LicenseConfigurationRequest) []types.LicenseConfigurationRequest

GenerateEC2LicenseConfigurationRequest coverts an internal slice of LicenseConfigurationRequest into a slice of ec2.LicenseConfigurationRequest

func GenerateEC2Monitoring

GenerateEC2Monitoring converts internal RunInstancesMonitoringEnabled into ec2.RunInstancesMonitoringEnabled

func GenerateEC2Permissions

func GenerateEC2Permissions(objectPerms []v1beta1.IPPermission) []ec2types.IpPermission

GenerateEC2Permissions converts object Permissions to ec2 format

func GenerateEC2Placement

func GenerateEC2Placement(p *manualv1alpha1.Placement) *types.Placement

GenerateEC2Placement converts internal Placement into ec2.Placement

func GenerateEC2PrivateIPAddressSpecs

func GenerateEC2PrivateIPAddressSpecs(specs []manualv1alpha1.PrivateIPAddressSpecification) []types.PrivateIpAddressSpecification

GenerateEC2PrivateIPAddressSpecs coverts an internal slice of PrivateIPAddressSpecification into a slice of ec2.PrivateIpAddressSpecification

func GenerateEC2RunInstancesInput

func GenerateEC2RunInstancesInput(name string, p *manualv1alpha1.InstanceParameters) *ec2.RunInstancesInput

GenerateEC2RunInstancesInput generates a ec2.RunInstanceInput based on the supplied managed resource Name and InstanceParameters Note: MaxCount and MinCount are set to 1 each per https://github.com/crossplane-contrib/provider-aws/pull/777#issuecomment-887017783

func GenerateEC2TagSpecifications

func GenerateEC2TagSpecifications(tagSpecs []manualv1alpha1.TagSpecification) []types.TagSpecification

GenerateEC2TagSpecifications takes a slice of TagSpecifications and converts it to a slice of ec2.TagSpecification

func GenerateEC2Tags

func GenerateEC2Tags(tags []v1beta1.Tag) []ec2types.Tag

GenerateEC2Tags generates a tag array with type that EC2 client expects.

func GenerateEC2TagsManualV1alpha1 added in v0.45.0

func GenerateEC2TagsManualV1alpha1(tags []svcapitypes.Tag) []types.Tag

GenerateEC2Tags generates a tag array with type that EC2 client expects.

func GenerateEC2TagsV1Beta1 added in v0.45.0

func GenerateEC2TagsV1Beta1(tags []svcapitypes.Tag) []ec2types.Tag

GenerateEC2Tags generates a tag array with type that EC2 client expects.

func GenerateElasticGPUAssociation

func GenerateElasticGPUAssociation(assocs []types.ElasticGpuAssociation) []manualv1alpha1.ElasticGPUAssociation

GenerateElasticGPUAssociation coverts a slice of ec2.ElasticGpuAssociation into an internal slice of ElasticGPUAssociation

func GenerateElasticInferenceAcceleratorAssociation

func GenerateElasticInferenceAcceleratorAssociation(assocs []types.ElasticInferenceAcceleratorAssociation) []manualv1alpha1.ElasticInferenceAcceleratorAssociation

GenerateElasticInferenceAcceleratorAssociation coverts a slice of ec2.ElasticInferenceAcceleratorAssociation into an internal slice of ElasticInferenceAcceleratorAssociation

func GenerateGroupIdentifiers

func GenerateGroupIdentifiers(ids []types.GroupIdentifier) []manualv1alpha1.GroupIdentifier

GenerateGroupIdentifiers coverts a slice of ec2.GroupIdentifier into an internal slice of GroupIdentifier

func GenerateHibernationOptionsRequest

func GenerateHibernationOptionsRequest(opts *types.HibernationOptions) *manualv1alpha1.HibernationOptionsRequest

GenerateHibernationOptionsRequest converts a ec2.HibernationOptions into a internal HibernationOptionsRequest

func GenerateIAMInstanceProfile

func GenerateIAMInstanceProfile(p *types.IamInstanceProfile) *manualv1alpha1.IAMInstanceProfile

GenerateIAMInstanceProfile converts a ec2.IamInstanceProfile into a internal IamInstanceProfile

func GenerateIGObservation

GenerateIGObservation is used to produce v1beta1.InternetGatewayExternalStatus from ec2types.InternetGateway.

func GenerateInstanceBlockDeviceMappings

func GenerateInstanceBlockDeviceMappings(mappings []types.InstanceBlockDeviceMapping) []manualv1alpha1.InstanceBlockDeviceMapping

GenerateInstanceBlockDeviceMappings coverts a slice of ec2.InstanceBlockDeviceMapping into an internal slice of InstanceBlockDeviceMapping

func GenerateInstanceIPV6Addresses

func GenerateInstanceIPV6Addresses(addrs []types.InstanceIpv6Address) []manualv1alpha1.InstanceIPv6Address

GenerateInstanceIPV6Addresses coverts a slice of ec2.InstanceIpv6Address into a slice of internal InstanceIPv6Address

func GenerateInstanceMetadataOptionsRequest

func GenerateInstanceMetadataOptionsRequest(opts *types.InstanceMetadataOptionsResponse) *manualv1alpha1.InstanceMetadataOptionsRequest

GenerateInstanceMetadataOptionsRequest converts an ec2.InstanceMetadataOptionsResponse into an internal InstanceMetadataOptionsRequest

func GenerateInstanceNetworkInterface

func GenerateInstanceNetworkInterface(nets []types.InstanceNetworkInterface) []manualv1alpha1.InstanceNetworkInterface

GenerateInstanceNetworkInterface coverts a slice of ec2.InstanceNetworkInterface into an internal slice of InstanceNetworkInterface

func GenerateInstanceObservation

func GenerateInstanceObservation(i types.Instance, attributes *ec2.DescribeInstanceAttributeOutput) manualv1alpha1.InstanceObservation

GenerateInstanceObservation is used to produce manualv1alpha1.InstanceObservation from a []ec2.Instance.

func GenerateInstancePrivateIPAddresses

func GenerateInstancePrivateIPAddresses(addrs []types.InstancePrivateIpAddress) []manualv1alpha1.InstancePrivateIPAddress

GenerateInstancePrivateIPAddresses coverts a slice of ec2.InstanceIpv6Address into a slice of internal InstanceIPv6Address

func GenerateLicenseConfigurationRequest

func GenerateLicenseConfigurationRequest(reqs []types.LicenseConfiguration) []manualv1alpha1.LicenseConfigurationRequest

GenerateLicenseConfigurationRequest coverts a slice of ec2.LicenseConfiguration into an internal slice of LicenseConfigurationRequest

func GenerateMonitoring

func GenerateMonitoring(m *types.Monitoring) *manualv1alpha1.Monitoring

GenerateMonitoring converts a ec2.Monitoring into a internal Monitoring

func GenerateNATGatewayObservation

func GenerateNATGatewayObservation(nat ec2types.NatGateway) v1beta1.NATGatewayObservation

GenerateNATGatewayObservation is used to produce v1beta1.NatGatewayObservation from ec2types.NatGateway.

func GeneratePlacement

func GeneratePlacement(p *types.Placement) *manualv1alpha1.Placement

GeneratePlacement converts ec2.Placement into an internal Placement

func GenerateProductCodes

func GenerateProductCodes(codes []types.ProductCode) []manualv1alpha1.ProductCode

GenerateProductCodes converts ec2.ProductCode into an internal ProductCode

func GenerateRTObservation

func GenerateRTObservation(rt ec2types.RouteTable) v1beta1.RouteTableObservation

GenerateRTObservation is used to produce v1beta1.RouteTableExternalStatus from ec2.RouteTable.

func GenerateSGObservation

GenerateSGObservation is used to produce v1beta1.SecurityGroupExternalStatus from ec2types.SecurityGroup.

func GenerateStateReason

func GenerateStateReason(r *types.StateReason) *manualv1alpha1.StateReason

GenerateStateReason converts ec2.StateReason into an internal StateReason

func GenerateSubnetObservation

func GenerateSubnetObservation(subnet ec2types.Subnet) v1beta1.SubnetObservation

GenerateSubnetObservation is used to produce v1beta1.SubnetExternalStatus from ec2types.Subnet

func GenerateTags

func GenerateTags(tags []types.Tag) []manualv1alpha1.Tag

GenerateTags converts a slice of ec2.Tag into an internal slice of Tag.

func GenerateVpcCIDRBlockObservation

func GenerateVpcCIDRBlockObservation(associationID string, vpc ec2types.Vpc) v1beta1.VPCCIDRBlockObservation

GenerateVpcCIDRBlockObservation is used to produce v1alpha1.VPCObservation from ec2.Vpc.

func GenerateVpcObservation

func GenerateVpcObservation(vpc ec2types.Vpc) v1beta1.VPCObservation

GenerateVpcObservation is used to produce v1beta1.VPCObservation from ec2types.Vpc.

func IsAddressNotFoundErr

func IsAddressNotFoundErr(err error) bool

IsAddressNotFoundErr returns true if the error is because the address doesn't exist

func IsAddressUpToDate

func IsAddressUpToDate(e v1beta1.AddressParameters, a ec2types.Address) bool

IsAddressUpToDate checks whether there is a change in any of the modifiable fields.

func IsAssociationIDNotFoundErr

func IsAssociationIDNotFoundErr(err error) bool

IsAssociationIDNotFoundErr returns true if the error is because the association doesn't exist

func IsCIDRNotFound

func IsCIDRNotFound(err error) bool

IsCIDRNotFound returns true if the error code indicates that the CIDR Block Association was not found

func IsFlowLogsNotFoundErr added in v0.30.0

func IsFlowLogsNotFoundErr(err error) bool

IsFlowLogsNotFoundErr returns true if the error is because the item doesn't exist

func IsIgUpToDate

IsIgUpToDate checks whether there is a change in any of the modifiable fields.

func IsInstanceNotFoundErr

func IsInstanceNotFoundErr(err error) bool

IsInstanceNotFoundErr returns true if the error is because the item doesn't exist

func IsInstanceUpToDate

func IsInstanceUpToDate(spec manualv1alpha1.InstanceParameters, instance types.Instance, attributes ec2.DescribeInstanceAttributeOutput) bool

IsInstanceUpToDate returns true if there is no update-able difference between desired and observed state of the resource.

func IsInternetGatewayAlreadyAttached

func IsInternetGatewayAlreadyAttached(err error) bool

IsInternetGatewayAlreadyAttached returns true if the error is because the item doesn't exist

func IsInternetGatewayNotFoundErr

func IsInternetGatewayNotFoundErr(err error) bool

IsInternetGatewayNotFoundErr returns true if the error is because the item doesn't exist

func IsNatGatewayNotFoundErr

func IsNatGatewayNotFoundErr(err error) bool

IsNatGatewayNotFoundErr returns true if the error is because the item doesn't exist

func IsRouteNotFoundErr

func IsRouteNotFoundErr(err error) bool

IsRouteNotFoundErr returns true if the error is because the route doesn't exist

func IsRouteTableNotFoundErr

func IsRouteTableNotFoundErr(err error) bool

IsRouteTableNotFoundErr returns true if the error is because the route table doesn't exist

func IsRtUpToDate

IsRtUpToDate checks whether there is a change in any of the modifiable fields.

func IsRuleAlreadyExistsErr

func IsRuleAlreadyExistsErr(err error) bool

IsRuleAlreadyExistsErr returns true if the error is because the rule already exists.

func IsSGUpToDate

func IsSGUpToDate(sg v1beta1.SecurityGroupParameters, observed ec2types.SecurityGroup) bool

IsSGUpToDate checks if the observed security group is up to equal to the desired state

func IsSecurityGroupNotFoundErr

func IsSecurityGroupNotFoundErr(err error) bool

IsSecurityGroupNotFoundErr returns true if the error is because the item doesn't exist

func IsStandardDomain

func IsStandardDomain(e v1beta1.AddressParameters) bool

IsStandardDomain checks whether it is set for standard domain

func IsSubnetNotFoundErr

func IsSubnetNotFoundErr(err error) bool

IsSubnetNotFoundErr returns true if the error is because the item doesn't exist

func IsSubnetUpToDate

func IsSubnetUpToDate(p v1beta1.SubnetParameters, s ec2types.Subnet) bool

IsSubnetUpToDate checks whether there is a change in any of the modifiable fields.

func IsVPCNotFoundErr

func IsVPCNotFoundErr(err error) bool

IsVPCNotFoundErr returns true if the error is because the item doesn't exist

func IsVpcCidrDeleting

func IsVpcCidrDeleting(observation v1beta1.VPCCIDRBlockObservation) bool

IsVpcCidrDeleting returns true if the CIDR Block is already disassociated or disassociating

func IsVpcUpToDate

func IsVpcUpToDate(spec v1beta1.VPCParameters, vpc ec2types.Vpc, attributes ec2.DescribeVpcAttributeOutput) bool

IsVpcUpToDate returns true if there is no update-able difference between desired and observed state of the resource.

func LateInitializeAddress

func LateInitializeAddress(in *v1beta1.AddressParameters, a *ec2types.Address)

LateInitializeAddress fills the empty fields in *v1beta1.AddressParameters with the values seen in ec2types.Address.

func LateInitializeIG

func LateInitializeIG(in *v1beta1.InternetGatewayParameters, ig *ec2types.InternetGateway)

LateInitializeIG fills the empty fields in *v1beta1.InternetGatewayParameters with the values seen in ec2types.InternetGateway.

func LateInitializeInstance

func LateInitializeInstance(in *manualv1alpha1.InstanceParameters, instance *types.Instance, attributes *ec2.DescribeInstanceAttributeOutput)

LateInitializeInstance fills the empty fields in *manualv1alpha1.InstanceParameters with the values seen in ec2.Instance and ec2.DescribeInstanceAttributeOutput.

func LateInitializeRT

func LateInitializeRT(in *v1beta1.RouteTableParameters, rt *ec2types.RouteTable)

LateInitializeRT fills the empty fields in *v1beta1.RouteTableParameters with the values seen in ec2.RouteTable.

func LateInitializeSG

func LateInitializeSG(in *v1beta1.SecurityGroupParameters, sg *ec2types.SecurityGroup)

LateInitializeSG fills the empty fields in *v1beta1.SecurityGroupParameters with the values seen in ec2types.SecurityGroup.

func LateInitializeSubnet

func LateInitializeSubnet(in *v1beta1.SubnetParameters, s *ec2types.Subnet)

LateInitializeSubnet fills the empty fields in *v1beta1.SubnetParameters with the values seen in ec2types.Subnet.

func LateInitializeVPC

func LateInitializeVPC(in *v1beta1.VPCParameters, v *ec2types.Vpc, attributes *ec2.DescribeVpcAttributeOutput)

LateInitializeVPC fills the empty fields in *v1beta1.VPCParameters with the values seen in ec2.Vpc and ec2.DescribeVpcAttributeOutput.

func SortRoutes

func SortRoutes(route []v1beta1.RouteBeta, ec2Route []ec2types.Route)

SortRoutes sorts array of Routes on DestinationCIDR

func SortTagsManualV1alpha1 added in v0.45.0

func SortTagsManualV1alpha1(tags []svcapitypes.Tag, ec2Tags []types.Tag)

SortTags sorts array of v1beta1.Tag and ec2.Tag on 'Key'

func ValidateRoutes

func ValidateRoutes(route []v1beta1.RouteBeta) error

ValidateRoutes on empty cidrs

Types

type AddressClient

type AddressClient interface {
	AllocateAddress(ctx context.Context, input *ec2.AllocateAddressInput, opts ...func(*ec2.Options)) (*ec2.AllocateAddressOutput, error)
	DescribeAddresses(ctx context.Context, input *ec2.DescribeAddressesInput, opts ...func(*ec2.Options)) (*ec2.DescribeAddressesOutput, error)
	ReleaseAddress(ctx context.Context, input *ec2.ReleaseAddressInput, opts ...func(*ec2.Options)) (*ec2.ReleaseAddressOutput, error)
	CreateTags(ctx context.Context, input *ec2.CreateTagsInput, opts ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error)
}

AddressClient is the external client used for ElasticIP Custom Resource

type CIDRNotFoundError

type CIDRNotFoundError struct{}

CIDRNotFoundError will be raised when there is no Association

func (*CIDRNotFoundError) Error

func (r *CIDRNotFoundError) Error() string

Error satisfies the Error interface for CIDRNotFoundError.

type Condition

type Condition string

Condition denotes the current state across instances

const (
	// Available is the condition that represents all instances are running
	Available Condition = "available"
	// Creating is the condition that represents some instances could be
	// running, but the rest are pending
	Creating Condition = "creating"
	// Deleting is the condition that represents some instances have entered
	// the shutdown/termination state
	Deleting Condition = "deleting"
	// Deleted is the condition that represents all instances have entered
	// the terminated state
	Deleted Condition = "deleted"
)

func GenerateInstanceCondition

func GenerateInstanceCondition(o manualv1alpha1.InstanceObservation) Condition

GenerateInstanceCondition returns an instance Condition depending on the supplied observation. Currently, the instance can be denoted as: * Available * Creating * Deleting

type InstanceClient

InstanceClient is the external client used for Instance Custom Resource

func NewInstanceClient

func NewInstanceClient(cfg aws.Config) InstanceClient

NewInstanceClient returns a new client using AWS credentials as JSON encoded data.

type InternetGatewayClient

type InternetGatewayClient interface {
	CreateInternetGateway(ctx context.Context, input *ec2.CreateInternetGatewayInput, opts ...func(*ec2.Options)) (*ec2.CreateInternetGatewayOutput, error)
	DeleteInternetGateway(ctx context.Context, input *ec2.DeleteInternetGatewayInput, opts ...func(*ec2.Options)) (*ec2.DeleteInternetGatewayOutput, error)
	DescribeInternetGateways(ctx context.Context, input *ec2.DescribeInternetGatewaysInput, opts ...func(*ec2.Options)) (*ec2.DescribeInternetGatewaysOutput, error)
	AttachInternetGateway(ctx context.Context, input *ec2.AttachInternetGatewayInput, opts ...func(*ec2.Options)) (*ec2.AttachInternetGatewayOutput, error)
	DetachInternetGateway(ctx context.Context, input *ec2.DetachInternetGatewayInput, opts ...func(*ec2.Options)) (*ec2.DetachInternetGatewayOutput, error)
	CreateTags(ctx context.Context, input *ec2.CreateTagsInput, opts ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error)
}

InternetGatewayClient is the external client used for InternetGateway Custom Resource

func NewInternetGatewayClient

func NewInternetGatewayClient(cfg aws.Config) InternetGatewayClient

NewInternetGatewayClient returns a new client using AWS credentials as JSON encoded data.

type NatGatewayClient

type NatGatewayClient interface {
	CreateNatGateway(ctx context.Context, input *ec2.CreateNatGatewayInput, opts ...func(*ec2.Options)) (*ec2.CreateNatGatewayOutput, error)
	DeleteNatGateway(ctx context.Context, input *ec2.DeleteNatGatewayInput, opts ...func(*ec2.Options)) (*ec2.DeleteNatGatewayOutput, error)
	DescribeNatGateways(ctx context.Context, input *ec2.DescribeNatGatewaysInput, opts ...func(*ec2.Options)) (*ec2.DescribeNatGatewaysOutput, error)
	CreateTags(ctx context.Context, input *ec2.CreateTagsInput, opts ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error)
	DeleteTags(ctx context.Context, input *ec2.DeleteTagsInput, opts ...func(*ec2.Options)) (*ec2.DeleteTagsOutput, error)
}

NatGatewayClient is the external client used for NatGateway Custom Resource

func NewNatGatewayClient

func NewNatGatewayClient(cfg aws.Config) NatGatewayClient

NewNatGatewayClient returns a new client using AWS credentials as JSON encoded data.

type RouteTableClient

type RouteTableClient interface {
	CreateRouteTable(ctx context.Context, input *ec2.CreateRouteTableInput, opts ...func(*ec2.Options)) (*ec2.CreateRouteTableOutput, error)
	DeleteRouteTable(ctx context.Context, input *ec2.DeleteRouteTableInput, opts ...func(*ec2.Options)) (*ec2.DeleteRouteTableOutput, error)
	DescribeRouteTables(ctx context.Context, input *ec2.DescribeRouteTablesInput, opts ...func(*ec2.Options)) (*ec2.DescribeRouteTablesOutput, error)
	CreateRoute(ctx context.Context, input *ec2.CreateRouteInput, opts ...func(*ec2.Options)) (*ec2.CreateRouteOutput, error)
	DeleteRoute(ctx context.Context, input *ec2.DeleteRouteInput, opts ...func(*ec2.Options)) (*ec2.DeleteRouteOutput, error)
	AssociateRouteTable(ctx context.Context, input *ec2.AssociateRouteTableInput, opts ...func(*ec2.Options)) (*ec2.AssociateRouteTableOutput, error)
	DisassociateRouteTable(ctx context.Context, input *ec2.DisassociateRouteTableInput, opts ...func(*ec2.Options)) (*ec2.DisassociateRouteTableOutput, error)
	CreateTags(ctx context.Context, input *ec2.CreateTagsInput, opts ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error)
	DeleteTags(ctx context.Context, input *ec2.DeleteTagsInput, opts ...func(*ec2.Options)) (*ec2.DeleteTagsOutput, error)
}

RouteTableClient is the external client used for RouteTable Custom Resource

func NewRouteTableClient

func NewRouteTableClient(cfg aws.Config) RouteTableClient

NewRouteTableClient returns a new client using AWS credentials as JSON encoded data.

type SecurityGroupClient

type SecurityGroupClient interface {
	CreateSecurityGroup(ctx context.Context, input *ec2.CreateSecurityGroupInput, opts ...func(*ec2.Options)) (*ec2.CreateSecurityGroupOutput, error)
	DeleteSecurityGroup(ctx context.Context, input *ec2.DeleteSecurityGroupInput, opts ...func(*ec2.Options)) (*ec2.DeleteSecurityGroupOutput, error)
	DescribeSecurityGroups(ctx context.Context, input *ec2.DescribeSecurityGroupsInput, opts ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupsOutput, error)
	DescribeSecurityGroupRules(ctx context.Context, input *ec2.DescribeSecurityGroupRulesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupRulesOutput, error)
	AuthorizeSecurityGroupIngress(ctx context.Context, input *ec2.AuthorizeSecurityGroupIngressInput, opts ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
	AuthorizeSecurityGroupEgress(ctx context.Context, input *ec2.AuthorizeSecurityGroupEgressInput, opts ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupEgressOutput, error)
	RevokeSecurityGroupIngress(ctx context.Context, input *ec2.RevokeSecurityGroupIngressInput, opts ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupIngressOutput, error)
	RevokeSecurityGroupEgress(ctx context.Context, input *ec2.RevokeSecurityGroupEgressInput, opts ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupEgressOutput, error)
	CreateTags(ctx context.Context, input *ec2.CreateTagsInput, opts ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error)
	DeleteTags(ctx context.Context, input *ec2.DeleteTagsInput, opts ...func(*ec2.Options)) (*ec2.DeleteTagsOutput, error)
}

SecurityGroupClient is the external client used for SecurityGroup Custom Resource

func NewSecurityGroupClient

func NewSecurityGroupClient(cfg awsgo.Config) SecurityGroupClient

NewSecurityGroupClient generates client for AWS Security Group API

type SecurityGroupRuleClient added in v0.30.0

type SecurityGroupRuleClient interface {
	AuthorizeSecurityGroupIngress(ctx context.Context, params *ec2.AuthorizeSecurityGroupIngressInput, optFns ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
	AuthorizeSecurityGroupEgress(ctx context.Context, params *ec2.AuthorizeSecurityGroupEgressInput, optFns ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupEgressOutput, error)
	DescribeSecurityGroupRules(ctx context.Context, params *ec2.DescribeSecurityGroupRulesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupRulesOutput, error)
	ModifySecurityGroupRules(ctx context.Context, params *ec2.ModifySecurityGroupRulesInput, optFns ...func(*ec2.Options)) (*ec2.ModifySecurityGroupRulesOutput, error)
	RevokeSecurityGroupIngress(ctx context.Context, params *ec2.RevokeSecurityGroupIngressInput, optFns ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupIngressOutput, error)
	RevokeSecurityGroupEgress(ctx context.Context, params *ec2.RevokeSecurityGroupEgressInput, optFns ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupEgressOutput, error)
}

SecurityGroupRuleClient is the external client used for SecurityGroupRule Custom Resource

func NewSecurityGroupRuleClient added in v0.30.0

func NewSecurityGroupRuleClient(cfg aws.Config) SecurityGroupRuleClient

NewSecurityGroupRuleClient generates client for AWS Security Group Rule API

type SubnetClient

type SubnetClient interface {
	CreateSubnet(ctx context.Context, input *ec2.CreateSubnetInput, opts ...func(*ec2.Options)) (*ec2.CreateSubnetOutput, error)
	DescribeSubnets(ctx context.Context, input *ec2.DescribeSubnetsInput, opts ...func(*ec2.Options)) (*ec2.DescribeSubnetsOutput, error)
	DeleteSubnet(ctx context.Context, input *ec2.DeleteSubnetInput, opts ...func(*ec2.Options)) (*ec2.DeleteSubnetOutput, error)
	ModifySubnetAttribute(ctx context.Context, input *ec2.ModifySubnetAttributeInput, opts ...func(*ec2.Options)) (*ec2.ModifySubnetAttributeOutput, error)
	CreateTags(ctx context.Context, input *ec2.CreateTagsInput, opts ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error)
	DeleteTags(ctx context.Context, input *ec2.DeleteTagsInput, opts ...func(*ec2.Options)) (*ec2.DeleteTagsOutput, error)
}

SubnetClient is the external client used for Subnet Custom Resource

func NewSubnetClient

func NewSubnetClient(cfg aws.Config) SubnetClient

NewSubnetClient returns a new client using AWS credentials as JSON encoded data.

type VPCCIDRBlockClient

type VPCCIDRBlockClient interface {
	DescribeVpcs(ctx context.Context, input *ec2.DescribeVpcsInput, opts ...func(*ec2.Options)) (*ec2.DescribeVpcsOutput, error)
	AssociateVpcCidrBlock(ctx context.Context, input *ec2.AssociateVpcCidrBlockInput, opts ...func(*ec2.Options)) (*ec2.AssociateVpcCidrBlockOutput, error)
	DisassociateVpcCidrBlock(ctx context.Context, input *ec2.DisassociateVpcCidrBlockInput, opts ...func(*ec2.Options)) (*ec2.DisassociateVpcCidrBlockOutput, error)
}

VPCCIDRBlockClient is the external client used for VPC CIDR Block Custom Resource

func NewVPCCIDRBlockClient

func NewVPCCIDRBlockClient(cfg awsgo.Config) VPCCIDRBlockClient

NewVPCCIDRBlockClient returns a new client using AWS credentials as JSON encoded data.

type VPCClient

type VPCClient interface {
	CreateVpc(ctx context.Context, input *ec2.CreateVpcInput, opts ...func(*ec2.Options)) (*ec2.CreateVpcOutput, error)
	DeleteVpc(ctx context.Context, input *ec2.DeleteVpcInput, opts ...func(*ec2.Options)) (*ec2.DeleteVpcOutput, error)
	DescribeVpcs(ctx context.Context, input *ec2.DescribeVpcsInput, opts ...func(*ec2.Options)) (*ec2.DescribeVpcsOutput, error)
	DescribeVpcAttribute(ctx context.Context, input *ec2.DescribeVpcAttributeInput, opts ...func(*ec2.Options)) (*ec2.DescribeVpcAttributeOutput, error)
	ModifyVpcAttribute(ctx context.Context, input *ec2.ModifyVpcAttributeInput, opts ...func(*ec2.Options)) (*ec2.ModifyVpcAttributeOutput, error)
	CreateTags(ctx context.Context, input *ec2.CreateTagsInput, opts ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error)
	DeleteTags(ctx context.Context, input *ec2.DeleteTagsInput, opts ...func(*ec2.Options)) (*ec2.DeleteTagsOutput, error)
	ModifyVpcTenancy(ctx context.Context, input *ec2.ModifyVpcTenancyInput, opts ...func(*ec2.Options)) (*ec2.ModifyVpcTenancyOutput, error)
}

VPCClient is the external client used for VPC Custom Resource

func NewVPCClient

func NewVPCClient(cfg aws.Config) VPCClient

NewVPCClient returns a new client using AWS credentials as JSON encoded data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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