myaws

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

filepath: /Users/go-sujun/aws-risp/pkg/myaws/myaws.go

Index

Constants

View Source
const (
	// DefaultRegion is the default AWS region for API calls
	DefaultRegion = "us-east-1"
)

Constants for AWS regions

Variables

View Source
var (

	// Time range variables for Cost Explorer queries
	Start, End string

	// Default sort parameter for Cost Explorer results
	Sort = "OnDemandCost"
)

Global variables for AWS services configuration

Functions

This section is empty.

Types

type MyAWS added in v0.0.5

type MyAWS struct {

	// Map of configured AWS services
	SVCs map[string]Service
	// contains filtered or unexported fields
}

MyAWS represents the main AWS client with configured services

func New added in v0.0.3

func New() *MyAWS

New creates a new MyAWS instance with initialized AWS configuration

func (*MyAWS) AddAllService added in v0.0.5

func (m *MyAWS) AddAllService()

AddAllService adds all configured AWS services to the MyAWS instance

func (*MyAWS) AddService added in v0.0.5

func (m *MyAWS) AddService(s string)

AddService adds a specific AWS service to the MyAWS instance The service is identified by its short name (e.g., "ec2", "rds")

func (*MyAWS) GetProducts added in v0.0.6

func (m *MyAWS) GetProducts()

func (*MyAWS) GetReservationCoverage added in v0.0.5

func (m *MyAWS) GetReservationCoverage()

GetReservationCoverage retrieves and displays AWS reservation coverage for configured services

func (*MyAWS) GetReservationUtilization added in v0.0.5

func (m *MyAWS) GetReservationUtilization()

GetReservationUtilization retrieves and displays AWS reservation utilization for configured services

type Service added in v0.0.3

type Service struct {
	// The service filter string used in Cost Explorer API
	ServiceFilter string
	// Keys used for grouping results in Cost Explorer API
	GroupByKey []string
	// Group definitions for Cost Explorer API calls
	GroupDefinitions []types.GroupDefinition
	// Attributes to display in the output
	Attributes []string
	// Coverage metrics to display in the output
	Coverage []string
}

Service represents an AWS service configuration for Cost Explorer queries

Jump to

Keyboard shortcuts

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