awsrds

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDBInstanceDoesNotExist = errors.New("rds db instance does not exist")
)

Functions

func AddTagsToResource

func AddTagsToResource(resourceARN string, tags []*rds.Tag, rdssvc *rds.RDS, logger lager.Logger) error

func BuilRDSTags

func BuilRDSTags(tags map[string]string) []*rds.Tag

func HandleAWSError

func HandleAWSError(err error, logger lager.Logger) error

func ListTagsForResource

func ListTagsForResource(resourceARN string, rdssvc *rds.RDS, logger lager.Logger) ([]*rds.Tag, error)

func RDSTagsValues

func RDSTagsValues(rdsTags []*rds.Tag) map[string]string

func RemoveTagsFromResource

func RemoveTagsFromResource(resourceARN string, tagKeys []*string, rdssvc *rds.RDS, logger lager.Logger) error

Types

type ByCreateTime

type ByCreateTime []*DBSnapshotDetails

func (ByCreateTime) Len

func (ct ByCreateTime) Len() int

func (ByCreateTime) Less

func (ct ByCreateTime) Less(i, j int) bool

func (ByCreateTime) Swap

func (ct ByCreateTime) Swap(i, j int)

type DBInstance

type DBInstance interface {
	Describe(ID string) (DBInstanceDetails, error)
	DescribeByTag(TagName, TagValue string) ([]*DBInstanceDetails, error)
	DescribeSnapshots(DBInstanceID string) ([]*DBSnapshotDetails, error)
	Create(ID string, dbInstanceDetails DBInstanceDetails) error
	Restore(ID, snapshotIdentifier string, dbInstanceDetails DBInstanceDetails) error
	Modify(ID string, dbInstanceDetails DBInstanceDetails, applyImmediately bool) error
	Reboot(ID string) error
	RemoveTag(ID, tagKey string) error
	Delete(ID string, skipFinalSnapshot bool) error
	GetTag(ID, tagKey string) (string, error)
}

type DBInstanceDetails

type DBInstanceDetails struct {
	Identifier                 string
	Status                     string
	DBInstanceClass            string
	Engine                     string
	EngineVersion              string
	Address                    string
	AllocatedStorage           int64
	Arn                        string
	AutoMinorVersionUpgrade    bool
	AvailabilityZone           string
	BackupRetentionPeriod      int64
	CharacterSetName           string
	CopyTagsToSnapshot         bool
	DBName                     string
	DBParameterGroupName       string
	DBSecurityGroups           []string
	DBSubnetGroupName          string
	Iops                       int64
	KmsKeyID                   string
	LicenseModel               string
	MasterUsername             string
	MasterUserPassword         string
	MultiAZ                    bool
	OptionGroupName            string
	PendingModifications       bool
	Port                       int64
	PreferredBackupWindow      string
	PreferredMaintenanceWindow string
	PubliclyAccessible         bool
	StorageEncrypted           bool
	StorageType                string
	Tags                       map[string]string
	VpcSecurityGroupIds        []string
}

type DBSnapshotDetails

type DBSnapshotDetails struct {
	Identifier         string
	InstanceIdentifier string
	Arn                string
	CreateTime         time.Time
	Tags               map[string]string
}

type RDSDBInstance

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

func NewRDSDBInstance

func NewRDSDBInstance(
	region string,
	partition string,
	rdssvc *rds.RDS,
	logger lager.Logger,
) *RDSDBInstance

func (*RDSDBInstance) Create

func (r *RDSDBInstance) Create(ID string, dbInstanceDetails DBInstanceDetails) error

func (*RDSDBInstance) Delete

func (r *RDSDBInstance) Delete(ID string, skipFinalSnapshot bool) error

func (*RDSDBInstance) Describe

func (r *RDSDBInstance) Describe(ID string) (DBInstanceDetails, error)

func (*RDSDBInstance) DescribeByTag

func (r *RDSDBInstance) DescribeByTag(tagKey, tagValue string) ([]*DBInstanceDetails, error)

func (*RDSDBInstance) DescribeSnapshots

func (r *RDSDBInstance) DescribeSnapshots(DBInstanceID string) ([]*DBSnapshotDetails, error)

func (*RDSDBInstance) GetTag

func (r *RDSDBInstance) GetTag(ID, tagKey string) (string, error)

func (*RDSDBInstance) Modify

func (r *RDSDBInstance) Modify(ID string, dbInstanceDetails DBInstanceDetails, applyImmediately bool) error

func (*RDSDBInstance) Reboot

func (r *RDSDBInstance) Reboot(ID string) error

func (*RDSDBInstance) RemoveTag

func (r *RDSDBInstance) RemoveTag(ID, tagKey string) error

func (*RDSDBInstance) Restore

func (r *RDSDBInstance) Restore(ID, snapshotIdentifier string, dbInstanceDetails DBInstanceDetails) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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