forked from aws/aws-sdk-go-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
58 lines (58 loc) · 1.75 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Package sdk is the official AWS SDK v2 for the Go programming language.
//
// aws-sdk-go-v2 is the the v2 of the AWS SDK for the Go programming language.
//
// Getting started
//
// The best way to get started working with the SDK is to use `go get` to add the
// SDK and desired service clients to your Go dependencies explicitly.
//
// go get github.com/aws/aws-sdk-go-v2
// go get github.com/aws/aws-sdk-go-v2/config
// go get github.com/aws/aws-sdk-go-v2/service/dynamodb
//
// Hello AWS
//
// This example shows how you can use the v2 SDK to make an API request using the
// SDK's Amazon DynamoDB client.
//
// package main
//
// import (
// "context"
// "fmt"
// "log"
//
// "github.com/aws/aws-sdk-go-v2/aws"
// "github.com/aws/aws-sdk-go-v2/config"
// "github.com/aws/aws-sdk-go-v2/service/dynamodb"
// )
//
// func main() {
// // Using the SDK's default configuration, loading additional config
// // and credentials values from the environment variables, shared
// // credentials, and shared configuration files
// cfg, err := config.LoadDefaultConfig(context.TODO(),
// config.WithRegion("us-west-2"),
// )
// if err != nil {
// log.Fatalf("unable to load SDK config, %v", err)
// }
//
// // Using the Config value, create the DynamoDB client
// svc := dynamodb.NewFromConfig(cfg)
//
// // Build the request with its input parameters
// resp, err := svc.ListTables(context.TODO(), &dynamodb.ListTablesInput{
// Limit: aws.Int32(5),
// })
// if err != nil {
// log.Fatalf("failed to list tables, %v", err)
// }
//
// fmt.Println("Tables:")
// for _, tableName := range resp.TableNames {
// fmt.Println(aws.ToString(tableName))
// }
// }
package sdk