/
api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go
115 lines (98 loc) · 4.8 KB
/
api_op_ListRequestedServiceQuotaChangeHistoryByQuota.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
// Code generated by smithy-go-codegen DO NOT EDIT.
package servicequotas
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/servicequotas/types"
"github.com/awslabs/smithy-go/middleware"
smithyhttp "github.com/awslabs/smithy-go/transport/http"
)
// Requests a list of the changes to specific service quotas. This command provides
// additional granularity over the ListRequestedServiceQuotaChangeHistory command.
// Once a quota change request has reached CASE_CLOSED, APPROVED, or DENIED, the
// history has been kept for 90 days.
func (c *Client) ListRequestedServiceQuotaChangeHistoryByQuota(ctx context.Context, params *ListRequestedServiceQuotaChangeHistoryByQuotaInput, optFns ...func(*Options)) (*ListRequestedServiceQuotaChangeHistoryByQuotaOutput, error) {
if params == nil {
params = &ListRequestedServiceQuotaChangeHistoryByQuotaInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListRequestedServiceQuotaChangeHistoryByQuota", params, optFns, addOperationListRequestedServiceQuotaChangeHistoryByQuotaMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListRequestedServiceQuotaChangeHistoryByQuotaOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListRequestedServiceQuotaChangeHistoryByQuotaInput struct {
// Specifies the service quota that you want to use
//
// This member is required.
QuotaCode *string
// Specifies the service that you want to use.
//
// This member is required.
ServiceCode *string
// (Optional) Limits the number of results that you want to include in the
// response. If you don't include this parameter, the response defaults to a value
// that's specific to the operation. If additional items exist beyond the specified
// maximum, the NextToken element is present and has a value (isn't null). Include
// that value as the NextToken request parameter in the call to the operation to
// get the next part of the results. You should check NextToken after every
// operation to ensure that you receive all of the results.
MaxResults *int32
// (Optional) Use this parameter in a request if you receive a NextToken response
// in a previous request that indicates that there's more output available. In a
// subsequent call, set it to the value of the previous call's NextToken response
// to indicate where the output should continue from.
NextToken *string
// Specifies the status value of the quota increase request.
Status types.RequestStatus
}
type ListRequestedServiceQuotaChangeHistoryByQuotaOutput struct {
// If present in the response, this value indicates there's more output available
// that what's included in the current response. This can occur even when the
// response includes no values at all, such as when you ask for a filtered view of
// a very long list. Use this value in the NextToken request parameter in a
// subsequent call to the operation to continue processing and get the next part of
// the output. You should repeat this until the NextToken response element comes
// back empty (as null).
NextToken *string
// Returns a list of service quota requests.
RequestedQuotas []*types.RequestedServiceQuotaChange
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
}
func addOperationListRequestedServiceQuotaChangeHistoryByQuotaMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRequestedServiceQuotaChangeHistoryByQuota{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRequestedServiceQuotaChangeHistoryByQuota{}, middleware.After)
if err != nil {
return err
}
awsmiddleware.AddRequestInvocationIDMiddleware(stack)
smithyhttp.AddContentLengthMiddleware(stack)
addResolveEndpointMiddleware(stack, options)
v4.AddComputePayloadSHA256Middleware(stack)
addRetryMiddlewares(stack, options)
addHTTPSignerV4Middleware(stack, options)
awsmiddleware.AddAttemptClockSkewMiddleware(stack)
addClientUserAgent(stack)
smithyhttp.AddErrorCloseResponseBodyMiddleware(stack)
smithyhttp.AddCloseResponseBodyMiddleware(stack)
addOpListRequestedServiceQuotaChangeHistoryByQuotaValidationMiddleware(stack)
stack.Initialize.Add(newServiceMetadataMiddleware_opListRequestedServiceQuotaChangeHistoryByQuota(options.Region), middleware.Before)
addRequestIDRetrieverMiddleware(stack)
addResponseErrorMiddleware(stack)
return nil
}
func newServiceMetadataMiddleware_opListRequestedServiceQuotaChangeHistoryByQuota(region string) awsmiddleware.RegisterServiceMetadata {
return awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "servicequotas",
OperationName: "ListRequestedServiceQuotaChangeHistoryByQuota",
}
}