Documentation
¶
Index ¶
- Variables
- type AMI
- func (a *AMI) Changelog(from, to string) *result.Changelogs
- func (a *AMI) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)
- func (a *AMI) ReportConfig() interface{}
- func (a *AMI) Source(workingDir string, resultSource *result.Source) error
- func (a *AMI) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error
- type ByCreationDateAsc
- type ByCreationDateDesc
- type Filter
- type Filters
- type Spec
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoFilter is return when didn't narrow AMI ID result ErrNoFilter error = errors.New("no filter specified") // ErrSpecNotValid is return when aws/ami spec are is not valid ErrSpecNotValid error = errors.New("ami spec not valid") // ErrWrongServiceConnection is returned when failing to connect to AWS api ErrWrongServiceConnection error = errors.New("can't connect to aws api") )
var ( // ErrWrongSortByValue is returned if we use the wrong sortBy value ErrWrongSortByValue error = errors.New("wrong value for key 'sortBy'") )
Functions ¶
This section is empty.
Types ¶
type AMI ¶
type AMI struct {
Spec Spec
// contains filtered or unexported fields
}
AMI contains information to manipulate AWS AMI information
func New ¶
New returns a reference to a newly initialized AMI object from an AMISpec or an error if the provided AMISpec triggers a validation error.
func (*AMI) Changelog ¶
func (a *AMI) Changelog(from, to string) *result.Changelogs
Changelog returns the changelog for this resource, or an empty string if not supported
func (*AMI) ReportConfig ¶ added in v0.99.0
func (a *AMI) ReportConfig() interface{}
ReportConfig returns a new configuration with only the necessary configuration fields to identify the resource without any sensitive information or context specific data.
type ByCreationDateAsc ¶
Sort by CreationDate Asc ByAge implements sort.Interface based on the Age field.
func (ByCreationDateAsc) Len ¶
func (images ByCreationDateAsc) Len() int
func (ByCreationDateAsc) Less ¶
func (images ByCreationDateAsc) Less(i, j int) bool
func (ByCreationDateAsc) Swap ¶
func (images ByCreationDateAsc) Swap(i, j int)
type ByCreationDateDesc ¶
Sort by CreationDate Descendant ByAge implements sort.Interface based on the Age field.
func (ByCreationDateDesc) Len ¶
func (images ByCreationDateDesc) Len() int
func (ByCreationDateDesc) Less ¶
func (images ByCreationDateDesc) Less(i, j int) bool
func (ByCreationDateDesc) Swap ¶
func (images ByCreationDateDesc) Swap(i, j int)
type Filter ¶
type Filter struct {
// Name specifies a filter name.
Name string `yaml:",omitempty"`
// Values specifies a filter value for a specific filter name.
Values string `yaml:",omitempty"`
}
Filter represents the updatecli configuration describing AMI filters.
type Spec ¶
type Spec struct {
// accesskey specifies the aws access key which combined with `secretkey`, is one of the way to authenticate
AccessKey string `yaml:",omitempty"`
// secretkey specifies the aws secret key which combined with `accesskey`, is one of the way to authenticate
SecretKey string `yaml:",omitempty"`
// Filters specifies a list of AMI filters
Filters Filters `yaml:",omitempty"`
// Region specifies the AWS region to use when looking for AMI
Region string `yaml:",omitempty"`
// Endpoint specifies the AWS endpoint to use when looking for AMI
Endpoint string `yaml:",omitempty"`
// Dryrun allows to Check whether you have the required permissions for the action.
DryRun bool `yaml:",omitempty"`
// Sortby specifies the order of AMI-ID that will be used to retrieve the last element such as `creationdateasc`
SortBy string `yaml:",omitempty"`
}
Spec contains the updatecli configuration provided by users.