Files
fn-serverless/vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/examples_test.go
2017-07-28 07:25:52 -07:00

268 lines
6.6 KiB
Go

// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package applicationdiscoveryservice_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/applicationdiscoveryservice"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleApplicationDiscoveryService_CreateTags() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.CreateTagsInput{
ConfigurationIds: []*string{ // Required
aws.String("ConfigurationId"), // Required
// More values...
},
Tags: []*applicationdiscoveryservice.Tag{ // Required
{ // Required
Key: aws.String("TagKey"), // Required
Value: aws.String("TagValue"), // Required
},
// More values...
},
}
resp, err := svc.CreateTags(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 ExampleApplicationDiscoveryService_DeleteTags() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.DeleteTagsInput{
ConfigurationIds: []*string{ // Required
aws.String("ConfigurationId"), // Required
// More values...
},
Tags: []*applicationdiscoveryservice.Tag{
{ // Required
Key: aws.String("TagKey"), // Required
Value: aws.String("TagValue"), // Required
},
// More values...
},
}
resp, err := svc.DeleteTags(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 ExampleApplicationDiscoveryService_DescribeAgents() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.DescribeAgentsInput{
AgentIds: []*string{
aws.String("AgentId"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeAgents(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 ExampleApplicationDiscoveryService_DescribeConfigurations() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.DescribeConfigurationsInput{
ConfigurationIds: []*string{ // Required
aws.String("ConfigurationId"), // Required
// More values...
},
}
resp, err := svc.DescribeConfigurations(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 ExampleApplicationDiscoveryService_DescribeExportConfigurations() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.DescribeExportConfigurationsInput{
ExportIds: []*string{
aws.String("ConfigurationsExportId"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeExportConfigurations(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 ExampleApplicationDiscoveryService_DescribeTags() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.DescribeTagsInput{
Filters: []*applicationdiscoveryservice.TagFilter{
{ // Required
Name: aws.String("FilterName"), // Required
Values: []*string{ // Required
aws.String("FilterValue"), // Required
// More values...
},
},
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeTags(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 ExampleApplicationDiscoveryService_ExportConfigurations() {
svc := applicationdiscoveryservice.New(session.New())
var params *applicationdiscoveryservice.ExportConfigurationsInput
resp, err := svc.ExportConfigurations(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 ExampleApplicationDiscoveryService_ListConfigurations() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.ListConfigurationsInput{
ConfigurationType: aws.String("ConfigurationItemType"), // Required
Filters: []*applicationdiscoveryservice.Filter{
{ // Required
Condition: aws.String("Condition"), // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("FilterValue"), // Required
// More values...
},
},
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.ListConfigurations(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 ExampleApplicationDiscoveryService_StartDataCollectionByAgentIds() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.StartDataCollectionByAgentIdsInput{
AgentIds: []*string{ // Required
aws.String("AgentId"), // Required
// More values...
},
}
resp, err := svc.StartDataCollectionByAgentIds(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 ExampleApplicationDiscoveryService_StopDataCollectionByAgentIds() {
svc := applicationdiscoveryservice.New(session.New())
params := &applicationdiscoveryservice.StopDataCollectionByAgentIdsInput{
AgentIds: []*string{ // Required
aws.String("AgentId"), // Required
// More values...
},
}
resp, err := svc.StopDataCollectionByAgentIds(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)
}