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, details domain.BindDetails, ...) (domain.Binding, error)
- func (b *RDSBroker) CheckAndRotateCredentials()
- func (b *RDSBroker) Deprovision(ctx context.Context, instanceID string, details domain.DeprovisionDetails, ...) (domain.DeprovisionServiceSpec, error)
- func (b *RDSBroker) GetBinding(ctx context.Context, instanceID, bindingID string, ...) (domain.GetBindingSpec, error)
- func (b *RDSBroker) GetInstance(ctx context.Context, instanceID string, details domain.FetchInstanceDetails) (domain.GetInstanceDetailsSpec, error)
- func (b *RDSBroker) LastBindingOperation(ctx context.Context, first, second string, pollDetails domain.PollDetails) (domain.LastOperation, error)
- func (b *RDSBroker) LastOperation(ctx context.Context, instanceID string, pollDetails domain.PollDetails) (domain.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 domain.ProvisionDetails, ...) (domain.ProvisionedServiceSpec, error)
- func (b *RDSBroker) RebootIfRequired(instanceID string, dbInstance *rds.DBInstance) (asyncOperationTriggered bool, err error)
- func (b *RDSBroker) Services(ctx context.Context) ([]domain.Service, error)
- func (b *RDSBroker) Unbind(ctx context.Context, instanceID, bindingID string, ...) (domain.UnbindSpec, error)
- func (b *RDSBroker) Update(ctx context.Context, instanceID string, details domain.UpdateDetails, ...) (domain.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") ErrCannotSkipMajorVersion = errors.New("cannot skip major Postgres versions. Please upgrade one major version at a time (e.g. 10, to 11, to 12)") ErrCannotDowngradeVersion = errors.New("cannot downgrade major versions") ErrCannotDowngradeStorage = errors.New("cannot downgrade storage") )
View Source
var SupportedPreloadExtensions = map[string][]DBExtension{ "postgres13": { 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, }, }, "postgres12": { 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, }, }, }
Lists the supported database extensions that require libraries to be loaded on startup, keyed on database engine family
Note that not all of these extensions necessarily make sense to allow in the offering configuration
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"` AWSTagCacheSeconds uint `json:"aws_tag_cache_seconds"` 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 domain.DeprovisionDetails, asyncAllowed bool, ) (domain.DeprovisionServiceSpec, error)
func (*RDSBroker) GetBinding ¶ added in v0.39.0
func (b *RDSBroker) GetBinding(ctx context.Context, instanceID, bindingID string, details domain.FetchBindingDetails) (domain.GetBindingSpec, error)
func (*RDSBroker) GetInstance ¶ added in v0.39.0
func (b *RDSBroker) GetInstance( ctx context.Context, instanceID string, details domain.FetchInstanceDetails, ) (domain.GetInstanceDetailsSpec, error)
func (*RDSBroker) LastBindingOperation ¶ added in v0.39.0
func (b *RDSBroker) LastBindingOperation(ctx context.Context, first, second string, pollDetails domain.PollDetails) (domain.LastOperation, error)
func (*RDSBroker) LastOperation ¶
func (b *RDSBroker) LastOperation( ctx context.Context, instanceID string, pollDetails domain.PollDetails, ) (domain.LastOperation, error)
func (*RDSBroker) PostRestoreTasks ¶
func (*RDSBroker) Provision ¶
func (b *RDSBroker) Provision( ctx context.Context, instanceID string, details domain.ProvisionDetails, asyncAllowed bool, ) (domain.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 []domain.RequiredPermission `json:"requires,omitempty"` Metadata *domain.ServiceMetadata `json:"metadata,omitempty"` DashboardClient *domain.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) EngineVersion ¶ added in v0.48.0
func (sp ServicePlan) EngineVersion() (*semver.Version, error)
func (ServicePlan) IsUpgradeFrom ¶ added in v0.48.0
func (sp ServicePlan) IsUpgradeFrom(oldPlan ServicePlan) (bool, error)
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.