Documentation
¶
Index ¶
- Constants
- Variables
- type BindParameters
- type Catalog
- type CatalogExternal
- type Config
- type Credentials
- type DBExtension
- type Engine
- type ParameterGroupSelector
- type ParameterGroupSource
- type ProvisionParameters
- type RDSBroker
- func (b *RDSBroker) Bind(ctx context.Context, instanceID, bindingID string, ...) (brokerapi.Binding, error)
- func (b *RDSBroker) CheckAndRotateCredentials()
- func (b *RDSBroker) Deprovision(ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, ...) (brokerapi.DeprovisionServiceSpec, error)
- func (b *RDSBroker) GetBinding(ctx context.Context, first, second string) (brokerapi.GetBindingSpec, error)
- func (b *RDSBroker) GetInstance(ctx context.Context, first string) (brokerapi.GetInstanceDetailsSpec, error)
- func (b *RDSBroker) LastBindingOperation(ctx context.Context, first, second string, pollDetails brokerapi.PollDetails) (brokerapi.LastOperation, error)
- func (b *RDSBroker) LastOperation(ctx context.Context, instanceID string, pollDetails brokerapi.PollDetails) (brokerapi.LastOperation, error)
- func (b *RDSBroker) PostRestoreTasks(instanceID string, dbInstance *rds.DBInstance, tagsByName map[string]string) (asyncOperationTriggered bool, err error)
- func (b *RDSBroker) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, ...) (brokerapi.ProvisionedServiceSpec, error)
- func (b *RDSBroker) RebootIfRequired(instanceID string, dbInstance *rds.DBInstance) (asyncOperationTriggered bool, err error)
- func (b *RDSBroker) Services(ctx context.Context) ([]brokerapi.Service, error)
- func (b *RDSBroker) Unbind(ctx context.Context, instanceID, bindingID string, ...) (brokerapi.UnbindSpec, error)
- func (b *RDSBroker) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, ...) (brokerapi.UpdateServiceSpec, error)
- type RDSInstanceTags
- type RDSProperties
- type Service
- type ServicePlan
- type UpdateParameters
Constants ¶
View Source
const MasterPasswordLength = 32
View Source
const MasterUsernameLength = 16
View Source
const RestoreFromLatestSnapshotBeforeTimeFormat = "2006-01-02 15:04:05"
View Source
const RestoreFromPointInTimeBeforeTimeFormat = "2006-01-02 15:04:05"
View Source
const StateReboot = "PendingReboot"
View Source
const StateResetUserPassword = "PendingResetUserPassword"
View Source
const StateUpdateSettings = "PendingUpdateSettings"
Variables ¶
View Source
var (
ErrEncryptionNotUpdateable = errors.New("instance can not be updated to a plan with different encryption settings")
)
View Source
var SupportedPreloadExtensions = map[string][]DBExtension{ "postgres11": { DBExtension{ Name: "auto_explain", RequiresPreloadLibrary: true, }, DBExtension{ Name: "orafce", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pgaudit", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pglogical", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pg_similarity", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pg_stat_statements", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pg_hint_plan", RequiresPreloadLibrary: true, }, }, "postgres10": { DBExtension{ Name: "auto_explain", RequiresPreloadLibrary: true, }, DBExtension{ Name: "orafce", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pgaudit", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pglogical", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pg_similarity", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pg_stat_statements", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pg_hint_plan", RequiresPreloadLibrary: true, }, }, "postgres9.5": { DBExtension{ Name: "auto_explain", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pgaudit", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pg_stat_statements", RequiresPreloadLibrary: true, }, DBExtension{ Name: "pg_hint_plan", RequiresPreloadLibrary: true, }, }, "mysql5.7": []DBExtension{}, }
Lists the supported database extensions that require libraries to be loaded on startup, keyed on database engine family
Functions ¶
This section is empty.
Types ¶
type BindParameters ¶
type BindParameters struct {
ReadOnly bool `json:"read_only"`
}
type Catalog ¶
type Catalog struct { Services []Service `json:"services,omitempty"` ExcludeEngines []Engine `json:"exclude_engines"` }
func (Catalog) FindService ¶
func (Catalog) FindServicePlan ¶
func (c Catalog) FindServicePlan(planID string) (plan ServicePlan, found bool)
type CatalogExternal ¶
type Config ¶
type Config struct { Region string `json:"region"` DBPrefix string `json:"db_prefix"` BrokerName string `json:"broker_name"` AWSPartition string `json:"aws_partition"` MasterPasswordSeed string `json:"master_password_seed"` AllowUserProvisionParameters bool `json:"allow_user_provision_parameters"` AllowUserUpdateParameters bool `json:"allow_user_update_parameters"` AllowUserBindParameters bool `json:"allow_user_bind_parameters"` Catalog Catalog `json:"catalog"` }
func (*Config) FillDefaults ¶
func (c *Config) FillDefaults()
type Credentials ¶
type DBExtension ¶ added in v0.27.0
type ParameterGroupSelector ¶ added in v0.27.0
type ParameterGroupSelector interface {
SelectParameterGroup(servicePlan ServicePlan, extensions []string) (string, error)
}
type ParameterGroupSource ¶ added in v0.27.0
type ParameterGroupSource struct {
// contains filtered or unexported fields
}
func NewParameterGroupSource ¶ added in v0.27.0
func NewParameterGroupSource(config Config, rdsInstance awsrds.RDSInstance, supportedPreloadExtensions map[string][]DBExtension, logger lager.Logger) *ParameterGroupSource
func (*ParameterGroupSource) SelectParameterGroup ¶ added in v0.27.0
func (pgs *ParameterGroupSource) SelectParameterGroup(servicePlan ServicePlan, extensions []string) (string, error)
type ProvisionParameters ¶
type ProvisionParameters struct { BackupRetentionPeriod int64 `json:"backup_retention_period"` CharacterSetName string `json:"character_set_name"` DBName string `json:"dbname"` PreferredBackupWindow string `json:"preferred_backup_window"` PreferredMaintenanceWindow string `json:"preferred_maintenance_window"` SkipFinalSnapshot *bool `json:"skip_final_snapshot"` RestoreFromPointInTimeOf *string `json:"restore_from_point_in_time_of"` RestoreFromPointInTimeBefore *string `json:"restore_from_point_in_time_before"` RestoreFromLatestSnapshotOf *string `json:"restore_from_latest_snapshot_of"` RestoreFromLatestSnapshotBefore *string `json:"restore_from_latest_snapshot_before"` Extensions []string `json:"enable_extensions"` }
func (*ProvisionParameters) Validate ¶
func (pp *ProvisionParameters) Validate() error
type RDSBroker ¶
type RDSBroker struct {
// contains filtered or unexported fields
}
func New ¶
func New( config Config, dbInstance awsrds.RDSInstance, sqlProvider sqlengine.Provider, parameterGroupSelector ParameterGroupSelector, logger lager.Logger, ) *RDSBroker
func (*RDSBroker) CheckAndRotateCredentials ¶
func (b *RDSBroker) CheckAndRotateCredentials()
func (*RDSBroker) Deprovision ¶
func (b *RDSBroker) Deprovision( ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool, ) (brokerapi.DeprovisionServiceSpec, error)
func (*RDSBroker) GetBinding ¶ added in v0.39.0
func (*RDSBroker) GetInstance ¶ added in v0.39.0
func (*RDSBroker) LastBindingOperation ¶ added in v0.39.0
func (b *RDSBroker) LastBindingOperation(ctx context.Context, first, second string, pollDetails brokerapi.PollDetails) (brokerapi.LastOperation, error)
func (*RDSBroker) LastOperation ¶
func (b *RDSBroker) LastOperation( ctx context.Context, instanceID string, pollDetails brokerapi.PollDetails, ) (brokerapi.LastOperation, error)
func (*RDSBroker) PostRestoreTasks ¶
func (*RDSBroker) Provision ¶
func (b *RDSBroker) Provision( ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool, ) (brokerapi.ProvisionedServiceSpec, error)
func (*RDSBroker) RebootIfRequired ¶ added in v0.31.0
type RDSInstanceTags ¶ added in v0.27.0
type RDSProperties ¶
type RDSProperties struct { DBInstanceClass *string `json:"db_instance_class"` Engine *string `json:"engine"` EngineVersion *string `json:"engine_version"` EngineFamily *string `json:"engine_family"` AllocatedStorage *int64 `json:"allocated_storage"` AutoMinorVersionUpgrade *bool `json:"auto_minor_version_upgrade,omitempty"` AvailabilityZone *string `json:"availability_zone,omitempty"` BackupRetentionPeriod *int64 `json:"backup_retention_period,omitempty"` CharacterSetName *string `json:"character_set_name,omitempty"` DBSecurityGroups []*string `json:"db_security_groups,omitempty"` DBSubnetGroupName *string `json:"db_subnet_group_name,omitempty"` LicenseModel *string `json:"license_model,omitempty"` MultiAZ *bool `json:"multi_az,omitempty"` OptionGroupName *string `json:"option_group_name,omitempty"` Port *int64 `json:"port,omitempty"` PreferredBackupWindow *string `json:"preferred_backup_window,omitempty"` PreferredMaintenanceWindow *string `json:"preferred_maintenance_window,omitempty"` PubliclyAccessible *bool `json:"publicly_accessible,omitempty"` StorageEncrypted *bool `json:"storage_encrypted,omitempty"` KmsKeyID *string `json:"kms_key_id,omitempty"` StorageType *string `json:"storage_type,omitempty"` Iops *int64 `json:"iops,omitempty"` VpcSecurityGroupIds []*string `json:"vpc_security_group_ids,omitempty"` CopyTagsToSnapshot *bool `json:"copy_tags_to_snapshot,omitempty"` SkipFinalSnapshot *bool `json:"skip_final_snapshot,omitempty"` DefaultExtensions []*string `json:"default_extensions,omitempty"` AllowedExtensions []*string `json:"allowed_extensions"` }
func (RDSProperties) Validate ¶
func (rp RDSProperties) Validate(c Catalog) error
type Service ¶
type Service struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Tags []string `json:"tags,omitempty"` PlanUpdatable bool `json:"plan_updateable"` Plans []ServicePlan `json:"plans"` Requires []brokerapi.RequiredPermission `json:"requires,omitempty"` Metadata *brokerapi.ServiceMetadata `json:"metadata,omitempty"` DashboardClient *brokerapi.ServiceDashboardClient `json:"dashboard_client,omitempty"` }
type ServicePlan ¶
type ServicePlan struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Free *bool `json:"free,omitempty"` Metadata *brokerapi.ServicePlanMetadata `json:"metadata,omitempty"` RDSProperties RDSProperties `json:"rds_properties,omitempty"` }
func (ServicePlan) Validate ¶
func (sp ServicePlan) Validate(c Catalog) error
type UpdateParameters ¶
type UpdateParameters struct { ApplyAtMaintenanceWindow bool `json:"apply_at_maintenance_window"` BackupRetentionPeriod int64 `json:"backup_retention_period"` PreferredBackupWindow string `json:"preferred_backup_window"` PreferredMaintenanceWindow string `json:"preferred_maintenance_window"` SkipFinalSnapshot *bool `json:"skip_final_snapshot"` Reboot *bool `json:"reboot"` UpgradeMinorVersionToLatest *bool `json:"update_minor_version_to_latest"` ForceFailover *bool `json:"force_failover"` EnableExtensions []string `json:"enable_extensions"` DisableExtensions []string `json:"disable_extensions"` }
func (*UpdateParameters) CheckForCompatibilityWithPlanChange ¶ added in v0.36.0
func (up *UpdateParameters) CheckForCompatibilityWithPlanChange() error
func (*UpdateParameters) Validate ¶
func (up *UpdateParameters) Validate() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.