Skip to content

Commit 0366607

Browse files
committed
Update README.md
1 parent 833544d commit 0366607

File tree

1 file changed

+61
-71
lines changed

1 file changed

+61
-71
lines changed

dotnetv4/Redshift/README.md

Lines changed: 61 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,119 @@
1-
# Amazon Redshift code examples for the SDK for .NET Framework 4.x
1+
# Amazon Redshift code examples for the SDK for .NET (v4)
22

33
## Overview
44

5-
This folder contains code examples that demonstrate how to use the AWS SDK for .NET Framework 4.x to interact with Amazon Redshift.
5+
Shows how to use the AWS SDK for .NET (v4) to work with Amazon Redshift.
66

7-
Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse service that makes it simple and cost-effective to efficiently analyze all your data using your existing business intelligence tools.
7+
<!--custom.overview.start-->
8+
<!--custom.overview.end-->
9+
10+
_Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse service that makes it simple and cost-effective to efficiently analyze all your data using your existing business intelligence tools._
811

912
## ⚠ Important
1013

11-
* Running this code might result in charges to your AWS account.
14+
* Running this code might result in charges to your AWS account. For more details, see [AWS Pricing](https://aws.amazon.com/pricing/) and [Free Tier](https://aws.amazon.com/free/).
1215
* Running the tests might result in charges to your AWS account.
1316
* 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).
1417
* 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).
1518

19+
<!--custom.important.start-->
20+
<!--custom.important.end-->
21+
1622
## Code examples
1723

18-
### Actions
24+
### Prerequisites
1925

20-
Code excerpts that show you how to call individual service functions:
26+
For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv4` folder.
2127

22-
- [CreateCluster](Actions/RedshiftWrapper.cs#L28) (`CreateCluster`)
23-
- [DeleteCluster](Actions/RedshiftWrapper.cs#L118) (`DeleteCluster`)
24-
- [DescribeClusters](Actions/RedshiftWrapper.cs#L69) (`DescribeClusters`)
25-
- [ModifyCluster](Actions/RedshiftWrapper.cs#L96) (`ModifyCluster`)
26-
- [CreateTable](Actions/RedshiftWrapper.cs#L157) (`ExecuteStatement`)
27-
- [InsertMovie](Actions/RedshiftWrapper.cs#L193) (`ExecuteStatement`)
28-
- [QueryMoviesByYear](Actions/RedshiftWrapper.cs#L227) (`ExecuteStatement`, `GetStatementResult`)
29-
- [DescribeStatement](Actions/RedshiftWrapper.cs#L269) (`DescribeStatement`)
30-
- [GetStatementResult](Actions/RedshiftWrapper.cs#L289) (`GetStatementResult`)
31-
- [ListDatabases](Actions/RedshiftWrapper.cs#L130) (`ListDatabases`)
3228

33-
### Scenarios
29+
<!--custom.prerequisites.start-->
30+
<!--custom.prerequisites.end-->
3431

35-
Code examples that show you how to accomplish a specific task by calling multiple functions within the same service:
32+
### Get started
3633

37-
- [Get started with Redshift clusters](Scenarios/RedshiftBasics.cs) - Learn the basics of Amazon Redshift by creating a cluster, adding a table, inserting data, and querying the table.
34+
- [Hello Amazon Redshift](Actions/HelloRedshift.cs#L20) (`DescribeClusters`)
3835

39-
### Hello
4036

41-
- [Hello Amazon Redshift](Hello/HelloRedshift.cs) - A simple example that shows how to get started with Amazon Redshift by listing existing clusters.
37+
### Basics
4238

43-
## Run the examples
39+
Code examples that show you how to perform the essential operations within a service.
4440

45-
### Prerequisites
41+
- [Learn the basics](Actions/RedshiftWrapper.cs)
4642

47-
For general prerequisites, see the [README](../../README.md) in the `dotnetv4` folder.
4843

49-
After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command:
44+
### Single actions
5045

51-
```
52-
dotnet run
53-
```
46+
Code excerpts that show you how to call individual service functions.
5447

55-
Alternatively, you can run the example from within your IDE.
48+
- [CreateCluster](Actions/RedshiftWrapper.cs#L34)
49+
- [DeleteCluster](Actions/RedshiftWrapper.cs#L143)
50+
- [DescribeClusters](Actions/RedshiftWrapper.cs#L77)
51+
- [DescribeStatement](Actions/RedshiftWrapper.cs#L375)
52+
- [GetStatementResult](Actions/RedshiftWrapper.cs#L406)
53+
- [ListDatabases](Actions/RedshiftWrapper.cs#L176)
54+
- [ModifyCluster](Actions/RedshiftWrapper.cs#L109)
5655

57-
### Hello Amazon Redshift
5856

59-
This example shows you how to get started using Amazon Redshift.
57+
<!--custom.examples.start-->
58+
<!--custom.examples.end-->
6059

61-
#### Purpose
60+
## Run the examples
6261

63-
Shows how to use the AWS SDK for .NET to get started using Amazon Redshift. Lists existing Redshift clusters in your account.
62+
### Instructions
6463

65-
### Redshift Basics Scenario
6664

67-
This scenario demonstrates how to interact with Amazon Redshift using the AWS SDK for .NET. It demonstrates various tasks such as creating a Redshift cluster, verifying its readiness, creating a table, populating the table with data, executing SQL queries, and finally cleaning up resources.
65+
<!--custom.instructions.start-->
66+
<!--custom.instructions.end-->
6867

69-
#### Purpose
68+
#### Hello Amazon Redshift
7069

71-
Demonstrates how to:
70+
This example shows you how to get started using Amazon Redshift.
7271

73-
1. Create an Amazon Redshift cluster.
74-
2. Wait for the cluster to become available.
75-
3. List databases in the cluster.
76-
4. Create a "Movies" table.
77-
5. Populate the "Movies" table using sample data.
78-
6. Query the "Movies" table by year.
79-
7. Modify the Redshift cluster.
80-
8. Delete the Amazon Redshift cluster.
8172

82-
#### Usage
73+
#### Learn the basics
8374

84-
1. Clone the repository or download the source code files.
85-
2. Open the code in your preferred .NET IDE.
86-
3. Update the following variables in the `RunScenarioAsync()` method if needed:
87-
- `userName`: The username for the Redshift cluster.
88-
- `userPassword`: The password for the Redshift cluster.
89-
- `databaseName`: The name of the database to use ("dev").
90-
4. Run the `RedshiftBasics` class.
75+
This example shows you how to do the following:
9176

92-
The program will guide you through the scenario, prompting you to enter a cluster ID and the number of records to add to the "Movies" table. The program will also display the progress and results of the various operations.
77+
- Create a Redshift cluster.
78+
- List databases in the cluster.
79+
- Create a table named Movies.
80+
- Populate the Movies table.
81+
- Query the Movies table by year.
82+
- Modify the Redshift cluster.
83+
- Delete the Amazon Redshift cluster.
9384

94-
## Tests
85+
<!--custom.basic_prereqs.redshift_Scenario.start-->
86+
<!--custom.basic_prereqs.redshift_Scenario.end-->
9587

96-
### Unit tests
9788

98-
Unit tests in this solution use MSTest. The tests use Moq to mock AWS service client dependencies.
89+
<!--custom.basics.redshift_Scenario.start-->
90+
<!--custom.basics.redshift_Scenario.end-->
9991

100-
Run unit tests with this command:
10192

102-
```
103-
dotnet test Tests/RedshiftTests.csproj
104-
```
93+
### Tests
10594

106-
### Integration tests
95+
⚠ Running tests might result in charges to your AWS account.
10796

108-
⚠️ Running the integration tests might result in charges to your AWS account.
10997

110-
The integration tests in this solution require access to AWS services and will create and delete AWS resources. Make sure you have valid AWS credentials configured before running these tests.
98+
To find instructions for running these tests, see the [README](../README.md#Tests)
99+
in the `dotnetv4` folder.
111100

112-
Run integration tests with this command:
113101

114-
```
115-
dotnet test IntegrationTests/RedshiftIntegrationTests.csproj
116-
```
117102

118-
Note: The full workflow integration test can take 10-15 minutes to complete due to cluster creation time.
103+
<!--custom.tests.start-->
104+
<!--custom.tests.end-->
119105

120106
## Additional resources
121107

122108
- [Amazon Redshift Management Guide](https://docs.aws.amazon.com/redshift/latest/mgmt/welcome.html)
123109
- [Amazon Redshift API Reference](https://docs.aws.amazon.com/redshift/latest/APIReference/Welcome.html)
124-
- [SDK for .NET Amazon Redshift reference](https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/Redshift/NRedshift.html)
110+
- [SDK for .NET (v4) Amazon Redshift reference](https://docs.aws.amazon.com/sdkfornet/v4/apidocs/items/Redshift/NRedshift.html)
111+
112+
<!--custom.resources.start-->
113+
<!--custom.resources.end-->
125114

126115
---
127116

128-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
117+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
118+
129119
SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)