aws

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWS_ACCESS_KEY_ID     string = "AWS_ACCESS_KEY_ID"
	AWS_SECRET_ACCESS_KEY string = "AWS_SECRET_ACCESS_KEY"
)

Variables

This section is empty.

Functions

func DescribeEcsClusters added in v0.1.4

func DescribeEcsClusters(ecsClient *ecs.Client, clusters []string) (ecs.DescribeClustersOutput, error)

func DescribeEcsServices added in v0.1.4

func DescribeEcsServices(ecsClient *ecs.Client, clusterName string, serviceArns []string) (ecs.DescribeServicesOutput, error)

func DescribeEcsTasksForService added in v0.1.4

func DescribeEcsTasksForService(ecsClient *ecs.Client, clusterName, serviceName string) (*ecs.DescribeTasksOutput, error)

func DownloadObject

func DownloadObject(cfg aws.Config, bucketName, key string) string

func GetAllRegions

func GetAllRegions() []string

func GetBuckEncryption

func GetBuckEncryption(cfg aws.Config, bucketName string) *types.ServerSideEncryptionConfiguration

func GetBuckLifecycle

func GetBuckLifecycle(cfg aws.Config, bucketName string) *s3.GetBucketLifecycleConfigurationOutput

func GetCfg added in v0.1.2

func GetCfg(cfgInput AWSConfigInput) (awsV2.Config, error)

func GetCfgUsingEnvVariables added in v0.1.2

func GetCfgUsingEnvVariables(profile, region string) (awsV2.Config, error)

func GetClusterJSONResponse added in v0.1.4

func GetClusterJSONResponse(cfg aws.Config, clusterName string) (string, error)

func GetECSContainerJsonResponse added in v0.1.4

func GetECSContainerJsonResponse(cfg aws.Config, clusterName, taskId, runtimeId string) (string, error)

func GetEcsServiceJSONResponse added in v0.1.4

func GetEcsServiceJSONResponse(cfg aws.Config, clusterName, serviceName string) (string, error)

func GetInfoAboutBucket

func GetInfoAboutBucket(cfg aws.Config, bucketName string, delimiter string, prefix string) (*s3.ListObjectsV2Output, error)

func GetLocalstackCfg added in v0.1.3

func GetLocalstackCfg(region string) (awsV2.Config, error)

func GetLocastackEndpoint added in v0.1.4

func GetLocastackEndpoint() string

func GetMessageFromQueue

func GetMessageFromQueue(cfg awsV2.Config, queueUrl string) (*sqs.ReceiveMessageOutput, error)

func GetPreSignedUrl

func GetPreSignedUrl(cfg aws.Config, bucketName, key string) string

func GetProfiles added in v0.1.1

func GetProfiles() (profiles []string, err error)

func GetSingleAMI

func GetSingleAMI(cfg aws.Config, amiId string) string

func GetSingleInstance

func GetSingleInstance(cfg aws.Config, insId string) string

func GetSingleSecGrp

func GetSingleSecGrp(cfg aws.Config, sgId string) string

func GetSingleSnapshot

func GetSingleSnapshot(cfg aws.Config, sId string) string

func GetSingleSubnet

func GetSingleSubnet(cfg aws.Config, sId string) string

func GetSingleVPC

func GetSingleVPC(cfg aws.Config, vpcId string) string

func GetSingleVolume

func GetSingleVolume(cfg aws.Config, vId string) string

func GetTaskIDFromArn added in v0.1.4

func GetTaskIDFromArn(taskArn string) string

func GetTaskJSONResponse added in v0.1.4

func GetTaskJSONResponse(cfg aws.Config, clusterName, taskArn string) (string, error)

func ListContainersForTask added in v0.1.4

func ListContainersForTask(cfg aws.Config, clusterName, taskId string) ([]types.Container, error)

Types

type AWSConfigInput added in v0.1.4

type AWSConfigInput struct {
	Profile, Region string
	UseLocalStack   bool
	UseEnvVariables bool
}

type BucketInfo

type BucketInfo struct {
	EncryptionConfiguration types.ServerSideEncryptionConfiguration
	LifeCycleRules          []types.LifecycleRule
}

type BucketResp

type BucketResp struct {
	BucketName   string
	CreationTime string
	Region       string
}

func ListBuckets

func ListBuckets(cfg aws.Config) ([]BucketResp, error)

type EBSResp

type EBSResp struct {
	VolumeId         string
	Size             string
	VolumeType       string
	State            string
	AvailabilityZone string
	Snapshot         string
	CreationTime     string
}

func GetVolumes

func GetVolumes(cfg aws.Config) ([]EBSResp, error)

type EC2Resp

type EC2Resp struct {
	Instance         ec2.Instance
	InstanceId       string
	InstanceType     string
	AvailabilityZone string
	InstanceState    string
	PublicDNS        string
	MonitoringState  string
	LaunchTime       string
}

func GetInstances

func GetInstances(cfg aws.Config) ([]EC2Resp, error)

type EcsClusterResp added in v0.1.4

type EcsClusterResp struct {
	ClusterName       string
	Status            string
	ClusterArn        string
	RunningTasksCount string
}

func ListEcsClusters added in v0.1.4

func ListEcsClusters(cfg aws.Config) ([]EcsClusterResp, error)

type EcsServiceResp added in v0.1.4

type EcsServiceResp struct {
	ServiceName    string
	Status         string
	DesiredCount   string
	RunningCount   string
	TaskDefinition string
	ServiceArn     string
}

func ListEcsServices added in v0.1.4

func ListEcsServices(cfg aws.Config, clusterName string) ([]EcsServiceResp, error)

type EcsTaskResp added in v0.1.4

type EcsTaskResp struct {
	TaskId string
	*ecsTypes.Task
}

func ListEcsTasks added in v0.1.4

func ListEcsTasks(cfg aws.Config, clusterName, serviceName string) ([]EcsTaskResp, error)

type IAMUSerGroupPolicyResponse

type IAMUSerGroupPolicyResponse struct {
	PolicyArn  string
	PolicyName string
}

func GetPoliciesOfGrp

func GetPoliciesOfGrp(cfg awsV2.Config, grpName string) []IAMUSerGroupPolicyResponse

type IAMUSerGroupResp

type IAMUSerGroupResp struct {
	GroupId      string
	GroupName    string
	ARN          string
	CreationTime string
}

func GetUserGroups

func GetUserGroups(cfg awsV2.Config) []IAMUSerGroupResp

type IAMUSerPolicyResponse

type IAMUSerPolicyResponse struct {
	PolicyArn  string
	PolicyName string
}

func GetPoliciesOfUser

func GetPoliciesOfUser(cfg awsV2.Config, usrName string) []IAMUSerPolicyResponse

If a user belong to a Group then we can't see the user's attached policy here, their policies are governed on the top of the group

type IAMUSerResp

type IAMUSerResp struct {
	UserId       string
	UserName     string
	ARN          string
	CreationTime string
}

func GetGroupUsers

func GetGroupUsers(cfg awsV2.Config, grpName string) []IAMUSerResp

func GetUsers

func GetUsers(cfg awsV2.Config) []IAMUSerResp

type IamRolePolicyResponse

type IamRolePolicyResponse struct {
	PolicyArn  string
	PolicyName string
}

func GetPoliciesOfRoles

func GetPoliciesOfRoles(cfg awsV2.Config, roleName string) []IamRolePolicyResponse

type IamRoleResp

type IamRoleResp struct {
	RoleId       string
	RoleName     string
	ARN          string
	CreationTime string
}

func GetIamRoles

func GetIamRoles(cfg awsV2.Config) []IamRoleResp

type ImageResp

type ImageResp struct {
	ImageId       string
	OwnerId       string
	ImageLocation string
	Name          string
	ImageType     string
}

func GetAMIs

func GetAMIs(cfg aws.Config) []ImageResp

type LambdaResp

type LambdaResp struct {
	FunctionName string
	Description  string
	Role         string
	FunctionArn  string
	CodeSize     string
	LastModified string
}

func GetAllLambdaFunctions

func GetAllLambdaFunctions(cfg awsV2.Config) ([]LambdaResp, error)

type Presigner added in v0.1.2

type Presigner struct {
	PresignClient *s3.PresignClient
}

type Profiles added in v0.1.2

type Profiles struct {
	Data  []string
	Error string
}

type S3Object

type S3Object struct {
	SizeInBytes                                        int64
	Name, ObjectType, LastModified, Size, StorageClass string
}

type SGResp added in v0.1.2

type SGResp struct {
	GroupId     string
	GroupName   string
	Description string
	OwnerId     string
	VpcId       string
}

func GetSecGrps

func GetSecGrps(cfg aws.Config) ([]SGResp, error)

type SQSResp

type SQSResp struct {
	Name              string
	URL               string
	Type              string
	Created           string
	MessagesAvailable string
	Encryption        string
	MaxMessageSize    string
}

func GetAllQueues

func GetAllQueues(cfg awsV2.Config) ([]SQSResp, error)

type Snapshot

type Snapshot struct {
	SnapshotId string
	OwnerId    string
	VolumeId   string
	VolumeSize string
	StartTime  string
	State      string
}

func GetSnapshots

func GetSnapshots(cfg aws.Config) []Snapshot

Snapshots are region specific Localstack does have default snapshots, so we can see some of the snapshots that we never created

type SubnetResp

type SubnetResp struct {
	SubnetId         string
	OwnerId          string
	CidrBlock        string
	AvailabilityZone string
	State            string
}

func GetSubnets

func GetSubnets(cfg aws.Config, vpcId string) []SubnetResp

type VpcResp

type VpcResp struct {
	VpcId           string
	OwnerId         string
	CidrBlock       string
	InstanceTenancy string
	State           string
}

func GetVPCs

func GetVPCs(cfg aws.Config) []VpcResp

Jump to

Keyboard shortcuts

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