123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- package support_test
- import (
- "bytes"
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/service/support"
- )
- var _ time.Duration
- var _ bytes.Buffer
- func ExampleSupport_AddAttachmentsToSet() {
- svc := support.New(nil)
- params := &support.AddAttachmentsToSetInput{
- Attachments: []*support.Attachment{ // Required
- { // Required
- Data: []byte("PAYLOAD"),
- FileName: aws.String("FileName"),
- },
- // More values...
- },
- AttachmentSetId: aws.String("AttachmentSetId"),
- }
- resp, err := svc.AddAttachmentsToSet(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 ExampleSupport_AddCommunicationToCase() {
- svc := support.New(nil)
- params := &support.AddCommunicationToCaseInput{
- CommunicationBody: aws.String("CommunicationBody"), // Required
- AttachmentSetId: aws.String("AttachmentSetId"),
- CaseId: aws.String("CaseId"),
- CcEmailAddresses: []*string{
- aws.String("CcEmailAddress"), // Required
- // More values...
- },
- }
- resp, err := svc.AddCommunicationToCase(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 ExampleSupport_CreateCase() {
- svc := support.New(nil)
- params := &support.CreateCaseInput{
- CommunicationBody: aws.String("CommunicationBody"), // Required
- Subject: aws.String("Subject"), // Required
- AttachmentSetId: aws.String("AttachmentSetId"),
- CategoryCode: aws.String("CategoryCode"),
- CcEmailAddresses: []*string{
- aws.String("CcEmailAddress"), // Required
- // More values...
- },
- IssueType: aws.String("IssueType"),
- Language: aws.String("Language"),
- ServiceCode: aws.String("ServiceCode"),
- SeverityCode: aws.String("SeverityCode"),
- }
- resp, err := svc.CreateCase(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 ExampleSupport_DescribeAttachment() {
- svc := support.New(nil)
- params := &support.DescribeAttachmentInput{
- AttachmentId: aws.String("AttachmentId"), // Required
- }
- resp, err := svc.DescribeAttachment(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 ExampleSupport_DescribeCases() {
- svc := support.New(nil)
- params := &support.DescribeCasesInput{
- AfterTime: aws.String("AfterTime"),
- BeforeTime: aws.String("BeforeTime"),
- CaseIdList: []*string{
- aws.String("CaseId"), // Required
- // More values...
- },
- DisplayId: aws.String("DisplayId"),
- IncludeCommunications: aws.Bool(true),
- IncludeResolvedCases: aws.Bool(true),
- Language: aws.String("Language"),
- MaxResults: aws.Int64(1),
- NextToken: aws.String("NextToken"),
- }
- resp, err := svc.DescribeCases(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 ExampleSupport_DescribeCommunications() {
- svc := support.New(nil)
- params := &support.DescribeCommunicationsInput{
- CaseId: aws.String("CaseId"), // Required
- AfterTime: aws.String("AfterTime"),
- BeforeTime: aws.String("BeforeTime"),
- MaxResults: aws.Int64(1),
- NextToken: aws.String("NextToken"),
- }
- resp, err := svc.DescribeCommunications(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 ExampleSupport_DescribeServices() {
- svc := support.New(nil)
- params := &support.DescribeServicesInput{
- Language: aws.String("Language"),
- ServiceCodeList: []*string{
- aws.String("ServiceCode"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeServices(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 ExampleSupport_DescribeSeverityLevels() {
- svc := support.New(nil)
- params := &support.DescribeSeverityLevelsInput{
- Language: aws.String("Language"),
- }
- resp, err := svc.DescribeSeverityLevels(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 ExampleSupport_DescribeTrustedAdvisorCheckRefreshStatuses() {
- svc := support.New(nil)
- params := &support.DescribeTrustedAdvisorCheckRefreshStatusesInput{
- CheckIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeTrustedAdvisorCheckRefreshStatuses(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 ExampleSupport_DescribeTrustedAdvisorCheckResult() {
- svc := support.New(nil)
- params := &support.DescribeTrustedAdvisorCheckResultInput{
- CheckId: aws.String("String"), // Required
- Language: aws.String("String"),
- }
- resp, err := svc.DescribeTrustedAdvisorCheckResult(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 ExampleSupport_DescribeTrustedAdvisorCheckSummaries() {
- svc := support.New(nil)
- params := &support.DescribeTrustedAdvisorCheckSummariesInput{
- CheckIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeTrustedAdvisorCheckSummaries(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 ExampleSupport_DescribeTrustedAdvisorChecks() {
- svc := support.New(nil)
- params := &support.DescribeTrustedAdvisorChecksInput{
- Language: aws.String("String"), // Required
- }
- resp, err := svc.DescribeTrustedAdvisorChecks(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 ExampleSupport_RefreshTrustedAdvisorCheck() {
- svc := support.New(nil)
- params := &support.RefreshTrustedAdvisorCheckInput{
- CheckId: aws.String("String"), // Required
- }
- resp, err := svc.RefreshTrustedAdvisorCheck(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 ExampleSupport_ResolveCase() {
- svc := support.New(nil)
- params := &support.ResolveCaseInput{
- CaseId: aws.String("CaseId"),
- }
- resp, err := svc.ResolveCase(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)
- }
|