aws-sdk-prometheusservice 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,237 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::PrometheusService
11
+ # @api private
12
+ module ClientApi
13
+
14
+ include Seahorse::Model
15
+
16
+ AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
17
+ ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
18
+ CreateWorkspaceRequest = Shapes::StructureShape.new(name: 'CreateWorkspaceRequest')
19
+ CreateWorkspaceResponse = Shapes::StructureShape.new(name: 'CreateWorkspaceResponse')
20
+ DeleteWorkspaceRequest = Shapes::StructureShape.new(name: 'DeleteWorkspaceRequest')
21
+ DescribeWorkspaceRequest = Shapes::StructureShape.new(name: 'DescribeWorkspaceRequest')
22
+ DescribeWorkspaceResponse = Shapes::StructureShape.new(name: 'DescribeWorkspaceResponse')
23
+ IdempotencyToken = Shapes::StringShape.new(name: 'IdempotencyToken')
24
+ Integer = Shapes::IntegerShape.new(name: 'Integer')
25
+ InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
26
+ ListWorkspacesRequest = Shapes::StructureShape.new(name: 'ListWorkspacesRequest')
27
+ ListWorkspacesRequestMaxResultsInteger = Shapes::IntegerShape.new(name: 'ListWorkspacesRequestMaxResultsInteger')
28
+ ListWorkspacesResponse = Shapes::StructureShape.new(name: 'ListWorkspacesResponse')
29
+ PaginationToken = Shapes::StringShape.new(name: 'PaginationToken')
30
+ ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
31
+ ServiceQuotaExceededException = Shapes::StructureShape.new(name: 'ServiceQuotaExceededException')
32
+ String = Shapes::StringShape.new(name: 'String')
33
+ ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
34
+ Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
35
+ UpdateWorkspaceAliasRequest = Shapes::StructureShape.new(name: 'UpdateWorkspaceAliasRequest')
36
+ Uri = Shapes::StringShape.new(name: 'Uri')
37
+ ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
38
+ ValidationExceptionField = Shapes::StructureShape.new(name: 'ValidationExceptionField')
39
+ ValidationExceptionFieldList = Shapes::ListShape.new(name: 'ValidationExceptionFieldList')
40
+ ValidationExceptionReason = Shapes::StringShape.new(name: 'ValidationExceptionReason')
41
+ WorkspaceAlias = Shapes::StringShape.new(name: 'WorkspaceAlias')
42
+ WorkspaceArn = Shapes::StringShape.new(name: 'WorkspaceArn')
43
+ WorkspaceDescription = Shapes::StructureShape.new(name: 'WorkspaceDescription')
44
+ WorkspaceId = Shapes::StringShape.new(name: 'WorkspaceId')
45
+ WorkspaceStatus = Shapes::StructureShape.new(name: 'WorkspaceStatus')
46
+ WorkspaceStatusCode = Shapes::StringShape.new(name: 'WorkspaceStatusCode')
47
+ WorkspaceSummary = Shapes::StructureShape.new(name: 'WorkspaceSummary')
48
+ WorkspaceSummaryList = Shapes::ListShape.new(name: 'WorkspaceSummaryList')
49
+
50
+ AccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
51
+ AccessDeniedException.struct_class = Types::AccessDeniedException
52
+
53
+ ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
54
+ ConflictException.add_member(:resource_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "resourceId"))
55
+ ConflictException.add_member(:resource_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "resourceType"))
56
+ ConflictException.struct_class = Types::ConflictException
57
+
58
+ CreateWorkspaceRequest.add_member(:alias, Shapes::ShapeRef.new(shape: WorkspaceAlias, location_name: "alias"))
59
+ CreateWorkspaceRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: IdempotencyToken, location_name: "clientToken", metadata: {"idempotencyToken"=>true}))
60
+ CreateWorkspaceRequest.struct_class = Types::CreateWorkspaceRequest
61
+
62
+ CreateWorkspaceResponse.add_member(:arn, Shapes::ShapeRef.new(shape: WorkspaceArn, required: true, location_name: "arn"))
63
+ CreateWorkspaceResponse.add_member(:status, Shapes::ShapeRef.new(shape: WorkspaceStatus, required: true, location_name: "status"))
64
+ CreateWorkspaceResponse.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location_name: "workspaceId"))
65
+ CreateWorkspaceResponse.struct_class = Types::CreateWorkspaceResponse
66
+
67
+ DeleteWorkspaceRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: IdempotencyToken, location: "querystring", location_name: "clientToken", metadata: {"idempotencyToken"=>true}))
68
+ DeleteWorkspaceRequest.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location: "uri", location_name: "workspaceId"))
69
+ DeleteWorkspaceRequest.struct_class = Types::DeleteWorkspaceRequest
70
+
71
+ DescribeWorkspaceRequest.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location: "uri", location_name: "workspaceId"))
72
+ DescribeWorkspaceRequest.struct_class = Types::DescribeWorkspaceRequest
73
+
74
+ DescribeWorkspaceResponse.add_member(:workspace, Shapes::ShapeRef.new(shape: WorkspaceDescription, required: true, location_name: "workspace"))
75
+ DescribeWorkspaceResponse.struct_class = Types::DescribeWorkspaceResponse
76
+
77
+ InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
78
+ InternalServerException.add_member(:retry_after_seconds, Shapes::ShapeRef.new(shape: Integer, location: "header", location_name: "Retry-After"))
79
+ InternalServerException.struct_class = Types::InternalServerException
80
+
81
+ ListWorkspacesRequest.add_member(:alias, Shapes::ShapeRef.new(shape: WorkspaceAlias, location: "querystring", location_name: "alias"))
82
+ ListWorkspacesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: ListWorkspacesRequestMaxResultsInteger, location: "querystring", location_name: "maxResults"))
83
+ ListWorkspacesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location: "querystring", location_name: "nextToken"))
84
+ ListWorkspacesRequest.struct_class = Types::ListWorkspacesRequest
85
+
86
+ ListWorkspacesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "nextToken"))
87
+ ListWorkspacesResponse.add_member(:workspaces, Shapes::ShapeRef.new(shape: WorkspaceSummaryList, required: true, location_name: "workspaces"))
88
+ ListWorkspacesResponse.struct_class = Types::ListWorkspacesResponse
89
+
90
+ ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
91
+ ResourceNotFoundException.add_member(:resource_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "resourceId"))
92
+ ResourceNotFoundException.add_member(:resource_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "resourceType"))
93
+ ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
94
+
95
+ ServiceQuotaExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
96
+ ServiceQuotaExceededException.add_member(:quota_code, Shapes::ShapeRef.new(shape: String, required: true, location_name: "quotaCode"))
97
+ ServiceQuotaExceededException.add_member(:resource_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "resourceId"))
98
+ ServiceQuotaExceededException.add_member(:resource_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "resourceType"))
99
+ ServiceQuotaExceededException.add_member(:service_code, Shapes::ShapeRef.new(shape: String, required: true, location_name: "serviceCode"))
100
+ ServiceQuotaExceededException.struct_class = Types::ServiceQuotaExceededException
101
+
102
+ ThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
103
+ ThrottlingException.add_member(:quota_code, Shapes::ShapeRef.new(shape: String, location_name: "quotaCode"))
104
+ ThrottlingException.add_member(:retry_after_seconds, Shapes::ShapeRef.new(shape: Integer, location: "header", location_name: "Retry-After"))
105
+ ThrottlingException.add_member(:service_code, Shapes::ShapeRef.new(shape: String, location_name: "serviceCode"))
106
+ ThrottlingException.struct_class = Types::ThrottlingException
107
+
108
+ UpdateWorkspaceAliasRequest.add_member(:alias, Shapes::ShapeRef.new(shape: WorkspaceAlias, location_name: "alias"))
109
+ UpdateWorkspaceAliasRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: IdempotencyToken, location_name: "clientToken", metadata: {"idempotencyToken"=>true}))
110
+ UpdateWorkspaceAliasRequest.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location: "uri", location_name: "workspaceId"))
111
+ UpdateWorkspaceAliasRequest.struct_class = Types::UpdateWorkspaceAliasRequest
112
+
113
+ ValidationException.add_member(:field_list, Shapes::ShapeRef.new(shape: ValidationExceptionFieldList, location_name: "fieldList"))
114
+ ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
115
+ ValidationException.add_member(:reason, Shapes::ShapeRef.new(shape: ValidationExceptionReason, required: true, location_name: "reason"))
116
+ ValidationException.struct_class = Types::ValidationException
117
+
118
+ ValidationExceptionField.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
119
+ ValidationExceptionField.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "name"))
120
+ ValidationExceptionField.struct_class = Types::ValidationExceptionField
121
+
122
+ ValidationExceptionFieldList.member = Shapes::ShapeRef.new(shape: ValidationExceptionField)
123
+
124
+ WorkspaceDescription.add_member(:alias, Shapes::ShapeRef.new(shape: WorkspaceAlias, location_name: "alias"))
125
+ WorkspaceDescription.add_member(:arn, Shapes::ShapeRef.new(shape: WorkspaceArn, required: true, location_name: "arn"))
126
+ WorkspaceDescription.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "createdAt"))
127
+ WorkspaceDescription.add_member(:prometheus_endpoint, Shapes::ShapeRef.new(shape: Uri, location_name: "prometheusEndpoint"))
128
+ WorkspaceDescription.add_member(:status, Shapes::ShapeRef.new(shape: WorkspaceStatus, required: true, location_name: "status"))
129
+ WorkspaceDescription.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location_name: "workspaceId"))
130
+ WorkspaceDescription.struct_class = Types::WorkspaceDescription
131
+
132
+ WorkspaceStatus.add_member(:status_code, Shapes::ShapeRef.new(shape: WorkspaceStatusCode, required: true, location_name: "statusCode"))
133
+ WorkspaceStatus.struct_class = Types::WorkspaceStatus
134
+
135
+ WorkspaceSummary.add_member(:alias, Shapes::ShapeRef.new(shape: WorkspaceAlias, location_name: "alias"))
136
+ WorkspaceSummary.add_member(:arn, Shapes::ShapeRef.new(shape: WorkspaceArn, required: true, location_name: "arn"))
137
+ WorkspaceSummary.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "createdAt"))
138
+ WorkspaceSummary.add_member(:status, Shapes::ShapeRef.new(shape: WorkspaceStatus, required: true, location_name: "status"))
139
+ WorkspaceSummary.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location_name: "workspaceId"))
140
+ WorkspaceSummary.struct_class = Types::WorkspaceSummary
141
+
142
+ WorkspaceSummaryList.member = Shapes::ShapeRef.new(shape: WorkspaceSummary)
143
+
144
+
145
+ # @api private
146
+ API = Seahorse::Model::Api.new.tap do |api|
147
+
148
+ api.version = "2020-08-01"
149
+
150
+ api.metadata = {
151
+ "apiVersion" => "2020-08-01",
152
+ "endpointPrefix" => "aps",
153
+ "jsonVersion" => "1.1",
154
+ "protocol" => "rest-json",
155
+ "serviceFullName" => "Amazon Prometheus Service",
156
+ "serviceId" => "amp",
157
+ "signatureVersion" => "v4",
158
+ "signingName" => "aps",
159
+ "uid" => "amp-2020-08-01",
160
+ }
161
+
162
+ api.add_operation(:create_workspace, Seahorse::Model::Operation.new.tap do |o|
163
+ o.name = "CreateWorkspace"
164
+ o.http_method = "POST"
165
+ o.http_request_uri = "/workspaces"
166
+ o.input = Shapes::ShapeRef.new(shape: CreateWorkspaceRequest)
167
+ o.output = Shapes::ShapeRef.new(shape: CreateWorkspaceResponse)
168
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
169
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
170
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
171
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
172
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
173
+ o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
174
+ end)
175
+
176
+ api.add_operation(:delete_workspace, Seahorse::Model::Operation.new.tap do |o|
177
+ o.name = "DeleteWorkspace"
178
+ o.http_method = "DELETE"
179
+ o.http_request_uri = "/workspaces/{workspaceId}"
180
+ o.input = Shapes::ShapeRef.new(shape: DeleteWorkspaceRequest)
181
+ o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
182
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
183
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
184
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
185
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
186
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
187
+ end)
188
+
189
+ api.add_operation(:describe_workspace, Seahorse::Model::Operation.new.tap do |o|
190
+ o.name = "DescribeWorkspace"
191
+ o.http_method = "GET"
192
+ o.http_request_uri = "/workspaces/{workspaceId}"
193
+ o.input = Shapes::ShapeRef.new(shape: DescribeWorkspaceRequest)
194
+ o.output = Shapes::ShapeRef.new(shape: DescribeWorkspaceResponse)
195
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
196
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
197
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
198
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
199
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
200
+ end)
201
+
202
+ api.add_operation(:list_workspaces, Seahorse::Model::Operation.new.tap do |o|
203
+ o.name = "ListWorkspaces"
204
+ o.http_method = "GET"
205
+ o.http_request_uri = "/workspaces"
206
+ o.input = Shapes::ShapeRef.new(shape: ListWorkspacesRequest)
207
+ o.output = Shapes::ShapeRef.new(shape: ListWorkspacesResponse)
208
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
209
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
210
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
211
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
212
+ o[:pager] = Aws::Pager.new(
213
+ limit_key: "max_results",
214
+ tokens: {
215
+ "next_token" => "next_token"
216
+ }
217
+ )
218
+ end)
219
+
220
+ api.add_operation(:update_workspace_alias, Seahorse::Model::Operation.new.tap do |o|
221
+ o.name = "UpdateWorkspaceAlias"
222
+ o.http_method = "POST"
223
+ o.http_request_uri = "/workspaces/{workspaceId}/alias"
224
+ o.input = Shapes::ShapeRef.new(shape: UpdateWorkspaceAliasRequest)
225
+ o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
226
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
227
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
228
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
229
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
230
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
231
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
232
+ o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
233
+ end)
234
+ end
235
+
236
+ end
237
+ end
@@ -0,0 +1,228 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::PrometheusService
11
+
12
+ # When PrometheusService returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::PrometheusService::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all PrometheusService errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::PrometheusService::Errors::ServiceError
20
+ # # rescues all PrometheusService API errors
21
+ # end
22
+ #
23
+ #
24
+ # ## Request Context
25
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
26
+ # information about the request that generated the error.
27
+ # See {Seahorse::Client::RequestContext} for more information.
28
+ #
29
+ # ## Error Classes
30
+ # * {AccessDeniedException}
31
+ # * {ConflictException}
32
+ # * {InternalServerException}
33
+ # * {ResourceNotFoundException}
34
+ # * {ServiceQuotaExceededException}
35
+ # * {ThrottlingException}
36
+ # * {ValidationException}
37
+ #
38
+ # Additionally, error classes are dynamically generated for service errors based on the error code
39
+ # if they are not defined above.
40
+ module Errors
41
+
42
+ extend Aws::Errors::DynamicErrors
43
+
44
+ class AccessDeniedException < ServiceError
45
+
46
+ # @param [Seahorse::Client::RequestContext] context
47
+ # @param [String] message
48
+ # @param [Aws::PrometheusService::Types::AccessDeniedException] data
49
+ def initialize(context, message, data = Aws::EmptyStructure.new)
50
+ super(context, message, data)
51
+ end
52
+
53
+ # @return [String]
54
+ def message
55
+ @message || @data[:message]
56
+ end
57
+ end
58
+
59
+ class ConflictException < ServiceError
60
+
61
+ # @param [Seahorse::Client::RequestContext] context
62
+ # @param [String] message
63
+ # @param [Aws::PrometheusService::Types::ConflictException] data
64
+ def initialize(context, message, data = Aws::EmptyStructure.new)
65
+ super(context, message, data)
66
+ end
67
+
68
+ # @return [String]
69
+ def message
70
+ @message || @data[:message]
71
+ end
72
+
73
+ # @return [String]
74
+ def resource_id
75
+ @data[:resource_id]
76
+ end
77
+
78
+ # @return [String]
79
+ def resource_type
80
+ @data[:resource_type]
81
+ end
82
+ end
83
+
84
+ class InternalServerException < ServiceError
85
+
86
+ # @param [Seahorse::Client::RequestContext] context
87
+ # @param [String] message
88
+ # @param [Aws::PrometheusService::Types::InternalServerException] data
89
+ def initialize(context, message, data = Aws::EmptyStructure.new)
90
+ super(context, message, data)
91
+ end
92
+
93
+ # @return [String]
94
+ def message
95
+ @message || @data[:message]
96
+ end
97
+
98
+ # @return [String]
99
+ def retry_after_seconds
100
+ @data[:retry_after_seconds]
101
+ end
102
+
103
+ def retryable?
104
+ true
105
+ end
106
+ end
107
+
108
+ class ResourceNotFoundException < ServiceError
109
+
110
+ # @param [Seahorse::Client::RequestContext] context
111
+ # @param [String] message
112
+ # @param [Aws::PrometheusService::Types::ResourceNotFoundException] data
113
+ def initialize(context, message, data = Aws::EmptyStructure.new)
114
+ super(context, message, data)
115
+ end
116
+
117
+ # @return [String]
118
+ def message
119
+ @message || @data[:message]
120
+ end
121
+
122
+ # @return [String]
123
+ def resource_id
124
+ @data[:resource_id]
125
+ end
126
+
127
+ # @return [String]
128
+ def resource_type
129
+ @data[:resource_type]
130
+ end
131
+ end
132
+
133
+ class ServiceQuotaExceededException < ServiceError
134
+
135
+ # @param [Seahorse::Client::RequestContext] context
136
+ # @param [String] message
137
+ # @param [Aws::PrometheusService::Types::ServiceQuotaExceededException] data
138
+ def initialize(context, message, data = Aws::EmptyStructure.new)
139
+ super(context, message, data)
140
+ end
141
+
142
+ # @return [String]
143
+ def message
144
+ @message || @data[:message]
145
+ end
146
+
147
+ # @return [String]
148
+ def quota_code
149
+ @data[:quota_code]
150
+ end
151
+
152
+ # @return [String]
153
+ def resource_id
154
+ @data[:resource_id]
155
+ end
156
+
157
+ # @return [String]
158
+ def resource_type
159
+ @data[:resource_type]
160
+ end
161
+
162
+ # @return [String]
163
+ def service_code
164
+ @data[:service_code]
165
+ end
166
+ end
167
+
168
+ class ThrottlingException < ServiceError
169
+
170
+ # @param [Seahorse::Client::RequestContext] context
171
+ # @param [String] message
172
+ # @param [Aws::PrometheusService::Types::ThrottlingException] data
173
+ def initialize(context, message, data = Aws::EmptyStructure.new)
174
+ super(context, message, data)
175
+ end
176
+
177
+ # @return [String]
178
+ def message
179
+ @message || @data[:message]
180
+ end
181
+
182
+ # @return [String]
183
+ def quota_code
184
+ @data[:quota_code]
185
+ end
186
+
187
+ # @return [String]
188
+ def retry_after_seconds
189
+ @data[:retry_after_seconds]
190
+ end
191
+
192
+ # @return [String]
193
+ def service_code
194
+ @data[:service_code]
195
+ end
196
+
197
+ def retryable?
198
+ true
199
+ end
200
+ end
201
+
202
+ class ValidationException < ServiceError
203
+
204
+ # @param [Seahorse::Client::RequestContext] context
205
+ # @param [String] message
206
+ # @param [Aws::PrometheusService::Types::ValidationException] data
207
+ def initialize(context, message, data = Aws::EmptyStructure.new)
208
+ super(context, message, data)
209
+ end
210
+
211
+ # @return [String]
212
+ def field_list
213
+ @data[:field_list]
214
+ end
215
+
216
+ # @return [String]
217
+ def message
218
+ @message || @data[:message]
219
+ end
220
+
221
+ # @return [String]
222
+ def reason
223
+ @data[:reason]
224
+ end
225
+ end
226
+
227
+ end
228
+ end