// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. package configservice_test import ( "bytes" "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/configservice" ) var _ time.Duration var _ bytes.Buffer func ExampleConfigService_DeleteDeliveryChannel() { svc := configservice.New(nil) params := &configservice.DeleteDeliveryChannelInput{ DeliveryChannelName: aws.String("ChannelName"), // Required } resp, err := svc.DeleteDeliveryChannel(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 ExampleConfigService_DeliverConfigSnapshot() { svc := configservice.New(nil) params := &configservice.DeliverConfigSnapshotInput{ DeliveryChannelName: aws.String("ChannelName"), // Required } resp, err := svc.DeliverConfigSnapshot(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 ExampleConfigService_DescribeConfigurationRecorderStatus() { svc := configservice.New(nil) params := &configservice.DescribeConfigurationRecorderStatusInput{ ConfigurationRecorderNames: []*string{ aws.String("RecorderName"), // Required // More values... }, } resp, err := svc.DescribeConfigurationRecorderStatus(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 ExampleConfigService_DescribeConfigurationRecorders() { svc := configservice.New(nil) params := &configservice.DescribeConfigurationRecordersInput{ ConfigurationRecorderNames: []*string{ aws.String("RecorderName"), // Required // More values... }, } resp, err := svc.DescribeConfigurationRecorders(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 ExampleConfigService_DescribeDeliveryChannelStatus() { svc := configservice.New(nil) params := &configservice.DescribeDeliveryChannelStatusInput{ DeliveryChannelNames: []*string{ aws.String("ChannelName"), // Required // More values... }, } resp, err := svc.DescribeDeliveryChannelStatus(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 ExampleConfigService_DescribeDeliveryChannels() { svc := configservice.New(nil) params := &configservice.DescribeDeliveryChannelsInput{ DeliveryChannelNames: []*string{ aws.String("ChannelName"), // Required // More values... }, } resp, err := svc.DescribeDeliveryChannels(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 ExampleConfigService_GetResourceConfigHistory() { svc := configservice.New(nil) params := &configservice.GetResourceConfigHistoryInput{ ResourceId: aws.String("ResourceId"), // Required ResourceType: aws.String("ResourceType"), // Required ChronologicalOrder: aws.String("ChronologicalOrder"), EarlierTime: aws.Time(time.Now()), LaterTime: aws.Time(time.Now()), Limit: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.GetResourceConfigHistory(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 ExampleConfigService_ListDiscoveredResources() { svc := configservice.New(nil) params := &configservice.ListDiscoveredResourcesInput{ ResourceType: aws.String("ResourceType"), // Required IncludeDeletedResources: aws.Bool(true), Limit: aws.Int64(1), NextToken: aws.String("NextToken"), ResourceIds: []*string{ aws.String("ResourceId"), // Required // More values... }, ResourceName: aws.String("ResourceName"), } resp, err := svc.ListDiscoveredResources(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 ExampleConfigService_PutConfigurationRecorder() { svc := configservice.New(nil) params := &configservice.PutConfigurationRecorderInput{ ConfigurationRecorder: &configservice.ConfigurationRecorder{ // Required Name: aws.String("RecorderName"), RecordingGroup: &configservice.RecordingGroup{ AllSupported: aws.Bool(true), ResourceTypes: []*string{ aws.String("ResourceType"), // Required // More values... }, }, RoleARN: aws.String("String"), }, } resp, err := svc.PutConfigurationRecorder(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 ExampleConfigService_PutDeliveryChannel() { svc := configservice.New(nil) params := &configservice.PutDeliveryChannelInput{ DeliveryChannel: &configservice.DeliveryChannel{ // Required Name: aws.String("ChannelName"), S3BucketName: aws.String("String"), S3KeyPrefix: aws.String("String"), SnsTopicARN: aws.String("String"), }, } resp, err := svc.PutDeliveryChannel(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 ExampleConfigService_StartConfigurationRecorder() { svc := configservice.New(nil) params := &configservice.StartConfigurationRecorderInput{ ConfigurationRecorderName: aws.String("RecorderName"), // Required } resp, err := svc.StartConfigurationRecorder(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 ExampleConfigService_StopConfigurationRecorder() { svc := configservice.New(nil) params := &configservice.StopConfigurationRecorderInput{ ConfigurationRecorderName: aws.String("RecorderName"), // Required } resp, err := svc.StopConfigurationRecorder(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) }