aws-sdk-eventbridgev2 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.
File without changes
@@ -0,0 +1,98 @@
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::EventBridgeV2
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute region
14
+ # The AWS region used to dispatch the request.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute endpoint
19
+ # Override the endpoint used to send this request.
20
+ #
21
+ # @return [String]
22
+ #
23
+ # @!attribute use_fips
24
+ # When true, send this request to the FIPS-compliant regional endpoint.
25
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute use_dual_stack
29
+ # When true, use the dual-stack endpoint.
30
+ #
31
+ # @return [Boolean]
32
+ #
33
+ # @!attribute account_id
34
+ # The AWS account ID used for the request, sourced from the caller's credentials.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @!attribute event_bus_arn
39
+ # The bus ARN from the request, bound via @contextParam. Its account is the bus owner and takes precedence over the credentials-sourced account for cell routing (cross-account calls).
40
+ #
41
+ # @return [String]
42
+ #
43
+ # @!attribute account_id_endpoint_mode
44
+ # The behavior for account ID based endpoint routing: preferred, disabled, or required.
45
+ #
46
+ # @return [String]
47
+ #
48
+ EndpointParameters = Struct.new(
49
+ :region,
50
+ :endpoint,
51
+ :use_fips,
52
+ :use_dual_stack,
53
+ :account_id,
54
+ :event_bus_arn,
55
+ :account_id_endpoint_mode,
56
+ ) do
57
+ include Aws::Structure
58
+
59
+ # @api private
60
+ class << self
61
+ PARAM_MAP = {
62
+ 'Region' => :region,
63
+ 'Endpoint' => :endpoint,
64
+ 'UseFIPS' => :use_fips,
65
+ 'UseDualStack' => :use_dual_stack,
66
+ 'AccountId' => :account_id,
67
+ 'EventBusArn' => :event_bus_arn,
68
+ 'AccountIdEndpointMode' => :account_id_endpoint_mode,
69
+ }.freeze
70
+ end
71
+
72
+ def initialize(options = {})
73
+ self[:region] = options[:region]
74
+ if self[:region].nil?
75
+ raise ArgumentError, "Missing required EndpointParameter: :region"
76
+ end
77
+ self[:endpoint] = options[:endpoint]
78
+ self[:use_fips] = options[:use_fips]
79
+ self[:use_fips] = false if self[:use_fips].nil?
80
+ self[:use_dual_stack] = options[:use_dual_stack]
81
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
82
+ self[:account_id] = options[:account_id]
83
+ self[:event_bus_arn] = options[:event_bus_arn]
84
+ self[:account_id_endpoint_mode] = options[:account_id_endpoint_mode]
85
+ end
86
+
87
+ def self.create(config, options={})
88
+ new({
89
+ region: config.region,
90
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
91
+ use_fips: config.use_fips_endpoint,
92
+ use_dual_stack: config.use_dualstack_endpoint,
93
+ account_id: config.credentials.credentials.account_id,
94
+ account_id_endpoint_mode: config.account_id_endpoint_mode,
95
+ }.merge(options))
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,95 @@
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::EventBridgeV2
11
+ class EndpointProvider
12
+ def resolve_endpoint(parameters)
13
+ if Aws::Endpoints::Matchers.set?(parameters.endpoint)
14
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
15
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
16
+ end
17
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
18
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
19
+ end
20
+ return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, metadata: { account_id_endpoint: false })
21
+ end
22
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
23
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.set?(parameters.event_bus_arn) && (parsed_bus_arn = Aws::Endpoints::Matchers.aws_parse_arn(parameters.event_bus_arn)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_bus_arn, "service"), "events") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_bus_arn, "accountId"), false)
24
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
25
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
26
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_bus_arn['accountId']}.eventsv2-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", properties: {"metricValues" => ["O"]}, metadata: { account_id_endpoint: false })
27
+ end
28
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
29
+ end
30
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
31
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
32
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_bus_arn['accountId']}.eventsv2-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", properties: {"metricValues" => ["O"]}, metadata: { account_id_endpoint: false })
33
+ end
34
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
35
+ end
36
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
37
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
38
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_bus_arn['accountId']}.eventsv2.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", properties: {"metricValues" => ["O"]}, metadata: { account_id_endpoint: false })
39
+ end
40
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
41
+ end
42
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_bus_arn['accountId']}.eventsv2.#{parameters.region}.#{partition_result['dnsSuffix']}", properties: {"metricValues" => ["O"]}, metadata: { account_id_endpoint: false })
43
+ end
44
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.set?(parameters.account_id)
45
+ if Aws::Endpoints::Matchers.valid_host_label?(parameters.account_id, false)
46
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
47
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
48
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parameters.account_id}.eventsv2-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", properties: {"metricValues" => ["O"]}, metadata: { account_id_endpoint: true })
49
+ end
50
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
51
+ end
52
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
53
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
54
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parameters.account_id}.eventsv2-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", properties: {"metricValues" => ["O"]}, metadata: { account_id_endpoint: true })
55
+ end
56
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
57
+ end
58
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
59
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
60
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parameters.account_id}.eventsv2.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", properties: {"metricValues" => ["O"]}, metadata: { account_id_endpoint: true })
61
+ end
62
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
63
+ end
64
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parameters.account_id}.eventsv2.#{parameters.region}.#{partition_result['dnsSuffix']}", properties: {"metricValues" => ["O"]}, metadata: { account_id_endpoint: true })
65
+ end
66
+ raise ArgumentError, "Credentials-sourced account ID parameter is invalid"
67
+ end
68
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "required")
69
+ raise ArgumentError, "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded"
70
+ end
71
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
72
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
73
+ return Aws::Endpoints::Endpoint.new(url: "https://eventsv2-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", metadata: { account_id_endpoint: false })
74
+ end
75
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
76
+ end
77
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
78
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
79
+ return Aws::Endpoints::Endpoint.new(url: "https://eventsv2-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", metadata: { account_id_endpoint: false })
80
+ end
81
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
82
+ end
83
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
84
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
85
+ return Aws::Endpoints::Endpoint.new(url: "https://eventsv2.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", metadata: { account_id_endpoint: false })
86
+ end
87
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
88
+ end
89
+ return Aws::Endpoints::Endpoint.new(url: "https://eventsv2.#{parameters.region}.#{partition_result['dnsSuffix']}", metadata: { account_id_endpoint: false })
90
+ end
91
+ raise ArgumentError, 'No endpoint could be resolved'
92
+
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,166 @@
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
+
11
+ module Aws::EventBridgeV2
12
+ # @api private
13
+ module Endpoints
14
+
15
+ class CreateEventSource
16
+ def self.build(context)
17
+ Aws::EventBridgeV2::EndpointParameters.create(
18
+ context.config,
19
+ event_bus_arn: context.params[:event_bus_arn],
20
+ )
21
+ end
22
+ end
23
+
24
+ class CreateSubscriber
25
+ def self.build(context)
26
+ Aws::EventBridgeV2::EndpointParameters.create(
27
+ context.config,
28
+ event_bus_arn: context.params[:event_bus_arn],
29
+ )
30
+ end
31
+ end
32
+
33
+ class DeleteEventBus
34
+ def self.build(context)
35
+ Aws::EventBridgeV2::EndpointParameters.create(
36
+ context.config,
37
+ event_bus_arn: context.params[:event_bus_arn],
38
+ )
39
+ end
40
+ end
41
+
42
+ class DeleteResourcePolicy
43
+ def self.build(context)
44
+ Aws::EventBridgeV2::EndpointParameters.create(
45
+ context.config,
46
+ event_bus_arn: context.params[:resource_arn],
47
+ )
48
+ end
49
+ end
50
+
51
+ class DescribeEventBus
52
+ def self.build(context)
53
+ Aws::EventBridgeV2::EndpointParameters.create(
54
+ context.config,
55
+ event_bus_arn: context.params[:event_bus_arn],
56
+ )
57
+ end
58
+ end
59
+
60
+ class GetResourcePolicy
61
+ def self.build(context)
62
+ Aws::EventBridgeV2::EndpointParameters.create(
63
+ context.config,
64
+ event_bus_arn: context.params[:resource_arn],
65
+ )
66
+ end
67
+ end
68
+
69
+ class ListEventSources
70
+ def self.build(context)
71
+ Aws::EventBridgeV2::EndpointParameters.create(
72
+ context.config,
73
+ event_bus_arn: context.params[:event_bus_arn],
74
+ )
75
+ end
76
+ end
77
+
78
+ class ListResourcePolicies
79
+ def self.build(context)
80
+ Aws::EventBridgeV2::EndpointParameters.create(
81
+ context.config,
82
+ event_bus_arn: context.params[:resource_arn],
83
+ )
84
+ end
85
+ end
86
+
87
+ class ListSubscribers
88
+ def self.build(context)
89
+ Aws::EventBridgeV2::EndpointParameters.create(
90
+ context.config,
91
+ event_bus_arn: context.params[:event_bus_arn],
92
+ )
93
+ end
94
+ end
95
+
96
+ class PutEvents
97
+ def self.build(context)
98
+ Aws::EventBridgeV2::EndpointParameters.create(
99
+ context.config,
100
+ event_bus_arn: context.params[:event_bus_arn],
101
+ )
102
+ end
103
+ end
104
+
105
+ class PutRawEvents
106
+ def self.build(context)
107
+ Aws::EventBridgeV2::EndpointParameters.create(
108
+ context.config,
109
+ event_bus_arn: context.params[:event_bus_arn],
110
+ )
111
+ end
112
+ end
113
+
114
+ class PutResourcePolicy
115
+ def self.build(context)
116
+ Aws::EventBridgeV2::EndpointParameters.create(
117
+ context.config,
118
+ event_bus_arn: context.params[:resource_arn],
119
+ )
120
+ end
121
+ end
122
+
123
+ class UpdateEventBus
124
+ def self.build(context)
125
+ Aws::EventBridgeV2::EndpointParameters.create(
126
+ context.config,
127
+ event_bus_arn: context.params[:event_bus_arn],
128
+ )
129
+ end
130
+ end
131
+
132
+
133
+ def self.parameters_for_operation(context)
134
+ case context.operation_name
135
+ when :create_event_source
136
+ CreateEventSource.build(context)
137
+ when :create_subscriber
138
+ CreateSubscriber.build(context)
139
+ when :delete_event_bus
140
+ DeleteEventBus.build(context)
141
+ when :delete_resource_policy
142
+ DeleteResourcePolicy.build(context)
143
+ when :describe_event_bus
144
+ DescribeEventBus.build(context)
145
+ when :get_resource_policy
146
+ GetResourcePolicy.build(context)
147
+ when :list_event_sources
148
+ ListEventSources.build(context)
149
+ when :list_resource_policies
150
+ ListResourcePolicies.build(context)
151
+ when :list_subscribers
152
+ ListSubscribers.build(context)
153
+ when :put_events
154
+ PutEvents.build(context)
155
+ when :put_raw_events
156
+ PutRawEvents.build(context)
157
+ when :put_resource_policy
158
+ PutResourcePolicy.build(context)
159
+ when :update_event_bus
160
+ UpdateEventBus.build(context)
161
+ else
162
+ Aws::EventBridgeV2::EndpointParameters.create(context.config)
163
+ end
164
+ end
165
+ end
166
+ end
@@ -0,0 +1,298 @@
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::EventBridgeV2
11
+
12
+ # When EventBridgeV2 returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::EventBridgeV2::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all EventBridgeV2 errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::EventBridgeV2::Errors::ServiceError
20
+ # # rescues all EventBridgeV2 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
+ # * {ConcurrentModificationException}
32
+ # * {ConflictException}
33
+ # * {IdempotentParameterMismatchException}
34
+ # * {InternalException}
35
+ # * {InvalidInputException}
36
+ # * {InvalidStateException}
37
+ # * {LimitExceededException}
38
+ # * {PolicyLengthExceededException}
39
+ # * {PublicPolicyException}
40
+ # * {ResourceAlreadyExistsException}
41
+ # * {ResourceInUseException}
42
+ # * {ResourceNotFoundException}
43
+ # * {SchemaRegistryUnavailableException}
44
+ # * {ThrottlingException}
45
+ #
46
+ # Additionally, error classes are dynamically generated for service errors based on the error code
47
+ # if they are not defined above.
48
+ module Errors
49
+
50
+ extend Aws::Errors::DynamicErrors
51
+
52
+ class AccessDeniedException < ServiceError
53
+
54
+ # @param [Seahorse::Client::RequestContext] context
55
+ # @param [String] message
56
+ # @param [Aws::EventBridgeV2::Types::AccessDeniedException] data
57
+ def initialize(context, message, data = Aws::EmptyStructure.new)
58
+ super(context, message, data)
59
+ end
60
+
61
+ # @return [String]
62
+ def message
63
+ @message || @data[:message]
64
+ end
65
+ end
66
+
67
+ class ConcurrentModificationException < ServiceError
68
+
69
+ # @param [Seahorse::Client::RequestContext] context
70
+ # @param [String] message
71
+ # @param [Aws::EventBridgeV2::Types::ConcurrentModificationException] data
72
+ def initialize(context, message, data = Aws::EmptyStructure.new)
73
+ super(context, message, data)
74
+ end
75
+
76
+ # @return [String]
77
+ def message
78
+ @message || @data[:message]
79
+ end
80
+
81
+ def retryable?
82
+ true
83
+ end
84
+ end
85
+
86
+ class ConflictException < ServiceError
87
+
88
+ # @param [Seahorse::Client::RequestContext] context
89
+ # @param [String] message
90
+ # @param [Aws::EventBridgeV2::Types::ConflictException] data
91
+ def initialize(context, message, data = Aws::EmptyStructure.new)
92
+ super(context, message, data)
93
+ end
94
+
95
+ # @return [String]
96
+ def message
97
+ @message || @data[:message]
98
+ end
99
+ end
100
+
101
+ class IdempotentParameterMismatchException < ServiceError
102
+
103
+ # @param [Seahorse::Client::RequestContext] context
104
+ # @param [String] message
105
+ # @param [Aws::EventBridgeV2::Types::IdempotentParameterMismatchException] data
106
+ def initialize(context, message, data = Aws::EmptyStructure.new)
107
+ super(context, message, data)
108
+ end
109
+
110
+ # @return [String]
111
+ def message
112
+ @message || @data[:message]
113
+ end
114
+ end
115
+
116
+ class InternalException < ServiceError
117
+
118
+ # @param [Seahorse::Client::RequestContext] context
119
+ # @param [String] message
120
+ # @param [Aws::EventBridgeV2::Types::InternalException] data
121
+ def initialize(context, message, data = Aws::EmptyStructure.new)
122
+ super(context, message, data)
123
+ end
124
+
125
+ # @return [String]
126
+ def message
127
+ @message || @data[:message]
128
+ end
129
+
130
+ def retryable?
131
+ true
132
+ end
133
+ end
134
+
135
+ class InvalidInputException < ServiceError
136
+
137
+ # @param [Seahorse::Client::RequestContext] context
138
+ # @param [String] message
139
+ # @param [Aws::EventBridgeV2::Types::InvalidInputException] data
140
+ def initialize(context, message, data = Aws::EmptyStructure.new)
141
+ super(context, message, data)
142
+ end
143
+
144
+ # @return [String]
145
+ def message
146
+ @message || @data[:message]
147
+ end
148
+ end
149
+
150
+ class InvalidStateException < ServiceError
151
+
152
+ # @param [Seahorse::Client::RequestContext] context
153
+ # @param [String] message
154
+ # @param [Aws::EventBridgeV2::Types::InvalidStateException] data
155
+ def initialize(context, message, data = Aws::EmptyStructure.new)
156
+ super(context, message, data)
157
+ end
158
+
159
+ # @return [String]
160
+ def message
161
+ @message || @data[:message]
162
+ end
163
+ end
164
+
165
+ class LimitExceededException < ServiceError
166
+
167
+ # @param [Seahorse::Client::RequestContext] context
168
+ # @param [String] message
169
+ # @param [Aws::EventBridgeV2::Types::LimitExceededException] data
170
+ def initialize(context, message, data = Aws::EmptyStructure.new)
171
+ super(context, message, data)
172
+ end
173
+
174
+ # @return [String]
175
+ def message
176
+ @message || @data[:message]
177
+ end
178
+ end
179
+
180
+ class PolicyLengthExceededException < ServiceError
181
+
182
+ # @param [Seahorse::Client::RequestContext] context
183
+ # @param [String] message
184
+ # @param [Aws::EventBridgeV2::Types::PolicyLengthExceededException] data
185
+ def initialize(context, message, data = Aws::EmptyStructure.new)
186
+ super(context, message, data)
187
+ end
188
+
189
+ # @return [String]
190
+ def message
191
+ @message || @data[:message]
192
+ end
193
+ end
194
+
195
+ class PublicPolicyException < ServiceError
196
+
197
+ # @param [Seahorse::Client::RequestContext] context
198
+ # @param [String] message
199
+ # @param [Aws::EventBridgeV2::Types::PublicPolicyException] data
200
+ def initialize(context, message, data = Aws::EmptyStructure.new)
201
+ super(context, message, data)
202
+ end
203
+
204
+ # @return [String]
205
+ def message
206
+ @message || @data[:message]
207
+ end
208
+ end
209
+
210
+ class ResourceAlreadyExistsException < ServiceError
211
+
212
+ # @param [Seahorse::Client::RequestContext] context
213
+ # @param [String] message
214
+ # @param [Aws::EventBridgeV2::Types::ResourceAlreadyExistsException] data
215
+ def initialize(context, message, data = Aws::EmptyStructure.new)
216
+ super(context, message, data)
217
+ end
218
+
219
+ # @return [String]
220
+ def message
221
+ @message || @data[:message]
222
+ end
223
+ end
224
+
225
+ class ResourceInUseException < ServiceError
226
+
227
+ # @param [Seahorse::Client::RequestContext] context
228
+ # @param [String] message
229
+ # @param [Aws::EventBridgeV2::Types::ResourceInUseException] data
230
+ def initialize(context, message, data = Aws::EmptyStructure.new)
231
+ super(context, message, data)
232
+ end
233
+
234
+ # @return [String]
235
+ def message
236
+ @message || @data[:message]
237
+ end
238
+ end
239
+
240
+ class ResourceNotFoundException < ServiceError
241
+
242
+ # @param [Seahorse::Client::RequestContext] context
243
+ # @param [String] message
244
+ # @param [Aws::EventBridgeV2::Types::ResourceNotFoundException] data
245
+ def initialize(context, message, data = Aws::EmptyStructure.new)
246
+ super(context, message, data)
247
+ end
248
+
249
+ # @return [String]
250
+ def message
251
+ @message || @data[:message]
252
+ end
253
+ end
254
+
255
+ class SchemaRegistryUnavailableException < ServiceError
256
+
257
+ # @param [Seahorse::Client::RequestContext] context
258
+ # @param [String] message
259
+ # @param [Aws::EventBridgeV2::Types::SchemaRegistryUnavailableException] data
260
+ def initialize(context, message, data = Aws::EmptyStructure.new)
261
+ super(context, message, data)
262
+ end
263
+
264
+ # @return [String]
265
+ def message
266
+ @message || @data[:message]
267
+ end
268
+
269
+ def retryable?
270
+ true
271
+ end
272
+ end
273
+
274
+ class ThrottlingException < ServiceError
275
+
276
+ # @param [Seahorse::Client::RequestContext] context
277
+ # @param [String] message
278
+ # @param [Aws::EventBridgeV2::Types::ThrottlingException] data
279
+ def initialize(context, message, data = Aws::EmptyStructure.new)
280
+ super(context, message, data)
281
+ end
282
+
283
+ # @return [String]
284
+ def message
285
+ @message || @data[:message]
286
+ end
287
+
288
+ def retryable?
289
+ true
290
+ end
291
+
292
+ def throttling?
293
+ true
294
+ end
295
+ end
296
+
297
+ end
298
+ end