Documentation ¶
Index ¶
- type GetStartedInstances
- func (scenario GetStartedInstances) Cleanup(instance *types.DBInstance, parameterGroup *types.DBParameterGroup)
- func (scenario GetStartedInstances) CreateInstance(instanceName string, dbEngine string, dbName string, ...) *types.DBInstance
- func (scenario GetStartedInstances) CreateParameterGroup(dbEngine string, parameterGroupName string) *types.DBParameterGroup
- func (scenario GetStartedInstances) CreateSnapshot(instance *types.DBInstance)
- func (scenario GetStartedInstances) DisplayConnection(instance *types.DBInstance)
- func (scenario GetStartedInstances) Run(dbEngine string, parameterGroupName string, instanceName string, dbName string)
- func (scenario GetStartedInstances) SetUserParameters(parameterGroupName string)
- type IScenarioHelper
- type ScenarioHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetStartedInstances ¶
type GetStartedInstances struct {
// contains filtered or unexported fields
}
GetStartedInstances is an interactive example that shows you how to use the AWS SDK for Go with Amazon Relation Database Service (Amazon RDS) to do the following:
- Create a custom DB parameter group and set parameter values.
- Create a DB instance that is configured to use the parameter group. The DB instance also contains a database.
- Take a snapshot of the DB instance.
- Delete the DB instance and parameter group.
func NewGetStartedInstances ¶
func NewGetStartedInstances(sdkConfig aws.Config, questioner demotools.IQuestioner, helper IScenarioHelper) GetStartedInstances
NewGetStartedInstances constructs a GetStartedInstances instance from a configuration. It uses the specified config to get an Amazon RDS client and create wrappers for the actions used in the scenario.
func (GetStartedInstances) Cleanup ¶
func (scenario GetStartedInstances) Cleanup( instance *types.DBInstance, parameterGroup *types.DBParameterGroup)
Cleanup shows how to clean up a DB instance and DB parameter group. Before the DB parameter group can be deleted, all associated DB instances must first be deleted.
func (GetStartedInstances) CreateInstance ¶
func (scenario GetStartedInstances) CreateInstance(instanceName string, dbEngine string, dbName string, parameterGroup *types.DBParameterGroup) *types.DBInstance
CreateInstance shows how to create a DB instance that contains a database of a specified type. The database is also configured to use a custom DB parameter group.
func (GetStartedInstances) CreateParameterGroup ¶
func (scenario GetStartedInstances) CreateParameterGroup(dbEngine string, parameterGroupName string) *types.DBParameterGroup
CreateParameterGroup shows how to get available engine versions for a specified database engine and create a DB parameter group that is compatible with a selected engine family.
func (GetStartedInstances) CreateSnapshot ¶
func (scenario GetStartedInstances) CreateSnapshot(instance *types.DBInstance)
CreateSnapshot shows how to create a DB instance snapshot and wait until it's available.
func (GetStartedInstances) DisplayConnection ¶
func (scenario GetStartedInstances) DisplayConnection(instance *types.DBInstance)
DisplayConnection displays connection information about a DB instance and tips on how to connect to it.
func (GetStartedInstances) Run ¶
func (scenario GetStartedInstances) Run(dbEngine string, parameterGroupName string, instanceName string, dbName string)
Run runs the interactive scenario.
func (GetStartedInstances) SetUserParameters ¶
func (scenario GetStartedInstances) SetUserParameters(parameterGroupName string)
SetUserParameters shows how to get the parameters contained in a custom parameter group and update some of the parameter values in the group.
type IScenarioHelper ¶
IScenarioHelper abstracts the function from a scenario so that it can be mocked for unit testing.
type ScenarioHelper ¶
type ScenarioHelper struct{}
func (ScenarioHelper) Pause ¶
func (helper ScenarioHelper) Pause(secs int)
Pause waits for the specified number of seconds.
func (ScenarioHelper) UniqueId ¶
func (helper ScenarioHelper) UniqueId() string
UniqueId returns a new UUID.