/
api_op_DescribeSeverityLevels.go
117 lines (96 loc) · 3.82 KB
/
api_op_DescribeSeverityLevels.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package support
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
type DescribeSeverityLevelsInput struct {
_ struct{} `type:"structure"`
// The ISO 639-1 code for the language in which AWS provides support. AWS Support
// currently supports English ("en") and Japanese ("ja"). Language parameters
// must be passed explicitly for operations that take them.
Language *string `locationName:"language" type:"string"`
}
// String returns the string representation
func (s DescribeSeverityLevelsInput) String() string {
return awsutil.Prettify(s)
}
// The list of severity levels returned by the DescribeSeverityLevels operation.
type DescribeSeverityLevelsOutput struct {
_ struct{} `type:"structure"`
// The available severity levels for the support case. Available severity levels
// are defined by your service level agreement with AWS.
SeverityLevels []SeverityLevel `locationName:"severityLevels" type:"list"`
}
// String returns the string representation
func (s DescribeSeverityLevelsOutput) String() string {
return awsutil.Prettify(s)
}
const opDescribeSeverityLevels = "DescribeSeverityLevels"
// DescribeSeverityLevelsRequest returns a request value for making API operation for
// AWS Support.
//
// Returns the list of severity levels that you can assign to an AWS Support
// case. The severity level for a case is also a field in the CaseDetails data
// type that you include for a CreateCase request.
//
// * You must have a Business or Enterprise support plan to use the AWS Support
// API.
//
// * If you call the AWS Support API from an account that does not have a
// Business or Enterprise support plan, the SubscriptionRequiredException
// error message appears. For information about changing your support plan,
// see AWS Support (http://aws.amazon.com/premiumsupport/).
//
// // Example sending a request using DescribeSeverityLevelsRequest.
// req := client.DescribeSeverityLevelsRequest(params)
// resp, err := req.Send(context.TODO())
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/support-2013-04-15/DescribeSeverityLevels
func (c *Client) DescribeSeverityLevelsRequest(input *DescribeSeverityLevelsInput) DescribeSeverityLevelsRequest {
op := &aws.Operation{
Name: opDescribeSeverityLevels,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeSeverityLevelsInput{}
}
req := c.newRequest(op, input, &DescribeSeverityLevelsOutput{})
return DescribeSeverityLevelsRequest{Request: req, Input: input, Copy: c.DescribeSeverityLevelsRequest}
}
// DescribeSeverityLevelsRequest is the request type for the
// DescribeSeverityLevels API operation.
type DescribeSeverityLevelsRequest struct {
*aws.Request
Input *DescribeSeverityLevelsInput
Copy func(*DescribeSeverityLevelsInput) DescribeSeverityLevelsRequest
}
// Send marshals and sends the DescribeSeverityLevels API request.
func (r DescribeSeverityLevelsRequest) Send(ctx context.Context) (*DescribeSeverityLevelsResponse, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &DescribeSeverityLevelsResponse{
DescribeSeverityLevelsOutput: r.Request.Data.(*DescribeSeverityLevelsOutput),
response: &aws.Response{Request: r.Request},
}
return resp, nil
}
// DescribeSeverityLevelsResponse is the response type for the
// DescribeSeverityLevels API operation.
type DescribeSeverityLevelsResponse struct {
*DescribeSeverityLevelsOutput
response *aws.Response
}
// SDKResponseMetdata returns the response metadata for the
// DescribeSeverityLevels request.
func (r *DescribeSeverityLevelsResponse) SDKResponseMetdata() *aws.Response {
return r.response
}