aws-sdk-lambda 1.76.0 → 1.107.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -52,12 +52,16 @@ module Aws::Lambda
52
52
  # * {PolicyLengthExceededException}
53
53
  # * {PreconditionFailedException}
54
54
  # * {ProvisionedConcurrencyConfigNotFoundException}
55
+ # * {RecursiveInvocationException}
55
56
  # * {RequestTooLargeException}
56
57
  # * {ResourceConflictException}
57
58
  # * {ResourceInUseException}
58
59
  # * {ResourceNotFoundException}
59
60
  # * {ResourceNotReadyException}
60
61
  # * {ServiceException}
62
+ # * {SnapStartException}
63
+ # * {SnapStartNotReadyException}
64
+ # * {SnapStartTimeoutException}
61
65
  # * {SubnetIPAddressLimitReachedException}
62
66
  # * {TooManyRequestsException}
63
67
  # * {UnsupportedMediaTypeException}
@@ -573,6 +577,26 @@ module Aws::Lambda
573
577
  end
574
578
  end
575
579
 
580
+ class RecursiveInvocationException < ServiceError
581
+
582
+ # @param [Seahorse::Client::RequestContext] context
583
+ # @param [String] message
584
+ # @param [Aws::Lambda::Types::RecursiveInvocationException] data
585
+ def initialize(context, message, data = Aws::EmptyStructure.new)
586
+ super(context, message, data)
587
+ end
588
+
589
+ # @return [String]
590
+ def type
591
+ @data[:type]
592
+ end
593
+
594
+ # @return [String]
595
+ def message
596
+ @message || @data[:message]
597
+ end
598
+ end
599
+
576
600
  class RequestTooLargeException < ServiceError
577
601
 
578
602
  # @param [Seahorse::Client::RequestContext] context
@@ -693,6 +717,66 @@ module Aws::Lambda
693
717
  end
694
718
  end
695
719
 
720
+ class SnapStartException < ServiceError
721
+
722
+ # @param [Seahorse::Client::RequestContext] context
723
+ # @param [String] message
724
+ # @param [Aws::Lambda::Types::SnapStartException] data
725
+ def initialize(context, message, data = Aws::EmptyStructure.new)
726
+ super(context, message, data)
727
+ end
728
+
729
+ # @return [String]
730
+ def type
731
+ @data[:type]
732
+ end
733
+
734
+ # @return [String]
735
+ def message
736
+ @message || @data[:message]
737
+ end
738
+ end
739
+
740
+ class SnapStartNotReadyException < ServiceError
741
+
742
+ # @param [Seahorse::Client::RequestContext] context
743
+ # @param [String] message
744
+ # @param [Aws::Lambda::Types::SnapStartNotReadyException] data
745
+ def initialize(context, message, data = Aws::EmptyStructure.new)
746
+ super(context, message, data)
747
+ end
748
+
749
+ # @return [String]
750
+ def type
751
+ @data[:type]
752
+ end
753
+
754
+ # @return [String]
755
+ def message
756
+ @message || @data[:message]
757
+ end
758
+ end
759
+
760
+ class SnapStartTimeoutException < ServiceError
761
+
762
+ # @param [Seahorse::Client::RequestContext] context
763
+ # @param [String] message
764
+ # @param [Aws::Lambda::Types::SnapStartTimeoutException] data
765
+ def initialize(context, message, data = Aws::EmptyStructure.new)
766
+ super(context, message, data)
767
+ end
768
+
769
+ # @return [String]
770
+ def type
771
+ @data[:type]
772
+ end
773
+
774
+ # @return [String]
775
+ def message
776
+ @message || @data[:message]
777
+ end
778
+ end
779
+
696
780
  class SubnetIPAddressLimitReachedException < ServiceError
697
781
 
698
782
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,54 @@
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::Lambda
11
+ module EventStreams
12
+ class InvokeWithResponseStreamResponseEvent
13
+
14
+ def initialize
15
+ @event_emitter = Aws::EventEmitter.new
16
+ end
17
+
18
+ def on_payload_chunk_event(&block)
19
+ @event_emitter.on(:payload_chunk, block) if block_given?
20
+ end
21
+
22
+ def on_invoke_complete_event(&block)
23
+ @event_emitter.on(:invoke_complete, block) if block_given?
24
+ end
25
+
26
+ def on_error_event(&block)
27
+ @event_emitter.on(:error, block) if block_given?
28
+ end
29
+
30
+ def on_initial_response_event(&block)
31
+ @event_emitter.on(:initial_response, block) if block_given?
32
+ end
33
+
34
+ def on_unknown_event(&block)
35
+ @event_emitter.on(:unknown_event, block) if block_given?
36
+ end
37
+
38
+ def on_event(&block)
39
+ on_payload_chunk_event(&block)
40
+ on_invoke_complete_event(&block)
41
+ on_error_event(&block)
42
+ on_initial_response_event(&block)
43
+ on_unknown_event(&block)
44
+ end
45
+
46
+ # @api private
47
+ # @return Aws::EventEmitter
48
+ attr_reader :event_emitter
49
+
50
+ end
51
+
52
+ end
53
+ end
54
+
@@ -0,0 +1,200 @@
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::Lambda
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Lambda::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::Lambda::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Lambda::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :add_layer_version_permission
60
+ Aws::Lambda::Endpoints::AddLayerVersionPermission.build(context)
61
+ when :add_permission
62
+ Aws::Lambda::Endpoints::AddPermission.build(context)
63
+ when :create_alias
64
+ Aws::Lambda::Endpoints::CreateAlias.build(context)
65
+ when :create_code_signing_config
66
+ Aws::Lambda::Endpoints::CreateCodeSigningConfig.build(context)
67
+ when :create_event_source_mapping
68
+ Aws::Lambda::Endpoints::CreateEventSourceMapping.build(context)
69
+ when :create_function
70
+ Aws::Lambda::Endpoints::CreateFunction.build(context)
71
+ when :create_function_url_config
72
+ Aws::Lambda::Endpoints::CreateFunctionUrlConfig.build(context)
73
+ when :delete_alias
74
+ Aws::Lambda::Endpoints::DeleteAlias.build(context)
75
+ when :delete_code_signing_config
76
+ Aws::Lambda::Endpoints::DeleteCodeSigningConfig.build(context)
77
+ when :delete_event_source_mapping
78
+ Aws::Lambda::Endpoints::DeleteEventSourceMapping.build(context)
79
+ when :delete_function
80
+ Aws::Lambda::Endpoints::DeleteFunction.build(context)
81
+ when :delete_function_code_signing_config
82
+ Aws::Lambda::Endpoints::DeleteFunctionCodeSigningConfig.build(context)
83
+ when :delete_function_concurrency
84
+ Aws::Lambda::Endpoints::DeleteFunctionConcurrency.build(context)
85
+ when :delete_function_event_invoke_config
86
+ Aws::Lambda::Endpoints::DeleteFunctionEventInvokeConfig.build(context)
87
+ when :delete_function_url_config
88
+ Aws::Lambda::Endpoints::DeleteFunctionUrlConfig.build(context)
89
+ when :delete_layer_version
90
+ Aws::Lambda::Endpoints::DeleteLayerVersion.build(context)
91
+ when :delete_provisioned_concurrency_config
92
+ Aws::Lambda::Endpoints::DeleteProvisionedConcurrencyConfig.build(context)
93
+ when :get_account_settings
94
+ Aws::Lambda::Endpoints::GetAccountSettings.build(context)
95
+ when :get_alias
96
+ Aws::Lambda::Endpoints::GetAlias.build(context)
97
+ when :get_code_signing_config
98
+ Aws::Lambda::Endpoints::GetCodeSigningConfig.build(context)
99
+ when :get_event_source_mapping
100
+ Aws::Lambda::Endpoints::GetEventSourceMapping.build(context)
101
+ when :get_function
102
+ Aws::Lambda::Endpoints::GetFunction.build(context)
103
+ when :get_function_code_signing_config
104
+ Aws::Lambda::Endpoints::GetFunctionCodeSigningConfig.build(context)
105
+ when :get_function_concurrency
106
+ Aws::Lambda::Endpoints::GetFunctionConcurrency.build(context)
107
+ when :get_function_configuration
108
+ Aws::Lambda::Endpoints::GetFunctionConfiguration.build(context)
109
+ when :get_function_event_invoke_config
110
+ Aws::Lambda::Endpoints::GetFunctionEventInvokeConfig.build(context)
111
+ when :get_function_url_config
112
+ Aws::Lambda::Endpoints::GetFunctionUrlConfig.build(context)
113
+ when :get_layer_version
114
+ Aws::Lambda::Endpoints::GetLayerVersion.build(context)
115
+ when :get_layer_version_by_arn
116
+ Aws::Lambda::Endpoints::GetLayerVersionByArn.build(context)
117
+ when :get_layer_version_policy
118
+ Aws::Lambda::Endpoints::GetLayerVersionPolicy.build(context)
119
+ when :get_policy
120
+ Aws::Lambda::Endpoints::GetPolicy.build(context)
121
+ when :get_provisioned_concurrency_config
122
+ Aws::Lambda::Endpoints::GetProvisionedConcurrencyConfig.build(context)
123
+ when :get_runtime_management_config
124
+ Aws::Lambda::Endpoints::GetRuntimeManagementConfig.build(context)
125
+ when :invoke
126
+ Aws::Lambda::Endpoints::Invoke.build(context)
127
+ when :invoke_async
128
+ Aws::Lambda::Endpoints::InvokeAsync.build(context)
129
+ when :invoke_with_response_stream
130
+ Aws::Lambda::Endpoints::InvokeWithResponseStream.build(context)
131
+ when :list_aliases
132
+ Aws::Lambda::Endpoints::ListAliases.build(context)
133
+ when :list_code_signing_configs
134
+ Aws::Lambda::Endpoints::ListCodeSigningConfigs.build(context)
135
+ when :list_event_source_mappings
136
+ Aws::Lambda::Endpoints::ListEventSourceMappings.build(context)
137
+ when :list_function_event_invoke_configs
138
+ Aws::Lambda::Endpoints::ListFunctionEventInvokeConfigs.build(context)
139
+ when :list_function_url_configs
140
+ Aws::Lambda::Endpoints::ListFunctionUrlConfigs.build(context)
141
+ when :list_functions
142
+ Aws::Lambda::Endpoints::ListFunctions.build(context)
143
+ when :list_functions_by_code_signing_config
144
+ Aws::Lambda::Endpoints::ListFunctionsByCodeSigningConfig.build(context)
145
+ when :list_layer_versions
146
+ Aws::Lambda::Endpoints::ListLayerVersions.build(context)
147
+ when :list_layers
148
+ Aws::Lambda::Endpoints::ListLayers.build(context)
149
+ when :list_provisioned_concurrency_configs
150
+ Aws::Lambda::Endpoints::ListProvisionedConcurrencyConfigs.build(context)
151
+ when :list_tags
152
+ Aws::Lambda::Endpoints::ListTags.build(context)
153
+ when :list_versions_by_function
154
+ Aws::Lambda::Endpoints::ListVersionsByFunction.build(context)
155
+ when :publish_layer_version
156
+ Aws::Lambda::Endpoints::PublishLayerVersion.build(context)
157
+ when :publish_version
158
+ Aws::Lambda::Endpoints::PublishVersion.build(context)
159
+ when :put_function_code_signing_config
160
+ Aws::Lambda::Endpoints::PutFunctionCodeSigningConfig.build(context)
161
+ when :put_function_concurrency
162
+ Aws::Lambda::Endpoints::PutFunctionConcurrency.build(context)
163
+ when :put_function_event_invoke_config
164
+ Aws::Lambda::Endpoints::PutFunctionEventInvokeConfig.build(context)
165
+ when :put_provisioned_concurrency_config
166
+ Aws::Lambda::Endpoints::PutProvisionedConcurrencyConfig.build(context)
167
+ when :put_runtime_management_config
168
+ Aws::Lambda::Endpoints::PutRuntimeManagementConfig.build(context)
169
+ when :remove_layer_version_permission
170
+ Aws::Lambda::Endpoints::RemoveLayerVersionPermission.build(context)
171
+ when :remove_permission
172
+ Aws::Lambda::Endpoints::RemovePermission.build(context)
173
+ when :tag_resource
174
+ Aws::Lambda::Endpoints::TagResource.build(context)
175
+ when :untag_resource
176
+ Aws::Lambda::Endpoints::UntagResource.build(context)
177
+ when :update_alias
178
+ Aws::Lambda::Endpoints::UpdateAlias.build(context)
179
+ when :update_code_signing_config
180
+ Aws::Lambda::Endpoints::UpdateCodeSigningConfig.build(context)
181
+ when :update_event_source_mapping
182
+ Aws::Lambda::Endpoints::UpdateEventSourceMapping.build(context)
183
+ when :update_function_code
184
+ Aws::Lambda::Endpoints::UpdateFunctionCode.build(context)
185
+ when :update_function_configuration
186
+ Aws::Lambda::Endpoints::UpdateFunctionConfiguration.build(context)
187
+ when :update_function_event_invoke_config
188
+ Aws::Lambda::Endpoints::UpdateFunctionEventInvokeConfig.build(context)
189
+ when :update_function_url_config
190
+ Aws::Lambda::Endpoints::UpdateFunctionUrlConfig.build(context)
191
+ end
192
+ end
193
+ end
194
+
195
+ def add_handlers(handlers, _config)
196
+ handlers.add(Handler, step: :build, priority: 75)
197
+ end
198
+ end
199
+ end
200
+ end