vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2017-07-23 08:51:42 +01:00
parent 0b6fba34a3
commit eb87cf6f12
2008 changed files with 352617 additions and 1004734 deletions
+39 -14
View File
@@ -2713,7 +2713,10 @@ func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilt
// * An AWS Lambda function that belongs to the same account as the subscription
// filter, for same-account delivery.
//
// There can only be one subscription filter associated with a log group.
// There can only be one subscription filter associated with a log group. If
// you are updating an existing filter, you must specify the correct name in
// filterName. Otherwise, the call will fail because you cannot associate a
// second filter with a log group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4101,6 +4104,12 @@ type DescribeLogStreamsInput struct {
//
// If you order the results by event time, you cannot specify the logStreamNamePrefix
// parameter.
//
// lastEventTimestamp represents the time of the most recent log event in the
// log stream in CloudWatch Logs. This number is expressed as the number of
// milliseconds since Jan 1, 1970 00:00:00 UTC. lastEventTimeStamp updates on
// an eventual consistency basis. It typically updates in less than an hour
// from ingestion, but may take longer in some rare situations.
OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"`
}
@@ -4462,7 +4471,8 @@ type Destination struct {
// The ARN of this destination.
Arn *string `locationName:"arn" type:"string"`
// The creation time of the destination.
// The creation time of the destination, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC.
CreationTime *int64 `locationName:"creationTime" type:"long"`
// The name of the destination.
@@ -4626,10 +4636,12 @@ func (s *ExportTask) SetTo(v int64) *ExportTask {
type ExportTaskExecutionInfo struct {
_ struct{} `type:"structure"`
// The completion time of the export task.
// The completion time of the export task, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC.
CompletionTime *int64 `locationName:"completionTime" type:"long"`
// The creation time of the export task.
// The creation time of the export task, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC.
CreationTime *int64 `locationName:"creationTime" type:"long"`
}
@@ -4864,7 +4876,8 @@ type FilteredLogEvent struct {
// The ID of the event.
EventId *string `locationName:"eventId" type:"string"`
// The time the event was ingested.
// The time the event was ingested, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC.
IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
// The name of the log stream this event belongs to.
@@ -5214,7 +5227,8 @@ type LogGroup struct {
// The Amazon Resource Name (ARN) of the log group.
Arn *string `locationName:"arn" type:"string"`
// The creation time of the log group.
// The creation time of the log group, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC.
CreationTime *int64 `locationName:"creationTime" type:"long"`
// The name of the log group.
@@ -5287,18 +5301,23 @@ type LogStream struct {
// The Amazon Resource Name (ARN) of the log stream.
Arn *string `locationName:"arn" type:"string"`
// The creation time of the stream.
// The creation time of the stream, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC.
CreationTime *int64 `locationName:"creationTime" type:"long"`
// The time of the first event, expressed as the number of milliseconds since
// Jan 1, 1970 00:00:00 UTC.
FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"`
// The time of the last event, expressed as the number of milliseconds since
// Jan 1, 1970 00:00:00 UTC.
// the time of the most recent log event in the log stream in CloudWatch Logs.
// This number is expressed as the number of milliseconds since Jan 1, 1970
// 00:00:00 UTC. lastEventTime updates on an eventual consistency basis. It
// typically updates in less than an hour from ingestion, but may take longer
// in some rare situations.
LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"`
// The ingestion time.
// The ingestion time, expressed as the number of milliseconds since Jan 1,
// 1970 00:00:00 UTC.
LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"`
// The name of the log stream.
@@ -5376,7 +5395,8 @@ func (s *LogStream) SetUploadSequenceToken(v string) *LogStream {
type MetricFilter struct {
_ struct{} `type:"structure"`
// The creation time of the metric filter.
// The creation time of the metric filter, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC.
CreationTime *int64 `locationName:"creationTime" type:"long"`
// The name of the metric filter.
@@ -5563,7 +5583,8 @@ func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation {
type OutputLogEvent struct {
_ struct{} `type:"structure"`
// The time the event was ingested.
// The time the event was ingested, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC.
IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
// The data contained in the log event.
@@ -6124,7 +6145,10 @@ type PutSubscriptionFilterInput struct {
// For a more even distribution, you can group log data randomly.
Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"`
// A name for the subscription filter.
// A name for the subscription filter. If you are updating an existing filter,
// you must specify the correct name in filterName. Otherwise, the call will
// fail because you cannot associate a second filter with a log group. To find
// the name of the filter currently associated with a log group, use DescribeSubscriptionFilters.
//
// FilterName is a required field
FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
@@ -6323,7 +6347,8 @@ func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream {
type SubscriptionFilter struct {
_ struct{} `type:"structure"`
// The creation time of the subscription filter.
// The creation time of the subscription filter, expressed as the number of
// milliseconds since Jan 1, 1970 00:00:00 UTC.
CreationTime *int64 `locationName:"creationTime" type:"long"`
// The Amazon Resource Name (ARN) of the destination.
@@ -1,695 +0,0 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudwatchlogs_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleCloudWatchLogs_CancelExportTask() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.CancelExportTaskInput{
TaskId: aws.String("ExportTaskId"), // Required
}
resp, err := svc.CancelExportTask(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_CreateExportTask() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.CreateExportTaskInput{
Destination: aws.String("ExportDestinationBucket"), // Required
From: aws.Int64(1), // Required
LogGroupName: aws.String("LogGroupName"), // Required
To: aws.Int64(1), // Required
DestinationPrefix: aws.String("ExportDestinationPrefix"),
LogStreamNamePrefix: aws.String("LogStreamName"),
TaskName: aws.String("ExportTaskName"),
}
resp, err := svc.CreateExportTask(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_CreateLogGroup() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.CreateLogGroupInput{
LogGroupName: aws.String("LogGroupName"), // Required
Tags: map[string]*string{
"Key": aws.String("TagValue"), // Required
// More values...
},
}
resp, err := svc.CreateLogGroup(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_CreateLogStream() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.CreateLogStreamInput{
LogGroupName: aws.String("LogGroupName"), // Required
LogStreamName: aws.String("LogStreamName"), // Required
}
resp, err := svc.CreateLogStream(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DeleteDestination() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DeleteDestinationInput{
DestinationName: aws.String("DestinationName"), // Required
}
resp, err := svc.DeleteDestination(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DeleteLogGroup() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DeleteLogGroupInput{
LogGroupName: aws.String("LogGroupName"), // Required
}
resp, err := svc.DeleteLogGroup(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DeleteLogStream() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DeleteLogStreamInput{
LogGroupName: aws.String("LogGroupName"), // Required
LogStreamName: aws.String("LogStreamName"), // Required
}
resp, err := svc.DeleteLogStream(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DeleteMetricFilter() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DeleteMetricFilterInput{
FilterName: aws.String("FilterName"), // Required
LogGroupName: aws.String("LogGroupName"), // Required
}
resp, err := svc.DeleteMetricFilter(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DeleteRetentionPolicy() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DeleteRetentionPolicyInput{
LogGroupName: aws.String("LogGroupName"), // Required
}
resp, err := svc.DeleteRetentionPolicy(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DeleteSubscriptionFilter() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DeleteSubscriptionFilterInput{
FilterName: aws.String("FilterName"), // Required
LogGroupName: aws.String("LogGroupName"), // Required
}
resp, err := svc.DeleteSubscriptionFilter(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DescribeDestinations() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DescribeDestinationsInput{
DestinationNamePrefix: aws.String("DestinationName"),
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeDestinations(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DescribeExportTasks() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DescribeExportTasksInput{
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
StatusCode: aws.String("ExportTaskStatusCode"),
TaskId: aws.String("ExportTaskId"),
}
resp, err := svc.DescribeExportTasks(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DescribeLogGroups() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DescribeLogGroupsInput{
Limit: aws.Int64(1),
LogGroupNamePrefix: aws.String("LogGroupName"),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeLogGroups(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DescribeLogStreams() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DescribeLogStreamsInput{
LogGroupName: aws.String("LogGroupName"), // Required
Descending: aws.Bool(true),
Limit: aws.Int64(1),
LogStreamNamePrefix: aws.String("LogStreamName"),
NextToken: aws.String("NextToken"),
OrderBy: aws.String("OrderBy"),
}
resp, err := svc.DescribeLogStreams(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DescribeMetricFilters() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DescribeMetricFiltersInput{
FilterNamePrefix: aws.String("FilterName"),
Limit: aws.Int64(1),
LogGroupName: aws.String("LogGroupName"),
MetricName: aws.String("MetricName"),
MetricNamespace: aws.String("MetricNamespace"),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeMetricFilters(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_DescribeSubscriptionFilters() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.DescribeSubscriptionFiltersInput{
LogGroupName: aws.String("LogGroupName"), // Required
FilterNamePrefix: aws.String("FilterName"),
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeSubscriptionFilters(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_FilterLogEvents() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.FilterLogEventsInput{
LogGroupName: aws.String("LogGroupName"), // Required
EndTime: aws.Int64(1),
FilterPattern: aws.String("FilterPattern"),
Interleaved: aws.Bool(true),
Limit: aws.Int64(1),
LogStreamNames: []*string{
aws.String("LogStreamName"), // Required
// More values...
},
NextToken: aws.String("NextToken"),
StartTime: aws.Int64(1),
}
resp, err := svc.FilterLogEvents(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_GetLogEvents() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.GetLogEventsInput{
LogGroupName: aws.String("LogGroupName"), // Required
LogStreamName: aws.String("LogStreamName"), // Required
EndTime: aws.Int64(1),
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
StartFromHead: aws.Bool(true),
StartTime: aws.Int64(1),
}
resp, err := svc.GetLogEvents(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_ListTagsLogGroup() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.ListTagsLogGroupInput{
LogGroupName: aws.String("LogGroupName"), // Required
}
resp, err := svc.ListTagsLogGroup(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_PutDestination() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.PutDestinationInput{
DestinationName: aws.String("DestinationName"), // Required
RoleArn: aws.String("RoleArn"), // Required
TargetArn: aws.String("TargetArn"), // Required
}
resp, err := svc.PutDestination(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_PutDestinationPolicy() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.PutDestinationPolicyInput{
AccessPolicy: aws.String("AccessPolicy"), // Required
DestinationName: aws.String("DestinationName"), // Required
}
resp, err := svc.PutDestinationPolicy(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_PutLogEvents() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.PutLogEventsInput{
LogEvents: []*cloudwatchlogs.InputLogEvent{ // Required
{ // Required
Message: aws.String("EventMessage"), // Required
Timestamp: aws.Int64(1), // Required
},
// More values...
},
LogGroupName: aws.String("LogGroupName"), // Required
LogStreamName: aws.String("LogStreamName"), // Required
SequenceToken: aws.String("SequenceToken"),
}
resp, err := svc.PutLogEvents(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_PutMetricFilter() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.PutMetricFilterInput{
FilterName: aws.String("FilterName"), // Required
FilterPattern: aws.String("FilterPattern"), // Required
LogGroupName: aws.String("LogGroupName"), // Required
MetricTransformations: []*cloudwatchlogs.MetricTransformation{ // Required
{ // Required
MetricName: aws.String("MetricName"), // Required
MetricNamespace: aws.String("MetricNamespace"), // Required
MetricValue: aws.String("MetricValue"), // Required
DefaultValue: aws.Float64(1.0),
},
// More values...
},
}
resp, err := svc.PutMetricFilter(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_PutRetentionPolicy() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.PutRetentionPolicyInput{
LogGroupName: aws.String("LogGroupName"), // Required
RetentionInDays: aws.Int64(1), // Required
}
resp, err := svc.PutRetentionPolicy(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_PutSubscriptionFilter() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.PutSubscriptionFilterInput{
DestinationArn: aws.String("DestinationArn"), // Required
FilterName: aws.String("FilterName"), // Required
FilterPattern: aws.String("FilterPattern"), // Required
LogGroupName: aws.String("LogGroupName"), // Required
Distribution: aws.String("Distribution"),
RoleArn: aws.String("RoleArn"),
}
resp, err := svc.PutSubscriptionFilter(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_TagLogGroup() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.TagLogGroupInput{
LogGroupName: aws.String("LogGroupName"), // Required
Tags: map[string]*string{ // Required
"Key": aws.String("TagValue"), // Required
// More values...
},
}
resp, err := svc.TagLogGroup(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_TestMetricFilter() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.TestMetricFilterInput{
FilterPattern: aws.String("FilterPattern"), // Required
LogEventMessages: []*string{ // Required
aws.String("EventMessage"), // Required
// More values...
},
}
resp, err := svc.TestMetricFilter(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCloudWatchLogs_UntagLogGroup() {
sess := session.Must(session.NewSession())
svc := cloudwatchlogs.New(sess)
params := &cloudwatchlogs.UntagLogGroupInput{
LogGroupName: aws.String("LogGroupName"), // Required
Tags: []*string{ // Required
aws.String("TagKey"), // Required
// More values...
},
}
resp, err := svc.UntagLogGroup(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}