aws-sdk-emrserverless 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,118 @@
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/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::EMRServerless
11
+
12
+ # When EMRServerless returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::EMRServerless::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all EMRServerless errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::EMRServerless::Errors::ServiceError
20
+ # # rescues all EMRServerless 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
+ # * {ConflictException}
31
+ # * {InternalServerException}
32
+ # * {ResourceNotFoundException}
33
+ # * {ServiceQuotaExceededException}
34
+ # * {ValidationException}
35
+ #
36
+ # Additionally, error classes are dynamically generated for service errors based on the error code
37
+ # if they are not defined above.
38
+ module Errors
39
+
40
+ extend Aws::Errors::DynamicErrors
41
+
42
+ class ConflictException < ServiceError
43
+
44
+ # @param [Seahorse::Client::RequestContext] context
45
+ # @param [String] message
46
+ # @param [Aws::EMRServerless::Types::ConflictException] data
47
+ def initialize(context, message, data = Aws::EmptyStructure.new)
48
+ super(context, message, data)
49
+ end
50
+
51
+ # @return [String]
52
+ def message
53
+ @message || @data[:message]
54
+ end
55
+ end
56
+
57
+ class InternalServerException < ServiceError
58
+
59
+ # @param [Seahorse::Client::RequestContext] context
60
+ # @param [String] message
61
+ # @param [Aws::EMRServerless::Types::InternalServerException] data
62
+ def initialize(context, message, data = Aws::EmptyStructure.new)
63
+ super(context, message, data)
64
+ end
65
+
66
+ # @return [String]
67
+ def message
68
+ @message || @data[:message]
69
+ end
70
+ end
71
+
72
+ class ResourceNotFoundException < ServiceError
73
+
74
+ # @param [Seahorse::Client::RequestContext] context
75
+ # @param [String] message
76
+ # @param [Aws::EMRServerless::Types::ResourceNotFoundException] data
77
+ def initialize(context, message, data = Aws::EmptyStructure.new)
78
+ super(context, message, data)
79
+ end
80
+
81
+ # @return [String]
82
+ def message
83
+ @message || @data[:message]
84
+ end
85
+ end
86
+
87
+ class ServiceQuotaExceededException < ServiceError
88
+
89
+ # @param [Seahorse::Client::RequestContext] context
90
+ # @param [String] message
91
+ # @param [Aws::EMRServerless::Types::ServiceQuotaExceededException] data
92
+ def initialize(context, message, data = Aws::EmptyStructure.new)
93
+ super(context, message, data)
94
+ end
95
+
96
+ # @return [String]
97
+ def message
98
+ @message || @data[:message]
99
+ end
100
+ end
101
+
102
+ class ValidationException < ServiceError
103
+
104
+ # @param [Seahorse::Client::RequestContext] context
105
+ # @param [String] message
106
+ # @param [Aws::EMRServerless::Types::ValidationException] data
107
+ def initialize(context, message, data = Aws::EmptyStructure.new)
108
+ super(context, message, data)
109
+ end
110
+
111
+ # @return [String]
112
+ def message
113
+ @message || @data[:message]
114
+ end
115
+ end
116
+
117
+ end
118
+ end
@@ -0,0 +1,26 @@
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/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::EMRServerless
11
+
12
+ class Resource
13
+
14
+ # @param options ({})
15
+ # @option options [Client] :client
16
+ def initialize(options = {})
17
+ @client = options[:client] || Client.new(options)
18
+ end
19
+
20
+ # @return [Client]
21
+ def client
22
+ @client
23
+ end
24
+
25
+ end
26
+ end