ec2

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 19 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 (
	// 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 added in v0.17.0

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

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

func CompareTags added in v0.17.0

func CompareTags(tags []v1beta1.Tag, ec2Tags []ec2types.Tag) bool

CompareTags compares arrays of v1beta1.Tag and ec2types.Tag

func CreateRTPatch added in v0.11.0

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

func DiffPermissions added in v0.21.2

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 added in v0.18.0

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 added in v0.18.0

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

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

func FromTimePtr added in v0.20.0

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

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

func GenerateAddressObservation added in v0.18.0

func GenerateAddressObservation(address ec2types.Address) v1beta1.AddressObservation

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

func GenerateCPUOptionsRequest added in v0.20.0

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

GenerateCPUOptionsRequest converts a CpuOptions into a internal CpuOptionsRequest

func GenerateCapacityReservationSpecResponse added in v0.20.0

GenerateCapacityReservationSpecResponse converts a ec2.CapacityReservationSpecificationResponse into an internal CapacityReservationSpecificationResponse

func GenerateDescribeInstancesByExternalTags added in v0.20.0

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 added in v0.20.0

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

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

func GenerateEC2CPUOptions added in v0.20.0

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

GenerateEC2CPUOptions converts an internal CPUOptionsRequest into a ec2.CpuOptionsRequest

func GenerateEC2CapacityReservationSpecs added in v0.20.0

GenerateEC2CapacityReservationSpecs coverts an internal CapacityReservationSpecification into a ec2.CapacityReservationSpecification

func GenerateEC2CreditSpec added in v0.20.0

GenerateEC2CreditSpec converts an internal CreditSpecificationRequest into a ec2.CreditSpecificationRequest

func GenerateEC2ElasticGPUSpecs added in v0.20.0

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

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

func GenerateEC2ElasticInferenceAccelerators added in v0.20.0

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

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

func GenerateEC2HibernationOptions added in v0.20.0

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

GenerateEC2HibernationOptions converts an internal HibernationOptionsRequest into a ec2.HibernationOptionsRequest

func GenerateEC2IAMInstanceProfileSpecification added in v0.20.0

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

GenerateEC2IAMInstanceProfileSpecification converts an internal IamInstanceProfileSpecification into a ec2.IamInstanceProfileSpecification

func GenerateEC2InstanceIPV6Addresses added in v0.20.0

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

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

func GenerateEC2InstanceMarketOptionsRequest added in v0.20.0

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

GenerateEC2InstanceMarketOptionsRequest converts an internal InstanceMarketOptionsRequest into a ec2.InstanceMarketOptionsRequest

func GenerateEC2InstanceMetadataOptionsRequest added in v0.20.0

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

GenerateEC2InstanceMetadataOptionsRequest converts an internal InstanceMetadataOptionsRequest into a ec2.InstanceMetadataOptionsRequest

func GenerateEC2InstanceNetworkInterfaceSpecs added in v0.20.0

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

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

func GenerateEC2LaunchTemplateSpec added in v0.20.0

GenerateEC2LaunchTemplateSpec converts internal LaunchTemplateSpecification into ec2.LaunchTemplateSpecification

func GenerateEC2LicenseConfigurationRequest added in v0.20.0

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

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

func GenerateEC2Monitoring added in v0.20.0

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 added in v0.20.0

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

GenerateEC2Placement converts internal Placement into ec2.Placement

func GenerateEC2PrivateIPAddressSpecs added in v0.20.0

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

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

func GenerateEC2RunInstancesInput added in v0.20.0

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/provider-aws/pull/777#issuecomment-887017783

func GenerateEC2TagSpecifications added in v0.20.0

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

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

func GenerateEC2Tags added in v0.17.0

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

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

func GenerateElasticGPUAssociation added in v0.20.0

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

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

func GenerateElasticInferenceAcceleratorAssociation added in v0.20.0

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

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

func GenerateGroupIdentifiers added in v0.20.0

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

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

func GenerateHibernationOptionsRequest added in v0.20.0

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

GenerateHibernationOptionsRequest converts a ec2.HibernationOptions into a internal HibernationOptionsRequest

func GenerateIAMInstanceProfile added in v0.20.0

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

GenerateIAMInstanceProfile converts a ec2.IamInstanceProfile into a internal IamInstanceProfile

func GenerateIGObservation added in v0.11.0

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

func GenerateInstanceBlockDeviceMappings added in v0.20.0

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

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

func GenerateInstanceIPV6Addresses added in v0.20.0

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

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

func GenerateInstanceMetadataOptionsRequest added in v0.20.0

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

GenerateInstanceMetadataOptionsRequest converts an ec2.InstanceMetadataOptionsResponse into an internal InstanceMetadataOptionsRequest

func GenerateInstanceNetworkInterface added in v0.20.0

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

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

func GenerateInstanceObservation added in v0.20.0

func GenerateInstanceObservation(i types.Instance) manualv1alpha1.InstanceObservation

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

func GenerateInstancePrivateIPAddresses added in v0.20.0

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

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

func GenerateLicenseConfigurationRequest added in v0.20.0

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

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

func GenerateMonitoring added in v0.20.0

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

GenerateMonitoring converts a ec2.Monitoring into a internal Monitoring

func GenerateNATGatewayObservation added in v0.13.0

func GenerateNATGatewayObservation(nat ec2types.NatGateway) v1beta1.NATGatewayObservation

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

func GeneratePlacement added in v0.20.0

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

GeneratePlacement converts ec2.Placement into an internal Placement

func GenerateProductCodes added in v0.20.0

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

GenerateProductCodes converts ec2.ProductCode into an internal ProductCode

func GenerateRTObservation added in v0.11.0

func GenerateRTObservation(rt ec2types.RouteTable) v1beta1.RouteTableObservation

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

func GenerateSGObservation added in v0.11.0

func GenerateSGObservation(sg ec2types.SecurityGroup) v1beta1.SecurityGroupObservation

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

func GenerateStateReason added in v0.20.0

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

GenerateStateReason converts ec2.StateReason into an internal StateReason

func GenerateSubnetObservation added in v0.11.0

func GenerateSubnetObservation(subnet ec2types.Subnet) v1beta1.SubnetObservation

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

func GenerateTags added in v0.20.0

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

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

func GenerateVpcCIDRBlockObservation added in v0.18.0

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

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

func GenerateVpcObservation added in v0.11.0

func GenerateVpcObservation(vpc ec2types.Vpc) v1beta1.VPCObservation

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

func IsAddressNotFoundErr added in v0.12.0

func IsAddressNotFoundErr(err error) bool

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

func IsAddressUpToDate added in v0.18.0

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 added in v0.18.0

func IsCIDRNotFound(err error) bool

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

func IsIgUpToDate added in v0.11.0

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

func IsInstanceNotFoundErr added in v0.20.0

func IsInstanceNotFoundErr(err error) bool

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

func IsInstanceUpToDate added in v0.20.0

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 added in v0.11.0

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 added in v0.13.0

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 added in v0.11.0

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 added in v0.11.0

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 added in v0.12.0

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 added in v0.11.0

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 added in v0.18.0

func IsVpcCidrDeleting(observation v1beta1.VPCCIDRBlockObservation) bool

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

func IsVpcUpToDate added in v0.11.0

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 added in v0.18.0

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 added in v0.11.0

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 added in v0.20.0

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 added in v0.11.0

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 added in v0.11.0

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 added in v0.11.0

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 added in v0.11.0

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 added in v0.17.0

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

SortRoutes sorts array of Routes on DestinationCIDR

func SortTags added in v0.17.0

func SortTags(tags []v1beta1.Tag, ec2Tags []ec2types.Tag)

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

func ValidateRoutes added in v0.27.0

func ValidateRoutes(route []v1beta1.RouteBeta) error

ValidateRoutes on empty cidrs

Types

type AddressClient added in v0.18.0

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 added in v0.18.0

type CIDRNotFoundError struct{}

CIDRNotFoundError will be raised when there is no Association

func (*CIDRNotFoundError) Error added in v0.18.0

func (r *CIDRNotFoundError) Error() string

Error satisfies the Error interface for CIDRNotFoundError.

type Condition added in v0.20.0

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 added in v0.20.0

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 added in v0.20.0

InstanceClient is the external client used for Instance Custom Resource

func NewInstanceClient added in v0.20.0

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 added in v0.13.0

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 added in v0.13.0

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)
	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 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 added in v0.18.0

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 added in v0.18.0

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