1
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
10
"github.com/aws/aws-sdk-go/aws"
11
"github.com/aws/aws-sdk-go/service/support"
17
func ExampleSupport_AddAttachmentsToSet() {
18
svc := support.New(nil)
20
params := &support.AddAttachmentsToSetInput{
21
Attachments: []*support.Attachment{ // Required
23
Data: []byte("PAYLOAD"),
24
FileName: aws.String("FileName"),
28
AttachmentSetId: aws.String("AttachmentSetId"),
30
resp, err := svc.AddAttachmentsToSet(params)
33
// Print the error, cast err to awserr.Error to get the Code and
34
// Message from an error.
35
fmt.Println(err.Error())
39
// Pretty-print the response data.
43
func ExampleSupport_AddCommunicationToCase() {
44
svc := support.New(nil)
46
params := &support.AddCommunicationToCaseInput{
47
CommunicationBody: aws.String("CommunicationBody"), // Required
48
AttachmentSetId: aws.String("AttachmentSetId"),
49
CaseId: aws.String("CaseId"),
50
CcEmailAddresses: []*string{
51
aws.String("CcEmailAddress"), // Required
55
resp, err := svc.AddCommunicationToCase(params)
58
// Print the error, cast err to awserr.Error to get the Code and
59
// Message from an error.
60
fmt.Println(err.Error())
64
// Pretty-print the response data.
68
func ExampleSupport_CreateCase() {
69
svc := support.New(nil)
71
params := &support.CreateCaseInput{
72
CommunicationBody: aws.String("CommunicationBody"), // Required
73
Subject: aws.String("Subject"), // Required
74
AttachmentSetId: aws.String("AttachmentSetId"),
75
CategoryCode: aws.String("CategoryCode"),
76
CcEmailAddresses: []*string{
77
aws.String("CcEmailAddress"), // Required
80
IssueType: aws.String("IssueType"),
81
Language: aws.String("Language"),
82
ServiceCode: aws.String("ServiceCode"),
83
SeverityCode: aws.String("SeverityCode"),
85
resp, err := svc.CreateCase(params)
88
// Print the error, cast err to awserr.Error to get the Code and
89
// Message from an error.
90
fmt.Println(err.Error())
94
// Pretty-print the response data.
98
func ExampleSupport_DescribeAttachment() {
99
svc := support.New(nil)
101
params := &support.DescribeAttachmentInput{
102
AttachmentId: aws.String("AttachmentId"), // Required
104
resp, err := svc.DescribeAttachment(params)
107
// Print the error, cast err to awserr.Error to get the Code and
108
// Message from an error.
109
fmt.Println(err.Error())
113
// Pretty-print the response data.
117
func ExampleSupport_DescribeCases() {
118
svc := support.New(nil)
120
params := &support.DescribeCasesInput{
121
AfterTime: aws.String("AfterTime"),
122
BeforeTime: aws.String("BeforeTime"),
123
CaseIdList: []*string{
124
aws.String("CaseId"), // Required
127
DisplayId: aws.String("DisplayId"),
128
IncludeCommunications: aws.Bool(true),
129
IncludeResolvedCases: aws.Bool(true),
130
Language: aws.String("Language"),
131
MaxResults: aws.Int64(1),
132
NextToken: aws.String("NextToken"),
134
resp, err := svc.DescribeCases(params)
137
// Print the error, cast err to awserr.Error to get the Code and
138
// Message from an error.
139
fmt.Println(err.Error())
143
// Pretty-print the response data.
147
func ExampleSupport_DescribeCommunications() {
148
svc := support.New(nil)
150
params := &support.DescribeCommunicationsInput{
151
CaseId: aws.String("CaseId"), // Required
152
AfterTime: aws.String("AfterTime"),
153
BeforeTime: aws.String("BeforeTime"),
154
MaxResults: aws.Int64(1),
155
NextToken: aws.String("NextToken"),
157
resp, err := svc.DescribeCommunications(params)
160
// Print the error, cast err to awserr.Error to get the Code and
161
// Message from an error.
162
fmt.Println(err.Error())
166
// Pretty-print the response data.
170
func ExampleSupport_DescribeServices() {
171
svc := support.New(nil)
173
params := &support.DescribeServicesInput{
174
Language: aws.String("Language"),
175
ServiceCodeList: []*string{
176
aws.String("ServiceCode"), // Required
180
resp, err := svc.DescribeServices(params)
183
// Print the error, cast err to awserr.Error to get the Code and
184
// Message from an error.
185
fmt.Println(err.Error())
189
// Pretty-print the response data.
193
func ExampleSupport_DescribeSeverityLevels() {
194
svc := support.New(nil)
196
params := &support.DescribeSeverityLevelsInput{
197
Language: aws.String("Language"),
199
resp, err := svc.DescribeSeverityLevels(params)
202
// Print the error, cast err to awserr.Error to get the Code and
203
// Message from an error.
204
fmt.Println(err.Error())
208
// Pretty-print the response data.
212
func ExampleSupport_DescribeTrustedAdvisorCheckRefreshStatuses() {
213
svc := support.New(nil)
215
params := &support.DescribeTrustedAdvisorCheckRefreshStatusesInput{
216
CheckIds: []*string{ // Required
217
aws.String("String"), // Required
221
resp, err := svc.DescribeTrustedAdvisorCheckRefreshStatuses(params)
224
// Print the error, cast err to awserr.Error to get the Code and
225
// Message from an error.
226
fmt.Println(err.Error())
230
// Pretty-print the response data.
234
func ExampleSupport_DescribeTrustedAdvisorCheckResult() {
235
svc := support.New(nil)
237
params := &support.DescribeTrustedAdvisorCheckResultInput{
238
CheckId: aws.String("String"), // Required
239
Language: aws.String("String"),
241
resp, err := svc.DescribeTrustedAdvisorCheckResult(params)
244
// Print the error, cast err to awserr.Error to get the Code and
245
// Message from an error.
246
fmt.Println(err.Error())
250
// Pretty-print the response data.
254
func ExampleSupport_DescribeTrustedAdvisorCheckSummaries() {
255
svc := support.New(nil)
257
params := &support.DescribeTrustedAdvisorCheckSummariesInput{
258
CheckIds: []*string{ // Required
259
aws.String("String"), // Required
263
resp, err := svc.DescribeTrustedAdvisorCheckSummaries(params)
266
// Print the error, cast err to awserr.Error to get the Code and
267
// Message from an error.
268
fmt.Println(err.Error())
272
// Pretty-print the response data.
276
func ExampleSupport_DescribeTrustedAdvisorChecks() {
277
svc := support.New(nil)
279
params := &support.DescribeTrustedAdvisorChecksInput{
280
Language: aws.String("String"), // Required
282
resp, err := svc.DescribeTrustedAdvisorChecks(params)
285
// Print the error, cast err to awserr.Error to get the Code and
286
// Message from an error.
287
fmt.Println(err.Error())
291
// Pretty-print the response data.
295
func ExampleSupport_RefreshTrustedAdvisorCheck() {
296
svc := support.New(nil)
298
params := &support.RefreshTrustedAdvisorCheckInput{
299
CheckId: aws.String("String"), // Required
301
resp, err := svc.RefreshTrustedAdvisorCheck(params)
304
// Print the error, cast err to awserr.Error to get the Code and
305
// Message from an error.
306
fmt.Println(err.Error())
310
// Pretty-print the response data.
314
func ExampleSupport_ResolveCase() {
315
svc := support.New(nil)
317
params := &support.ResolveCaseInput{
318
CaseId: aws.String("CaseId"),
320
resp, err := svc.ResolveCase(params)
323
// Print the error, cast err to awserr.Error to get the Code and
324
// Message from an error.
325
fmt.Println(err.Error())
329
// Pretty-print the response data.