Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Functions ¶
func PopulateTagFields ¶ added in v0.0.38
func PopulateTagFields(tags []types.Tag) ([]tablewriter.Field, error)
func WaitForStatus ¶ added in v0.7.0
func WaitForStatus(ctx context.Context, config WaitConfig) (string, error)
WaitForStatus polls StatusFunc at PollInterval until IsTerminal returns true or MaxWait is exceeded. Returns the final status.
Types ¶
type BaseService ¶
func LoadDefaultConfig ¶
type ResourceInfo ¶ added in v0.7.0
ResourceInfo describes an AWS resource type identified by its ID prefix.
func IdentifyResource ¶ added in v0.7.0
func IdentifyResource(id string) *ResourceInfo
IdentifyResource returns the service and resource type for a given AWS resource ID based on its prefix. Returns nil for unrecognised IDs.
type ResourceURI ¶ added in v0.7.0
type ResourceURI struct {
Service string
ResourceType string
Resource string
Params map[string]string
}
ResourceURI represents a parsed protocol-style resource identifier. e.g. "rds://my-database" → {Service: "rds", ResourceType: "instance", Resource: "my-database"} e.g. "ecs://service/my-cluster/my-svc" → {Service: "ecs", ResourceType: "service", Resource: "my-svc", Params: {"cluster": "my-cluster"}}
func ParseResourceURI ¶ added in v0.7.0
func ParseResourceURI(input string) (*ResourceURI, error)
ParseResourceURI parses a protocol-style resource identifier.
Supported formats:
- "ec2://i-xxx" → EC2 instance
- "ec2://volume/vol-xxx" → EC2 volume
- "rds://my-database" → RDS instance (default type)
- "rds://cluster/my-cluster" → RDS cluster
- "cf://my-stack" → CloudFormation stack
- "elasticache://my-cluster" → ElastiCache cluster
- "elb://my-lb" → ELB load balancer
- "vpc://nat-gateway/nat-xxx" → VPC NAT gateway
- "ecs://service/my-cluster/my-svc" → ECS service (cluster extracted as param)
- "ecs://task/my-cluster/task-id" → ECS task (cluster extracted as param)
- "i-xxx" → EC2 instance (detected by prefix)
- "nat-xxx" → VPC NAT gateway (detected by prefix)
Returns an error if the input cannot be resolved to a service.
type Tag ¶ added in v0.0.38
func NormalizeTags ¶ added in v0.0.35
NormalizeTags turns the provided tags into a map