awsrds

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TagServiceID            = "Service ID"
	TagPlanID               = "Plan ID"
	TagOrganizationID       = "Organization ID"
	TagSpaceID              = "Space ID"
	TagSkipFinalSnapshot    = "SkipFinalSnapshot"
	TagRestoredFromSnapshot = "Restored From Snapshot"
	TagBrokerName           = "Broker Name"
	TagExtensions           = "Extensions"
)

Variables

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

Functions

func BuilRDSTags

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

func GetDBAddress added in v0.24.0

func GetDBAddress(endpoint *rds.Endpoint) (dbAddress string)

func GetDBPort added in v0.24.0

func GetDBPort(endpoint *rds.Endpoint) int64

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 []*rds.DBSnapshot

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 DescribeOption added in v0.22.0

type DescribeOption string
const (
	// Should Describe* ops invalidate and refresh the cache
	DescribeRefreshCacheOption DescribeOption = "refreshCache"
)

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) AddTagsToResource added in v0.24.0

func (r *RDSDBInstance) AddTagsToResource(resourceARN string, tags []*rds.Tag) error

func (*RDSDBInstance) Create

func (r *RDSDBInstance) Create(createDBInstanceInput *rds.CreateDBInstanceInput) error

func (*RDSDBInstance) CreateParameterGroup added in v0.27.0

func (r *RDSDBInstance) CreateParameterGroup(input *rds.CreateDBParameterGroupInput) error

func (*RDSDBInstance) Delete

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

func (*RDSDBInstance) DeleteSnapshots added in v0.9.0

func (r *RDSDBInstance) DeleteSnapshots(brokerName string, keepForDays int) error

func (*RDSDBInstance) Describe

func (r *RDSDBInstance) Describe(ID string) (*rds.DBInstance, error)

func (*RDSDBInstance) DescribeByTag

func (r *RDSDBInstance) DescribeByTag(tagKey, tagValue string, opts ...DescribeOption) ([]*rds.DBInstance, error)

func (*RDSDBInstance) DescribeSnapshots

func (r *RDSDBInstance) DescribeSnapshots(DBInstanceID string) ([]*rds.DBSnapshot, error)

func (*RDSDBInstance) GetParameterGroup added in v0.27.0

func (r *RDSDBInstance) GetParameterGroup(groupId string) (*rds.DBParameterGroup, error)

func (*RDSDBInstance) GetResourceTags added in v0.24.0

func (r *RDSDBInstance) GetResourceTags(resourceArn string, opts ...DescribeOption) ([]*rds.Tag, error)

func (*RDSDBInstance) GetTag

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

func (*RDSDBInstance) Modify

func (r *RDSDBInstance) Modify(modifyDBInstanceInput *rds.ModifyDBInstanceInput) (*rds.DBInstance, error)

func (*RDSDBInstance) ModifyParameterGroup added in v0.27.0

func (r *RDSDBInstance) ModifyParameterGroup(input *rds.ModifyDBParameterGroupInput) error

func (*RDSDBInstance) Reboot

func (r *RDSDBInstance) Reboot(rebootDBInstanceInput *rds.RebootDBInstanceInput) error

func (*RDSDBInstance) RemoveTag

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

func (*RDSDBInstance) Restore

func (r *RDSDBInstance) Restore(restoreDBInstanceInput *rds.RestoreDBInstanceFromDBSnapshotInput) error

type RDSInstance added in v0.24.0

type RDSInstance interface {
	Describe(ID string) (*rds.DBInstance, error)
	GetResourceTags(resourceArn string, opts ...DescribeOption) ([]*rds.Tag, error)
	DescribeByTag(TagName, TagValue string, opts ...DescribeOption) ([]*rds.DBInstance, error)
	DescribeSnapshots(DBInstanceID string) ([]*rds.DBSnapshot, error)
	DeleteSnapshots(brokerName string, keepForDays int) error
	Create(createDBInstanceInput *rds.CreateDBInstanceInput) error
	Restore(restoreRBInstanceInput *rds.RestoreDBInstanceFromDBSnapshotInput) error
	Modify(modifyDBInstanceInput *rds.ModifyDBInstanceInput) (*rds.DBInstance, error)
	AddTagsToResource(resourceArn string, tags []*rds.Tag) error
	Reboot(rebootDBInstanceInput *rds.RebootDBInstanceInput) error
	RemoveTag(ID, tagKey string) error
	Delete(ID string, skipFinalSnapshot bool) error
	GetTag(ID, tagKey string) (string, error)
	GetParameterGroup(groupId string) (*rds.DBParameterGroup, error)
	CreateParameterGroup(input *rds.CreateDBParameterGroupInput) error
	ModifyParameterGroup(input *rds.ModifyDBParameterGroupInput) error
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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