aws

package
v0.0.0-...-892e304 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: BSD-3-Clause Imports: 44 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIAMRoleToInstanceProfile

func AddIAMRoleToInstanceProfile(roleName, instanceProfileName string, dryRun bool) error

func AssociateRouteTable

func AssociateRouteTable(routeTableSearch, subnetSearch string, dryRun bool) error

func AttachIAMRolePolicy

func AttachIAMRolePolicy(roleName, policy string, dryRun bool) error

AttachIAMRolePolicy attaches an IAM Role to a policy

func AttachIAMRolePolicyByARN

func AttachIAMRolePolicyByARN(roleName, policyARN string, dryRun bool) error

func AttachInternetGateway

func AttachInternetGateway(gatewaySearch, vpcSearch string, dryRun bool) error

func AttachVolume

func AttachVolume(volumeSearch, instanceSearch string, dryRun bool) error

AttachVolume attaches an EBS Volume to an Instance

func CheckCreds

func CheckCreds() (bool, string)

CheckCreds Runs before everything, verifying we have proper authentication or asking us to set some up

func CopyImage

func CopyImage(search, region string, dryRun bool) error

CopyImage copies an existing AMI to another region

func CopySnapshot

func CopySnapshot(search, region string, dryRun bool) error

CopySnapshot copies a Snapshot to another region

func CreateAddress

func CreateAddress(region, domain string, dryRun bool) (string, error)

CreateAddress creates a new Elastic IP Address in the given region and domain

func CreateAlarm

func CreateAlarm(class string, region string, dryRun bool) error

CreateAlarm creates a new CloudWatch Alarm given the provided class and region

func CreateAutoScaleAlarms

func CreateAutoScaleAlarms(class string, asgSearch string, dryRun bool) error

CreateAutoScaleAlarm creates a new CloudWatch Alarm given the provided class

func CreateAutoScaleGroups

func CreateAutoScaleGroups(class string, dryRun bool) (err error)

CreateAutoScaleGroups creates a new AutoScale Group of the given class

func CreateIAMInstanceProfile

func CreateIAMInstanceProfile(instanceProfileName, path string, dryRun bool) (string, error)

CreateIAMInstanceProfile creates a new IAM Instance Profile with the provided name, and optional path

func CreateIAMPolicy

func CreateIAMPolicy(policyName, policyDocument, path, description string, dryRun bool) (string, error)

CreateIAMUser creates a new IAM User with the provided username and path

func CreateIAMRole

func CreateIAMRole(roleName, rolePolicyDocument, path string, dryRun bool) (string, error)

CreateIAMRole creates a new IAM Role with the provided name, policyDocument, and optional path

func CreateIAMUser

func CreateIAMUser(username, path string) error

CreateIAMUser creates a new IAM User with the provided username and path

func CreateImage

func CreateImage(class, search string, dryRun bool) error

CreateImage creates a new Amazon Machine Image from an instance matching the provided search term. It assigns the Image the class and name that was provided

func CreateInternetGateway

func CreateInternetGateway(name, region string, dryRun bool) (string, error)

CreateInternetGateway creates a new VPC Internet Gateway

func CreateKeyPair

func CreateKeyPair(class, region string, dryRun bool) error

CreateKeyPair creates a KeyPair of a specified class in the specified region

func CreateLaunchConfigurations

func CreateLaunchConfigurations(class string, dryRun bool) (err error)

CreateLaunchConfigurations creates a new Launch Configuration of a given class

func CreateLoadBalancer

func CreateLoadBalancer(class, region string, dryRun bool) error

func CreateNatGateway

func CreateNatGateway(name, allocationId, subnetId, region string, dryRun bool) (string, error)

func CreateResourceRecord

func CreateResourceRecord(name, value string, ttl string, force, private, dryRun bool) error

CreateResourceRecord creates an AWS Route53 Resource Record

func CreateRouteTable

func CreateRouteTable(name, vpcSearch string, dryRun bool) (string, error)

CreateRouteTable creates a new VPC Route Table

func CreateScalingPolicy

func CreateScalingPolicy(class, asgSearch string, dryRun bool) error

CreateScalingPolicy creates a new Scaling Policy given the provided class, and region

func CreateSecurityGroup

func CreateSecurityGroup(class, region, vpc string, dryRun bool) error

CreateSecurityGroup creates a new Security Group based on the provided class, region, and VPC ID

func CreateSimpleDBDomain

func CreateSimpleDBDomain(domain, region string) error

CreateSimpleDBDomain creates a new SimpleDB Domain

func CreateSnapshot

func CreateSnapshot(class, search string, waitFlag, forceYes, dryRun bool) error

CreateSnapshot creates a new EBS Snapshot

func CreateSubnet

func CreateSubnet(class, name, vpcSearch, ip, az string, dryRun bool) error

CreateSubnet creates a new VPC Subnet

func CreateVolume

func CreateVolume(class, name, az string, dryRun bool) error

CreateVolume creates a new EBS Volume

func CreateVpc

func CreateVpc(class, name, ip, region string, dryRun bool) error

CreateVpc creates a new VPC

func DeleteAddresses

func DeleteAddresses(search, region string, dryRun bool) (err error)

DeleteAddresses Deletes one or more Elastic IP Addresses based on the given search term and optional region

func DeleteAutoScaleGroups

func DeleteAutoScaleGroups(name, region string, force, dryRun bool) (err error)

DeleteAutoScaleGroups deletes one or more AutoScale Groups that match the provided name and optionally the provided region

func DeleteIAMInstanceProfiles

func DeleteIAMInstanceProfiles(search string, dryRun bool) error

DeleteIAMInstanceProfiles deletes one or more IAM Instance Profiles that match the provided search term

func DeleteIAMPolicies

func DeleteIAMPolicies(name string, dryRun bool) (err error)

DeleteIAMPolicies deletes one or more IAM Policies that match the provided name

func DeleteIAMRoles

func DeleteIAMRoles(name string, dryRun bool) error

DeleteIAMRoles deletes one or more IAM Roles that match the provided name

func DeleteIAMUsers

func DeleteIAMUsers(username string, dryRun bool) (err error)

DeleteIAMUsers deletes one or more IAM Users that match the provided username

func DeleteImages

func DeleteImages(search, region string, dryRun bool) (err error)

DeleteImages deletes one or more AMI images based on the search and optional region input

func DeleteInternetGateway

func DeleteInternetGateway(gatewaySearch string, dryRun bool) error

func DeleteKeyPairs

func DeleteKeyPairs(name string, dryRun bool) error

DeleteKeyPairs deletes an existing KeyPair from AWS

func DeleteLaunchConfigurations

func DeleteLaunchConfigurations(search, region string, dryRun bool) (err error)

DeleteLaunchConfigurations deletes one or more Launch Configurations that match the provided search term and optional region

func DeleteLoadBalancers

func DeleteLoadBalancers(search, region string, dryRun bool) (err error)

Public function with confirmation terminal prompt

func DeleteResourceRecords

func DeleteResourceRecords(search string, dryRun bool) error

DeleteResourceRecords deletes AWS Route53 Resource Records

func DeleteRouteTable

func DeleteRouteTable(routeTableSearch string, dryRun bool) error

func DeleteScalingPolicies

func DeleteScalingPolicies(search, region string, dryRun bool) (err error)

DeleteScalingPolicies deletes one or more Scaling Policies that match the provided search term and optionally the provided region

func DeleteSecurityGroups

func DeleteSecurityGroups(search, region string, dryRun bool) (err error)

DeleteSecurityGroups deletes one or more Security Groups that match the provided search term and optional region

func DeleteSimpleDBDomains

func DeleteSimpleDBDomains(search, region string) (err error)

DeleteSimpleDBDomains deletes one or more SimpleDB Domains

func DeleteSnapshots

func DeleteSnapshots(search, region string, dryRun bool) (err error)

DeleteSnapshots deletes one or more EBS Snapshots based on the given search term an optional region input.

func DeleteSubnets

func DeleteSubnets(name, region string, dryRun bool) (err error)

DeleteSubnets deletes one or more VPC Subnets based on the given name and optional region input.

func DeleteVolumes

func DeleteVolumes(search, region string, dryRun bool) (err error)

DeleteVolumes deletes one or more EBS Volumes given the search term and optional region input.

func DeleteVpcs

func DeleteVpcs(search, region string, dryRun bool) (err error)

DeleteVpcs deletes one or more VPCs given the search term and optional region input

func DeregisterInstances

func DeregisterInstances(search, region string, dryRun bool) (err error)

DeregisterInstances deregisters an EC2 instances from SSM Inventory

func DetachIAMRolePolicy

func DetachIAMRolePolicy(roleName, policyArn string) error

DetachIAMRolePolicy detaches an IAM Role from a policy

func DetachInternetGateway

func DetachInternetGateway(gatewaySearch string, dryRun bool) error

func DetachVolume

func DetachVolume(volumeSearch, instanceSearch string, force, dryRun bool) error

DetachVolume detaches an EBS Volume from an Instance

func DisassociateRouteTable

func DisassociateRouteTable(routeTableSearch, subnetSearch string, dryRun bool) error

func ExecuteScalingPolicies

func ExecuteScalingPolicies(search, region string, force, dryRun bool) (err error)

ExecuteScalingPolicies

func GetIAMAttachedRolePolicyARNs

func GetIAMAttachedRolePolicyARNs(roleName string) ([]string, error)

GetIAMAttachedRolePolicyNames returns the names of IAM Role Policies that are attached to the provided IAM Role

func GetIAMRolePolicyNames

func GetIAMRolePolicyNames(roleName string) ([]string, error)

GetIAMRolePolicyNames returns the names of IAM Role Policies that are embedded in the provided IAM Role

func GetLaunchConfigurationName

func GetLaunchConfigurationName(region, class string, version int) string

GetLaunchConfigurationName returns the name of a Launch Configuration that matches the provided class and version, while also verifying that it exists

func GetLaunchConfigurationVersion

func GetLaunchConfigurationVersion(class string, previous bool) (int, error)

GetLaunchConfigurationVersion returns the current or previous version of a Launch Configuration that matches the provided class

func GetLoadBalancerTags

func GetLoadBalancerTags(names []string, region string) (map[string][]*elb.Tag, error)

func GetRegionAddresses

func GetRegionAddresses(region string, adrList *Addresses, search string, available bool) error

GetRegionAddresses returns a list of Elastic IP Addresses for a given region into the provided Addresses slice

func GetRegionAlarms

func GetRegionAlarms(region string, alList *Alarms, search string) error

GetRegionAlarms returns a list of CloudWatch Alarms for the given region into the provided Alarms slice

func GetRegionAutoScaleGroups

func GetRegionAutoScaleGroups(region string, asgList *AutoScaleGroups, search string) error

GetRegionAutoScaleGroups returns a list of AutoScale Groups for a given region into the provided AutoScaleGroups slice

func GetRegionBuckets

func GetRegionBuckets(region string, bucketList *Buckets, search string) error

GetRegionBuckets returns a list of Buckets for a given region into the provided Buckets slice

func GetRegionCommandInvocations

func GetRegionCommandInvocations(region string, cmdInvocationsList *CommandInvocations, search string, details bool) error

GetRegionCommandInvocations returns a slice of Command Invocations into the passed CommandInvocations slice based on the provided region and search term, and optional details flag

func GetRegionHostedZones

func GetRegionHostedZones(region string, hostedZoneList *HostedZones, search string) error

GetRegionHostedZones returns a list of HostedZones for a given region into the provided HostedZones slice

func GetRegionImages

func GetRegionImages(region string, imgList *Images, search string, available bool) error

GetRegionImages returns a slice of AMI's into the passed Image slice based on the provided region and search term, and optional available flag

func GetRegionInstances

func GetRegionInstances(region string, instList *Instances, search string, running bool) error

GetRegionInstances returns a slice of Instances into the passed Instances slice based on the provided region and search term, and optional running flag

func GetRegionInternetGateways

func GetRegionInternetGateways(region string, igList *InternetGateways, search string, available bool) error

GetRegionInternetGateways returns a list of a regions InternetGateways that match the provided search term

func GetRegionInventory

func GetRegionInventory(region string, invList *Inventory, search string) error

GetRegionInventory returns a slice of Inventory into the passed Inventories slice based on the provided region and search term, and optional running flag

func GetRegionKeyPairs

func GetRegionKeyPairs(region string, keyList *KeyPairs, search string) error

GetRegionKeyPairs returns a list of KeyPairs for a given region into the provided KeyPairs slice

func GetRegionLaunchConfigurations

func GetRegionLaunchConfigurations(region string, lcList *LaunchConfigs, search string) error

GetRegionLaunchConfigurations returns a slice of Launch Configurations into the provided LaunchConfigs slice that match the region and search term

func GetRegionListWithoutIgnored

func GetRegionListWithoutIgnored() []*ec2.Region

func GetRegionLoadBalancers

func GetRegionLoadBalancers(region string, lbList *LoadBalancers, search string) error

GetRegionLoadBalancers returns a list of Load Balancers in a region into the provided LoadBalancers slice

func GetRegionLoadBalancersV2

func GetRegionLoadBalancersV2(region string, lbList *LoadBalancersV2) error

GetRegionLoadBalancersV2 returns a slice of Application Load Balancers in the region into the provided LoadBalancersV2 slice

func GetRegionResourceRecords

func GetRegionResourceRecords(hostedZoneId, region string, resourceRecordList *ResourceRecords, search string) error

GetRegionResourceRecords returns a list of ResourceRecords for a given region into the provided ResourceRecords slice

func GetRegionRouteTables

func GetRegionRouteTables(region string, rtList *RouteTables, search string) error

GetRegionRouteTables returns a list of a regions RouteTables that match the provided search term

func GetRegionSSMInstances

func GetRegionSSMInstances(region string, ssmInstList *SSMInstances, search string) error

GetRegionSSMInstances returns a slice of Instances into the passed Instances slice based on the provided region and search term, and optional running flag

func GetRegionScalingPolicies

func GetRegionScalingPolicies(region string, spList *ScalingPolicies, search string) error

GetRegionScalingPolicies returns a slice of Scaling Policies for a region into the given ScalingPolicies slice

func GetRegionSecurityGroups

func GetRegionSecurityGroups(region string, secGrpList *SecurityGroups, search string) error

GetRegionSecurityGroups returns a regions Security Groups into the provided SecurityGroups slice

func GetRegionSimpleDBDomains

func GetRegionSimpleDBDomains(region string, domainList *SimpleDBDomains, search string) error

GetRegionSimpleDBDomains returns a slice of a regions SimpleDB Domains into the provided SimpleDBDomains slice

func GetRegionSnapshots

func GetRegionSnapshots(region string, snapList *Snapshots, search string, completed bool) error

GetRegionSnapshots returns a list of a regions Snapshots into the provided Snapshots slice that match the provided search term and optional completed flag

func GetRegionSubnets

func GetRegionSubnets(region string, subList *Subnets, search string) error

GetRegionSubnets returns a list of Subnets of a region into the provided Subnets slice

func GetRegionVolumes

func GetRegionVolumes(region string, volList *Volumes, search string, available bool) error

GetRegionVolumes returns a slice of region Volumes into the provided Volumes slice that matches the provided region and search, and optional available flag

func GetRegionVpcs

func GetRegionVpcs(region string, vpcList *Vpcs, search string) error

GetRegionVpcs returns a list of a regions VPCs that match the provided search term

func GetTagValue

func GetTagValue(key string, tags interface{}) string

GetTagValue returns the tag with the given key if available.

func InstallKeyPair

func InstallKeyPair(class string, dryRun bool) error

InstallKeyPair installs a keypair locally

func LaunchInstance

func LaunchInstance(class, sequence, az string, dryRun bool) error

LaunchInstance Launches a new EC2 Instance

func RebootInstances

func RebootInstances(search, region string, dryRun bool) (err error)

RebootInstances reboots one or more instances based on the given search term an optional region input

func RefreshVolume

func RefreshVolume(volumeSearch, instanceSearch string, force, dryRun bool) error

RefreshVolume refreshes an EBS Volume on an Instance

func RemoveIAMRoleFromInstanceProfile

func RemoveIAMRoleFromInstanceProfile(roleName, instanceProfileName string) error

RemoveIAMRoleFromInstanceProfile removes an IAM Role from an Instance Profile

func ResumeProcesses

func ResumeProcesses(search, region string, dryRun bool) (err error)

ResumeProcesses resumes AutoScaling actions on AutoScaling Groups that match the provided search term and (optional) region

func RotateLaunchConfigurations

func RotateLaunchConfigurations(class string, cfg config.LaunchConfigurationClass, dryRun bool) error

RotateLaunchConfigurations rotates out older Launch Configurations

func SetEc2NameAndClassTags

func SetEc2NameAndClassTags(resource *string, name, class, region string) error

SetEc2NameAndClassTags sets the Name and Class tags of an EC2 asset

func StartInstances

func StartInstances(search, region string, dryRun bool) (err error)

StartInstances starts one or more instances based on the given search term and optional region

func StopInstances

func StopInstances(search, region string, force, dryRun bool) (err error)

StopInstances stops an EC2 instances based on the given search term and optional region input. A third option "force" will force stop the instance(s)

func SuspendProcesses

func SuspendProcesses(search, region string, dryRun bool) (err error)

SuspendProcesses suspends AutoScaling actions on AutoScaling Groups that match the provided search term and (optional) region

func TerminateInstances

func TerminateInstances(search, region string, dryRun bool) (err error)

TerminateInstances terminates EC2 instances based on the given search term and optional region input

func UpdateAutoScaleGroups

func UpdateAutoScaleGroups(name, version string, double, forceYes, dryRun bool) (err error)

UpdateAutoScaleGroups updates existing AutoScale Groups that match the given search term to the provided version of Launch Configuration

func UpdateLoadBalancers

func UpdateLoadBalancers(search, region string, dryRun bool) (err error)

UpdateLoadBalancers updates one or more Load Balancers that match the provided search term and optional region

func UpdateScalingPolicies

func UpdateScalingPolicies(search, region string, dryRun bool) (err error)

UpdateScalingPolicies

func UpdateSecurityGroups

func UpdateSecurityGroups(search, region string, dryRun bool) (err error)

UpdateSecurityGroups updates one or more Security Groups that match the provided search term and optional region

Types

type ARN

type ARN models.ARN

ARN represents a single Amazon Resource Number

func ParseArn

func ParseArn(arnStr string) (*ARN, error)

ParseArn parses an ARN string and returns an awsm ARN object

type Address

type Address models.Address

Address represents a single Elastic IP Address

func (*Address) Marshal

func (a *Address) Marshal(address *ec2.Address, region string, instList *Instances)

Marshal parses the response from the aws sdk into an awsm Address

type Addresses

type Addresses []Address

Addresses represents a slice of Elastic IP Addresses

func GetAddresses

func GetAddresses(search string, available bool) (*Addresses, []error)

GetAddresses returns a slice of Elastic IP Addresses based on the given search term and optional available flag

func (*Addresses) PrintTable

func (i *Addresses) PrintTable()

PrintTable Prints an ascii table of the list of Elastic IP Addresses

type Alarm

type Alarm models.Alarm

Alarm represents a single CloudWatch Alarm

func (*Alarm) Marshal

func (a *Alarm) Marshal(alarm *cloudwatch.MetricAlarm, region string)

Marshal parses the response from the aws sdk into an awsm Alarm

type Alarms

type Alarms []Alarm

Alarms represents a slice of CloudWatch Alarms

func GetAlarms

func GetAlarms(search string) (*Alarms, []error)

GetAlarms returns a slice of CloudWatch Alarms based on the given search term

func (*Alarms) PrintTable

func (i *Alarms) PrintTable()

PrintTable Prints an ascii table of the list of CloudWatch Alarms

type AutoScaleGroup

type AutoScaleGroup models.AutoScaleGroup

AutoScaleGroup represents a single AutoScale Group

func (*AutoScaleGroup) Marshal

func (a *AutoScaleGroup) Marshal(autoscalegroup *autoscaling.Group, region string, subList *Subnets)

Marshal parses the response from the aws sdk into an awsm AutoScale Group

type AutoScaleGroups

type AutoScaleGroups []AutoScaleGroup

AutoScaleGroups represents a slice of AutoScale Groups

func GetAutoScaleGroups

func GetAutoScaleGroups(search string) (*AutoScaleGroups, []error)

GetAutoScaleGroups returns a slice of AutoScale Groups based on the given search term

func (*AutoScaleGroups) LockedLaunchConfigurations

func (a *AutoScaleGroups) LockedLaunchConfigurations() map[string]bool

LockedLaunchConfigurations returns a map of Launch Configurations that are locked (currently being used in an AutoScale Group)

func (*AutoScaleGroups) PrintTable

func (a *AutoScaleGroups) PrintTable()

PrintTable Prints an ascii table of the list of AutoScaling Groups

type Bucket

type Bucket models.Bucket

Bucket represents a single S3 Bucket

func (*Bucket) Marshal

func (b *Bucket) Marshal(bucket *s3.Bucket)

Marshal parses the response from the aws sdk into an awsm Bucket

type Buckets

type Buckets []Bucket

Buckets represents a slice of AWS S3 Buckets

func GetBuckets

func GetBuckets(search string) (*Buckets, error)

GetBuckets returns a list of S3 Buckets that match the provided search term

func (*Buckets) PrintTable

func (b *Buckets) PrintTable()

PrintTable Prints an ascii table of the list of KeyPairs

type CommandInvocation

type CommandInvocation models.CommandInvocation

CommandInvocation represents a single SSM Command Invocation

func (*CommandInvocation) Marshal

func (i *CommandInvocation) Marshal(invocation *ssm.CommandInvocation, region string, instList *Instances)

Marshal parses the response from the aws sdk into an awsm CommandInvocation

type CommandInvocations

type CommandInvocations []CommandInvocation

CommandInvocations represents a slice of SSM Command Invocations

func GetRegionCommandInvocationsByCommandID

func GetRegionCommandInvocationsByCommandID(region string, commandId string, details bool) (CommandInvocations, error)

GetRegionCommandInvocationssByCommandID returns a slice of Command Invocations based on the provided region and commandId, and optional details flag

func ListCommandInvocations

func ListCommandInvocations(search string, details bool) (*CommandInvocations, []error)

ListCommandInvocations returns a list of Command Invocations

func RunCommand

func RunCommand(search, command string, dryRun bool) (*CommandInvocations, error)

RunCommand runs a command on one or more ec2 instances.

func (*CommandInvocations) Finished

func (i *CommandInvocations) Finished() bool

Finished checks if any of the command invocations within the slice are still in progress, and returns true when they are not.

func (*CommandInvocations) PrintOutput

func (i *CommandInvocations) PrintOutput()

func (*CommandInvocations) PrintTable

func (i *CommandInvocations) PrintTable()

PrintTable Prints an ascii table of the list of Command Invocations and their output

type CommandPlugin

type CommandPlugin models.CommandPlugin

CommandPlugin represents a single SSM Command Plugin

func (*CommandPlugin) Marshal

func (p *CommandPlugin) Marshal(plugin *ssm.CommandPlugin)

Marshal parses the response from the aws sdk into an awsm CommandPlugin

type CommandPlugins

type CommandPlugins []CommandPlugin

CommandPlugins represents a slice of SSM Command Plugins

type Entity

type Entity models.Entity

Entity represents a single SSM Entity

func (*Entity) Marshal

func (e *Entity) Marshal(entity *ssm.InventoryResultEntity, region string, instList *Instances)

Marshal parses the response from the aws sdk into an awsm Entity

type Events

type Events []models.Event

ARN represents a single Amazon Resource Number

func GetEvents

func GetEvents() (Events, error)

func (Events) Len

func (e Events) Len() int

func (Events) Less

func (e Events) Less(i, j int) bool

func (Events) Swap

func (e Events) Swap(i, j int)

type HostedZone

type HostedZone models.HostedZone

HostedZone represents a single Route53 Hosted Zone

func (*HostedZone) GetResourceRecords

func (h *HostedZone) GetResourceRecords(search string) (*ResourceRecords, error)

func (*HostedZone) Marshal

func (h *HostedZone) Marshal(hostedZone *route53.HostedZone)

Marshal parses the response from the aws sdk into an awsm HostedZone

type HostedZones

type HostedZones []HostedZone

HostedZones represents a slice of AWS Route53 Hosted Zones

func GetHostedZones

func GetHostedZones(search string) (*HostedZones, error)

GetHostedZones returns a list of Route53 Hosted Zones that match the provided search term

func (*HostedZones) PrintTable

func (h *HostedZones) PrintTable()

PrintTable Prints an ascii table of the list of KeyPairs

type IAMInstanceProfile

type IAMInstanceProfile models.IAMInstanceProfile

IAMRole represents a single IAM Profile

func GetIAMInstanceProfile

func GetIAMInstanceProfile(name string) (IAMInstanceProfile, error)

GetIAMProfile returns a single IAM Profile that matches the provided name

func GetIAMInstanceProfileByName

func GetIAMInstanceProfileByName(instanceProfileName string) (iamInstanceProfile IAMInstanceProfile, err error)

GetIAMInstanceProfileByName returns an IAM Instance Profile that matches the provided name

func (*IAMInstanceProfile) Marshal

func (i *IAMInstanceProfile) Marshal(profile *iam.InstanceProfile)

Marshal parses the response from the aws sdk into an awsm IAM Role

type IAMInstanceProfiles

type IAMInstanceProfiles []IAMInstanceProfile

IAMProfile represents a slice of AWS IAM Profiles

func GetIAMInstanceProfiles

func GetIAMInstanceProfiles(search string) (iamProfileList *IAMInstanceProfiles, err error)

GetIAMInstanceProfiles returns a list of IAM Profiles that matches the provided name

func GetIAMInstanceProfilesForRole

func GetIAMInstanceProfilesForRole(roleName string) (iamInstanceProfileList IAMInstanceProfiles, err error)

GetIAMInstanceProfiles returns a list of IAM Profiles that matches the provided name

func (*IAMInstanceProfiles) PrintTable

func (i *IAMInstanceProfiles) PrintTable()

PrintTable Prints an ascii table of the list of IAM Instance Profiles

type IAMPolicies

type IAMPolicies []IAMPolicy

IAMPolicies represents a slice of AWS IAM Policy

func GetIAMPolicies

func GetIAMPolicies(search string) (iamPolicyList *IAMPolicies, err error)

GetIAMPolicies returns a list of IAM Policies that matches the provided name

func (*IAMPolicies) PrintTable

func (i *IAMPolicies) PrintTable()

PrintTable Prints an ascii table of the list of IAM Policies

type IAMPolicy

type IAMPolicy models.IAMPolicy

IAMPolicy represents a single IAM Policy

func GetIAMPolicyByARN

func GetIAMPolicyByARN(policyARN string) (iamPolicy *IAMPolicy, err error)

GetIAMPolicyByARN returns a single IAM Policy that matches the provided ARN

func GetIAMPolicyByName

func GetIAMPolicyByName(policyName string) (iamPolicy IAMPolicy, err error)

GetIAMPolicyByName returns an IAM Policy that matches the provided name

func (*IAMPolicy) Marshal

func (i *IAMPolicy) Marshal(policy *iam.Policy)

Marshal parses the response from the aws sdk into an awsm IAM Policy

type IAMPolicyDocument

type IAMPolicyDocument models.IAMPolicyDocument

IAMPolicyDocument represents a single IAM Policy

func GetIAMPolicyDocument

func GetIAMPolicyDocument(search string, version string) (IAMPolicyDocument, error)

GetIAMPolicy returns a single IAM Policy given a provided search term

func (*IAMPolicyDocument) Marshal

func (i *IAMPolicyDocument) Marshal(policyVersion *iam.PolicyVersion)

Marshal parses the response from the aws sdk into an awsm IAM Policy Document

type IAMRole

type IAMRole models.IAMRole

IAMRole represents a single IAM Role

func GetIAMRole

func GetIAMRole(name string) (IAMRole, error)

GetIAMRole returns a single IAM Role that matches the provided name

func GetIAMRoleByName

func GetIAMRoleByName(roleName string) (iamRole IAMRole, err error)

GetIAMRoleByName returns an IAM Role that matches the provided name

func (*IAMRole) Marshal

func (i *IAMRole) Marshal(user *iam.Role)

Marshal parses the response from the aws sdk into an awsm IAM Role

type IAMRoles

type IAMRoles []IAMRole

IAMRoles represents a slice of AWS IAM Roles

func GetIAMRoles

func GetIAMRoles(search string) (iamRoleList *IAMRoles, err error)

GetIAMRoles returns a list of IAM Roles that matches the provided name

func (*IAMRoles) PrintTable

func (i *IAMRoles) PrintTable()

PrintTable Prints an ascii table of the list of IAM Roles

type IAMUser

type IAMUser models.IAMUser

IAMUser represents a single IAM User

func GetIAMUser

func GetIAMUser(username string) (IAMUser, error)

GetIAMUser returns a single IAM User that matches the provided username

func (*IAMUser) Marshal

func (i *IAMUser) Marshal(user *iam.User)

Marshal parses the response from the aws sdk into an awsm IAM User

type IAMUsers

type IAMUsers []IAMUser

IAMUsers represents a slice of AWS IAM Users

func GetIAMUsers

func GetIAMUsers(search string) (iamList *IAMUsers, err error)

GetIAMUsers returns a list of IAM Users that match the provided search term

func (*IAMUsers) PrintTable

func (i *IAMUsers) PrintTable()

PrintTable Prints an ascii table of the list of IAM Users

type Image

type Image models.Image

Image represents a single Amazon Machine Image

func GetImageById

func GetImageById(region, id string) (Image, error)

GetImageById returns an Amazon Machine Image via its ID

func GetLatestImageByTag

func GetLatestImageByTag(region, key, value string) (Image, error)

GetLatestImageByTag returns the newest Amazon Machine Image in the provided region that matches the key/value tag provided

func (*Image) Marshal

func (i *Image) Marshal(image *ec2.Image, region string)

Marshal parses the response from the aws sdk into an awsm Image

type Images

type Images []Image

Images represents a slice of Amazon Machine Images

func GetImages

func GetImages(search string, available bool) (*Images, []error)

GetImages returns a slice of Images based on the provided search term and optional available flag

func GetImagesByTag

func GetImagesByTag(region, key, value string, available bool) (Images, error)

GetImagesByTag returns a slice of Amazon Machine Images given the provided region, and tag key/values

func (*Images) GetImageName

func (i *Images) GetImageName(id string) string

GetImageName returns the name of an AMI given the provided AMI ID

func (Images) Len

func (i Images) Len() int

Len returns the number of Images within the Images slice

func (Images) Less

func (i Images) Less(k, j int) bool

Less returns true if the Image at index k is newer than the Image at index j

func (*Images) PrintTable

func (i *Images) PrintTable()

PrintTable Prints an ascii table of the list of Amazon Machine Images

func (Images) Swap

func (i Images) Swap(k, j int)

Swap swaps the position of two Images within the Image slice

type Instance

type Instance models.Instance

Instance represents a single EC2 Instace

func (*Instance) Marshal

func (i *Instance) Marshal(instance *ec2.Instance, region string, subList *Subnets, vpcList *Vpcs, imgList *Images)

Marshal parses the response from the aws sdk into an awsm Instance

type Instances

type Instances []Instance

Instances represents a slice of EC2 Instances

func GetInstances

func GetInstances(search string, running bool) (*Instances, []error)

GetInstances returns a list of EC2 Instances that match the provided search term and optional running flag

func (*Instances) GetInstanceClass

func (i *Instances) GetInstanceClass(id string) string

GetInstanceClass returns the the class of an EC2 Instance given an EC2 Instance ID

func (*Instances) GetInstanceName

func (i *Instances) GetInstanceName(id string) string

GetInstanceName returns the the name of an EC2 Instance given an EC2 Instance ID

func (*Instances) PrintTable

func (i *Instances) PrintTable()

PrintTable Prints an ascii table of the list of Instances

type InternetGateway

type InternetGateway models.InternetGateway

InternetGateway represents a single InternetGateway

func (*InternetGateway) Marshal

func (i *InternetGateway) Marshal(ig *ec2.InternetGateway, region string)

Marshal parses the response from the aws sdk into an awsm Vpc

type InternetGateways

type InternetGateways []InternetGateway

InternetGateways represents a slice of InternetGateways

func GetInternetGateways

func GetInternetGateways(search string, available bool) (*InternetGateways, []error)

GetInternetGateways returns a slice of Internet Gateways that match the provided search term

func (*InternetGateways) PrintTable

func (i *InternetGateways) PrintTable()

PrintTable Prints an ascii table of the list of VPCs

type Inventory

type Inventory []Entity

Inventory represents a slice of SSM Entities

func GetInventory

func GetInventory(search string) (*Inventory, []error)

func (*Inventory) PrintTable

func (i *Inventory) PrintTable()

PrintTable Prints an ascii table of the list of the Inventory

type KeyPair

type KeyPair models.KeyPair

KeyPair represents a single AWS KeyPair

func GetKeyPairByName

func GetKeyPairByName(region, name string) (KeyPair, error)

GetKeyPairByName returns a single KeyPair given the provided region and name

func (*KeyPair) Marshal

func (k *KeyPair) Marshal(keyPair *ec2.KeyPairInfo, region string)

Marshal parses the response from the aws sdk into an awsm KeyPair

type KeyPairs

type KeyPairs []KeyPair

KeyPairs represents a slice of AWS KeyPairs

func GetKeyPairs

func GetKeyPairs(search string) (*KeyPairs, []error)

GetKeyPairs returns a slice of KeyPairs that match the provided search term

func (*KeyPairs) PrintTable

func (i *KeyPairs) PrintTable()

PrintTable Prints an ascii table of the list of KeyPairs

type LaunchConfig

type LaunchConfig models.LaunchConfig

LaunchConfig represents a single Launch Configuration

func (*LaunchConfig) Marshal

func (l *LaunchConfig) Marshal(config *autoscaling.LaunchConfiguration, region string, secGrpList *SecurityGroups, imgList *Images)

Marshal parses the response from the aws sdk into an awsm LaunchConfig

type LaunchConfigs

type LaunchConfigs []LaunchConfig

LaunchConfigs represents a slice of Launch Configurations

func GetLaunchConfigurations

func GetLaunchConfigurations(search string) (*LaunchConfigs, []error)

GetLaunchConfigurations returns a slice of Launch Configurations that match the provided search term

func GetLaunchConfigurationsByName

func GetLaunchConfigurationsByName(region, name string) (LaunchConfigs, error)

GetLaunchConfigurationsByName returns a slice of Launch Configurations for a given region and name

func (LaunchConfigs) Len

func (l LaunchConfigs) Len() int

Len returns the current number of Launch Configurations in the slice

func (LaunchConfigs) Less

func (l LaunchConfigs) Less(i, j int) bool

Less returns true of the Launch Configuration at indes i was created after the Launch Configuration at index j

func (*LaunchConfigs) LockedImageIds

func (l *LaunchConfigs) LockedImageIds() map[string]bool

LockedImageIds returns a list of locked AMI's (that are currently being used in Launch Configurations)

func (*LaunchConfigs) LockedSnapshotIds

func (l *LaunchConfigs) LockedSnapshotIds() map[string]bool

LockedSnapshotIds returns a map of locked EBS Snapshots (that are currently being used in Launch Configurations)

func (*LaunchConfigs) PrintTable

func (l *LaunchConfigs) PrintTable()

PrintTable Prints an ascii table of the list of Launch Configurations

func (LaunchConfigs) Swap

func (l LaunchConfigs) Swap(i, j int)

Swap swaps the position of two Launch Configurations in the slice

type LoadBalancer

type LoadBalancer models.LoadBalancer

LoadBalancer represents a single AWS Load Balancer

func GetLoadBalancerByName

func GetLoadBalancerByName(region, name string) (LoadBalancer, error)

GetLoadBalancerByName returns a single Load Balancer given the provided region and name

func (*LoadBalancer) Marshal

func (l *LoadBalancer) Marshal(balancer *elb.LoadBalancerDescription, region string, secGrpList *SecurityGroups, vpcList *Vpcs, subList *Subnets, tags map[string][]*elb.Tag)

Marshal parses the response from the aws sdk into an awsm LoadBalancer

type LoadBalancerChange

type LoadBalancerChange struct {
	LoadBalancer      LoadBalancer
	Revoke            bool
	Attributes        config.LoadBalancerAttributes
	HealthCheck       config.LoadBalancerHealthCheck
	Listeners         []config.LoadBalancerListener
	SecurityGroups    []string
	Subnets           []string
	AvailabilityZones []string
	Disable           bool
	Detach            bool
}

type LoadBalancerV2

type LoadBalancerV2 models.LoadBalancerV2

LoadBalancerV2 represents a single Application Load Balancer

func (*LoadBalancerV2) Marshal

func (l *LoadBalancerV2) Marshal(balancer *elbv2.LoadBalancer, region string, secGrpList *SecurityGroups)

Marshal parses the response from the aws sdk into an awsm LoadBalancerV2

type LoadBalancers

type LoadBalancers []LoadBalancer

LoadBalancers represents a slice of AWS Load Balancers

func GetLoadBalancers

func GetLoadBalancers(search string) (*LoadBalancers, []error)

GetLoadBalancers returns a slice of AWS Load Balancers

func (LoadBalancers) Diff

func (s LoadBalancers) Diff() ([]LoadBalancerChange, error)

func (*LoadBalancers) PrintTable

func (i *LoadBalancers) PrintTable()

PrintTable Prints an ascii table of the list of Load Balancers

type LoadBalancersV2

type LoadBalancersV2 []LoadBalancerV2

LoadBalancersV2 represents a slice of Application Load Balancers

func GetLoadBalancersV2

func GetLoadBalancersV2() (*LoadBalancersV2, []error)

GetLoadBalancersV2 returns a slice of Application Load Balancers

func (*LoadBalancersV2) PrintTable

func (i *LoadBalancersV2) PrintTable()

PrintTable Prints an ascii table of the list of Application Load Balancers

type Profile

type Profile struct {
	Name            string   `ini:"-"` // considered Sections in config file
	AccessKeyID     string   `ini:"aws_access_key_id"`
	SecretAccessKey string   `ini:"aws_secret_access_key"`
	IgnoreRegions   []string `ini:"ignore_regions"`
}

Profile represents a single AWS profile (an access key id and secret access key)

type ResourceRecord

type ResourceRecord models.ResourceRecord

ResourceRecord represents a single Route53 Host Record

func (*ResourceRecord) Marshal

func (h *ResourceRecord) Marshal(resourceRecordSet *route53.ResourceRecordSet, hostedZoneId string)

Marshal parses the response from the aws sdk into an awsm ResourceRecord

type ResourceRecordChange

type ResourceRecordChange models.ResourceRecordChange

ResourceRecordChange represents a single Route53 Host Record Change

type ResourceRecordChanges

type ResourceRecordChanges []ResourceRecordChange

ResourceRecordChanges represents a slice of AWS Route53 Host Record Changes

type ResourceRecords

type ResourceRecords []ResourceRecord

ResourceRecords represents a slice of AWS Route53 Host Records

func GetResourceRecords

func GetResourceRecords(search string) (*ResourceRecords, error)

GetResourceRecords returns a list of Route53 Resource Records that match the provided search term

func (*ResourceRecords) PrintTable

func (h *ResourceRecords) PrintTable()

PrintTable Prints an ascii table of the list of ResourceRecords

type RouteTable

type RouteTable models.RouteTable

RouteTable represents a single RouteTable

func GetVpcMainRouteTable

func GetVpcMainRouteTable(vpcId, region string) (RouteTable, error)

func (*RouteTable) Marshal

func (r *RouteTable) Marshal(rt *ec2.RouteTable, region string)

Marshal parses the response from the aws sdk into an awsm Vpc

type RouteTableAssociation

type RouteTableAssociation models.RouteTableAssociation

RouteTableAssociation represents a single RouteTableAssociation

type RouteTableAssociations

type RouteTableAssociations []RouteTableAssociation

RouteTableAssociations represents a slice of RouteTableAssociations

type RouteTables

type RouteTables []RouteTable

RouteTables represents a slice of RouteTables

func GetRouteTables

func GetRouteTables(search string) (*RouteTables, []error)

GetRouteTables returns a slice of Route Tables that match the provided search term

func GetVpcRouteTables

func GetVpcRouteTables(search, vpcId, region string) (*RouteTables, error)

func (*RouteTables) PrintTable

func (i *RouteTables) PrintTable()

PrintTable Prints an ascii table of the list of VPCs

type SSMInstance

type SSMInstance models.SSMInstance

SSMInstance represents a single SSM Instance

func GetSSMInstanceById

func GetSSMInstanceById(region, id string) (SSMInstance, error)

GetSSMInstanceById returns a single SSM Instance by its instance ID and region

func (*SSMInstance) Marshal

func (i *SSMInstance) Marshal(instance *ssm.InstanceInformation, region string, instList *Instances)

Marshal parses the response from the aws sdk into an awsm SSMInstance

type SSMInstances

type SSMInstances []SSMInstance

SSMInstances represents a slice of SSM Instances

func GetSSMInstances

func GetSSMInstances(search string) (*SSMInstances, []error)

GetSSMInstances returns a slice of SSMInstances that math the provided optional search term

func (*SSMInstances) PrintTable

func (i *SSMInstances) PrintTable()

PrintTable Prints an ascii table of the list of the Inventory

type ScalingActivities

type ScalingActivities []ScalingActivity

AutoScaleGroups represents a slice of AutoScale Groups

func GetScalingActivities

func GetScalingActivities(search string, latest bool) (ScalingActivities, error)

GetScalingActivities

func (*ScalingActivities) PrintTable

func (s *ScalingActivities) PrintTable()

PrintTable Prints an ascii table of the list of AutoScaling Groups

type ScalingActivity

type ScalingActivity models.ScalingActivity

AutoScaleGroup represents a single AutoScale Group

func (*ScalingActivity) Marshal

func (a *ScalingActivity) Marshal(activity *autoscaling.Activity, asg *AutoScaleGroup)

Marshal parses the response from the aws sdk into an awsm AutoScale Group

type ScalingPolicies

type ScalingPolicies []ScalingPolicy

ScalingPolicies represents a slice of Scaling Policies

func GetScalingPolicies

func GetScalingPolicies(search string) (*ScalingPolicies, []error)

GetScalingPolicies returns a slice of Scaling Policies based on the given search term

func (*ScalingPolicies) GetPolicyNameByArn

func (s *ScalingPolicies) GetPolicyNameByArn(arn string) string

GetPolicyNameByArn returns the name of a Scaling Policy given the provided arn of that policy

func (*ScalingPolicies) PrintTable

func (s *ScalingPolicies) PrintTable()

PrintTable Prints an ascii table of the list of Scaling Policies

type ScalingPolicy

type ScalingPolicy models.ScalingPolicy

ScalingPolicy represents a single Scaling Policy

func (*ScalingPolicy) Marshal

func (s *ScalingPolicy) Marshal(policy *autoscaling.ScalingPolicy, region string)

Marshal parses the response from the aws sdk into an awsm ScalingPolicy

type SecurityGroup

type SecurityGroup models.SecurityGroup

SecurityGroup represents a single Security Group

func GetEc2ClassicSecurityGroupByName

func GetEc2ClassicSecurityGroupByName(region, name string) (SecurityGroup, error)

GetClassicSecurityGroupByName returns a single Security Group that matches a provided region and name, (non-vpc only)

func GetSecurityGroupByName

func GetSecurityGroupByName(region, name string) (SecurityGroup, error)

GetSecurityGroupByName returns a single Security Group that matches a provided region and name

func GetSecurityGroupByTag

func GetSecurityGroupByTag(region, key, value string) (SecurityGroup, error)

GetSecurityGroupByTag returns a single Security Group that matches a provided region and key/value tag

func (*SecurityGroup) Marshal

func (s *SecurityGroup) Marshal(securitygroup *ec2.SecurityGroup, region string, vpcList *Vpcs)

Marshal parses the response from the aws sdk into an awsm Security Group

type SecurityGroupChange

type SecurityGroupChange struct {
	Group  SecurityGroup
	Revoke bool
	Type   string
	Grants []config.SecurityGroupGrant
}

type SecurityGroupChanges

type SecurityGroupChanges []SecurityGroupChange

func (SecurityGroupChanges) Len

func (c SecurityGroupChanges) Len() int

Len sort func for SecurityGroupChanges

func (SecurityGroupChanges) Less

func (c SecurityGroupChanges) Less(i, j int) bool

Less sort func for SecurityGroupChanges

func (SecurityGroupChanges) Swap

func (c SecurityGroupChanges) Swap(i, j int)

Swap sort func for SecurityGroupChanges

type SecurityGroups

type SecurityGroups []SecurityGroup

SecurityGroups represents a slice of Security Groups

func GetSecurityGroupByTagMulti

func GetSecurityGroupByTagMulti(region, key string, value []string) (SecurityGroups, error)

GetSecurityGroupByTagMulti returns a slice of Security Groups that matches a provided region and key/value tag. Accepts multiple tag values for a single key.

func GetSecurityGroups

func GetSecurityGroups(search string) (*SecurityGroups, []error)

GetSecurityGroups returns a slice of Security Groups given a provided search term

func (SecurityGroups) Diff

func (*SecurityGroups) GetSecurityGroupIDs

func (s *SecurityGroups) GetSecurityGroupIDs() []string

GetSecurityGroupNames returns a slice of the security group names (or ID's if a name is not available)

func (*SecurityGroups) GetSecurityGroupNames

func (s *SecurityGroups) GetSecurityGroupNames(ids []string) []string

GetSecurityGroupNames returns a slice of the security group names (or ID's if a name is not available)

func (*SecurityGroups) PrintTable

func (s *SecurityGroups) PrintTable()

PrintTable Prints an ascii table of the list of Security Groups

type SimpleDBDomain

type SimpleDBDomain models.SimpleDBDomain

SimpleDBDomain represents a single SimpleDB Domain

type SimpleDBDomains

type SimpleDBDomains []SimpleDBDomain

SimpleDBDomains represents a slice of SimpleDB Domains

func GetSimpleDBDomains

func GetSimpleDBDomains(search string) (*SimpleDBDomains, []error)

GetSimpleDBDomains returns a slice of SimpleDB Domains that match the provided search term

func (*SimpleDBDomains) PrintTable

func (i *SimpleDBDomains) PrintTable()

PrintTable Prints an ascii table of the list of SimpleDB Domains

type Snapshot

type Snapshot models.Snapshot

Snapshot represents a single EBS Snapshot

func GetLatestSnapshotByTag

func GetLatestSnapshotByTag(region, key, value string) (Snapshot, error)

GetLatestSnapshotByTag returns the newest EBS Snapshot that matches the provided region and Tag key/value

func (*Snapshot) Marshal

func (s *Snapshot) Marshal(snapshot *ec2.Snapshot, region string)

Marshal parses the response from the aws sdk into an awsm Snapshot

type Snapshots

type Snapshots []Snapshot

Snapshots represents a slice of EBS Snapshots

func GetLatestSnapshotByTagMulti

func GetLatestSnapshotByTagMulti(region, key string, value []string) (Snapshots, error)

GetLatestSnapshotByTagMulti returns a slice of the newest EBS Snapshot that matches the provided region and Tag key/value. Multiple Tag values can be provided

func GetSnapshots

func GetSnapshots(search string, completed bool) (*Snapshots, []error)

GetSnapshots returns a slice of EBS Snapshots that match the provided search term and optional completed flag

func GetSnapshotsByTag

func GetSnapshotsByTag(region, key, value string, completed bool) (Snapshots, error)

GetSnapshotsByTag returns a slice of EBS Snapshots that match the provided region and Tag key/value

func (Snapshots) Len

func (s Snapshots) Len() int

Len returns the number of EBS Snapshots

func (Snapshots) Less

func (s Snapshots) Less(i, j int) bool

Less returns true of the Snapshot at index i is newer than the Snapshot at index j

func (*Snapshots) PrintTable

func (s *Snapshots) PrintTable()

PrintTable Prints an ascii table of the list of EBS Snapshots

func (Snapshots) Swap

func (s Snapshots) Swap(i, j int)

Swap swaps the Snapshots at index i and j

type Subnet

type Subnet models.Subnet

Subnet represents a single Subnet

func GetSubnetByTag

func GetSubnetByTag(region, key, value string) (Subnet, error)

GetSubnetByTag returns a single Subnet given the provided region and Tag key/value

func (*Subnet) Marshal

func (s *Subnet) Marshal(subnet *ec2.Subnet, region string, vpcList *Vpcs)

Marshal parses the response from the aws sdk into an awsm Subnet

type Subnets

type Subnets []Subnet

Subnets represents a slice of Subnets

func GetSubnets

func GetSubnets(search string) (*Subnets, []error)

GetSubnets returns a slice of Subnets that match the provided search term

func GetSubnetsByVpcID

func GetSubnetsByVpcID(vpcID string, region string) (Subnets, error)

GetSubnetsByVpcID returns a slice of Subnets that belong to the provided VPC ID

func (*Subnets) GetSubnetClasses

func (s *Subnets) GetSubnetClasses(ids []string) []string

GetSubnetClasses returns a slice of Subnet Classes given their ID's

func (*Subnets) GetSubnetName

func (s *Subnets) GetSubnetName(id string) string

GetSubnetName returns the name of a Subnet given its ID

func (*Subnets) GetSubnetNames

func (s *Subnets) GetSubnetNames(ids []string) []string

GetSubnetNames returns a slice of Subnet Names given their ID's

func (*Subnets) GetVpcIDBySubnetID

func (s *Subnets) GetVpcIDBySubnetID(id string) string

GetVpcIDBySubnetID returns the ID of a VPC given the ID of a Subnet

func (*Subnets) GetVpcNameBySubnetID

func (s *Subnets) GetVpcNameBySubnetID(id string) string

GetVpcNameBySubnetID returns the Name of a VPC given the ID of a Subnet

func (*Subnets) PrintTable

func (s *Subnets) PrintTable()

PrintTable Prints an ascii table of the list of Subnets

type Volume

type Volume models.Volume

Volume represents a single EBS Volume

func GetVolumeById

func GetVolumeById(region, volumeId string) (Volume, error)

GetVolumeById returns a single EBS Volume given a region and volume id

func GetVolumeByTag

func GetVolumeByTag(region, key, value string) (Volume, error)

GetVolumeByTag returns a single EBS Volume given a region and Tag key/value

func (*Volume) Marshal

func (v *Volume) Marshal(volume *ec2.Volume, region string, instList *Instances)

Marshal parses the response from the aws sdk into an awsm Volume

type Volumes

type Volumes []Volume

Volumes represents a slice of EBS Volumes

func GetVolumeByInstanceIDSearch

func GetVolumeByInstanceIDSearch(region, instanceId, search string) (*Volumes, error)

GetVolumeByInstanceIDandTag returns a list of EBS Volumes given an Instance Id and tag pair

func GetVolumes

func GetVolumes(search string, available bool) (*Volumes, []error)

GetVolumes returns a slice of Volumes that match the provided search term and optional available flag

func GetVolumesByInstanceID

func GetVolumesByInstanceID(region, instanceId string) (Volumes, error)

GetVolumesByInstanceID returns a list of EBS Volumes given an instance Id

func (Volumes) Len

func (v Volumes) Len() int

Len returns the number of EBS Volumes

func (Volumes) Less

func (v Volumes) Less(i, j int) bool

Less returns true if the Volume at index i was created after the volume at index j

func (*Volumes) PrintTable

func (v *Volumes) PrintTable()

PrintTable Prints an ascii table of the list of EBS Volumes

func (Volumes) Swap

func (v Volumes) Swap(i, j int)

Swap swaps the Volumes at index i and j

type Vpc

type Vpc models.Vpc

Vpc represents a single VPC

func GetRegionVpcByTag

func GetRegionVpcByTag(region, key, value string) (Vpc, error)

GetRegionVpcByTag returns a single VPC that matches the provided region and Tag key/value

func GetVpcByTag

func GetVpcByTag(region, key, value string) (Vpc, error)

GetVpcByTag returns a single VPC that matches the provided and Tag key/value

func (*Vpc) GetVpcSecurityGroupByTag

func (v *Vpc) GetVpcSecurityGroupByTag(key, value string) (SecurityGroup, error)

GetVpcSecurityGroupByTag returns a VPC Security Group that matches the provided Tag key/value

func (*Vpc) GetVpcSecurityGroupByTagMulti

func (v *Vpc) GetVpcSecurityGroupByTagMulti(key string, value []string) (SecurityGroups, error)

GetVpcSecurityGroupByTagMulti returns a slice VPC Security Groups that matches the provided Tag key/value. Multiple values can be passed

func (*Vpc) GetVpcSubnetByTag

func (v *Vpc) GetVpcSubnetByTag(key, value string) (Subnet, error)

GetVpcSubnetByTag Gets a single VPC Subnet that matches the provided Tag key/value

func (*Vpc) Marshal

func (v *Vpc) Marshal(vpc *ec2.Vpc, region string)

Marshal parses the response from the aws sdk into an awsm Vpc

type Vpcs

type Vpcs []Vpc

Vpcs represents a slice of VPCs

func GetVpcs

func GetVpcs(search string) (*Vpcs, []error)

GetVpcs returns a slice of VPCs that match the provided search term

func (*Vpcs) GetVpcName

func (i *Vpcs) GetVpcName(id string) string

GetVpcName returns the name of a VPC given its ID

func (*Vpcs) PrintTable

func (i *Vpcs) PrintTable()

PrintTable Prints an ascii table of the list of VPCs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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