aws

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 36 Imported by: 0

Documentation

Overview

Copyright (C) 2021-2023, Kubefirst

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

Index

Constants

View Source
const (
	CloudProvider = "aws"
)

Variables

This section is empty.

Functions

func NewAws

func NewAws() aws.Config

NewAws instantiates a new AWS configuration

func NewAwsV2 added in v0.1.25

func NewAwsV2(region string) aws.Config

func NewAwsV3 added in v0.1.25

func NewAwsV3(region string, accessKeyID string, secretAccessKey string, sessionToken string) aws.Config

func NewClientset added in v0.1.25

func NewClientset(cluster *eks.Cluster) (*kubernetes.Clientset, error)

func NewRestConfig added in v0.1.25

func NewRestConfig(cluster *eks.Cluster) (*rest.Config, error)

Types

type ARecord added in v0.1.25

type ARecord struct {
	Name        string
	RecordType  string
	TTL         *int64
	AliasTarget *route53Types.AliasTarget
}

ARecord stores Route53 A record data

type AWSARecord

type AWSARecord struct {
	Name        string
	RecordType  string
	TTL         *int64
	AliasTarget *route53Types.AliasTarget
}

AWSARecord stores Route53 A record data

type AWSConfiguration

type AWSConfiguration struct {
	Config aws.Config
}

AWSConfiguration stores session data to organize all AWS functions into a single struct

var Conf AWSConfiguration = AWSConfiguration{
	Config: NewAws(),
}

Create a single configuration instance to act as an interface to the AWS client

func (*AWSConfiguration) CheckAvailabilityZones added in v0.1.25

func (conf *AWSConfiguration) CheckAvailabilityZones(region string) (bool, error)

CheckAvailabilityZones determines whether or not an aws region is compatible with the minimum availability zone requirement specified by consumption of aws Terraform modules

func (*AWSConfiguration) CreateBucket added in v0.1.25

func (conf *AWSConfiguration) CreateBucket(bucketName string) (*s3.CreateBucketOutput, error)

CreateBucket

func (*AWSConfiguration) DeleteBucket added in v0.1.25

func (conf *AWSConfiguration) DeleteBucket(bucketName string) error

DeleteBucket

func (*AWSConfiguration) DeleteEKSSecurityGroups added in v0.1.25

func (conf *AWSConfiguration) DeleteEKSSecurityGroups(region string, eksClusterName string) error

DeleteEKSSecurityGroups deletes security groups associated with an EKS cluster

func (*AWSConfiguration) DeleteElasticLoadBalancer added in v0.1.25

func (conf *AWSConfiguration) DeleteElasticLoadBalancer(elbdp ElbDeletionParameters) error

DeleteElasticLoadBalancer deletes an Elastic Load Balancer associated with an EKS cluster

func (*AWSConfiguration) DeleteSecurityGroup added in v0.1.25

func (conf *AWSConfiguration) DeleteSecurityGroup(region string, sgid string) error

DeleteSecurityGroup deletes a security group

func (*AWSConfiguration) GetCallerIdentity added in v0.1.25

func (conf *AWSConfiguration) GetCallerIdentity() (*sts.GetCallerIdentityOutput, error)

func (*AWSConfiguration) GetECRAuthToken added in v0.1.25

func (conf *AWSConfiguration) GetECRAuthToken() (string, error)

func (*AWSConfiguration) GetHostedZone added in v0.1.25

func (conf *AWSConfiguration) GetHostedZone(hostedZoneID string) (*route53.GetHostedZoneOutput, error)

GetHostedZone returns an object detailing a hosted zone

func (*AWSConfiguration) GetHostedZoneID

func (conf *AWSConfiguration) GetHostedZoneID(hostedZoneName string) (string, error)

GetHostedZoneID returns the ID of a hosted zone if valid

func (*AWSConfiguration) GetHostedZoneNameServers added in v0.1.25

func (conf *AWSConfiguration) GetHostedZoneNameServers(domainName string) (bool, []string, error)

GetHostedZoneNameServers returns nameservers for a hosted zone if available for private zones, nothing is returned

func (*AWSConfiguration) GetHostedZones added in v0.1.25

func (conf *AWSConfiguration) GetHostedZones() ([]string, error)

GetHostedZone returns an object detailing a hosted zone

func (*AWSConfiguration) GetIamRole added in v0.1.25

func (conf *AWSConfiguration) GetIamRole(roleName string) (*iam.GetRoleOutput, error)

func (*AWSConfiguration) GetKmsKeyID added in v0.1.25

func (conf *AWSConfiguration) GetKmsKeyID(keyAlias string) (string, error)

func (*AWSConfiguration) GetLoadBalancersForDeletion added in v0.1.25

func (conf *AWSConfiguration) GetLoadBalancersForDeletion(eksClusterName string) ([]ElbDeletionParameters, error)

GetLoadBalancersForDeletion gets all load balancers and returns details for a load balancer associated with the target EKS cluster

func (*AWSConfiguration) GetRegions added in v0.1.25

func (conf *AWSConfiguration) GetRegions(region string) ([]string, error)

GetRegions lists all available regions

func (*AWSConfiguration) GetServiceQuotas added in v0.1.25

func (conf *AWSConfiguration) GetServiceQuotas(services []string) (map[string][]QuotaDetailResponse, error)

GetServiceQuotas

func (*AWSConfiguration) ListBuckets added in v0.1.25

func (conf *AWSConfiguration) ListBuckets() (*s3.ListBucketsOutput, error)

func (*AWSConfiguration) ListCompatibleRegions added in v0.1.25

func (conf *AWSConfiguration) ListCompatibleRegions() ([]string, error)

ListCompatibleRegions returns aws regions that have the minimum number of availability zones required to support the kubefirst platform

func (*AWSConfiguration) ListInstanceSizesForRegion added in v0.1.25

func (conf *AWSConfiguration) ListInstanceSizesForRegion() ([]string, error)

func (*AWSConfiguration) ListQuotas added in v0.1.25

func (*AWSConfiguration) Route53AlterResourceRecord

Route53AlterResourceRecord simplifies manipulation of Route53 records

func (*AWSConfiguration) Route53ListARecords

func (conf *AWSConfiguration) Route53ListARecords(hostedZoneId string) ([]AWSARecord, error)

Route53ListARecords retrieves all DNS A records for a hosted zone

func (*AWSConfiguration) Route53ListTXTRecords

func (conf *AWSConfiguration) Route53ListTXTRecords(hostedZoneId string) ([]AWSTXTRecord, error)

Route53ListTXTRecords retrieves all DNS TXT record type for a hosted zone

func (*AWSConfiguration) TestHostedZoneLiveness

func (conf *AWSConfiguration) TestHostedZoneLiveness(hostedZoneName string) bool

TestHostedZoneLiveness checks Route53 for the liveness test record

func (*AWSConfiguration) TestHostedZoneLivenessWithTxtRecords added in v0.1.25

func (conf *AWSConfiguration) TestHostedZoneLivenessWithTxtRecords(hostedZoneName string) (bool, error)

TestHostedZoneLivenessWithTxtRecords determines whether or not a target hosted zone is initialized and ready to accept records

type AWSRoute53AlterResourceRecord

type AWSRoute53AlterResourceRecord struct {
	// contains filtered or unexported fields
}

type AWSTXTRecord

type AWSTXTRecord struct {
	Name          string
	Value         string
	SetIdentifier *string
	Weight        *int64
	TTL           int64
}

AWSTXTRecord stores Route53 TXT record data

type ElbDeletionParameters added in v0.1.25

type ElbDeletionParameters struct {
	ElbName                 string
	ElbSourceSecurityGroups []string
}

ElbDeletionParameters describes an Elastic Load Balancer name and source security group to delete

type ElbTags added in v0.1.25

type ElbTags struct {
	Key   string
	Value string
}

ElbTags describes a pair of tags assigned to an Elastic Load Balancer

type QuotaDetailResponse added in v0.1.25

type QuotaDetailResponse struct {
	QuotaName  string
	QuotaValue float64
}

type TXTRecord added in v0.1.25

type TXTRecord struct {
	Name          string
	Value         string
	SetIdentifier *string
	Weight        *int64
	TTL           int64
}

Jump to

Keyboard shortcuts

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