aws

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAWSCommands

func CreateAWSCommands() *cobra.Command

CreateAWSCommands creates the AWS command tree for static commands

func EnsureVPCInternetGatewayAndDefaultRoute added in v0.0.3

func EnsureVPCInternetGatewayAndDefaultRoute(ctx context.Context, opts CLIExecOptions, vpcID string, w io.Writer, run CLIRunner) (string, error)

func EscapeJMES added in v0.0.3

func EscapeJMES(s string) string

func ExtractELBv2SubnetsFromArgs added in v0.0.3

func ExtractELBv2SubnetsFromArgs(args []string) []string

func FindAttachedInternetGatewayForVPC added in v0.0.3

func FindAttachedInternetGatewayForVPC(ctx context.Context, opts CLIExecOptions, vpcID string, run CLIRunner) (string, error)

func GetLLMAnalysisPrompt

func GetLLMAnalysisPrompt(question string) string

GetLLMAnalysisPrompt returns the prompt for LLM to analyze what AWS operations are needed

func MaybeEnsureHTTPSViaCloudFront added in v0.0.3

func MaybeEnsureHTTPSViaCloudFront(ctx context.Context, bindings map[string]string, opts CLIExecOptions, run CLIRunner) error

func ShortStableHash added in v0.0.3

func ShortStableHash(s string) string

func WaitForCloudFrontDistributionDeployed added in v0.0.3

func WaitForCloudFrontDistributionDeployed(ctx context.Context, id, profile string, run CLIRunner) error

Types

type AIProfile

type AIProfile struct {
	Provider   string `mapstructure:"provider"`
	AWSProfile string `mapstructure:"aws_profile"`
	Model      string `mapstructure:"model"`
	Region     string `mapstructure:"region"`
	APIKeyEnv  string `mapstructure:"api_key_env"`
}

AIProfile represents an AI provider configuration

func GetAIProfile

func GetAIProfile(providerName string) (*AIProfile, error)

GetAIProfile returns the AI configuration for the given provider name

type BackendAWSCredentials added in v0.0.3

type BackendAWSCredentials struct {
	AccessKeyID     string
	SecretAccessKey string
	Region          string
	SessionToken    string
}

BackendAWSCredentials represents AWS credentials from the backend

type CLIExecOptions added in v0.0.3

type CLIExecOptions struct {
	Profile   string
	Region    string
	Writer    io.Writer
	Destroyer bool
}

type CLIRunner added in v0.0.3

type CLIRunner func(ctx context.Context, args []string, stdinBytes []byte, w io.Writer) (string, error)

type Client

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

func NewClient

func NewClient(ctx context.Context) (*Client, error)

func NewClientWithCredentials added in v0.0.3

func NewClientWithCredentials(ctx context.Context, creds *BackendAWSCredentials, debug bool) (*Client, error)

NewClientWithCredentials creates a new AWS client using explicit credentials from the backend

func NewClientWithProfile

func NewClientWithProfile(ctx context.Context, profile string) (*Client, error)

func NewClientWithProfileAndDebug

func NewClientWithProfileAndDebug(ctx context.Context, profile string, debug bool) (*Client, error)

func (*Client) ExecCLI

func (c *Client) ExecCLI(ctx context.Context, args []string) (string, error)

ExecCLI exposes the CLI helper to other packages.

func (*Client) ExecuteOperation

func (c *Client) ExecuteOperation(ctx context.Context, toolName string, input map[string]interface{}) (string, error)

ExecuteOperation exposes the default single-operation execution helper.

func (*Client) ExecuteOperations

func (c *Client) ExecuteOperations(ctx context.Context, operations []LLMOperation) (string, error)

ExecuteOperations exposes the default batch execution helper.

func (*Client) ExecuteOperationsConcurrently

func (c *Client) ExecuteOperationsConcurrently(ctx context.Context, operations []LLMOperation, aiProfile string) (string, error)

ExecuteOperationsConcurrently executes multiple AWS operations concurrently for LLM processing

func (*Client) ExecuteOperationsWithAWSProfile

func (c *Client) ExecuteOperationsWithAWSProfile(ctx context.Context, operations []LLMOperation, awsProfile, region string) (string, error)

ExecuteOperationsWithAWSProfile executes multiple AWS operations concurrently using a direct AWS profile

func (*Client) GetAIProfiles

func (c *Client) GetAIProfiles() map[string]AIProfile

GetAIProfiles returns all AI profiles from the configuration

func (*Client) GetRecentAlarms

func (c *Client) GetRecentAlarms(ctx context.Context) (string, error)

GetRecentAlarms gets recent CloudWatch alarm information

func (*Client) GetRelevantContext

func (c *Client) GetRelevantContext(ctx context.Context, question string) (string, error)

type LLMAnalysis

type LLMAnalysis struct {
	Operations []LLMOperation `json:"operations"`
	Analysis   string         `json:"analysis"`
}

LLMAnalysis represents the LLM's analysis of what AWS operations are needed

type LLMOperation

type LLMOperation struct {
	Operation  string                 `json:"operation"`
	Reason     string                 `json:"reason"`
	Parameters map[string]interface{} `json:"parameters"`
}

LLMOperation represents an AWS operation requested by the LLM

type LLMOperationResult

type LLMOperationResult struct {
	Operation string
	Result    string
	Error     error
	Index     int
}

LLMOperationResult represents the result of an AWS operation for LLM processing

Jump to

Keyboard shortcuts

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