-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go implementation of RDS get started with instances scenario and related
actions. * Hello RDS * Get started with instances * Unit and integration tests * SOS metadata * README
- Loading branch information
Showing
13 changed files
with
1,544 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<!--Generated by WRITEME on 2023-06-28 22:20:08.375942 (UTC)--> | ||
# Amazon RDS code examples for the SDK for Go V2 | ||
|
||
## Overview | ||
|
||
Shows how to use the AWS SDK for Go V2 to work with Amazon Relational Database Service (Amazon RDS). | ||
|
||
<!--custom.overview.start--> | ||
<!--custom.overview.end--> | ||
|
||
*Amazon RDS is a web service that makes it easier to set up, operate, and scale a relational database in the cloud.* | ||
|
||
## ⚠ Important | ||
|
||
* Running this code might result in charges to your AWS account. | ||
* Running the tests might result in charges to your AWS account. | ||
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). | ||
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). | ||
|
||
<!--custom.important.start--> | ||
<!--custom.important.end--> | ||
|
||
## Code examples | ||
|
||
### Prerequisites | ||
|
||
For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. | ||
|
||
|
||
<!--custom.prerequisites.start--> | ||
<!--custom.prerequisites.end--> | ||
|
||
|
||
### Get started | ||
|
||
* [Hello Amazon RDS](hello/hello.go#L4) (`DescribeDBInstances`) | ||
|
||
### Single actions | ||
|
||
Code excerpts that show you how to call individual service functions. | ||
|
||
* [Create a DB instance](actions/instances.go#L172) (`CreateDBInstance`) | ||
* [Create a DB parameter group](actions/instances.go#L46) (`CreateDBParameterGroup`) | ||
* [Create a snapshot of a DB instance](actions/instances.go#L135) (`CreateDBSnapshot`) | ||
* [Delete a DB instance](actions/instances.go#L226) (`DeleteDBInstance`) | ||
* [Delete a DB parameter group](actions/instances.go#L70) (`DeleteDBParameterGroup`) | ||
* [Describe DB instances](actions/instances.go#L201) (`DescribeDBInstances`) | ||
* [Describe DB parameter groups](actions/instances.go#L21) (`DescribeDBParameterGroups`) | ||
* [Describe database engine versions](actions/instances.go#L245) (`DescribeDBEngineVersions`) | ||
* [Describe options for DB instances](actions/instances.go#L266) (`DescribeOrderableDBInstanceOptions`) | ||
* [Describe parameters in a DB parameter group](actions/instances.go#L88) (`DescribeDBParameters`) | ||
* [Describe snapshots of DB instances](actions/instances.go#L154) (`DescribeDBSnapshots`) | ||
* [Update parameters in a DB parameter group](actions/instances.go#L116) (`ModifyDBParameterGroup`) | ||
|
||
### Scenarios | ||
|
||
Code examples that show you how to accomplish a specific task by calling multiple | ||
functions within the same service. | ||
|
||
* [Get started with DB instances](scenarios/get_started_instances.go) | ||
|
||
## Run the examples | ||
|
||
### Instructions | ||
|
||
|
||
<!--custom.instructions.start--> | ||
<!--custom.instructions.end--> | ||
|
||
#### Hello Amazon RDS | ||
|
||
This example shows you how to get started using Amazon RDS. | ||
|
||
``` | ||
go run ./hello | ||
``` | ||
|
||
#### Run a scenario | ||
|
||
All scenarios can be run with the `cmd` runner. To get a list of scenarios | ||
and to get help for running a scenario, use the following command: | ||
|
||
``` | ||
go run ./cmd -h | ||
``` | ||
|
||
#### Get started with DB instances | ||
|
||
This example shows you how to do the following: | ||
|
||
* Create a custom DB parameter group and set parameter values. | ||
* Create a DB instance that's configured to use the parameter group. The DB instance also contains a database. | ||
* Take a snapshot of the instance. | ||
* Delete the instance and parameter group. | ||
|
||
<!--custom.scenario_prereqs.rds_Scenario_GetStartedInstances.start--> | ||
<!--custom.scenario_prereqs.rds_Scenario_GetStartedInstances.end--> | ||
|
||
|
||
<!--custom.scenarios.rds_Scenario_GetStartedInstances.start--> | ||
<!--custom.scenarios.rds_Scenario_GetStartedInstances.end--> | ||
|
||
### Tests | ||
|
||
⚠ Running tests might result in charges to your AWS account. | ||
|
||
|
||
To find instructions for running these tests, see the [README](../README.md#Tests) | ||
in the `gov2` folder. | ||
|
||
|
||
|
||
<!--custom.tests.start--> | ||
<!--custom.tests.end--> | ||
|
||
## Additional resources | ||
|
||
* [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html) | ||
* [Amazon RDS API Reference](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/Welcome.html) | ||
* [SDK for Go V2 Amazon RDS reference](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/rds) | ||
|
||
<!--custom.resources.start--> | ||
<!--custom.resources.end--> | ||
|
||
--- | ||
|
||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
||
SPDX-License-Identifier: Apache-2.0 |
Oops, something went wrong.