rusoto_lambda/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28/// <p>Limits that are related to concurrency and storage. All file and storage sizes are in bytes.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
30#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
31pub struct AccountLimit {
32    /// <p>The maximum size of a function's deployment package and layers when they're extracted.</p>
33    #[serde(rename = "CodeSizeUnzipped")]
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub code_size_unzipped: Option<i64>,
36    /// <p>The maximum size of a deployment package when it's uploaded directly to AWS Lambda. Use Amazon S3 for larger files.</p>
37    #[serde(rename = "CodeSizeZipped")]
38    #[serde(skip_serializing_if = "Option::is_none")]
39    pub code_size_zipped: Option<i64>,
40    /// <p>The maximum number of simultaneous function executions.</p>
41    #[serde(rename = "ConcurrentExecutions")]
42    #[serde(skip_serializing_if = "Option::is_none")]
43    pub concurrent_executions: Option<i64>,
44    /// <p>The amount of storage space that you can use for all deployment packages and layer archives.</p>
45    #[serde(rename = "TotalCodeSize")]
46    #[serde(skip_serializing_if = "Option::is_none")]
47    pub total_code_size: Option<i64>,
48    /// <p>The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with <a>PutFunctionConcurrency</a>.</p>
49    #[serde(rename = "UnreservedConcurrentExecutions")]
50    #[serde(skip_serializing_if = "Option::is_none")]
51    pub unreserved_concurrent_executions: Option<i64>,
52}
53
54/// <p>The number of functions and amount of storage in use.</p>
55#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
56#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
57pub struct AccountUsage {
58    /// <p>The number of Lambda functions.</p>
59    #[serde(rename = "FunctionCount")]
60    #[serde(skip_serializing_if = "Option::is_none")]
61    pub function_count: Option<i64>,
62    /// <p>The amount of storage space, in bytes, that's being used by deployment packages and layer archives.</p>
63    #[serde(rename = "TotalCodeSize")]
64    #[serde(skip_serializing_if = "Option::is_none")]
65    pub total_code_size: Option<i64>,
66}
67
68#[derive(Clone, Debug, Default, PartialEq, Serialize)]
69#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
70pub struct AddLayerVersionPermissionRequest {
71    /// <p>The API action that grants access to the layer. For example, <code>lambda:GetLayerVersion</code>.</p>
72    #[serde(rename = "Action")]
73    pub action: String,
74    /// <p>The name or Amazon Resource Name (ARN) of the layer.</p>
75    #[serde(rename = "LayerName")]
76    pub layer_name: String,
77    /// <p>With the principal set to <code>*</code>, grant permission to all accounts in the specified organization.</p>
78    #[serde(rename = "OrganizationId")]
79    #[serde(skip_serializing_if = "Option::is_none")]
80    pub organization_id: Option<String>,
81    /// <p>An account ID, or <code>*</code> to grant permission to all AWS accounts.</p>
82    #[serde(rename = "Principal")]
83    pub principal: String,
84    /// <p>Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.</p>
85    #[serde(rename = "RevisionId")]
86    #[serde(skip_serializing_if = "Option::is_none")]
87    pub revision_id: Option<String>,
88    /// <p>An identifier that distinguishes the policy from others on the same layer version.</p>
89    #[serde(rename = "StatementId")]
90    pub statement_id: String,
91    /// <p>The version number.</p>
92    #[serde(rename = "VersionNumber")]
93    pub version_number: i64,
94}
95
96#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
97#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
98pub struct AddLayerVersionPermissionResponse {
99    /// <p>A unique identifier for the current revision of the policy.</p>
100    #[serde(rename = "RevisionId")]
101    #[serde(skip_serializing_if = "Option::is_none")]
102    pub revision_id: Option<String>,
103    /// <p>The permission statement.</p>
104    #[serde(rename = "Statement")]
105    #[serde(skip_serializing_if = "Option::is_none")]
106    pub statement: Option<String>,
107}
108
109#[derive(Clone, Debug, Default, PartialEq, Serialize)]
110#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
111pub struct AddPermissionRequest {
112    /// <p>The action that the principal can use on the function. For example, <code>lambda:InvokeFunction</code> or <code>lambda:GetFunction</code>.</p>
113    #[serde(rename = "Action")]
114    pub action: String,
115    /// <p>For Alexa Smart Home functions, a token that must be supplied by the invoker.</p>
116    #[serde(rename = "EventSourceToken")]
117    #[serde(skip_serializing_if = "Option::is_none")]
118    pub event_source_token: Option<String>,
119    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
120    #[serde(rename = "FunctionName")]
121    pub function_name: String,
122    /// <p>The AWS service or account that invokes the function. If you specify a service, use <code>SourceArn</code> or <code>SourceAccount</code> to limit who can invoke the function through that service.</p>
123    #[serde(rename = "Principal")]
124    pub principal: String,
125    /// <p>Specify a version or alias to add permissions to a published version of the function.</p>
126    #[serde(rename = "Qualifier")]
127    #[serde(skip_serializing_if = "Option::is_none")]
128    pub qualifier: Option<String>,
129    /// <p>Only update the policy if the revision ID matches the ID that's specified. Use this option to avoid modifying a policy that has changed since you last read it.</p>
130    #[serde(rename = "RevisionId")]
131    #[serde(skip_serializing_if = "Option::is_none")]
132    pub revision_id: Option<String>,
133    /// <p>For Amazon S3, the ID of the account that owns the resource. Use this together with <code>SourceArn</code> to ensure that the resource is owned by the specified account. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.</p>
134    #[serde(rename = "SourceAccount")]
135    #[serde(skip_serializing_if = "Option::is_none")]
136    pub source_account: Option<String>,
137    /// <p>For AWS services, the ARN of the AWS resource that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic.</p>
138    #[serde(rename = "SourceArn")]
139    #[serde(skip_serializing_if = "Option::is_none")]
140    pub source_arn: Option<String>,
141    /// <p>A statement identifier that differentiates the statement from others in the same policy.</p>
142    #[serde(rename = "StatementId")]
143    pub statement_id: String,
144}
145
146#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
147#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
148pub struct AddPermissionResponse {
149    /// <p>The permission statement that's added to the function policy.</p>
150    #[serde(rename = "Statement")]
151    #[serde(skip_serializing_if = "Option::is_none")]
152    pub statement: Option<String>,
153}
154
155/// <p>Provides configuration information about a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
156#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
157#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
158pub struct AliasConfiguration {
159    /// <p>The Amazon Resource Name (ARN) of the alias.</p>
160    #[serde(rename = "AliasArn")]
161    #[serde(skip_serializing_if = "Option::is_none")]
162    pub alias_arn: Option<String>,
163    /// <p>A description of the alias.</p>
164    #[serde(rename = "Description")]
165    #[serde(skip_serializing_if = "Option::is_none")]
166    pub description: Option<String>,
167    /// <p>The function version that the alias invokes.</p>
168    #[serde(rename = "FunctionVersion")]
169    #[serde(skip_serializing_if = "Option::is_none")]
170    pub function_version: Option<String>,
171    /// <p>The name of the alias.</p>
172    #[serde(rename = "Name")]
173    #[serde(skip_serializing_if = "Option::is_none")]
174    pub name: Option<String>,
175    /// <p>A unique identifier that changes when you update the alias.</p>
176    #[serde(rename = "RevisionId")]
177    #[serde(skip_serializing_if = "Option::is_none")]
178    pub revision_id: Option<String>,
179    /// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">routing configuration</a> of the alias.</p>
180    #[serde(rename = "RoutingConfig")]
181    #[serde(skip_serializing_if = "Option::is_none")]
182    pub routing_config: Option<AliasRoutingConfiguration>,
183}
184
185/// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">traffic-shifting</a> configuration of a Lambda function alias.</p>
186#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
187pub struct AliasRoutingConfiguration {
188    /// <p>The second version, and the percentage of traffic that's routed to it.</p>
189    #[serde(rename = "AdditionalVersionWeights")]
190    #[serde(skip_serializing_if = "Option::is_none")]
191    pub additional_version_weights: Option<::std::collections::HashMap<String, f64>>,
192}
193
194#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
195#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
196pub struct Concurrency {
197    /// <p>The number of concurrent executions that are reserved for this function. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html">Managing Concurrency</a>.</p>
198    #[serde(rename = "ReservedConcurrentExecutions")]
199    #[serde(skip_serializing_if = "Option::is_none")]
200    pub reserved_concurrent_executions: Option<i64>,
201}
202
203#[derive(Clone, Debug, Default, PartialEq, Serialize)]
204#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
205pub struct CreateAliasRequest {
206    /// <p>A description of the alias.</p>
207    #[serde(rename = "Description")]
208    #[serde(skip_serializing_if = "Option::is_none")]
209    pub description: Option<String>,
210    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
211    #[serde(rename = "FunctionName")]
212    pub function_name: String,
213    /// <p>The function version that the alias invokes.</p>
214    #[serde(rename = "FunctionVersion")]
215    pub function_version: String,
216    /// <p>The name of the alias.</p>
217    #[serde(rename = "Name")]
218    pub name: String,
219    /// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html#configuring-alias-routing">routing configuration</a> of the alias.</p>
220    #[serde(rename = "RoutingConfig")]
221    #[serde(skip_serializing_if = "Option::is_none")]
222    pub routing_config: Option<AliasRoutingConfiguration>,
223}
224
225#[derive(Clone, Debug, Default, PartialEq, Serialize)]
226#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
227pub struct CreateEventSourceMappingRequest {
228    /// <p><p>The maximum number of items to retrieve in a single batch.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - Default 100. Max 1,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - Default 10. Max 10.</p> </li> </ul></p>
229    #[serde(rename = "BatchSize")]
230    #[serde(skip_serializing_if = "Option::is_none")]
231    pub batch_size: Option<i64>,
232    /// <p>(Streams) If the function returns an error, split the batch in two and retry.</p>
233    #[serde(rename = "BisectBatchOnFunctionError")]
234    #[serde(skip_serializing_if = "Option::is_none")]
235    pub bisect_batch_on_function_error: Option<bool>,
236    /// <p>(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded records.</p>
237    #[serde(rename = "DestinationConfig")]
238    #[serde(skip_serializing_if = "Option::is_none")]
239    pub destination_config: Option<DestinationConfig>,
240    /// <p>Disables the event source mapping to pause polling and invocation.</p>
241    #[serde(rename = "Enabled")]
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub enabled: Option<bool>,
244    /// <p><p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - The ARN of the queue.</p> </li> </ul></p>
245    #[serde(rename = "EventSourceArn")]
246    pub event_source_arn: String,
247    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
248    #[serde(rename = "FunctionName")]
249    pub function_name: String,
250    /// <p>(Streams) The maximum amount of time to gather records before invoking the function, in seconds.</p>
251    #[serde(rename = "MaximumBatchingWindowInSeconds")]
252    #[serde(skip_serializing_if = "Option::is_none")]
253    pub maximum_batching_window_in_seconds: Option<i64>,
254    /// <p>(Streams) The maximum age of a record that Lambda sends to a function for processing.</p>
255    #[serde(rename = "MaximumRecordAgeInSeconds")]
256    #[serde(skip_serializing_if = "Option::is_none")]
257    pub maximum_record_age_in_seconds: Option<i64>,
258    /// <p>(Streams) The maximum number of times to retry when the function returns an error.</p>
259    #[serde(rename = "MaximumRetryAttempts")]
260    #[serde(skip_serializing_if = "Option::is_none")]
261    pub maximum_retry_attempts: Option<i64>,
262    /// <p>(Streams) The number of batches to process from each shard concurrently.</p>
263    #[serde(rename = "ParallelizationFactor")]
264    #[serde(skip_serializing_if = "Option::is_none")]
265    pub parallelization_factor: Option<i64>,
266    /// <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Streams sources. <code>AT_TIMESTAMP</code> is only supported for Amazon Kinesis streams.</p>
267    #[serde(rename = "StartingPosition")]
268    #[serde(skip_serializing_if = "Option::is_none")]
269    pub starting_position: Option<String>,
270    /// <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading.</p>
271    #[serde(rename = "StartingPositionTimestamp")]
272    #[serde(skip_serializing_if = "Option::is_none")]
273    pub starting_position_timestamp: Option<f64>,
274}
275
276#[derive(Clone, Debug, Default, PartialEq, Serialize)]
277#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
278pub struct CreateFunctionRequest {
279    /// <p>The code for the function.</p>
280    #[serde(rename = "Code")]
281    pub code: FunctionCode,
282    /// <p>A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq">Dead Letter Queues</a>.</p>
283    #[serde(rename = "DeadLetterConfig")]
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub dead_letter_config: Option<DeadLetterConfig>,
286    /// <p>A description of the function.</p>
287    #[serde(rename = "Description")]
288    #[serde(skip_serializing_if = "Option::is_none")]
289    pub description: Option<String>,
290    /// <p>Environment variables that are accessible from function code during execution.</p>
291    #[serde(rename = "Environment")]
292    #[serde(skip_serializing_if = "Option::is_none")]
293    pub environment: Option<Environment>,
294    /// <p>Connection settings for an Amazon EFS file system.</p>
295    #[serde(rename = "FileSystemConfigs")]
296    #[serde(skip_serializing_if = "Option::is_none")]
297    pub file_system_configs: Option<Vec<FileSystemConfig>>,
298    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
299    #[serde(rename = "FunctionName")]
300    pub function_name: String,
301    /// <p>The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html">Programming Model</a>.</p>
302    #[serde(rename = "Handler")]
303    pub handler: String,
304    /// <p>The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.</p>
305    #[serde(rename = "KMSKeyArn")]
306    #[serde(skip_serializing_if = "Option::is_none")]
307    pub kms_key_arn: Option<String>,
308    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
309    #[serde(rename = "Layers")]
310    #[serde(skip_serializing_if = "Option::is_none")]
311    pub layers: Option<Vec<String>>,
312    /// <p>The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.</p>
313    #[serde(rename = "MemorySize")]
314    #[serde(skip_serializing_if = "Option::is_none")]
315    pub memory_size: Option<i64>,
316    /// <p>Set to true to publish the first version of the function during creation.</p>
317    #[serde(rename = "Publish")]
318    #[serde(skip_serializing_if = "Option::is_none")]
319    pub publish: Option<bool>,
320    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
321    #[serde(rename = "Role")]
322    pub role: String,
323    /// <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">runtime</a>.</p>
324    #[serde(rename = "Runtime")]
325    pub runtime: String,
326    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
327    #[serde(rename = "Tags")]
328    #[serde(skip_serializing_if = "Option::is_none")]
329    pub tags: Option<::std::collections::HashMap<String, String>>,
330    /// <p>The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.</p>
331    #[serde(rename = "Timeout")]
332    #[serde(skip_serializing_if = "Option::is_none")]
333    pub timeout: Option<i64>,
334    /// <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with AWS X-Ray.</p>
335    #[serde(rename = "TracingConfig")]
336    #[serde(skip_serializing_if = "Option::is_none")]
337    pub tracing_config: Option<TracingConfig>,
338    /// <p>For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can only access resources and the internet through that VPC. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">VPC Settings</a>.</p>
339    #[serde(rename = "VpcConfig")]
340    #[serde(skip_serializing_if = "Option::is_none")]
341    pub vpc_config: Option<VpcConfig>,
342}
343
344/// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq">dead-letter queue</a> for failed asynchronous invocations.</p>
345#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
346pub struct DeadLetterConfig {
347    /// <p>The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.</p>
348    #[serde(rename = "TargetArn")]
349    #[serde(skip_serializing_if = "Option::is_none")]
350    pub target_arn: Option<String>,
351}
352
353#[derive(Clone, Debug, Default, PartialEq, Serialize)]
354#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
355pub struct DeleteAliasRequest {
356    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
357    #[serde(rename = "FunctionName")]
358    pub function_name: String,
359    /// <p>The name of the alias.</p>
360    #[serde(rename = "Name")]
361    pub name: String,
362}
363
364#[derive(Clone, Debug, Default, PartialEq, Serialize)]
365#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
366pub struct DeleteEventSourceMappingRequest {
367    /// <p>The identifier of the event source mapping.</p>
368    #[serde(rename = "UUID")]
369    pub uuid: String,
370}
371
372#[derive(Clone, Debug, Default, PartialEq, Serialize)]
373#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
374pub struct DeleteFunctionConcurrencyRequest {
375    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
376    #[serde(rename = "FunctionName")]
377    pub function_name: String,
378}
379
380#[derive(Clone, Debug, Default, PartialEq, Serialize)]
381#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
382pub struct DeleteFunctionEventInvokeConfigRequest {
383    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
384    #[serde(rename = "FunctionName")]
385    pub function_name: String,
386    /// <p>A version number or alias name.</p>
387    #[serde(rename = "Qualifier")]
388    #[serde(skip_serializing_if = "Option::is_none")]
389    pub qualifier: Option<String>,
390}
391
392#[derive(Clone, Debug, Default, PartialEq, Serialize)]
393#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
394pub struct DeleteFunctionRequest {
395    /// <p>The name of the Lambda function or version.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:1</code> (with version).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
396    #[serde(rename = "FunctionName")]
397    pub function_name: String,
398    /// <p>Specify a version to delete. You can't delete a version that's referenced by an alias.</p>
399    #[serde(rename = "Qualifier")]
400    #[serde(skip_serializing_if = "Option::is_none")]
401    pub qualifier: Option<String>,
402}
403
404#[derive(Clone, Debug, Default, PartialEq, Serialize)]
405#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
406pub struct DeleteLayerVersionRequest {
407    /// <p>The name or Amazon Resource Name (ARN) of the layer.</p>
408    #[serde(rename = "LayerName")]
409    pub layer_name: String,
410    /// <p>The version number.</p>
411    #[serde(rename = "VersionNumber")]
412    pub version_number: i64,
413}
414
415#[derive(Clone, Debug, Default, PartialEq, Serialize)]
416#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
417pub struct DeleteProvisionedConcurrencyConfigRequest {
418    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
419    #[serde(rename = "FunctionName")]
420    pub function_name: String,
421    /// <p>The version number or alias name.</p>
422    #[serde(rename = "Qualifier")]
423    pub qualifier: String,
424}
425
426/// <p>A configuration object that specifies the destination of an event after Lambda processes it.</p>
427#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
428pub struct DestinationConfig {
429    /// <p>The destination configuration for failed invocations.</p>
430    #[serde(rename = "OnFailure")]
431    #[serde(skip_serializing_if = "Option::is_none")]
432    pub on_failure: Option<OnFailure>,
433    /// <p>The destination configuration for successful invocations.</p>
434    #[serde(rename = "OnSuccess")]
435    #[serde(skip_serializing_if = "Option::is_none")]
436    pub on_success: Option<OnSuccess>,
437}
438
439/// <p>A function's environment variable settings.</p>
440#[derive(Clone, Debug, Default, PartialEq, Serialize)]
441#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
442pub struct Environment {
443    /// <p>Environment variable key-value pairs.</p>
444    #[serde(rename = "Variables")]
445    #[serde(skip_serializing_if = "Option::is_none")]
446    pub variables: Option<::std::collections::HashMap<String, String>>,
447}
448
449/// <p>Error messages for environment variables that couldn't be applied.</p>
450#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
451#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
452pub struct EnvironmentError {
453    /// <p>The error code.</p>
454    #[serde(rename = "ErrorCode")]
455    #[serde(skip_serializing_if = "Option::is_none")]
456    pub error_code: Option<String>,
457    /// <p>The error message.</p>
458    #[serde(rename = "Message")]
459    #[serde(skip_serializing_if = "Option::is_none")]
460    pub message: Option<String>,
461}
462
463/// <p>The results of an operation to update or read environment variables. If the operation is successful, the response contains the environment variables. If it failed, the response contains details about the error.</p>
464#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
465#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
466pub struct EnvironmentResponse {
467    /// <p>Error messages for environment variables that couldn't be applied.</p>
468    #[serde(rename = "Error")]
469    #[serde(skip_serializing_if = "Option::is_none")]
470    pub error: Option<EnvironmentError>,
471    /// <p>Environment variable key-value pairs.</p>
472    #[serde(rename = "Variables")]
473    #[serde(skip_serializing_if = "Option::is_none")]
474    pub variables: Option<::std::collections::HashMap<String, String>>,
475}
476
477/// <p>A mapping between an AWS resource and an AWS Lambda function. See <a>CreateEventSourceMapping</a> for details.</p>
478#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
479#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
480pub struct EventSourceMappingConfiguration {
481    /// <p>The maximum number of items to retrieve in a single batch.</p>
482    #[serde(rename = "BatchSize")]
483    #[serde(skip_serializing_if = "Option::is_none")]
484    pub batch_size: Option<i64>,
485    /// <p>(Streams) If the function returns an error, split the batch in two and retry.</p>
486    #[serde(rename = "BisectBatchOnFunctionError")]
487    #[serde(skip_serializing_if = "Option::is_none")]
488    pub bisect_batch_on_function_error: Option<bool>,
489    /// <p>(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded records.</p>
490    #[serde(rename = "DestinationConfig")]
491    #[serde(skip_serializing_if = "Option::is_none")]
492    pub destination_config: Option<DestinationConfig>,
493    /// <p>The Amazon Resource Name (ARN) of the event source.</p>
494    #[serde(rename = "EventSourceArn")]
495    #[serde(skip_serializing_if = "Option::is_none")]
496    pub event_source_arn: Option<String>,
497    /// <p>The ARN of the Lambda function.</p>
498    #[serde(rename = "FunctionArn")]
499    #[serde(skip_serializing_if = "Option::is_none")]
500    pub function_arn: Option<String>,
501    /// <p>The date that the event source mapping was last updated, or its state changed.</p>
502    #[serde(rename = "LastModified")]
503    #[serde(skip_serializing_if = "Option::is_none")]
504    pub last_modified: Option<f64>,
505    /// <p>The result of the last AWS Lambda invocation of your Lambda function.</p>
506    #[serde(rename = "LastProcessingResult")]
507    #[serde(skip_serializing_if = "Option::is_none")]
508    pub last_processing_result: Option<String>,
509    /// <p>(Streams) The maximum amount of time to gather records before invoking the function, in seconds.</p>
510    #[serde(rename = "MaximumBatchingWindowInSeconds")]
511    #[serde(skip_serializing_if = "Option::is_none")]
512    pub maximum_batching_window_in_seconds: Option<i64>,
513    /// <p>(Streams) The maximum age of a record that Lambda sends to a function for processing.</p>
514    #[serde(rename = "MaximumRecordAgeInSeconds")]
515    #[serde(skip_serializing_if = "Option::is_none")]
516    pub maximum_record_age_in_seconds: Option<i64>,
517    /// <p>(Streams) The maximum number of times to retry when the function returns an error.</p>
518    #[serde(rename = "MaximumRetryAttempts")]
519    #[serde(skip_serializing_if = "Option::is_none")]
520    pub maximum_retry_attempts: Option<i64>,
521    /// <p>(Streams) The number of batches to process from each shard concurrently.</p>
522    #[serde(rename = "ParallelizationFactor")]
523    #[serde(skip_serializing_if = "Option::is_none")]
524    pub parallelization_factor: Option<i64>,
525    /// <p>The state of the event source mapping. It can be one of the following: <code>Creating</code>, <code>Enabling</code>, <code>Enabled</code>, <code>Disabling</code>, <code>Disabled</code>, <code>Updating</code>, or <code>Deleting</code>.</p>
526    #[serde(rename = "State")]
527    #[serde(skip_serializing_if = "Option::is_none")]
528    pub state: Option<String>,
529    /// <p>Indicates whether the last change to the event source mapping was made by a user, or by the Lambda service.</p>
530    #[serde(rename = "StateTransitionReason")]
531    #[serde(skip_serializing_if = "Option::is_none")]
532    pub state_transition_reason: Option<String>,
533    /// <p>The identifier of the event source mapping.</p>
534    #[serde(rename = "UUID")]
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub uuid: Option<String>,
537}
538
539/// <p>Details about the connection between a Lambda function and an Amazon EFS file system.</p>
540#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
541pub struct FileSystemConfig {
542    /// <p>The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.</p>
543    #[serde(rename = "Arn")]
544    pub arn: String,
545    /// <p>The path where the function can access the file system, starting with <code>/mnt/</code>.</p>
546    #[serde(rename = "LocalMountPath")]
547    pub local_mount_path: String,
548}
549
550/// <p>The code for the Lambda function. You can specify either an object in Amazon S3, or upload a deployment package directly.</p>
551#[derive(Clone, Debug, Default, PartialEq, Serialize)]
552#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
553pub struct FunctionCode {
554    /// <p>An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.</p>
555    #[serde(rename = "S3Bucket")]
556    #[serde(skip_serializing_if = "Option::is_none")]
557    pub s3_bucket: Option<String>,
558    /// <p>The Amazon S3 key of the deployment package.</p>
559    #[serde(rename = "S3Key")]
560    #[serde(skip_serializing_if = "Option::is_none")]
561    pub s3_key: Option<String>,
562    /// <p>For versioned objects, the version of the deployment package object to use.</p>
563    #[serde(rename = "S3ObjectVersion")]
564    #[serde(skip_serializing_if = "Option::is_none")]
565    pub s3_object_version: Option<String>,
566    /// <p>The base64-encoded contents of the deployment package. AWS SDK and AWS CLI clients handle the encoding for you.</p>
567    #[serde(rename = "ZipFile")]
568    #[serde(
569        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
570        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
571        default
572    )]
573    #[serde(skip_serializing_if = "Option::is_none")]
574    pub zip_file: Option<bytes::Bytes>,
575}
576
577/// <p>Details about a function's deployment package.</p>
578#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
579#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
580pub struct FunctionCodeLocation {
581    /// <p>A presigned URL that you can use to download the deployment package.</p>
582    #[serde(rename = "Location")]
583    #[serde(skip_serializing_if = "Option::is_none")]
584    pub location: Option<String>,
585    /// <p>The service that's hosting the file.</p>
586    #[serde(rename = "RepositoryType")]
587    #[serde(skip_serializing_if = "Option::is_none")]
588    pub repository_type: Option<String>,
589}
590
591/// <p>Details about a function's configuration.</p>
592#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
593#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
594pub struct FunctionConfiguration {
595    /// <p>The SHA256 hash of the function's deployment package.</p>
596    #[serde(rename = "CodeSha256")]
597    #[serde(skip_serializing_if = "Option::is_none")]
598    pub code_sha_256: Option<String>,
599    /// <p>The size of the function's deployment package, in bytes.</p>
600    #[serde(rename = "CodeSize")]
601    #[serde(skip_serializing_if = "Option::is_none")]
602    pub code_size: Option<i64>,
603    /// <p>The function's dead letter queue.</p>
604    #[serde(rename = "DeadLetterConfig")]
605    #[serde(skip_serializing_if = "Option::is_none")]
606    pub dead_letter_config: Option<DeadLetterConfig>,
607    /// <p>The function's description.</p>
608    #[serde(rename = "Description")]
609    #[serde(skip_serializing_if = "Option::is_none")]
610    pub description: Option<String>,
611    /// <p>The function's environment variables.</p>
612    #[serde(rename = "Environment")]
613    #[serde(skip_serializing_if = "Option::is_none")]
614    pub environment: Option<EnvironmentResponse>,
615    /// <p>Connection settings for an Amazon EFS file system.</p>
616    #[serde(rename = "FileSystemConfigs")]
617    #[serde(skip_serializing_if = "Option::is_none")]
618    pub file_system_configs: Option<Vec<FileSystemConfig>>,
619    /// <p>The function's Amazon Resource Name (ARN).</p>
620    #[serde(rename = "FunctionArn")]
621    #[serde(skip_serializing_if = "Option::is_none")]
622    pub function_arn: Option<String>,
623    /// <p>The name of the function.</p>
624    #[serde(rename = "FunctionName")]
625    #[serde(skip_serializing_if = "Option::is_none")]
626    pub function_name: Option<String>,
627    /// <p>The function that Lambda calls to begin executing your function.</p>
628    #[serde(rename = "Handler")]
629    #[serde(skip_serializing_if = "Option::is_none")]
630    pub handler: Option<String>,
631    /// <p>The KMS key that's used to encrypt the function's environment variables. This key is only returned if you've configured a customer managed CMK.</p>
632    #[serde(rename = "KMSKeyArn")]
633    #[serde(skip_serializing_if = "Option::is_none")]
634    pub kms_key_arn: Option<String>,
635    /// <p>The date and time that the function was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
636    #[serde(rename = "LastModified")]
637    #[serde(skip_serializing_if = "Option::is_none")]
638    pub last_modified: Option<String>,
639    /// <p>The status of the last update that was performed on the function. This is first set to <code>Successful</code> after function creation completes.</p>
640    #[serde(rename = "LastUpdateStatus")]
641    #[serde(skip_serializing_if = "Option::is_none")]
642    pub last_update_status: Option<String>,
643    /// <p>The reason for the last update that was performed on the function.</p>
644    #[serde(rename = "LastUpdateStatusReason")]
645    #[serde(skip_serializing_if = "Option::is_none")]
646    pub last_update_status_reason: Option<String>,
647    /// <p>The reason code for the last update that was performed on the function.</p>
648    #[serde(rename = "LastUpdateStatusReasonCode")]
649    #[serde(skip_serializing_if = "Option::is_none")]
650    pub last_update_status_reason_code: Option<String>,
651    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html"> layers</a>.</p>
652    #[serde(rename = "Layers")]
653    #[serde(skip_serializing_if = "Option::is_none")]
654    pub layers: Option<Vec<Layer>>,
655    /// <p>For Lambda@Edge functions, the ARN of the master function.</p>
656    #[serde(rename = "MasterArn")]
657    #[serde(skip_serializing_if = "Option::is_none")]
658    pub master_arn: Option<String>,
659    /// <p>The memory that's allocated to the function.</p>
660    #[serde(rename = "MemorySize")]
661    #[serde(skip_serializing_if = "Option::is_none")]
662    pub memory_size: Option<i64>,
663    /// <p>The latest updated revision of the function or alias.</p>
664    #[serde(rename = "RevisionId")]
665    #[serde(skip_serializing_if = "Option::is_none")]
666    pub revision_id: Option<String>,
667    /// <p>The function's execution role.</p>
668    #[serde(rename = "Role")]
669    #[serde(skip_serializing_if = "Option::is_none")]
670    pub role: Option<String>,
671    /// <p>The runtime environment for the Lambda function.</p>
672    #[serde(rename = "Runtime")]
673    #[serde(skip_serializing_if = "Option::is_none")]
674    pub runtime: Option<String>,
675    /// <p>The current state of the function. When the state is <code>Inactive</code>, you can reactivate the function by invoking it.</p>
676    #[serde(rename = "State")]
677    #[serde(skip_serializing_if = "Option::is_none")]
678    pub state: Option<String>,
679    /// <p>The reason for the function's current state.</p>
680    #[serde(rename = "StateReason")]
681    #[serde(skip_serializing_if = "Option::is_none")]
682    pub state_reason: Option<String>,
683    /// <p>The reason code for the function's current state. When the code is <code>Creating</code>, you can't invoke or modify the function.</p>
684    #[serde(rename = "StateReasonCode")]
685    #[serde(skip_serializing_if = "Option::is_none")]
686    pub state_reason_code: Option<String>,
687    /// <p>The amount of time in seconds that Lambda allows a function to run before stopping it.</p>
688    #[serde(rename = "Timeout")]
689    #[serde(skip_serializing_if = "Option::is_none")]
690    pub timeout: Option<i64>,
691    /// <p>The function's AWS X-Ray tracing configuration.</p>
692    #[serde(rename = "TracingConfig")]
693    #[serde(skip_serializing_if = "Option::is_none")]
694    pub tracing_config: Option<TracingConfigResponse>,
695    /// <p>The version of the Lambda function.</p>
696    #[serde(rename = "Version")]
697    #[serde(skip_serializing_if = "Option::is_none")]
698    pub version: Option<String>,
699    /// <p>The function's networking configuration.</p>
700    #[serde(rename = "VpcConfig")]
701    #[serde(skip_serializing_if = "Option::is_none")]
702    pub vpc_config: Option<VpcConfigResponse>,
703}
704
705#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
706#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
707pub struct FunctionEventInvokeConfig {
708    /// <p><p>A destination for events after they have been sent to a function for processing.</p> <p class="title"> <b>Destinations</b> </p> <ul> <li> <p> <b>Function</b> - The Amazon Resource Name (ARN) of a Lambda function.</p> </li> <li> <p> <b>Queue</b> - The ARN of an SQS queue.</p> </li> <li> <p> <b>Topic</b> - The ARN of an SNS topic.</p> </li> <li> <p> <b>Event Bus</b> - The ARN of an Amazon EventBridge event bus.</p> </li> </ul></p>
709    #[serde(rename = "DestinationConfig")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub destination_config: Option<DestinationConfig>,
712    /// <p>The Amazon Resource Name (ARN) of the function.</p>
713    #[serde(rename = "FunctionArn")]
714    #[serde(skip_serializing_if = "Option::is_none")]
715    pub function_arn: Option<String>,
716    /// <p>The date and time that the configuration was last updated.</p>
717    #[serde(rename = "LastModified")]
718    #[serde(skip_serializing_if = "Option::is_none")]
719    pub last_modified: Option<f64>,
720    /// <p>The maximum age of a request that Lambda sends to a function for processing.</p>
721    #[serde(rename = "MaximumEventAgeInSeconds")]
722    #[serde(skip_serializing_if = "Option::is_none")]
723    pub maximum_event_age_in_seconds: Option<i64>,
724    /// <p>The maximum number of times to retry when the function returns an error.</p>
725    #[serde(rename = "MaximumRetryAttempts")]
726    #[serde(skip_serializing_if = "Option::is_none")]
727    pub maximum_retry_attempts: Option<i64>,
728}
729
730#[derive(Clone, Debug, Default, PartialEq, Serialize)]
731#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
732pub struct GetAccountSettingsRequest {}
733
734#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
735#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
736pub struct GetAccountSettingsResponse {
737    /// <p>Limits that are related to concurrency and code storage.</p>
738    #[serde(rename = "AccountLimit")]
739    #[serde(skip_serializing_if = "Option::is_none")]
740    pub account_limit: Option<AccountLimit>,
741    /// <p>The number of functions and amount of storage in use.</p>
742    #[serde(rename = "AccountUsage")]
743    #[serde(skip_serializing_if = "Option::is_none")]
744    pub account_usage: Option<AccountUsage>,
745}
746
747#[derive(Clone, Debug, Default, PartialEq, Serialize)]
748#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
749pub struct GetAliasRequest {
750    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
751    #[serde(rename = "FunctionName")]
752    pub function_name: String,
753    /// <p>The name of the alias.</p>
754    #[serde(rename = "Name")]
755    pub name: String,
756}
757
758#[derive(Clone, Debug, Default, PartialEq, Serialize)]
759#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
760pub struct GetEventSourceMappingRequest {
761    /// <p>The identifier of the event source mapping.</p>
762    #[serde(rename = "UUID")]
763    pub uuid: String,
764}
765
766#[derive(Clone, Debug, Default, PartialEq, Serialize)]
767#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
768pub struct GetFunctionConcurrencyRequest {
769    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
770    #[serde(rename = "FunctionName")]
771    pub function_name: String,
772}
773
774#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
775#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
776pub struct GetFunctionConcurrencyResponse {
777    /// <p>The number of simultaneous executions that are reserved for the function.</p>
778    #[serde(rename = "ReservedConcurrentExecutions")]
779    #[serde(skip_serializing_if = "Option::is_none")]
780    pub reserved_concurrent_executions: Option<i64>,
781}
782
783#[derive(Clone, Debug, Default, PartialEq, Serialize)]
784#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
785pub struct GetFunctionConfigurationRequest {
786    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
787    #[serde(rename = "FunctionName")]
788    pub function_name: String,
789    /// <p>Specify a version or alias to get details about a published version of the function.</p>
790    #[serde(rename = "Qualifier")]
791    #[serde(skip_serializing_if = "Option::is_none")]
792    pub qualifier: Option<String>,
793}
794
795#[derive(Clone, Debug, Default, PartialEq, Serialize)]
796#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
797pub struct GetFunctionEventInvokeConfigRequest {
798    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
799    #[serde(rename = "FunctionName")]
800    pub function_name: String,
801    /// <p>A version number or alias name.</p>
802    #[serde(rename = "Qualifier")]
803    #[serde(skip_serializing_if = "Option::is_none")]
804    pub qualifier: Option<String>,
805}
806
807#[derive(Clone, Debug, Default, PartialEq, Serialize)]
808#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
809pub struct GetFunctionRequest {
810    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
811    #[serde(rename = "FunctionName")]
812    pub function_name: String,
813    /// <p>Specify a version or alias to get details about a published version of the function.</p>
814    #[serde(rename = "Qualifier")]
815    #[serde(skip_serializing_if = "Option::is_none")]
816    pub qualifier: Option<String>,
817}
818
819#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
820#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
821pub struct GetFunctionResponse {
822    /// <p>The deployment package of the function or version.</p>
823    #[serde(rename = "Code")]
824    #[serde(skip_serializing_if = "Option::is_none")]
825    pub code: Option<FunctionCodeLocation>,
826    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html">reserved concurrency</a>.</p>
827    #[serde(rename = "Concurrency")]
828    #[serde(skip_serializing_if = "Option::is_none")]
829    pub concurrency: Option<Concurrency>,
830    /// <p>The configuration of the function or version.</p>
831    #[serde(rename = "Configuration")]
832    #[serde(skip_serializing_if = "Option::is_none")]
833    pub configuration: Option<FunctionConfiguration>,
834    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a>.</p>
835    #[serde(rename = "Tags")]
836    #[serde(skip_serializing_if = "Option::is_none")]
837    pub tags: Option<::std::collections::HashMap<String, String>>,
838}
839
840#[derive(Clone, Debug, Default, PartialEq, Serialize)]
841#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
842pub struct GetLayerVersionByArnRequest {
843    /// <p>The ARN of the layer version.</p>
844    #[serde(rename = "Arn")]
845    pub arn: String,
846}
847
848#[derive(Clone, Debug, Default, PartialEq, Serialize)]
849#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
850pub struct GetLayerVersionPolicyRequest {
851    /// <p>The name or Amazon Resource Name (ARN) of the layer.</p>
852    #[serde(rename = "LayerName")]
853    pub layer_name: String,
854    /// <p>The version number.</p>
855    #[serde(rename = "VersionNumber")]
856    pub version_number: i64,
857}
858
859#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
860#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
861pub struct GetLayerVersionPolicyResponse {
862    /// <p>The policy document.</p>
863    #[serde(rename = "Policy")]
864    #[serde(skip_serializing_if = "Option::is_none")]
865    pub policy: Option<String>,
866    /// <p>A unique identifier for the current revision of the policy.</p>
867    #[serde(rename = "RevisionId")]
868    #[serde(skip_serializing_if = "Option::is_none")]
869    pub revision_id: Option<String>,
870}
871
872#[derive(Clone, Debug, Default, PartialEq, Serialize)]
873#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
874pub struct GetLayerVersionRequest {
875    /// <p>The name or Amazon Resource Name (ARN) of the layer.</p>
876    #[serde(rename = "LayerName")]
877    pub layer_name: String,
878    /// <p>The version number.</p>
879    #[serde(rename = "VersionNumber")]
880    pub version_number: i64,
881}
882
883#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
884#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
885pub struct GetLayerVersionResponse {
886    /// <p>The layer's compatible runtimes.</p>
887    #[serde(rename = "CompatibleRuntimes")]
888    #[serde(skip_serializing_if = "Option::is_none")]
889    pub compatible_runtimes: Option<Vec<String>>,
890    /// <p>Details about the layer version.</p>
891    #[serde(rename = "Content")]
892    #[serde(skip_serializing_if = "Option::is_none")]
893    pub content: Option<LayerVersionContentOutput>,
894    /// <p>The date that the layer version was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
895    #[serde(rename = "CreatedDate")]
896    #[serde(skip_serializing_if = "Option::is_none")]
897    pub created_date: Option<String>,
898    /// <p>The description of the version.</p>
899    #[serde(rename = "Description")]
900    #[serde(skip_serializing_if = "Option::is_none")]
901    pub description: Option<String>,
902    /// <p>The ARN of the layer.</p>
903    #[serde(rename = "LayerArn")]
904    #[serde(skip_serializing_if = "Option::is_none")]
905    pub layer_arn: Option<String>,
906    /// <p>The ARN of the layer version.</p>
907    #[serde(rename = "LayerVersionArn")]
908    #[serde(skip_serializing_if = "Option::is_none")]
909    pub layer_version_arn: Option<String>,
910    /// <p>The layer's software license.</p>
911    #[serde(rename = "LicenseInfo")]
912    #[serde(skip_serializing_if = "Option::is_none")]
913    pub license_info: Option<String>,
914    /// <p>The version number.</p>
915    #[serde(rename = "Version")]
916    #[serde(skip_serializing_if = "Option::is_none")]
917    pub version: Option<i64>,
918}
919
920#[derive(Clone, Debug, Default, PartialEq, Serialize)]
921#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
922pub struct GetPolicyRequest {
923    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
924    #[serde(rename = "FunctionName")]
925    pub function_name: String,
926    /// <p>Specify a version or alias to get the policy for that resource.</p>
927    #[serde(rename = "Qualifier")]
928    #[serde(skip_serializing_if = "Option::is_none")]
929    pub qualifier: Option<String>,
930}
931
932#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
933#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
934pub struct GetPolicyResponse {
935    /// <p>The resource-based policy.</p>
936    #[serde(rename = "Policy")]
937    #[serde(skip_serializing_if = "Option::is_none")]
938    pub policy: Option<String>,
939    /// <p>A unique identifier for the current revision of the policy.</p>
940    #[serde(rename = "RevisionId")]
941    #[serde(skip_serializing_if = "Option::is_none")]
942    pub revision_id: Option<String>,
943}
944
945#[derive(Clone, Debug, Default, PartialEq, Serialize)]
946#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
947pub struct GetProvisionedConcurrencyConfigRequest {
948    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
949    #[serde(rename = "FunctionName")]
950    pub function_name: String,
951    /// <p>The version number or alias name.</p>
952    #[serde(rename = "Qualifier")]
953    pub qualifier: String,
954}
955
956#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
957#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
958pub struct GetProvisionedConcurrencyConfigResponse {
959    /// <p>The amount of provisioned concurrency allocated.</p>
960    #[serde(rename = "AllocatedProvisionedConcurrentExecutions")]
961    #[serde(skip_serializing_if = "Option::is_none")]
962    pub allocated_provisioned_concurrent_executions: Option<i64>,
963    /// <p>The amount of provisioned concurrency available.</p>
964    #[serde(rename = "AvailableProvisionedConcurrentExecutions")]
965    #[serde(skip_serializing_if = "Option::is_none")]
966    pub available_provisioned_concurrent_executions: Option<i64>,
967    /// <p>The date and time that a user last updated the configuration, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 format</a>.</p>
968    #[serde(rename = "LastModified")]
969    #[serde(skip_serializing_if = "Option::is_none")]
970    pub last_modified: Option<String>,
971    /// <p>The amount of provisioned concurrency requested.</p>
972    #[serde(rename = "RequestedProvisionedConcurrentExecutions")]
973    #[serde(skip_serializing_if = "Option::is_none")]
974    pub requested_provisioned_concurrent_executions: Option<i64>,
975    /// <p>The status of the allocation process.</p>
976    #[serde(rename = "Status")]
977    #[serde(skip_serializing_if = "Option::is_none")]
978    pub status: Option<String>,
979    /// <p>For failed allocations, the reason that provisioned concurrency could not be allocated.</p>
980    #[serde(rename = "StatusReason")]
981    #[serde(skip_serializing_if = "Option::is_none")]
982    pub status_reason: Option<String>,
983}
984
985#[derive(Clone, Debug, Default, PartialEq, Serialize)]
986#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
987pub struct InvocationRequest {
988    /// <p>Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.</p>
989    #[serde(rename = "ClientContext")]
990    #[serde(skip_serializing_if = "Option::is_none")]
991    pub client_context: Option<String>,
992    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
993    #[serde(rename = "FunctionName")]
994    pub function_name: String,
995    /// <p><p>Choose from the following options.</p> <ul> <li> <p> <code>RequestResponse</code> (default) - Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.</p> </li> <li> <p> <code>Event</code> - Invoke the function asynchronously. Send events that fail multiple times to the function&#39;s dead-letter queue (if it&#39;s configured). The API response only includes a status code.</p> </li> <li> <p> <code>DryRun</code> - Validate parameter values and verify that the user or role has permission to invoke the function.</p> </li> </ul></p>
996    #[serde(rename = "InvocationType")]
997    #[serde(skip_serializing_if = "Option::is_none")]
998    pub invocation_type: Option<String>,
999    /// <p>Set to <code>Tail</code> to include the execution log in the response.</p>
1000    #[serde(rename = "LogType")]
1001    #[serde(skip_serializing_if = "Option::is_none")]
1002    pub log_type: Option<String>,
1003    /// <p>The JSON that you want to provide to your Lambda function as input.</p>
1004    #[serde(rename = "Payload")]
1005    #[serde(
1006        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
1007        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
1008        default
1009    )]
1010    #[serde(skip_serializing_if = "Option::is_none")]
1011    pub payload: Option<bytes::Bytes>,
1012    /// <p>Specify a version or alias to invoke a published version of the function.</p>
1013    #[serde(rename = "Qualifier")]
1014    #[serde(skip_serializing_if = "Option::is_none")]
1015    pub qualifier: Option<String>,
1016}
1017
1018#[derive(Clone, Debug, Default, PartialEq)]
1019pub struct InvocationResponse {
1020    /// <p>The version of the function that executed. When you invoke a function with an alias, this indicates which version the alias resolved to.</p>
1021    pub executed_version: Option<String>,
1022    /// <p>If present, indicates that an error occurred during function execution. Details about the error are included in the response payload.</p>
1023    pub function_error: Option<String>,
1024    /// <p>The last 4 KB of the execution log, which is base64 encoded.</p>
1025    pub log_result: Option<String>,
1026    /// <p>The response from the function, or an error object.</p>
1027    pub payload: Option<bytes::Bytes>,
1028    /// <p>The HTTP status code is in the 200 range for a successful request. For the <code>RequestResponse</code> invocation type, this status code is 200. For the <code>Event</code> invocation type, this status code is 202. For the <code>DryRun</code> invocation type, the status code is 204.</p>
1029    pub status_code: Option<i64>,
1030}
1031
1032#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1033#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1034pub struct InvokeAsyncRequest {
1035    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1036    #[serde(rename = "FunctionName")]
1037    pub function_name: String,
1038    /// <p>The JSON that you want to provide to your Lambda function as input.</p>
1039    #[serde(rename = "InvokeArgs")]
1040    #[serde(
1041        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
1042        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
1043        default
1044    )]
1045    pub invoke_args: bytes::Bytes,
1046}
1047
1048/// <p>A success response (<code>202 Accepted</code>) indicates that the request is queued for invocation. </p>
1049#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1050#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1051pub struct InvokeAsyncResponse {
1052    /// <p>The status code.</p>
1053    #[serde(rename = "Status")]
1054    #[serde(skip_serializing_if = "Option::is_none")]
1055    pub status: Option<i64>,
1056}
1057
1058/// <p>An <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>.</p>
1059#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1060#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1061pub struct Layer {
1062    /// <p>The Amazon Resource Name (ARN) of the function layer.</p>
1063    #[serde(rename = "Arn")]
1064    #[serde(skip_serializing_if = "Option::is_none")]
1065    pub arn: Option<String>,
1066    /// <p>The size of the layer archive in bytes.</p>
1067    #[serde(rename = "CodeSize")]
1068    #[serde(skip_serializing_if = "Option::is_none")]
1069    pub code_size: Option<i64>,
1070}
1071
1072/// <p>A ZIP archive that contains the contents of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. You can specify either an Amazon S3 location, or upload a layer archive directly.</p>
1073#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1074#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1075pub struct LayerVersionContentInput {
1076    /// <p>The Amazon S3 bucket of the layer archive.</p>
1077    #[serde(rename = "S3Bucket")]
1078    #[serde(skip_serializing_if = "Option::is_none")]
1079    pub s3_bucket: Option<String>,
1080    /// <p>The Amazon S3 key of the layer archive.</p>
1081    #[serde(rename = "S3Key")]
1082    #[serde(skip_serializing_if = "Option::is_none")]
1083    pub s3_key: Option<String>,
1084    /// <p>For versioned objects, the version of the layer archive object to use.</p>
1085    #[serde(rename = "S3ObjectVersion")]
1086    #[serde(skip_serializing_if = "Option::is_none")]
1087    pub s3_object_version: Option<String>,
1088    /// <p>The base64-encoded contents of the layer archive. AWS SDK and AWS CLI clients handle the encoding for you.</p>
1089    #[serde(rename = "ZipFile")]
1090    #[serde(
1091        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
1092        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
1093        default
1094    )]
1095    #[serde(skip_serializing_if = "Option::is_none")]
1096    pub zip_file: Option<bytes::Bytes>,
1097}
1098
1099/// <p>Details about a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>.</p>
1100#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1101#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1102pub struct LayerVersionContentOutput {
1103    /// <p>The SHA-256 hash of the layer archive.</p>
1104    #[serde(rename = "CodeSha256")]
1105    #[serde(skip_serializing_if = "Option::is_none")]
1106    pub code_sha_256: Option<String>,
1107    /// <p>The size of the layer archive in bytes.</p>
1108    #[serde(rename = "CodeSize")]
1109    #[serde(skip_serializing_if = "Option::is_none")]
1110    pub code_size: Option<i64>,
1111    /// <p>A link to the layer archive in Amazon S3 that is valid for 10 minutes.</p>
1112    #[serde(rename = "Location")]
1113    #[serde(skip_serializing_if = "Option::is_none")]
1114    pub location: Option<String>,
1115}
1116
1117/// <p>Details about a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>.</p>
1118#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1119#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1120pub struct LayerVersionsListItem {
1121    /// <p>The layer's compatible runtimes.</p>
1122    #[serde(rename = "CompatibleRuntimes")]
1123    #[serde(skip_serializing_if = "Option::is_none")]
1124    pub compatible_runtimes: Option<Vec<String>>,
1125    /// <p>The date that the version was created, in ISO 8601 format. For example, <code>2018-11-27T15:10:45.123+0000</code>.</p>
1126    #[serde(rename = "CreatedDate")]
1127    #[serde(skip_serializing_if = "Option::is_none")]
1128    pub created_date: Option<String>,
1129    /// <p>The description of the version.</p>
1130    #[serde(rename = "Description")]
1131    #[serde(skip_serializing_if = "Option::is_none")]
1132    pub description: Option<String>,
1133    /// <p>The ARN of the layer version.</p>
1134    #[serde(rename = "LayerVersionArn")]
1135    #[serde(skip_serializing_if = "Option::is_none")]
1136    pub layer_version_arn: Option<String>,
1137    /// <p>The layer's open-source license.</p>
1138    #[serde(rename = "LicenseInfo")]
1139    #[serde(skip_serializing_if = "Option::is_none")]
1140    pub license_info: Option<String>,
1141    /// <p>The version number.</p>
1142    #[serde(rename = "Version")]
1143    #[serde(skip_serializing_if = "Option::is_none")]
1144    pub version: Option<i64>,
1145}
1146
1147/// <p>Details about an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>.</p>
1148#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1149#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1150pub struct LayersListItem {
1151    /// <p>The newest version of the layer.</p>
1152    #[serde(rename = "LatestMatchingVersion")]
1153    #[serde(skip_serializing_if = "Option::is_none")]
1154    pub latest_matching_version: Option<LayerVersionsListItem>,
1155    /// <p>The Amazon Resource Name (ARN) of the function layer.</p>
1156    #[serde(rename = "LayerArn")]
1157    #[serde(skip_serializing_if = "Option::is_none")]
1158    pub layer_arn: Option<String>,
1159    /// <p>The name of the layer.</p>
1160    #[serde(rename = "LayerName")]
1161    #[serde(skip_serializing_if = "Option::is_none")]
1162    pub layer_name: Option<String>,
1163}
1164
1165#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1166#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1167pub struct ListAliasesRequest {
1168    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1169    #[serde(rename = "FunctionName")]
1170    pub function_name: String,
1171    /// <p>Specify a function version to only list aliases that invoke that version.</p>
1172    #[serde(rename = "FunctionVersion")]
1173    #[serde(skip_serializing_if = "Option::is_none")]
1174    pub function_version: Option<String>,
1175    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
1176    #[serde(rename = "Marker")]
1177    #[serde(skip_serializing_if = "Option::is_none")]
1178    pub marker: Option<String>,
1179    /// <p>Limit the number of aliases returned.</p>
1180    #[serde(rename = "MaxItems")]
1181    #[serde(skip_serializing_if = "Option::is_none")]
1182    pub max_items: Option<i64>,
1183}
1184
1185#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1186#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1187pub struct ListAliasesResponse {
1188    /// <p>A list of aliases.</p>
1189    #[serde(rename = "Aliases")]
1190    #[serde(skip_serializing_if = "Option::is_none")]
1191    pub aliases: Option<Vec<AliasConfiguration>>,
1192    /// <p>The pagination token that's included if more results are available.</p>
1193    #[serde(rename = "NextMarker")]
1194    #[serde(skip_serializing_if = "Option::is_none")]
1195    pub next_marker: Option<String>,
1196}
1197
1198#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1199#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1200pub struct ListEventSourceMappingsRequest {
1201    /// <p><p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - The ARN of the queue.</p> </li> </ul></p>
1202    #[serde(rename = "EventSourceArn")]
1203    #[serde(skip_serializing_if = "Option::is_none")]
1204    pub event_source_arn: Option<String>,
1205    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
1206    #[serde(rename = "FunctionName")]
1207    #[serde(skip_serializing_if = "Option::is_none")]
1208    pub function_name: Option<String>,
1209    /// <p>A pagination token returned by a previous call.</p>
1210    #[serde(rename = "Marker")]
1211    #[serde(skip_serializing_if = "Option::is_none")]
1212    pub marker: Option<String>,
1213    /// <p>The maximum number of event source mappings to return.</p>
1214    #[serde(rename = "MaxItems")]
1215    #[serde(skip_serializing_if = "Option::is_none")]
1216    pub max_items: Option<i64>,
1217}
1218
1219#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1220#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1221pub struct ListEventSourceMappingsResponse {
1222    /// <p>A list of event source mappings.</p>
1223    #[serde(rename = "EventSourceMappings")]
1224    #[serde(skip_serializing_if = "Option::is_none")]
1225    pub event_source_mappings: Option<Vec<EventSourceMappingConfiguration>>,
1226    /// <p>A pagination token that's returned when the response doesn't contain all event source mappings.</p>
1227    #[serde(rename = "NextMarker")]
1228    #[serde(skip_serializing_if = "Option::is_none")]
1229    pub next_marker: Option<String>,
1230}
1231
1232#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1233#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1234pub struct ListFunctionEventInvokeConfigsRequest {
1235    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1236    #[serde(rename = "FunctionName")]
1237    pub function_name: String,
1238    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
1239    #[serde(rename = "Marker")]
1240    #[serde(skip_serializing_if = "Option::is_none")]
1241    pub marker: Option<String>,
1242    /// <p>The maximum number of configurations to return.</p>
1243    #[serde(rename = "MaxItems")]
1244    #[serde(skip_serializing_if = "Option::is_none")]
1245    pub max_items: Option<i64>,
1246}
1247
1248#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1249#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1250pub struct ListFunctionEventInvokeConfigsResponse {
1251    /// <p>A list of configurations.</p>
1252    #[serde(rename = "FunctionEventInvokeConfigs")]
1253    #[serde(skip_serializing_if = "Option::is_none")]
1254    pub function_event_invoke_configs: Option<Vec<FunctionEventInvokeConfig>>,
1255    /// <p>The pagination token that's included if more results are available.</p>
1256    #[serde(rename = "NextMarker")]
1257    #[serde(skip_serializing_if = "Option::is_none")]
1258    pub next_marker: Option<String>,
1259}
1260
1261#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1262#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1263pub struct ListFunctionsRequest {
1264    /// <p>Set to <code>ALL</code> to include entries for all published versions of each function.</p>
1265    #[serde(rename = "FunctionVersion")]
1266    #[serde(skip_serializing_if = "Option::is_none")]
1267    pub function_version: Option<String>,
1268    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
1269    #[serde(rename = "Marker")]
1270    #[serde(skip_serializing_if = "Option::is_none")]
1271    pub marker: Option<String>,
1272    /// <p>For Lambda@Edge functions, the AWS Region of the master function. For example, <code>us-east-1</code> filters the list of functions to only include Lambda@Edge functions replicated from a master function in US East (N. Virginia). If specified, you must set <code>FunctionVersion</code> to <code>ALL</code>.</p>
1273    #[serde(rename = "MasterRegion")]
1274    #[serde(skip_serializing_if = "Option::is_none")]
1275    pub master_region: Option<String>,
1276    /// <p>The maximum number of functions to return.</p>
1277    #[serde(rename = "MaxItems")]
1278    #[serde(skip_serializing_if = "Option::is_none")]
1279    pub max_items: Option<i64>,
1280}
1281
1282/// <p>A list of Lambda functions.</p>
1283#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1284#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1285pub struct ListFunctionsResponse {
1286    /// <p>A list of Lambda functions.</p>
1287    #[serde(rename = "Functions")]
1288    #[serde(skip_serializing_if = "Option::is_none")]
1289    pub functions: Option<Vec<FunctionConfiguration>>,
1290    /// <p>The pagination token that's included if more results are available.</p>
1291    #[serde(rename = "NextMarker")]
1292    #[serde(skip_serializing_if = "Option::is_none")]
1293    pub next_marker: Option<String>,
1294}
1295
1296#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1297#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1298pub struct ListLayerVersionsRequest {
1299    /// <p>A runtime identifier. For example, <code>go1.x</code>.</p>
1300    #[serde(rename = "CompatibleRuntime")]
1301    #[serde(skip_serializing_if = "Option::is_none")]
1302    pub compatible_runtime: Option<String>,
1303    /// <p>The name or Amazon Resource Name (ARN) of the layer.</p>
1304    #[serde(rename = "LayerName")]
1305    pub layer_name: String,
1306    /// <p>A pagination token returned by a previous call.</p>
1307    #[serde(rename = "Marker")]
1308    #[serde(skip_serializing_if = "Option::is_none")]
1309    pub marker: Option<String>,
1310    /// <p>The maximum number of versions to return.</p>
1311    #[serde(rename = "MaxItems")]
1312    #[serde(skip_serializing_if = "Option::is_none")]
1313    pub max_items: Option<i64>,
1314}
1315
1316#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1317#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1318pub struct ListLayerVersionsResponse {
1319    /// <p>A list of versions.</p>
1320    #[serde(rename = "LayerVersions")]
1321    #[serde(skip_serializing_if = "Option::is_none")]
1322    pub layer_versions: Option<Vec<LayerVersionsListItem>>,
1323    /// <p>A pagination token returned when the response doesn't contain all versions.</p>
1324    #[serde(rename = "NextMarker")]
1325    #[serde(skip_serializing_if = "Option::is_none")]
1326    pub next_marker: Option<String>,
1327}
1328
1329#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1330#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1331pub struct ListLayersRequest {
1332    /// <p>A runtime identifier. For example, <code>go1.x</code>.</p>
1333    #[serde(rename = "CompatibleRuntime")]
1334    #[serde(skip_serializing_if = "Option::is_none")]
1335    pub compatible_runtime: Option<String>,
1336    /// <p>A pagination token returned by a previous call.</p>
1337    #[serde(rename = "Marker")]
1338    #[serde(skip_serializing_if = "Option::is_none")]
1339    pub marker: Option<String>,
1340    /// <p>The maximum number of layers to return.</p>
1341    #[serde(rename = "MaxItems")]
1342    #[serde(skip_serializing_if = "Option::is_none")]
1343    pub max_items: Option<i64>,
1344}
1345
1346#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1347#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1348pub struct ListLayersResponse {
1349    /// <p>A list of function layers.</p>
1350    #[serde(rename = "Layers")]
1351    #[serde(skip_serializing_if = "Option::is_none")]
1352    pub layers: Option<Vec<LayersListItem>>,
1353    /// <p>A pagination token returned when the response doesn't contain all layers.</p>
1354    #[serde(rename = "NextMarker")]
1355    #[serde(skip_serializing_if = "Option::is_none")]
1356    pub next_marker: Option<String>,
1357}
1358
1359#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1360#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1361pub struct ListProvisionedConcurrencyConfigsRequest {
1362    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1363    #[serde(rename = "FunctionName")]
1364    pub function_name: String,
1365    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
1366    #[serde(rename = "Marker")]
1367    #[serde(skip_serializing_if = "Option::is_none")]
1368    pub marker: Option<String>,
1369    /// <p>Specify a number to limit the number of configurations returned.</p>
1370    #[serde(rename = "MaxItems")]
1371    #[serde(skip_serializing_if = "Option::is_none")]
1372    pub max_items: Option<i64>,
1373}
1374
1375#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1376#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1377pub struct ListProvisionedConcurrencyConfigsResponse {
1378    /// <p>The pagination token that's included if more results are available.</p>
1379    #[serde(rename = "NextMarker")]
1380    #[serde(skip_serializing_if = "Option::is_none")]
1381    pub next_marker: Option<String>,
1382    /// <p>A list of provisioned concurrency configurations.</p>
1383    #[serde(rename = "ProvisionedConcurrencyConfigs")]
1384    #[serde(skip_serializing_if = "Option::is_none")]
1385    pub provisioned_concurrency_configs: Option<Vec<ProvisionedConcurrencyConfigListItem>>,
1386}
1387
1388#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1389#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1390pub struct ListTagsRequest {
1391    /// <p>The function's Amazon Resource Name (ARN).</p>
1392    #[serde(rename = "Resource")]
1393    pub resource: String,
1394}
1395
1396#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1397#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1398pub struct ListTagsResponse {
1399    /// <p>The function's tags.</p>
1400    #[serde(rename = "Tags")]
1401    #[serde(skip_serializing_if = "Option::is_none")]
1402    pub tags: Option<::std::collections::HashMap<String, String>>,
1403}
1404
1405#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1406#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1407pub struct ListVersionsByFunctionRequest {
1408    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1409    #[serde(rename = "FunctionName")]
1410    pub function_name: String,
1411    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
1412    #[serde(rename = "Marker")]
1413    #[serde(skip_serializing_if = "Option::is_none")]
1414    pub marker: Option<String>,
1415    /// <p>The maximum number of versions to return.</p>
1416    #[serde(rename = "MaxItems")]
1417    #[serde(skip_serializing_if = "Option::is_none")]
1418    pub max_items: Option<i64>,
1419}
1420
1421#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1422#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1423pub struct ListVersionsByFunctionResponse {
1424    /// <p>The pagination token that's included if more results are available.</p>
1425    #[serde(rename = "NextMarker")]
1426    #[serde(skip_serializing_if = "Option::is_none")]
1427    pub next_marker: Option<String>,
1428    /// <p>A list of Lambda function versions.</p>
1429    #[serde(rename = "Versions")]
1430    #[serde(skip_serializing_if = "Option::is_none")]
1431    pub versions: Option<Vec<FunctionConfiguration>>,
1432}
1433
1434/// <p>A destination for events that failed processing.</p>
1435#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1436pub struct OnFailure {
1437    /// <p>The Amazon Resource Name (ARN) of the destination resource.</p>
1438    #[serde(rename = "Destination")]
1439    #[serde(skip_serializing_if = "Option::is_none")]
1440    pub destination: Option<String>,
1441}
1442
1443/// <p>A destination for events that were processed successfully.</p>
1444#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1445pub struct OnSuccess {
1446    /// <p>The Amazon Resource Name (ARN) of the destination resource.</p>
1447    #[serde(rename = "Destination")]
1448    #[serde(skip_serializing_if = "Option::is_none")]
1449    pub destination: Option<String>,
1450}
1451
1452/// <p>Details about the provisioned concurrency configuration for a function alias or version.</p>
1453#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1454#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1455pub struct ProvisionedConcurrencyConfigListItem {
1456    /// <p>The amount of provisioned concurrency allocated.</p>
1457    #[serde(rename = "AllocatedProvisionedConcurrentExecutions")]
1458    #[serde(skip_serializing_if = "Option::is_none")]
1459    pub allocated_provisioned_concurrent_executions: Option<i64>,
1460    /// <p>The amount of provisioned concurrency available.</p>
1461    #[serde(rename = "AvailableProvisionedConcurrentExecutions")]
1462    #[serde(skip_serializing_if = "Option::is_none")]
1463    pub available_provisioned_concurrent_executions: Option<i64>,
1464    /// <p>The Amazon Resource Name (ARN) of the alias or version.</p>
1465    #[serde(rename = "FunctionArn")]
1466    #[serde(skip_serializing_if = "Option::is_none")]
1467    pub function_arn: Option<String>,
1468    /// <p>The date and time that a user last updated the configuration, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 format</a>.</p>
1469    #[serde(rename = "LastModified")]
1470    #[serde(skip_serializing_if = "Option::is_none")]
1471    pub last_modified: Option<String>,
1472    /// <p>The amount of provisioned concurrency requested.</p>
1473    #[serde(rename = "RequestedProvisionedConcurrentExecutions")]
1474    #[serde(skip_serializing_if = "Option::is_none")]
1475    pub requested_provisioned_concurrent_executions: Option<i64>,
1476    /// <p>The status of the allocation process.</p>
1477    #[serde(rename = "Status")]
1478    #[serde(skip_serializing_if = "Option::is_none")]
1479    pub status: Option<String>,
1480    /// <p>For failed allocations, the reason that provisioned concurrency could not be allocated.</p>
1481    #[serde(rename = "StatusReason")]
1482    #[serde(skip_serializing_if = "Option::is_none")]
1483    pub status_reason: Option<String>,
1484}
1485
1486#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1487#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1488pub struct PublishLayerVersionRequest {
1489    /// <p>A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">function runtimes</a>. Used for filtering with <a>ListLayers</a> and <a>ListLayerVersions</a>.</p>
1490    #[serde(rename = "CompatibleRuntimes")]
1491    #[serde(skip_serializing_if = "Option::is_none")]
1492    pub compatible_runtimes: Option<Vec<String>>,
1493    /// <p>The function layer archive.</p>
1494    #[serde(rename = "Content")]
1495    pub content: LayerVersionContentInput,
1496    /// <p>The description of the version.</p>
1497    #[serde(rename = "Description")]
1498    #[serde(skip_serializing_if = "Option::is_none")]
1499    pub description: Option<String>,
1500    /// <p>The name or Amazon Resource Name (ARN) of the layer.</p>
1501    #[serde(rename = "LayerName")]
1502    pub layer_name: String,
1503    /// <p><p>The layer&#39;s software license. It can be any of the following:</p> <ul> <li> <p>An <a href="https://spdx.org/licenses/">SPDX license identifier</a>. For example, <code>MIT</code>.</p> </li> <li> <p>The URL of a license hosted on the internet. For example, <code>https://opensource.org/licenses/MIT</code>.</p> </li> <li> <p>The full text of the license.</p> </li> </ul></p>
1504    #[serde(rename = "LicenseInfo")]
1505    #[serde(skip_serializing_if = "Option::is_none")]
1506    pub license_info: Option<String>,
1507}
1508
1509#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1510#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1511pub struct PublishLayerVersionResponse {
1512    /// <p>The layer's compatible runtimes.</p>
1513    #[serde(rename = "CompatibleRuntimes")]
1514    #[serde(skip_serializing_if = "Option::is_none")]
1515    pub compatible_runtimes: Option<Vec<String>>,
1516    /// <p>Details about the layer version.</p>
1517    #[serde(rename = "Content")]
1518    #[serde(skip_serializing_if = "Option::is_none")]
1519    pub content: Option<LayerVersionContentOutput>,
1520    /// <p>The date that the layer version was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
1521    #[serde(rename = "CreatedDate")]
1522    #[serde(skip_serializing_if = "Option::is_none")]
1523    pub created_date: Option<String>,
1524    /// <p>The description of the version.</p>
1525    #[serde(rename = "Description")]
1526    #[serde(skip_serializing_if = "Option::is_none")]
1527    pub description: Option<String>,
1528    /// <p>The ARN of the layer.</p>
1529    #[serde(rename = "LayerArn")]
1530    #[serde(skip_serializing_if = "Option::is_none")]
1531    pub layer_arn: Option<String>,
1532    /// <p>The ARN of the layer version.</p>
1533    #[serde(rename = "LayerVersionArn")]
1534    #[serde(skip_serializing_if = "Option::is_none")]
1535    pub layer_version_arn: Option<String>,
1536    /// <p>The layer's software license.</p>
1537    #[serde(rename = "LicenseInfo")]
1538    #[serde(skip_serializing_if = "Option::is_none")]
1539    pub license_info: Option<String>,
1540    /// <p>The version number.</p>
1541    #[serde(rename = "Version")]
1542    #[serde(skip_serializing_if = "Option::is_none")]
1543    pub version: Option<i64>,
1544}
1545
1546#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1547#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1548pub struct PublishVersionRequest {
1549    /// <p>Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing a version if the function code has changed since you last updated it. You can get the hash for the version that you uploaded from the output of <a>UpdateFunctionCode</a>.</p>
1550    #[serde(rename = "CodeSha256")]
1551    #[serde(skip_serializing_if = "Option::is_none")]
1552    pub code_sha_256: Option<String>,
1553    /// <p>A description for the version to override the description in the function configuration.</p>
1554    #[serde(rename = "Description")]
1555    #[serde(skip_serializing_if = "Option::is_none")]
1556    pub description: Option<String>,
1557    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1558    #[serde(rename = "FunctionName")]
1559    pub function_name: String,
1560    /// <p>Only update the function if the revision ID matches the ID that's specified. Use this option to avoid publishing a version if the function configuration has changed since you last updated it.</p>
1561    #[serde(rename = "RevisionId")]
1562    #[serde(skip_serializing_if = "Option::is_none")]
1563    pub revision_id: Option<String>,
1564}
1565
1566#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1567#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1568pub struct PutFunctionConcurrencyRequest {
1569    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1570    #[serde(rename = "FunctionName")]
1571    pub function_name: String,
1572    /// <p>The number of simultaneous executions to reserve for the function.</p>
1573    #[serde(rename = "ReservedConcurrentExecutions")]
1574    pub reserved_concurrent_executions: i64,
1575}
1576
1577#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1578#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1579pub struct PutFunctionEventInvokeConfigRequest {
1580    /// <p><p>A destination for events after they have been sent to a function for processing.</p> <p class="title"> <b>Destinations</b> </p> <ul> <li> <p> <b>Function</b> - The Amazon Resource Name (ARN) of a Lambda function.</p> </li> <li> <p> <b>Queue</b> - The ARN of an SQS queue.</p> </li> <li> <p> <b>Topic</b> - The ARN of an SNS topic.</p> </li> <li> <p> <b>Event Bus</b> - The ARN of an Amazon EventBridge event bus.</p> </li> </ul></p>
1581    #[serde(rename = "DestinationConfig")]
1582    #[serde(skip_serializing_if = "Option::is_none")]
1583    pub destination_config: Option<DestinationConfig>,
1584    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1585    #[serde(rename = "FunctionName")]
1586    pub function_name: String,
1587    /// <p>The maximum age of a request that Lambda sends to a function for processing.</p>
1588    #[serde(rename = "MaximumEventAgeInSeconds")]
1589    #[serde(skip_serializing_if = "Option::is_none")]
1590    pub maximum_event_age_in_seconds: Option<i64>,
1591    /// <p>The maximum number of times to retry when the function returns an error.</p>
1592    #[serde(rename = "MaximumRetryAttempts")]
1593    #[serde(skip_serializing_if = "Option::is_none")]
1594    pub maximum_retry_attempts: Option<i64>,
1595    /// <p>A version number or alias name.</p>
1596    #[serde(rename = "Qualifier")]
1597    #[serde(skip_serializing_if = "Option::is_none")]
1598    pub qualifier: Option<String>,
1599}
1600
1601#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1602#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1603pub struct PutProvisionedConcurrencyConfigRequest {
1604    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1605    #[serde(rename = "FunctionName")]
1606    pub function_name: String,
1607    /// <p>The amount of provisioned concurrency to allocate for the version or alias.</p>
1608    #[serde(rename = "ProvisionedConcurrentExecutions")]
1609    pub provisioned_concurrent_executions: i64,
1610    /// <p>The version number or alias name.</p>
1611    #[serde(rename = "Qualifier")]
1612    pub qualifier: String,
1613}
1614
1615#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1616#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1617pub struct PutProvisionedConcurrencyConfigResponse {
1618    /// <p>The amount of provisioned concurrency allocated.</p>
1619    #[serde(rename = "AllocatedProvisionedConcurrentExecutions")]
1620    #[serde(skip_serializing_if = "Option::is_none")]
1621    pub allocated_provisioned_concurrent_executions: Option<i64>,
1622    /// <p>The amount of provisioned concurrency available.</p>
1623    #[serde(rename = "AvailableProvisionedConcurrentExecutions")]
1624    #[serde(skip_serializing_if = "Option::is_none")]
1625    pub available_provisioned_concurrent_executions: Option<i64>,
1626    /// <p>The date and time that a user last updated the configuration, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 format</a>.</p>
1627    #[serde(rename = "LastModified")]
1628    #[serde(skip_serializing_if = "Option::is_none")]
1629    pub last_modified: Option<String>,
1630    /// <p>The amount of provisioned concurrency requested.</p>
1631    #[serde(rename = "RequestedProvisionedConcurrentExecutions")]
1632    #[serde(skip_serializing_if = "Option::is_none")]
1633    pub requested_provisioned_concurrent_executions: Option<i64>,
1634    /// <p>The status of the allocation process.</p>
1635    #[serde(rename = "Status")]
1636    #[serde(skip_serializing_if = "Option::is_none")]
1637    pub status: Option<String>,
1638    /// <p>For failed allocations, the reason that provisioned concurrency could not be allocated.</p>
1639    #[serde(rename = "StatusReason")]
1640    #[serde(skip_serializing_if = "Option::is_none")]
1641    pub status_reason: Option<String>,
1642}
1643
1644#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1645#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1646pub struct RemoveLayerVersionPermissionRequest {
1647    /// <p>The name or Amazon Resource Name (ARN) of the layer.</p>
1648    #[serde(rename = "LayerName")]
1649    pub layer_name: String,
1650    /// <p>Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.</p>
1651    #[serde(rename = "RevisionId")]
1652    #[serde(skip_serializing_if = "Option::is_none")]
1653    pub revision_id: Option<String>,
1654    /// <p>The identifier that was specified when the statement was added.</p>
1655    #[serde(rename = "StatementId")]
1656    pub statement_id: String,
1657    /// <p>The version number.</p>
1658    #[serde(rename = "VersionNumber")]
1659    pub version_number: i64,
1660}
1661
1662#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1663#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1664pub struct RemovePermissionRequest {
1665    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1666    #[serde(rename = "FunctionName")]
1667    pub function_name: String,
1668    /// <p>Specify a version or alias to remove permissions from a published version of the function.</p>
1669    #[serde(rename = "Qualifier")]
1670    #[serde(skip_serializing_if = "Option::is_none")]
1671    pub qualifier: Option<String>,
1672    /// <p>Only update the policy if the revision ID matches the ID that's specified. Use this option to avoid modifying a policy that has changed since you last read it.</p>
1673    #[serde(rename = "RevisionId")]
1674    #[serde(skip_serializing_if = "Option::is_none")]
1675    pub revision_id: Option<String>,
1676    /// <p>Statement ID of the permission to remove.</p>
1677    #[serde(rename = "StatementId")]
1678    pub statement_id: String,
1679}
1680
1681#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1682#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1683pub struct TagResourceRequest {
1684    /// <p>The function's Amazon Resource Name (ARN).</p>
1685    #[serde(rename = "Resource")]
1686    pub resource: String,
1687    /// <p>A list of tags to apply to the function.</p>
1688    #[serde(rename = "Tags")]
1689    pub tags: ::std::collections::HashMap<String, String>,
1690}
1691
1692/// <p>The function's AWS X-Ray tracing configuration. To sample and record incoming requests, set <code>Mode</code> to <code>Active</code>.</p>
1693#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1694#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1695pub struct TracingConfig {
1696    /// <p>The tracing mode.</p>
1697    #[serde(rename = "Mode")]
1698    #[serde(skip_serializing_if = "Option::is_none")]
1699    pub mode: Option<String>,
1700}
1701
1702/// <p>The function's AWS X-Ray tracing configuration.</p>
1703#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1704#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1705pub struct TracingConfigResponse {
1706    /// <p>The tracing mode.</p>
1707    #[serde(rename = "Mode")]
1708    #[serde(skip_serializing_if = "Option::is_none")]
1709    pub mode: Option<String>,
1710}
1711
1712#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1713#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1714pub struct UntagResourceRequest {
1715    /// <p>The function's Amazon Resource Name (ARN).</p>
1716    #[serde(rename = "Resource")]
1717    pub resource: String,
1718    /// <p>A list of tag keys to remove from the function.</p>
1719    #[serde(rename = "TagKeys")]
1720    pub tag_keys: Vec<String>,
1721}
1722
1723#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1724#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1725pub struct UpdateAliasRequest {
1726    /// <p>A description of the alias.</p>
1727    #[serde(rename = "Description")]
1728    #[serde(skip_serializing_if = "Option::is_none")]
1729    pub description: Option<String>,
1730    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1731    #[serde(rename = "FunctionName")]
1732    pub function_name: String,
1733    /// <p>The function version that the alias invokes.</p>
1734    #[serde(rename = "FunctionVersion")]
1735    #[serde(skip_serializing_if = "Option::is_none")]
1736    pub function_version: Option<String>,
1737    /// <p>The name of the alias.</p>
1738    #[serde(rename = "Name")]
1739    pub name: String,
1740    /// <p>Only update the alias if the revision ID matches the ID that's specified. Use this option to avoid modifying an alias that has changed since you last read it.</p>
1741    #[serde(rename = "RevisionId")]
1742    #[serde(skip_serializing_if = "Option::is_none")]
1743    pub revision_id: Option<String>,
1744    /// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html#configuring-alias-routing">routing configuration</a> of the alias.</p>
1745    #[serde(rename = "RoutingConfig")]
1746    #[serde(skip_serializing_if = "Option::is_none")]
1747    pub routing_config: Option<AliasRoutingConfiguration>,
1748}
1749
1750#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1751#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1752pub struct UpdateEventSourceMappingRequest {
1753    /// <p><p>The maximum number of items to retrieve in a single batch.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - Default 100. Max 1,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - Default 10. Max 10.</p> </li> </ul></p>
1754    #[serde(rename = "BatchSize")]
1755    #[serde(skip_serializing_if = "Option::is_none")]
1756    pub batch_size: Option<i64>,
1757    /// <p>(Streams) If the function returns an error, split the batch in two and retry.</p>
1758    #[serde(rename = "BisectBatchOnFunctionError")]
1759    #[serde(skip_serializing_if = "Option::is_none")]
1760    pub bisect_batch_on_function_error: Option<bool>,
1761    /// <p>(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded records.</p>
1762    #[serde(rename = "DestinationConfig")]
1763    #[serde(skip_serializing_if = "Option::is_none")]
1764    pub destination_config: Option<DestinationConfig>,
1765    /// <p>Disables the event source mapping to pause polling and invocation.</p>
1766    #[serde(rename = "Enabled")]
1767    #[serde(skip_serializing_if = "Option::is_none")]
1768    pub enabled: Option<bool>,
1769    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
1770    #[serde(rename = "FunctionName")]
1771    #[serde(skip_serializing_if = "Option::is_none")]
1772    pub function_name: Option<String>,
1773    /// <p>(Streams) The maximum amount of time to gather records before invoking the function, in seconds.</p>
1774    #[serde(rename = "MaximumBatchingWindowInSeconds")]
1775    #[serde(skip_serializing_if = "Option::is_none")]
1776    pub maximum_batching_window_in_seconds: Option<i64>,
1777    /// <p>(Streams) The maximum age of a record that Lambda sends to a function for processing.</p>
1778    #[serde(rename = "MaximumRecordAgeInSeconds")]
1779    #[serde(skip_serializing_if = "Option::is_none")]
1780    pub maximum_record_age_in_seconds: Option<i64>,
1781    /// <p>(Streams) The maximum number of times to retry when the function returns an error.</p>
1782    #[serde(rename = "MaximumRetryAttempts")]
1783    #[serde(skip_serializing_if = "Option::is_none")]
1784    pub maximum_retry_attempts: Option<i64>,
1785    /// <p>(Streams) The number of batches to process from each shard concurrently.</p>
1786    #[serde(rename = "ParallelizationFactor")]
1787    #[serde(skip_serializing_if = "Option::is_none")]
1788    pub parallelization_factor: Option<i64>,
1789    /// <p>The identifier of the event source mapping.</p>
1790    #[serde(rename = "UUID")]
1791    pub uuid: String,
1792}
1793
1794#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1795#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1796pub struct UpdateFunctionCodeRequest {
1797    /// <p>Set to true to validate the request parameters and access permissions without modifying the function code.</p>
1798    #[serde(rename = "DryRun")]
1799    #[serde(skip_serializing_if = "Option::is_none")]
1800    pub dry_run: Option<bool>,
1801    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1802    #[serde(rename = "FunctionName")]
1803    pub function_name: String,
1804    /// <p>Set to true to publish a new version of the function after updating the code. This has the same effect as calling <a>PublishVersion</a> separately.</p>
1805    #[serde(rename = "Publish")]
1806    #[serde(skip_serializing_if = "Option::is_none")]
1807    pub publish: Option<bool>,
1808    /// <p>Only update the function if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.</p>
1809    #[serde(rename = "RevisionId")]
1810    #[serde(skip_serializing_if = "Option::is_none")]
1811    pub revision_id: Option<String>,
1812    /// <p>An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.</p>
1813    #[serde(rename = "S3Bucket")]
1814    #[serde(skip_serializing_if = "Option::is_none")]
1815    pub s3_bucket: Option<String>,
1816    /// <p>The Amazon S3 key of the deployment package.</p>
1817    #[serde(rename = "S3Key")]
1818    #[serde(skip_serializing_if = "Option::is_none")]
1819    pub s3_key: Option<String>,
1820    /// <p>For versioned objects, the version of the deployment package object to use.</p>
1821    #[serde(rename = "S3ObjectVersion")]
1822    #[serde(skip_serializing_if = "Option::is_none")]
1823    pub s3_object_version: Option<String>,
1824    /// <p>The base64-encoded contents of the deployment package. AWS SDK and AWS CLI clients handle the encoding for you.</p>
1825    #[serde(rename = "ZipFile")]
1826    #[serde(
1827        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
1828        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
1829        default
1830    )]
1831    #[serde(skip_serializing_if = "Option::is_none")]
1832    pub zip_file: Option<bytes::Bytes>,
1833}
1834
1835#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1836#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1837pub struct UpdateFunctionConfigurationRequest {
1838    /// <p>A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq">Dead Letter Queues</a>.</p>
1839    #[serde(rename = "DeadLetterConfig")]
1840    #[serde(skip_serializing_if = "Option::is_none")]
1841    pub dead_letter_config: Option<DeadLetterConfig>,
1842    /// <p>A description of the function.</p>
1843    #[serde(rename = "Description")]
1844    #[serde(skip_serializing_if = "Option::is_none")]
1845    pub description: Option<String>,
1846    /// <p>Environment variables that are accessible from function code during execution.</p>
1847    #[serde(rename = "Environment")]
1848    #[serde(skip_serializing_if = "Option::is_none")]
1849    pub environment: Option<Environment>,
1850    /// <p>Connection settings for an Amazon EFS file system.</p>
1851    #[serde(rename = "FileSystemConfigs")]
1852    #[serde(skip_serializing_if = "Option::is_none")]
1853    pub file_system_configs: Option<Vec<FileSystemConfig>>,
1854    /// <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1855    #[serde(rename = "FunctionName")]
1856    pub function_name: String,
1857    /// <p>The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html">Programming Model</a>.</p>
1858    #[serde(rename = "Handler")]
1859    #[serde(skip_serializing_if = "Option::is_none")]
1860    pub handler: Option<String>,
1861    /// <p>The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.</p>
1862    #[serde(rename = "KMSKeyArn")]
1863    #[serde(skip_serializing_if = "Option::is_none")]
1864    pub kms_key_arn: Option<String>,
1865    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
1866    #[serde(rename = "Layers")]
1867    #[serde(skip_serializing_if = "Option::is_none")]
1868    pub layers: Option<Vec<String>>,
1869    /// <p>The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.</p>
1870    #[serde(rename = "MemorySize")]
1871    #[serde(skip_serializing_if = "Option::is_none")]
1872    pub memory_size: Option<i64>,
1873    /// <p>Only update the function if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.</p>
1874    #[serde(rename = "RevisionId")]
1875    #[serde(skip_serializing_if = "Option::is_none")]
1876    pub revision_id: Option<String>,
1877    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
1878    #[serde(rename = "Role")]
1879    #[serde(skip_serializing_if = "Option::is_none")]
1880    pub role: Option<String>,
1881    /// <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">runtime</a>.</p>
1882    #[serde(rename = "Runtime")]
1883    #[serde(skip_serializing_if = "Option::is_none")]
1884    pub runtime: Option<String>,
1885    /// <p>The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.</p>
1886    #[serde(rename = "Timeout")]
1887    #[serde(skip_serializing_if = "Option::is_none")]
1888    pub timeout: Option<i64>,
1889    /// <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with AWS X-Ray.</p>
1890    #[serde(rename = "TracingConfig")]
1891    #[serde(skip_serializing_if = "Option::is_none")]
1892    pub tracing_config: Option<TracingConfig>,
1893    /// <p>For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can only access resources and the internet through that VPC. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">VPC Settings</a>.</p>
1894    #[serde(rename = "VpcConfig")]
1895    #[serde(skip_serializing_if = "Option::is_none")]
1896    pub vpc_config: Option<VpcConfig>,
1897}
1898
1899#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1900#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1901pub struct UpdateFunctionEventInvokeConfigRequest {
1902    /// <p><p>A destination for events after they have been sent to a function for processing.</p> <p class="title"> <b>Destinations</b> </p> <ul> <li> <p> <b>Function</b> - The Amazon Resource Name (ARN) of a Lambda function.</p> </li> <li> <p> <b>Queue</b> - The ARN of an SQS queue.</p> </li> <li> <p> <b>Topic</b> - The ARN of an SNS topic.</p> </li> <li> <p> <b>Event Bus</b> - The ARN of an Amazon EventBridge event bus.</p> </li> </ul></p>
1903    #[serde(rename = "DestinationConfig")]
1904    #[serde(skip_serializing_if = "Option::is_none")]
1905    pub destination_config: Option<DestinationConfig>,
1906    /// <p>The name of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1907    #[serde(rename = "FunctionName")]
1908    pub function_name: String,
1909    /// <p>The maximum age of a request that Lambda sends to a function for processing.</p>
1910    #[serde(rename = "MaximumEventAgeInSeconds")]
1911    #[serde(skip_serializing_if = "Option::is_none")]
1912    pub maximum_event_age_in_seconds: Option<i64>,
1913    /// <p>The maximum number of times to retry when the function returns an error.</p>
1914    #[serde(rename = "MaximumRetryAttempts")]
1915    #[serde(skip_serializing_if = "Option::is_none")]
1916    pub maximum_retry_attempts: Option<i64>,
1917    /// <p>A version number or alias name.</p>
1918    #[serde(rename = "Qualifier")]
1919    #[serde(skip_serializing_if = "Option::is_none")]
1920    pub qualifier: Option<String>,
1921}
1922
1923/// <p>The VPC security groups and subnets that are attached to a Lambda function. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">VPC Settings</a>.</p>
1924#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1925#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1926pub struct VpcConfig {
1927    /// <p>A list of VPC security groups IDs.</p>
1928    #[serde(rename = "SecurityGroupIds")]
1929    #[serde(skip_serializing_if = "Option::is_none")]
1930    pub security_group_ids: Option<Vec<String>>,
1931    /// <p>A list of VPC subnet IDs.</p>
1932    #[serde(rename = "SubnetIds")]
1933    #[serde(skip_serializing_if = "Option::is_none")]
1934    pub subnet_ids: Option<Vec<String>>,
1935}
1936
1937/// <p>The VPC security groups and subnets that are attached to a Lambda function.</p>
1938#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1939#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1940pub struct VpcConfigResponse {
1941    /// <p>A list of VPC security groups IDs.</p>
1942    #[serde(rename = "SecurityGroupIds")]
1943    #[serde(skip_serializing_if = "Option::is_none")]
1944    pub security_group_ids: Option<Vec<String>>,
1945    /// <p>A list of VPC subnet IDs.</p>
1946    #[serde(rename = "SubnetIds")]
1947    #[serde(skip_serializing_if = "Option::is_none")]
1948    pub subnet_ids: Option<Vec<String>>,
1949    /// <p>The ID of the VPC.</p>
1950    #[serde(rename = "VpcId")]
1951    #[serde(skip_serializing_if = "Option::is_none")]
1952    pub vpc_id: Option<String>,
1953}
1954
1955/// Errors returned by AddLayerVersionPermission
1956#[derive(Debug, PartialEq)]
1957pub enum AddLayerVersionPermissionError {
1958    /// <p>One of the parameters in the request is invalid.</p>
1959    InvalidParameterValue(String),
1960    /// <p>The permissions policy for the resource is too large. <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">Learn more</a> </p>
1961    PolicyLengthExceeded(String),
1962    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the <code>GetFunction</code> or the <code>GetAlias</code> API to retrieve the latest RevisionId for your resource.</p>
1963    PreconditionFailed(String),
1964    /// <p>The resource already exists, or another operation is in progress.</p>
1965    ResourceConflict(String),
1966    /// <p>The resource specified in the request does not exist.</p>
1967    ResourceNotFound(String),
1968    /// <p>The AWS Lambda service encountered an internal error.</p>
1969    Service(String),
1970    /// <p>The request throughput limit was exceeded.</p>
1971    TooManyRequests(String),
1972}
1973
1974impl AddLayerVersionPermissionError {
1975    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddLayerVersionPermissionError> {
1976        if let Some(err) = proto::json::Error::parse_rest(&res) {
1977            match err.typ.as_str() {
1978                "InvalidParameterValueException" => {
1979                    return RusotoError::Service(
1980                        AddLayerVersionPermissionError::InvalidParameterValue(err.msg),
1981                    )
1982                }
1983                "PolicyLengthExceededException" => {
1984                    return RusotoError::Service(
1985                        AddLayerVersionPermissionError::PolicyLengthExceeded(err.msg),
1986                    )
1987                }
1988                "PreconditionFailedException" => {
1989                    return RusotoError::Service(
1990                        AddLayerVersionPermissionError::PreconditionFailed(err.msg),
1991                    )
1992                }
1993                "ResourceConflictException" => {
1994                    return RusotoError::Service(AddLayerVersionPermissionError::ResourceConflict(
1995                        err.msg,
1996                    ))
1997                }
1998                "ResourceNotFoundException" => {
1999                    return RusotoError::Service(AddLayerVersionPermissionError::ResourceNotFound(
2000                        err.msg,
2001                    ))
2002                }
2003                "ServiceException" => {
2004                    return RusotoError::Service(AddLayerVersionPermissionError::Service(err.msg))
2005                }
2006                "TooManyRequestsException" => {
2007                    return RusotoError::Service(AddLayerVersionPermissionError::TooManyRequests(
2008                        err.msg,
2009                    ))
2010                }
2011                "ValidationException" => return RusotoError::Validation(err.msg),
2012                _ => {}
2013            }
2014        }
2015        RusotoError::Unknown(res)
2016    }
2017}
2018impl fmt::Display for AddLayerVersionPermissionError {
2019    #[allow(unused_variables)]
2020    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2021        match *self {
2022            AddLayerVersionPermissionError::InvalidParameterValue(ref cause) => {
2023                write!(f, "{}", cause)
2024            }
2025            AddLayerVersionPermissionError::PolicyLengthExceeded(ref cause) => {
2026                write!(f, "{}", cause)
2027            }
2028            AddLayerVersionPermissionError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
2029            AddLayerVersionPermissionError::ResourceConflict(ref cause) => write!(f, "{}", cause),
2030            AddLayerVersionPermissionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2031            AddLayerVersionPermissionError::Service(ref cause) => write!(f, "{}", cause),
2032            AddLayerVersionPermissionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2033        }
2034    }
2035}
2036impl Error for AddLayerVersionPermissionError {}
2037/// Errors returned by AddPermission
2038#[derive(Debug, PartialEq)]
2039pub enum AddPermissionError {
2040    /// <p>One of the parameters in the request is invalid.</p>
2041    InvalidParameterValue(String),
2042    /// <p>The permissions policy for the resource is too large. <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">Learn more</a> </p>
2043    PolicyLengthExceeded(String),
2044    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the <code>GetFunction</code> or the <code>GetAlias</code> API to retrieve the latest RevisionId for your resource.</p>
2045    PreconditionFailed(String),
2046    /// <p>The resource already exists, or another operation is in progress.</p>
2047    ResourceConflict(String),
2048    /// <p>The resource specified in the request does not exist.</p>
2049    ResourceNotFound(String),
2050    /// <p>The AWS Lambda service encountered an internal error.</p>
2051    Service(String),
2052    /// <p>The request throughput limit was exceeded.</p>
2053    TooManyRequests(String),
2054}
2055
2056impl AddPermissionError {
2057    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddPermissionError> {
2058        if let Some(err) = proto::json::Error::parse_rest(&res) {
2059            match err.typ.as_str() {
2060                "InvalidParameterValueException" => {
2061                    return RusotoError::Service(AddPermissionError::InvalidParameterValue(err.msg))
2062                }
2063                "PolicyLengthExceededException" => {
2064                    return RusotoError::Service(AddPermissionError::PolicyLengthExceeded(err.msg))
2065                }
2066                "PreconditionFailedException" => {
2067                    return RusotoError::Service(AddPermissionError::PreconditionFailed(err.msg))
2068                }
2069                "ResourceConflictException" => {
2070                    return RusotoError::Service(AddPermissionError::ResourceConflict(err.msg))
2071                }
2072                "ResourceNotFoundException" => {
2073                    return RusotoError::Service(AddPermissionError::ResourceNotFound(err.msg))
2074                }
2075                "ServiceException" => {
2076                    return RusotoError::Service(AddPermissionError::Service(err.msg))
2077                }
2078                "TooManyRequestsException" => {
2079                    return RusotoError::Service(AddPermissionError::TooManyRequests(err.msg))
2080                }
2081                "ValidationException" => return RusotoError::Validation(err.msg),
2082                _ => {}
2083            }
2084        }
2085        RusotoError::Unknown(res)
2086    }
2087}
2088impl fmt::Display for AddPermissionError {
2089    #[allow(unused_variables)]
2090    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2091        match *self {
2092            AddPermissionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2093            AddPermissionError::PolicyLengthExceeded(ref cause) => write!(f, "{}", cause),
2094            AddPermissionError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
2095            AddPermissionError::ResourceConflict(ref cause) => write!(f, "{}", cause),
2096            AddPermissionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2097            AddPermissionError::Service(ref cause) => write!(f, "{}", cause),
2098            AddPermissionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2099        }
2100    }
2101}
2102impl Error for AddPermissionError {}
2103/// Errors returned by CreateAlias
2104#[derive(Debug, PartialEq)]
2105pub enum CreateAliasError {
2106    /// <p>One of the parameters in the request is invalid.</p>
2107    InvalidParameterValue(String),
2108    /// <p>The resource already exists, or another operation is in progress.</p>
2109    ResourceConflict(String),
2110    /// <p>The resource specified in the request does not exist.</p>
2111    ResourceNotFound(String),
2112    /// <p>The AWS Lambda service encountered an internal error.</p>
2113    Service(String),
2114    /// <p>The request throughput limit was exceeded.</p>
2115    TooManyRequests(String),
2116}
2117
2118impl CreateAliasError {
2119    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAliasError> {
2120        if let Some(err) = proto::json::Error::parse_rest(&res) {
2121            match err.typ.as_str() {
2122                "InvalidParameterValueException" => {
2123                    return RusotoError::Service(CreateAliasError::InvalidParameterValue(err.msg))
2124                }
2125                "ResourceConflictException" => {
2126                    return RusotoError::Service(CreateAliasError::ResourceConflict(err.msg))
2127                }
2128                "ResourceNotFoundException" => {
2129                    return RusotoError::Service(CreateAliasError::ResourceNotFound(err.msg))
2130                }
2131                "ServiceException" => {
2132                    return RusotoError::Service(CreateAliasError::Service(err.msg))
2133                }
2134                "TooManyRequestsException" => {
2135                    return RusotoError::Service(CreateAliasError::TooManyRequests(err.msg))
2136                }
2137                "ValidationException" => return RusotoError::Validation(err.msg),
2138                _ => {}
2139            }
2140        }
2141        RusotoError::Unknown(res)
2142    }
2143}
2144impl fmt::Display for CreateAliasError {
2145    #[allow(unused_variables)]
2146    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2147        match *self {
2148            CreateAliasError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2149            CreateAliasError::ResourceConflict(ref cause) => write!(f, "{}", cause),
2150            CreateAliasError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2151            CreateAliasError::Service(ref cause) => write!(f, "{}", cause),
2152            CreateAliasError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2153        }
2154    }
2155}
2156impl Error for CreateAliasError {}
2157/// Errors returned by CreateEventSourceMapping
2158#[derive(Debug, PartialEq)]
2159pub enum CreateEventSourceMappingError {
2160    /// <p>One of the parameters in the request is invalid.</p>
2161    InvalidParameterValue(String),
2162    /// <p>The resource already exists, or another operation is in progress.</p>
2163    ResourceConflict(String),
2164    /// <p>The resource specified in the request does not exist.</p>
2165    ResourceNotFound(String),
2166    /// <p>The AWS Lambda service encountered an internal error.</p>
2167    Service(String),
2168    /// <p>The request throughput limit was exceeded.</p>
2169    TooManyRequests(String),
2170}
2171
2172impl CreateEventSourceMappingError {
2173    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateEventSourceMappingError> {
2174        if let Some(err) = proto::json::Error::parse_rest(&res) {
2175            match err.typ.as_str() {
2176                "InvalidParameterValueException" => {
2177                    return RusotoError::Service(
2178                        CreateEventSourceMappingError::InvalidParameterValue(err.msg),
2179                    )
2180                }
2181                "ResourceConflictException" => {
2182                    return RusotoError::Service(CreateEventSourceMappingError::ResourceConflict(
2183                        err.msg,
2184                    ))
2185                }
2186                "ResourceNotFoundException" => {
2187                    return RusotoError::Service(CreateEventSourceMappingError::ResourceNotFound(
2188                        err.msg,
2189                    ))
2190                }
2191                "ServiceException" => {
2192                    return RusotoError::Service(CreateEventSourceMappingError::Service(err.msg))
2193                }
2194                "TooManyRequestsException" => {
2195                    return RusotoError::Service(CreateEventSourceMappingError::TooManyRequests(
2196                        err.msg,
2197                    ))
2198                }
2199                "ValidationException" => return RusotoError::Validation(err.msg),
2200                _ => {}
2201            }
2202        }
2203        RusotoError::Unknown(res)
2204    }
2205}
2206impl fmt::Display for CreateEventSourceMappingError {
2207    #[allow(unused_variables)]
2208    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2209        match *self {
2210            CreateEventSourceMappingError::InvalidParameterValue(ref cause) => {
2211                write!(f, "{}", cause)
2212            }
2213            CreateEventSourceMappingError::ResourceConflict(ref cause) => write!(f, "{}", cause),
2214            CreateEventSourceMappingError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2215            CreateEventSourceMappingError::Service(ref cause) => write!(f, "{}", cause),
2216            CreateEventSourceMappingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2217        }
2218    }
2219}
2220impl Error for CreateEventSourceMappingError {}
2221/// Errors returned by CreateFunction
2222#[derive(Debug, PartialEq)]
2223pub enum CreateFunctionError {
2224    /// <p>You have exceeded your maximum total code size per account. <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">Learn more</a> </p>
2225    CodeStorageExceeded(String),
2226    /// <p>One of the parameters in the request is invalid.</p>
2227    InvalidParameterValue(String),
2228    /// <p>The resource already exists, or another operation is in progress.</p>
2229    ResourceConflict(String),
2230    /// <p>The resource specified in the request does not exist.</p>
2231    ResourceNotFound(String),
2232    /// <p>The AWS Lambda service encountered an internal error.</p>
2233    Service(String),
2234    /// <p>The request throughput limit was exceeded.</p>
2235    TooManyRequests(String),
2236}
2237
2238impl CreateFunctionError {
2239    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFunctionError> {
2240        if let Some(err) = proto::json::Error::parse_rest(&res) {
2241            match err.typ.as_str() {
2242                "CodeStorageExceededException" => {
2243                    return RusotoError::Service(CreateFunctionError::CodeStorageExceeded(err.msg))
2244                }
2245                "InvalidParameterValueException" => {
2246                    return RusotoError::Service(CreateFunctionError::InvalidParameterValue(
2247                        err.msg,
2248                    ))
2249                }
2250                "ResourceConflictException" => {
2251                    return RusotoError::Service(CreateFunctionError::ResourceConflict(err.msg))
2252                }
2253                "ResourceNotFoundException" => {
2254                    return RusotoError::Service(CreateFunctionError::ResourceNotFound(err.msg))
2255                }
2256                "ServiceException" => {
2257                    return RusotoError::Service(CreateFunctionError::Service(err.msg))
2258                }
2259                "TooManyRequestsException" => {
2260                    return RusotoError::Service(CreateFunctionError::TooManyRequests(err.msg))
2261                }
2262                "ValidationException" => return RusotoError::Validation(err.msg),
2263                _ => {}
2264            }
2265        }
2266        RusotoError::Unknown(res)
2267    }
2268}
2269impl fmt::Display for CreateFunctionError {
2270    #[allow(unused_variables)]
2271    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2272        match *self {
2273            CreateFunctionError::CodeStorageExceeded(ref cause) => write!(f, "{}", cause),
2274            CreateFunctionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2275            CreateFunctionError::ResourceConflict(ref cause) => write!(f, "{}", cause),
2276            CreateFunctionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2277            CreateFunctionError::Service(ref cause) => write!(f, "{}", cause),
2278            CreateFunctionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2279        }
2280    }
2281}
2282impl Error for CreateFunctionError {}
2283/// Errors returned by DeleteAlias
2284#[derive(Debug, PartialEq)]
2285pub enum DeleteAliasError {
2286    /// <p>One of the parameters in the request is invalid.</p>
2287    InvalidParameterValue(String),
2288    /// <p>The resource already exists, or another operation is in progress.</p>
2289    ResourceConflict(String),
2290    /// <p>The AWS Lambda service encountered an internal error.</p>
2291    Service(String),
2292    /// <p>The request throughput limit was exceeded.</p>
2293    TooManyRequests(String),
2294}
2295
2296impl DeleteAliasError {
2297    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAliasError> {
2298        if let Some(err) = proto::json::Error::parse_rest(&res) {
2299            match err.typ.as_str() {
2300                "InvalidParameterValueException" => {
2301                    return RusotoError::Service(DeleteAliasError::InvalidParameterValue(err.msg))
2302                }
2303                "ResourceConflictException" => {
2304                    return RusotoError::Service(DeleteAliasError::ResourceConflict(err.msg))
2305                }
2306                "ServiceException" => {
2307                    return RusotoError::Service(DeleteAliasError::Service(err.msg))
2308                }
2309                "TooManyRequestsException" => {
2310                    return RusotoError::Service(DeleteAliasError::TooManyRequests(err.msg))
2311                }
2312                "ValidationException" => return RusotoError::Validation(err.msg),
2313                _ => {}
2314            }
2315        }
2316        RusotoError::Unknown(res)
2317    }
2318}
2319impl fmt::Display for DeleteAliasError {
2320    #[allow(unused_variables)]
2321    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2322        match *self {
2323            DeleteAliasError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2324            DeleteAliasError::ResourceConflict(ref cause) => write!(f, "{}", cause),
2325            DeleteAliasError::Service(ref cause) => write!(f, "{}", cause),
2326            DeleteAliasError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2327        }
2328    }
2329}
2330impl Error for DeleteAliasError {}
2331/// Errors returned by DeleteEventSourceMapping
2332#[derive(Debug, PartialEq)]
2333pub enum DeleteEventSourceMappingError {
2334    /// <p>One of the parameters in the request is invalid.</p>
2335    InvalidParameterValue(String),
2336    /// <p>The operation conflicts with the resource's availability. For example, you attempted to update an EventSource Mapping in CREATING, or tried to delete a EventSource mapping currently in the UPDATING state.</p>
2337    ResourceInUse(String),
2338    /// <p>The resource specified in the request does not exist.</p>
2339    ResourceNotFound(String),
2340    /// <p>The AWS Lambda service encountered an internal error.</p>
2341    Service(String),
2342    /// <p>The request throughput limit was exceeded.</p>
2343    TooManyRequests(String),
2344}
2345
2346impl DeleteEventSourceMappingError {
2347    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteEventSourceMappingError> {
2348        if let Some(err) = proto::json::Error::parse_rest(&res) {
2349            match err.typ.as_str() {
2350                "InvalidParameterValueException" => {
2351                    return RusotoError::Service(
2352                        DeleteEventSourceMappingError::InvalidParameterValue(err.msg),
2353                    )
2354                }
2355                "ResourceInUseException" => {
2356                    return RusotoError::Service(DeleteEventSourceMappingError::ResourceInUse(
2357                        err.msg,
2358                    ))
2359                }
2360                "ResourceNotFoundException" => {
2361                    return RusotoError::Service(DeleteEventSourceMappingError::ResourceNotFound(
2362                        err.msg,
2363                    ))
2364                }
2365                "ServiceException" => {
2366                    return RusotoError::Service(DeleteEventSourceMappingError::Service(err.msg))
2367                }
2368                "TooManyRequestsException" => {
2369                    return RusotoError::Service(DeleteEventSourceMappingError::TooManyRequests(
2370                        err.msg,
2371                    ))
2372                }
2373                "ValidationException" => return RusotoError::Validation(err.msg),
2374                _ => {}
2375            }
2376        }
2377        RusotoError::Unknown(res)
2378    }
2379}
2380impl fmt::Display for DeleteEventSourceMappingError {
2381    #[allow(unused_variables)]
2382    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2383        match *self {
2384            DeleteEventSourceMappingError::InvalidParameterValue(ref cause) => {
2385                write!(f, "{}", cause)
2386            }
2387            DeleteEventSourceMappingError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2388            DeleteEventSourceMappingError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2389            DeleteEventSourceMappingError::Service(ref cause) => write!(f, "{}", cause),
2390            DeleteEventSourceMappingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2391        }
2392    }
2393}
2394impl Error for DeleteEventSourceMappingError {}
2395/// Errors returned by DeleteFunction
2396#[derive(Debug, PartialEq)]
2397pub enum DeleteFunctionError {
2398    /// <p>One of the parameters in the request is invalid.</p>
2399    InvalidParameterValue(String),
2400    /// <p>The resource already exists, or another operation is in progress.</p>
2401    ResourceConflict(String),
2402    /// <p>The resource specified in the request does not exist.</p>
2403    ResourceNotFound(String),
2404    /// <p>The AWS Lambda service encountered an internal error.</p>
2405    Service(String),
2406    /// <p>The request throughput limit was exceeded.</p>
2407    TooManyRequests(String),
2408}
2409
2410impl DeleteFunctionError {
2411    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFunctionError> {
2412        if let Some(err) = proto::json::Error::parse_rest(&res) {
2413            match err.typ.as_str() {
2414                "InvalidParameterValueException" => {
2415                    return RusotoError::Service(DeleteFunctionError::InvalidParameterValue(
2416                        err.msg,
2417                    ))
2418                }
2419                "ResourceConflictException" => {
2420                    return RusotoError::Service(DeleteFunctionError::ResourceConflict(err.msg))
2421                }
2422                "ResourceNotFoundException" => {
2423                    return RusotoError::Service(DeleteFunctionError::ResourceNotFound(err.msg))
2424                }
2425                "ServiceException" => {
2426                    return RusotoError::Service(DeleteFunctionError::Service(err.msg))
2427                }
2428                "TooManyRequestsException" => {
2429                    return RusotoError::Service(DeleteFunctionError::TooManyRequests(err.msg))
2430                }
2431                "ValidationException" => return RusotoError::Validation(err.msg),
2432                _ => {}
2433            }
2434        }
2435        RusotoError::Unknown(res)
2436    }
2437}
2438impl fmt::Display for DeleteFunctionError {
2439    #[allow(unused_variables)]
2440    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2441        match *self {
2442            DeleteFunctionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2443            DeleteFunctionError::ResourceConflict(ref cause) => write!(f, "{}", cause),
2444            DeleteFunctionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2445            DeleteFunctionError::Service(ref cause) => write!(f, "{}", cause),
2446            DeleteFunctionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2447        }
2448    }
2449}
2450impl Error for DeleteFunctionError {}
2451/// Errors returned by DeleteFunctionConcurrency
2452#[derive(Debug, PartialEq)]
2453pub enum DeleteFunctionConcurrencyError {
2454    /// <p>One of the parameters in the request is invalid.</p>
2455    InvalidParameterValue(String),
2456    /// <p>The resource already exists, or another operation is in progress.</p>
2457    ResourceConflict(String),
2458    /// <p>The resource specified in the request does not exist.</p>
2459    ResourceNotFound(String),
2460    /// <p>The AWS Lambda service encountered an internal error.</p>
2461    Service(String),
2462    /// <p>The request throughput limit was exceeded.</p>
2463    TooManyRequests(String),
2464}
2465
2466impl DeleteFunctionConcurrencyError {
2467    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFunctionConcurrencyError> {
2468        if let Some(err) = proto::json::Error::parse_rest(&res) {
2469            match err.typ.as_str() {
2470                "InvalidParameterValueException" => {
2471                    return RusotoError::Service(
2472                        DeleteFunctionConcurrencyError::InvalidParameterValue(err.msg),
2473                    )
2474                }
2475                "ResourceConflictException" => {
2476                    return RusotoError::Service(DeleteFunctionConcurrencyError::ResourceConflict(
2477                        err.msg,
2478                    ))
2479                }
2480                "ResourceNotFoundException" => {
2481                    return RusotoError::Service(DeleteFunctionConcurrencyError::ResourceNotFound(
2482                        err.msg,
2483                    ))
2484                }
2485                "ServiceException" => {
2486                    return RusotoError::Service(DeleteFunctionConcurrencyError::Service(err.msg))
2487                }
2488                "TooManyRequestsException" => {
2489                    return RusotoError::Service(DeleteFunctionConcurrencyError::TooManyRequests(
2490                        err.msg,
2491                    ))
2492                }
2493                "ValidationException" => return RusotoError::Validation(err.msg),
2494                _ => {}
2495            }
2496        }
2497        RusotoError::Unknown(res)
2498    }
2499}
2500impl fmt::Display for DeleteFunctionConcurrencyError {
2501    #[allow(unused_variables)]
2502    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2503        match *self {
2504            DeleteFunctionConcurrencyError::InvalidParameterValue(ref cause) => {
2505                write!(f, "{}", cause)
2506            }
2507            DeleteFunctionConcurrencyError::ResourceConflict(ref cause) => write!(f, "{}", cause),
2508            DeleteFunctionConcurrencyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2509            DeleteFunctionConcurrencyError::Service(ref cause) => write!(f, "{}", cause),
2510            DeleteFunctionConcurrencyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2511        }
2512    }
2513}
2514impl Error for DeleteFunctionConcurrencyError {}
2515/// Errors returned by DeleteFunctionEventInvokeConfig
2516#[derive(Debug, PartialEq)]
2517pub enum DeleteFunctionEventInvokeConfigError {
2518    /// <p>One of the parameters in the request is invalid.</p>
2519    InvalidParameterValue(String),
2520    /// <p>The resource specified in the request does not exist.</p>
2521    ResourceNotFound(String),
2522    /// <p>The AWS Lambda service encountered an internal error.</p>
2523    Service(String),
2524    /// <p>The request throughput limit was exceeded.</p>
2525    TooManyRequests(String),
2526}
2527
2528impl DeleteFunctionEventInvokeConfigError {
2529    pub fn from_response(
2530        res: BufferedHttpResponse,
2531    ) -> RusotoError<DeleteFunctionEventInvokeConfigError> {
2532        if let Some(err) = proto::json::Error::parse_rest(&res) {
2533            match err.typ.as_str() {
2534                "InvalidParameterValueException" => {
2535                    return RusotoError::Service(
2536                        DeleteFunctionEventInvokeConfigError::InvalidParameterValue(err.msg),
2537                    )
2538                }
2539                "ResourceNotFoundException" => {
2540                    return RusotoError::Service(
2541                        DeleteFunctionEventInvokeConfigError::ResourceNotFound(err.msg),
2542                    )
2543                }
2544                "ServiceException" => {
2545                    return RusotoError::Service(DeleteFunctionEventInvokeConfigError::Service(
2546                        err.msg,
2547                    ))
2548                }
2549                "TooManyRequestsException" => {
2550                    return RusotoError::Service(
2551                        DeleteFunctionEventInvokeConfigError::TooManyRequests(err.msg),
2552                    )
2553                }
2554                "ValidationException" => return RusotoError::Validation(err.msg),
2555                _ => {}
2556            }
2557        }
2558        RusotoError::Unknown(res)
2559    }
2560}
2561impl fmt::Display for DeleteFunctionEventInvokeConfigError {
2562    #[allow(unused_variables)]
2563    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2564        match *self {
2565            DeleteFunctionEventInvokeConfigError::InvalidParameterValue(ref cause) => {
2566                write!(f, "{}", cause)
2567            }
2568            DeleteFunctionEventInvokeConfigError::ResourceNotFound(ref cause) => {
2569                write!(f, "{}", cause)
2570            }
2571            DeleteFunctionEventInvokeConfigError::Service(ref cause) => write!(f, "{}", cause),
2572            DeleteFunctionEventInvokeConfigError::TooManyRequests(ref cause) => {
2573                write!(f, "{}", cause)
2574            }
2575        }
2576    }
2577}
2578impl Error for DeleteFunctionEventInvokeConfigError {}
2579/// Errors returned by DeleteLayerVersion
2580#[derive(Debug, PartialEq)]
2581pub enum DeleteLayerVersionError {
2582    /// <p>The AWS Lambda service encountered an internal error.</p>
2583    Service(String),
2584    /// <p>The request throughput limit was exceeded.</p>
2585    TooManyRequests(String),
2586}
2587
2588impl DeleteLayerVersionError {
2589    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLayerVersionError> {
2590        if let Some(err) = proto::json::Error::parse_rest(&res) {
2591            match err.typ.as_str() {
2592                "ServiceException" => {
2593                    return RusotoError::Service(DeleteLayerVersionError::Service(err.msg))
2594                }
2595                "TooManyRequestsException" => {
2596                    return RusotoError::Service(DeleteLayerVersionError::TooManyRequests(err.msg))
2597                }
2598                "ValidationException" => return RusotoError::Validation(err.msg),
2599                _ => {}
2600            }
2601        }
2602        RusotoError::Unknown(res)
2603    }
2604}
2605impl fmt::Display for DeleteLayerVersionError {
2606    #[allow(unused_variables)]
2607    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2608        match *self {
2609            DeleteLayerVersionError::Service(ref cause) => write!(f, "{}", cause),
2610            DeleteLayerVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2611        }
2612    }
2613}
2614impl Error for DeleteLayerVersionError {}
2615/// Errors returned by DeleteProvisionedConcurrencyConfig
2616#[derive(Debug, PartialEq)]
2617pub enum DeleteProvisionedConcurrencyConfigError {
2618    /// <p>One of the parameters in the request is invalid.</p>
2619    InvalidParameterValue(String),
2620    /// <p>The resource already exists, or another operation is in progress.</p>
2621    ResourceConflict(String),
2622    /// <p>The resource specified in the request does not exist.</p>
2623    ResourceNotFound(String),
2624    /// <p>The AWS Lambda service encountered an internal error.</p>
2625    Service(String),
2626    /// <p>The request throughput limit was exceeded.</p>
2627    TooManyRequests(String),
2628}
2629
2630impl DeleteProvisionedConcurrencyConfigError {
2631    pub fn from_response(
2632        res: BufferedHttpResponse,
2633    ) -> RusotoError<DeleteProvisionedConcurrencyConfigError> {
2634        if let Some(err) = proto::json::Error::parse_rest(&res) {
2635            match err.typ.as_str() {
2636                "InvalidParameterValueException" => {
2637                    return RusotoError::Service(
2638                        DeleteProvisionedConcurrencyConfigError::InvalidParameterValue(err.msg),
2639                    )
2640                }
2641                "ResourceConflictException" => {
2642                    return RusotoError::Service(
2643                        DeleteProvisionedConcurrencyConfigError::ResourceConflict(err.msg),
2644                    )
2645                }
2646                "ResourceNotFoundException" => {
2647                    return RusotoError::Service(
2648                        DeleteProvisionedConcurrencyConfigError::ResourceNotFound(err.msg),
2649                    )
2650                }
2651                "ServiceException" => {
2652                    return RusotoError::Service(DeleteProvisionedConcurrencyConfigError::Service(
2653                        err.msg,
2654                    ))
2655                }
2656                "TooManyRequestsException" => {
2657                    return RusotoError::Service(
2658                        DeleteProvisionedConcurrencyConfigError::TooManyRequests(err.msg),
2659                    )
2660                }
2661                "ValidationException" => return RusotoError::Validation(err.msg),
2662                _ => {}
2663            }
2664        }
2665        RusotoError::Unknown(res)
2666    }
2667}
2668impl fmt::Display for DeleteProvisionedConcurrencyConfigError {
2669    #[allow(unused_variables)]
2670    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2671        match *self {
2672            DeleteProvisionedConcurrencyConfigError::InvalidParameterValue(ref cause) => {
2673                write!(f, "{}", cause)
2674            }
2675            DeleteProvisionedConcurrencyConfigError::ResourceConflict(ref cause) => {
2676                write!(f, "{}", cause)
2677            }
2678            DeleteProvisionedConcurrencyConfigError::ResourceNotFound(ref cause) => {
2679                write!(f, "{}", cause)
2680            }
2681            DeleteProvisionedConcurrencyConfigError::Service(ref cause) => write!(f, "{}", cause),
2682            DeleteProvisionedConcurrencyConfigError::TooManyRequests(ref cause) => {
2683                write!(f, "{}", cause)
2684            }
2685        }
2686    }
2687}
2688impl Error for DeleteProvisionedConcurrencyConfigError {}
2689/// Errors returned by GetAccountSettings
2690#[derive(Debug, PartialEq)]
2691pub enum GetAccountSettingsError {
2692    /// <p>The AWS Lambda service encountered an internal error.</p>
2693    Service(String),
2694    /// <p>The request throughput limit was exceeded.</p>
2695    TooManyRequests(String),
2696}
2697
2698impl GetAccountSettingsError {
2699    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccountSettingsError> {
2700        if let Some(err) = proto::json::Error::parse_rest(&res) {
2701            match err.typ.as_str() {
2702                "ServiceException" => {
2703                    return RusotoError::Service(GetAccountSettingsError::Service(err.msg))
2704                }
2705                "TooManyRequestsException" => {
2706                    return RusotoError::Service(GetAccountSettingsError::TooManyRequests(err.msg))
2707                }
2708                "ValidationException" => return RusotoError::Validation(err.msg),
2709                _ => {}
2710            }
2711        }
2712        RusotoError::Unknown(res)
2713    }
2714}
2715impl fmt::Display for GetAccountSettingsError {
2716    #[allow(unused_variables)]
2717    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2718        match *self {
2719            GetAccountSettingsError::Service(ref cause) => write!(f, "{}", cause),
2720            GetAccountSettingsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2721        }
2722    }
2723}
2724impl Error for GetAccountSettingsError {}
2725/// Errors returned by GetAlias
2726#[derive(Debug, PartialEq)]
2727pub enum GetAliasError {
2728    /// <p>One of the parameters in the request is invalid.</p>
2729    InvalidParameterValue(String),
2730    /// <p>The resource specified in the request does not exist.</p>
2731    ResourceNotFound(String),
2732    /// <p>The AWS Lambda service encountered an internal error.</p>
2733    Service(String),
2734    /// <p>The request throughput limit was exceeded.</p>
2735    TooManyRequests(String),
2736}
2737
2738impl GetAliasError {
2739    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAliasError> {
2740        if let Some(err) = proto::json::Error::parse_rest(&res) {
2741            match err.typ.as_str() {
2742                "InvalidParameterValueException" => {
2743                    return RusotoError::Service(GetAliasError::InvalidParameterValue(err.msg))
2744                }
2745                "ResourceNotFoundException" => {
2746                    return RusotoError::Service(GetAliasError::ResourceNotFound(err.msg))
2747                }
2748                "ServiceException" => return RusotoError::Service(GetAliasError::Service(err.msg)),
2749                "TooManyRequestsException" => {
2750                    return RusotoError::Service(GetAliasError::TooManyRequests(err.msg))
2751                }
2752                "ValidationException" => return RusotoError::Validation(err.msg),
2753                _ => {}
2754            }
2755        }
2756        RusotoError::Unknown(res)
2757    }
2758}
2759impl fmt::Display for GetAliasError {
2760    #[allow(unused_variables)]
2761    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2762        match *self {
2763            GetAliasError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2764            GetAliasError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2765            GetAliasError::Service(ref cause) => write!(f, "{}", cause),
2766            GetAliasError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2767        }
2768    }
2769}
2770impl Error for GetAliasError {}
2771/// Errors returned by GetEventSourceMapping
2772#[derive(Debug, PartialEq)]
2773pub enum GetEventSourceMappingError {
2774    /// <p>One of the parameters in the request is invalid.</p>
2775    InvalidParameterValue(String),
2776    /// <p>The resource specified in the request does not exist.</p>
2777    ResourceNotFound(String),
2778    /// <p>The AWS Lambda service encountered an internal error.</p>
2779    Service(String),
2780    /// <p>The request throughput limit was exceeded.</p>
2781    TooManyRequests(String),
2782}
2783
2784impl GetEventSourceMappingError {
2785    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetEventSourceMappingError> {
2786        if let Some(err) = proto::json::Error::parse_rest(&res) {
2787            match err.typ.as_str() {
2788                "InvalidParameterValueException" => {
2789                    return RusotoError::Service(GetEventSourceMappingError::InvalidParameterValue(
2790                        err.msg,
2791                    ))
2792                }
2793                "ResourceNotFoundException" => {
2794                    return RusotoError::Service(GetEventSourceMappingError::ResourceNotFound(
2795                        err.msg,
2796                    ))
2797                }
2798                "ServiceException" => {
2799                    return RusotoError::Service(GetEventSourceMappingError::Service(err.msg))
2800                }
2801                "TooManyRequestsException" => {
2802                    return RusotoError::Service(GetEventSourceMappingError::TooManyRequests(
2803                        err.msg,
2804                    ))
2805                }
2806                "ValidationException" => return RusotoError::Validation(err.msg),
2807                _ => {}
2808            }
2809        }
2810        RusotoError::Unknown(res)
2811    }
2812}
2813impl fmt::Display for GetEventSourceMappingError {
2814    #[allow(unused_variables)]
2815    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2816        match *self {
2817            GetEventSourceMappingError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2818            GetEventSourceMappingError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2819            GetEventSourceMappingError::Service(ref cause) => write!(f, "{}", cause),
2820            GetEventSourceMappingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2821        }
2822    }
2823}
2824impl Error for GetEventSourceMappingError {}
2825/// Errors returned by GetFunction
2826#[derive(Debug, PartialEq)]
2827pub enum GetFunctionError {
2828    /// <p>One of the parameters in the request is invalid.</p>
2829    InvalidParameterValue(String),
2830    /// <p>The resource specified in the request does not exist.</p>
2831    ResourceNotFound(String),
2832    /// <p>The AWS Lambda service encountered an internal error.</p>
2833    Service(String),
2834    /// <p>The request throughput limit was exceeded.</p>
2835    TooManyRequests(String),
2836}
2837
2838impl GetFunctionError {
2839    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFunctionError> {
2840        if let Some(err) = proto::json::Error::parse_rest(&res) {
2841            match err.typ.as_str() {
2842                "InvalidParameterValueException" => {
2843                    return RusotoError::Service(GetFunctionError::InvalidParameterValue(err.msg))
2844                }
2845                "ResourceNotFoundException" => {
2846                    return RusotoError::Service(GetFunctionError::ResourceNotFound(err.msg))
2847                }
2848                "ServiceException" => {
2849                    return RusotoError::Service(GetFunctionError::Service(err.msg))
2850                }
2851                "TooManyRequestsException" => {
2852                    return RusotoError::Service(GetFunctionError::TooManyRequests(err.msg))
2853                }
2854                "ValidationException" => return RusotoError::Validation(err.msg),
2855                _ => {}
2856            }
2857        }
2858        RusotoError::Unknown(res)
2859    }
2860}
2861impl fmt::Display for GetFunctionError {
2862    #[allow(unused_variables)]
2863    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2864        match *self {
2865            GetFunctionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2866            GetFunctionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2867            GetFunctionError::Service(ref cause) => write!(f, "{}", cause),
2868            GetFunctionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2869        }
2870    }
2871}
2872impl Error for GetFunctionError {}
2873/// Errors returned by GetFunctionConcurrency
2874#[derive(Debug, PartialEq)]
2875pub enum GetFunctionConcurrencyError {
2876    /// <p>One of the parameters in the request is invalid.</p>
2877    InvalidParameterValue(String),
2878    /// <p>The resource specified in the request does not exist.</p>
2879    ResourceNotFound(String),
2880    /// <p>The AWS Lambda service encountered an internal error.</p>
2881    Service(String),
2882    /// <p>The request throughput limit was exceeded.</p>
2883    TooManyRequests(String),
2884}
2885
2886impl GetFunctionConcurrencyError {
2887    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFunctionConcurrencyError> {
2888        if let Some(err) = proto::json::Error::parse_rest(&res) {
2889            match err.typ.as_str() {
2890                "InvalidParameterValueException" => {
2891                    return RusotoError::Service(
2892                        GetFunctionConcurrencyError::InvalidParameterValue(err.msg),
2893                    )
2894                }
2895                "ResourceNotFoundException" => {
2896                    return RusotoError::Service(GetFunctionConcurrencyError::ResourceNotFound(
2897                        err.msg,
2898                    ))
2899                }
2900                "ServiceException" => {
2901                    return RusotoError::Service(GetFunctionConcurrencyError::Service(err.msg))
2902                }
2903                "TooManyRequestsException" => {
2904                    return RusotoError::Service(GetFunctionConcurrencyError::TooManyRequests(
2905                        err.msg,
2906                    ))
2907                }
2908                "ValidationException" => return RusotoError::Validation(err.msg),
2909                _ => {}
2910            }
2911        }
2912        RusotoError::Unknown(res)
2913    }
2914}
2915impl fmt::Display for GetFunctionConcurrencyError {
2916    #[allow(unused_variables)]
2917    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2918        match *self {
2919            GetFunctionConcurrencyError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2920            GetFunctionConcurrencyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2921            GetFunctionConcurrencyError::Service(ref cause) => write!(f, "{}", cause),
2922            GetFunctionConcurrencyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2923        }
2924    }
2925}
2926impl Error for GetFunctionConcurrencyError {}
2927/// Errors returned by GetFunctionConfiguration
2928#[derive(Debug, PartialEq)]
2929pub enum GetFunctionConfigurationError {
2930    /// <p>One of the parameters in the request is invalid.</p>
2931    InvalidParameterValue(String),
2932    /// <p>The resource specified in the request does not exist.</p>
2933    ResourceNotFound(String),
2934    /// <p>The AWS Lambda service encountered an internal error.</p>
2935    Service(String),
2936    /// <p>The request throughput limit was exceeded.</p>
2937    TooManyRequests(String),
2938}
2939
2940impl GetFunctionConfigurationError {
2941    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFunctionConfigurationError> {
2942        if let Some(err) = proto::json::Error::parse_rest(&res) {
2943            match err.typ.as_str() {
2944                "InvalidParameterValueException" => {
2945                    return RusotoError::Service(
2946                        GetFunctionConfigurationError::InvalidParameterValue(err.msg),
2947                    )
2948                }
2949                "ResourceNotFoundException" => {
2950                    return RusotoError::Service(GetFunctionConfigurationError::ResourceNotFound(
2951                        err.msg,
2952                    ))
2953                }
2954                "ServiceException" => {
2955                    return RusotoError::Service(GetFunctionConfigurationError::Service(err.msg))
2956                }
2957                "TooManyRequestsException" => {
2958                    return RusotoError::Service(GetFunctionConfigurationError::TooManyRequests(
2959                        err.msg,
2960                    ))
2961                }
2962                "ValidationException" => return RusotoError::Validation(err.msg),
2963                _ => {}
2964            }
2965        }
2966        RusotoError::Unknown(res)
2967    }
2968}
2969impl fmt::Display for GetFunctionConfigurationError {
2970    #[allow(unused_variables)]
2971    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2972        match *self {
2973            GetFunctionConfigurationError::InvalidParameterValue(ref cause) => {
2974                write!(f, "{}", cause)
2975            }
2976            GetFunctionConfigurationError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2977            GetFunctionConfigurationError::Service(ref cause) => write!(f, "{}", cause),
2978            GetFunctionConfigurationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2979        }
2980    }
2981}
2982impl Error for GetFunctionConfigurationError {}
2983/// Errors returned by GetFunctionEventInvokeConfig
2984#[derive(Debug, PartialEq)]
2985pub enum GetFunctionEventInvokeConfigError {
2986    /// <p>One of the parameters in the request is invalid.</p>
2987    InvalidParameterValue(String),
2988    /// <p>The resource specified in the request does not exist.</p>
2989    ResourceNotFound(String),
2990    /// <p>The AWS Lambda service encountered an internal error.</p>
2991    Service(String),
2992    /// <p>The request throughput limit was exceeded.</p>
2993    TooManyRequests(String),
2994}
2995
2996impl GetFunctionEventInvokeConfigError {
2997    pub fn from_response(
2998        res: BufferedHttpResponse,
2999    ) -> RusotoError<GetFunctionEventInvokeConfigError> {
3000        if let Some(err) = proto::json::Error::parse_rest(&res) {
3001            match err.typ.as_str() {
3002                "InvalidParameterValueException" => {
3003                    return RusotoError::Service(
3004                        GetFunctionEventInvokeConfigError::InvalidParameterValue(err.msg),
3005                    )
3006                }
3007                "ResourceNotFoundException" => {
3008                    return RusotoError::Service(
3009                        GetFunctionEventInvokeConfigError::ResourceNotFound(err.msg),
3010                    )
3011                }
3012                "ServiceException" => {
3013                    return RusotoError::Service(GetFunctionEventInvokeConfigError::Service(
3014                        err.msg,
3015                    ))
3016                }
3017                "TooManyRequestsException" => {
3018                    return RusotoError::Service(
3019                        GetFunctionEventInvokeConfigError::TooManyRequests(err.msg),
3020                    )
3021                }
3022                "ValidationException" => return RusotoError::Validation(err.msg),
3023                _ => {}
3024            }
3025        }
3026        RusotoError::Unknown(res)
3027    }
3028}
3029impl fmt::Display for GetFunctionEventInvokeConfigError {
3030    #[allow(unused_variables)]
3031    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3032        match *self {
3033            GetFunctionEventInvokeConfigError::InvalidParameterValue(ref cause) => {
3034                write!(f, "{}", cause)
3035            }
3036            GetFunctionEventInvokeConfigError::ResourceNotFound(ref cause) => {
3037                write!(f, "{}", cause)
3038            }
3039            GetFunctionEventInvokeConfigError::Service(ref cause) => write!(f, "{}", cause),
3040            GetFunctionEventInvokeConfigError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3041        }
3042    }
3043}
3044impl Error for GetFunctionEventInvokeConfigError {}
3045/// Errors returned by GetLayerVersion
3046#[derive(Debug, PartialEq)]
3047pub enum GetLayerVersionError {
3048    /// <p>One of the parameters in the request is invalid.</p>
3049    InvalidParameterValue(String),
3050    /// <p>The resource specified in the request does not exist.</p>
3051    ResourceNotFound(String),
3052    /// <p>The AWS Lambda service encountered an internal error.</p>
3053    Service(String),
3054    /// <p>The request throughput limit was exceeded.</p>
3055    TooManyRequests(String),
3056}
3057
3058impl GetLayerVersionError {
3059    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLayerVersionError> {
3060        if let Some(err) = proto::json::Error::parse_rest(&res) {
3061            match err.typ.as_str() {
3062                "InvalidParameterValueException" => {
3063                    return RusotoError::Service(GetLayerVersionError::InvalidParameterValue(
3064                        err.msg,
3065                    ))
3066                }
3067                "ResourceNotFoundException" => {
3068                    return RusotoError::Service(GetLayerVersionError::ResourceNotFound(err.msg))
3069                }
3070                "ServiceException" => {
3071                    return RusotoError::Service(GetLayerVersionError::Service(err.msg))
3072                }
3073                "TooManyRequestsException" => {
3074                    return RusotoError::Service(GetLayerVersionError::TooManyRequests(err.msg))
3075                }
3076                "ValidationException" => return RusotoError::Validation(err.msg),
3077                _ => {}
3078            }
3079        }
3080        RusotoError::Unknown(res)
3081    }
3082}
3083impl fmt::Display for GetLayerVersionError {
3084    #[allow(unused_variables)]
3085    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3086        match *self {
3087            GetLayerVersionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3088            GetLayerVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3089            GetLayerVersionError::Service(ref cause) => write!(f, "{}", cause),
3090            GetLayerVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3091        }
3092    }
3093}
3094impl Error for GetLayerVersionError {}
3095/// Errors returned by GetLayerVersionByArn
3096#[derive(Debug, PartialEq)]
3097pub enum GetLayerVersionByArnError {
3098    /// <p>One of the parameters in the request is invalid.</p>
3099    InvalidParameterValue(String),
3100    /// <p>The resource specified in the request does not exist.</p>
3101    ResourceNotFound(String),
3102    /// <p>The AWS Lambda service encountered an internal error.</p>
3103    Service(String),
3104    /// <p>The request throughput limit was exceeded.</p>
3105    TooManyRequests(String),
3106}
3107
3108impl GetLayerVersionByArnError {
3109    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLayerVersionByArnError> {
3110        if let Some(err) = proto::json::Error::parse_rest(&res) {
3111            match err.typ.as_str() {
3112                "InvalidParameterValueException" => {
3113                    return RusotoError::Service(GetLayerVersionByArnError::InvalidParameterValue(
3114                        err.msg,
3115                    ))
3116                }
3117                "ResourceNotFoundException" => {
3118                    return RusotoError::Service(GetLayerVersionByArnError::ResourceNotFound(
3119                        err.msg,
3120                    ))
3121                }
3122                "ServiceException" => {
3123                    return RusotoError::Service(GetLayerVersionByArnError::Service(err.msg))
3124                }
3125                "TooManyRequestsException" => {
3126                    return RusotoError::Service(GetLayerVersionByArnError::TooManyRequests(
3127                        err.msg,
3128                    ))
3129                }
3130                "ValidationException" => return RusotoError::Validation(err.msg),
3131                _ => {}
3132            }
3133        }
3134        RusotoError::Unknown(res)
3135    }
3136}
3137impl fmt::Display for GetLayerVersionByArnError {
3138    #[allow(unused_variables)]
3139    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3140        match *self {
3141            GetLayerVersionByArnError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3142            GetLayerVersionByArnError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3143            GetLayerVersionByArnError::Service(ref cause) => write!(f, "{}", cause),
3144            GetLayerVersionByArnError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3145        }
3146    }
3147}
3148impl Error for GetLayerVersionByArnError {}
3149/// Errors returned by GetLayerVersionPolicy
3150#[derive(Debug, PartialEq)]
3151pub enum GetLayerVersionPolicyError {
3152    /// <p>One of the parameters in the request is invalid.</p>
3153    InvalidParameterValue(String),
3154    /// <p>The resource specified in the request does not exist.</p>
3155    ResourceNotFound(String),
3156    /// <p>The AWS Lambda service encountered an internal error.</p>
3157    Service(String),
3158    /// <p>The request throughput limit was exceeded.</p>
3159    TooManyRequests(String),
3160}
3161
3162impl GetLayerVersionPolicyError {
3163    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLayerVersionPolicyError> {
3164        if let Some(err) = proto::json::Error::parse_rest(&res) {
3165            match err.typ.as_str() {
3166                "InvalidParameterValueException" => {
3167                    return RusotoError::Service(GetLayerVersionPolicyError::InvalidParameterValue(
3168                        err.msg,
3169                    ))
3170                }
3171                "ResourceNotFoundException" => {
3172                    return RusotoError::Service(GetLayerVersionPolicyError::ResourceNotFound(
3173                        err.msg,
3174                    ))
3175                }
3176                "ServiceException" => {
3177                    return RusotoError::Service(GetLayerVersionPolicyError::Service(err.msg))
3178                }
3179                "TooManyRequestsException" => {
3180                    return RusotoError::Service(GetLayerVersionPolicyError::TooManyRequests(
3181                        err.msg,
3182                    ))
3183                }
3184                "ValidationException" => return RusotoError::Validation(err.msg),
3185                _ => {}
3186            }
3187        }
3188        RusotoError::Unknown(res)
3189    }
3190}
3191impl fmt::Display for GetLayerVersionPolicyError {
3192    #[allow(unused_variables)]
3193    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3194        match *self {
3195            GetLayerVersionPolicyError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3196            GetLayerVersionPolicyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3197            GetLayerVersionPolicyError::Service(ref cause) => write!(f, "{}", cause),
3198            GetLayerVersionPolicyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3199        }
3200    }
3201}
3202impl Error for GetLayerVersionPolicyError {}
3203/// Errors returned by GetPolicy
3204#[derive(Debug, PartialEq)]
3205pub enum GetPolicyError {
3206    /// <p>One of the parameters in the request is invalid.</p>
3207    InvalidParameterValue(String),
3208    /// <p>The resource specified in the request does not exist.</p>
3209    ResourceNotFound(String),
3210    /// <p>The AWS Lambda service encountered an internal error.</p>
3211    Service(String),
3212    /// <p>The request throughput limit was exceeded.</p>
3213    TooManyRequests(String),
3214}
3215
3216impl GetPolicyError {
3217    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPolicyError> {
3218        if let Some(err) = proto::json::Error::parse_rest(&res) {
3219            match err.typ.as_str() {
3220                "InvalidParameterValueException" => {
3221                    return RusotoError::Service(GetPolicyError::InvalidParameterValue(err.msg))
3222                }
3223                "ResourceNotFoundException" => {
3224                    return RusotoError::Service(GetPolicyError::ResourceNotFound(err.msg))
3225                }
3226                "ServiceException" => {
3227                    return RusotoError::Service(GetPolicyError::Service(err.msg))
3228                }
3229                "TooManyRequestsException" => {
3230                    return RusotoError::Service(GetPolicyError::TooManyRequests(err.msg))
3231                }
3232                "ValidationException" => return RusotoError::Validation(err.msg),
3233                _ => {}
3234            }
3235        }
3236        RusotoError::Unknown(res)
3237    }
3238}
3239impl fmt::Display for GetPolicyError {
3240    #[allow(unused_variables)]
3241    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3242        match *self {
3243            GetPolicyError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3244            GetPolicyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3245            GetPolicyError::Service(ref cause) => write!(f, "{}", cause),
3246            GetPolicyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3247        }
3248    }
3249}
3250impl Error for GetPolicyError {}
3251/// Errors returned by GetProvisionedConcurrencyConfig
3252#[derive(Debug, PartialEq)]
3253pub enum GetProvisionedConcurrencyConfigError {
3254    /// <p>One of the parameters in the request is invalid.</p>
3255    InvalidParameterValue(String),
3256    /// <p>The specified configuration does not exist.</p>
3257    ProvisionedConcurrencyConfigNotFound(String),
3258    /// <p>The resource specified in the request does not exist.</p>
3259    ResourceNotFound(String),
3260    /// <p>The AWS Lambda service encountered an internal error.</p>
3261    Service(String),
3262    /// <p>The request throughput limit was exceeded.</p>
3263    TooManyRequests(String),
3264}
3265
3266impl GetProvisionedConcurrencyConfigError {
3267    pub fn from_response(
3268        res: BufferedHttpResponse,
3269    ) -> RusotoError<GetProvisionedConcurrencyConfigError> {
3270        if let Some(err) = proto::json::Error::parse_rest(&res) {
3271            match err.typ.as_str() {
3272                "InvalidParameterValueException" => {
3273                    return RusotoError::Service(
3274                        GetProvisionedConcurrencyConfigError::InvalidParameterValue(err.msg),
3275                    )
3276                }
3277                "ProvisionedConcurrencyConfigNotFoundException" => {
3278                    return RusotoError::Service(
3279                        GetProvisionedConcurrencyConfigError::ProvisionedConcurrencyConfigNotFound(
3280                            err.msg,
3281                        ),
3282                    )
3283                }
3284                "ResourceNotFoundException" => {
3285                    return RusotoError::Service(
3286                        GetProvisionedConcurrencyConfigError::ResourceNotFound(err.msg),
3287                    )
3288                }
3289                "ServiceException" => {
3290                    return RusotoError::Service(GetProvisionedConcurrencyConfigError::Service(
3291                        err.msg,
3292                    ))
3293                }
3294                "TooManyRequestsException" => {
3295                    return RusotoError::Service(
3296                        GetProvisionedConcurrencyConfigError::TooManyRequests(err.msg),
3297                    )
3298                }
3299                "ValidationException" => return RusotoError::Validation(err.msg),
3300                _ => {}
3301            }
3302        }
3303        RusotoError::Unknown(res)
3304    }
3305}
3306impl fmt::Display for GetProvisionedConcurrencyConfigError {
3307    #[allow(unused_variables)]
3308    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3309        match *self {
3310            GetProvisionedConcurrencyConfigError::InvalidParameterValue(ref cause) => {
3311                write!(f, "{}", cause)
3312            }
3313            GetProvisionedConcurrencyConfigError::ProvisionedConcurrencyConfigNotFound(
3314                ref cause,
3315            ) => write!(f, "{}", cause),
3316            GetProvisionedConcurrencyConfigError::ResourceNotFound(ref cause) => {
3317                write!(f, "{}", cause)
3318            }
3319            GetProvisionedConcurrencyConfigError::Service(ref cause) => write!(f, "{}", cause),
3320            GetProvisionedConcurrencyConfigError::TooManyRequests(ref cause) => {
3321                write!(f, "{}", cause)
3322            }
3323        }
3324    }
3325}
3326impl Error for GetProvisionedConcurrencyConfigError {}
3327/// Errors returned by Invoke
3328#[derive(Debug, PartialEq)]
3329pub enum InvokeError {
3330    /// <p>Need additional permissions to configure VPC settings.</p>
3331    EC2AccessDenied(String),
3332    /// <p>AWS Lambda was throttled by Amazon EC2 during Lambda function initialization using the execution role provided for the Lambda function.</p>
3333    EC2Throttled(String),
3334    /// <p>AWS Lambda received an unexpected EC2 client exception while setting up for the Lambda function.</p>
3335    EC2Unexpected(String),
3336    /// <p>An error occured when reading from or writing to a connected file system.</p>
3337    EFSIO(String),
3338    /// <p>The function couldn't make a network connection to the configured file system.</p>
3339    EFSMountConnectivity(String),
3340    /// <p>The function couldn't mount the configured file system due to a permission or configuration issue.</p>
3341    EFSMountFailure(String),
3342    /// <p>The function was able to make a network connection to the configured file system, but the mount operation timed out.</p>
3343    EFSMountTimeout(String),
3344    /// <p>AWS Lambda was not able to create an elastic network interface in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached.</p>
3345    ENILimitReached(String),
3346    /// <p>One of the parameters in the request is invalid.</p>
3347    InvalidParameterValue(String),
3348    /// <p>The request body could not be parsed as JSON.</p>
3349    InvalidRequestContent(String),
3350    /// <p>The runtime or runtime version specified is not supported.</p>
3351    InvalidRuntime(String),
3352    /// <p>The Security Group ID provided in the Lambda function VPC configuration is invalid.</p>
3353    InvalidSecurityGroupID(String),
3354    /// <p>The Subnet ID provided in the Lambda function VPC configuration is invalid.</p>
3355    InvalidSubnetID(String),
3356    /// <p>AWS Lambda could not unzip the deployment package.</p>
3357    InvalidZipFile(String),
3358    /// <p>Lambda was unable to decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
3359    KMSAccessDenied(String),
3360    /// <p>Lambda was unable to decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
3361    KMSDisabled(String),
3362    /// <p>Lambda was unable to decrypt the environment variables because the KMS key used is in an invalid state for Decrypt. Check the function's KMS key settings.</p>
3363    KMSInvalidState(String),
3364    /// <p>Lambda was unable to decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings. </p>
3365    KMSNotFound(String),
3366    /// <p>The request payload exceeded the <code>Invoke</code> request body JSON input limit. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">Limits</a>. </p>
3367    RequestTooLarge(String),
3368    /// <p>The resource already exists, or another operation is in progress.</p>
3369    ResourceConflict(String),
3370    /// <p>The resource specified in the request does not exist.</p>
3371    ResourceNotFound(String),
3372    /// <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
3373    ResourceNotReady(String),
3374    /// <p>The AWS Lambda service encountered an internal error.</p>
3375    Service(String),
3376    /// <p>AWS Lambda was not able to set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.</p>
3377    SubnetIPAddressLimitReached(String),
3378    /// <p>The request throughput limit was exceeded.</p>
3379    TooManyRequests(String),
3380    /// <p>The content type of the <code>Invoke</code> request body is not JSON.</p>
3381    UnsupportedMediaType(String),
3382}
3383
3384impl InvokeError {
3385    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InvokeError> {
3386        if let Some(err) = proto::json::Error::parse_rest(&res) {
3387            match err.typ.as_str() {
3388                "EC2AccessDeniedException" => {
3389                    return RusotoError::Service(InvokeError::EC2AccessDenied(err.msg))
3390                }
3391                "EC2ThrottledException" => {
3392                    return RusotoError::Service(InvokeError::EC2Throttled(err.msg))
3393                }
3394                "EC2UnexpectedException" => {
3395                    return RusotoError::Service(InvokeError::EC2Unexpected(err.msg))
3396                }
3397                "EFSIOException" => return RusotoError::Service(InvokeError::EFSIO(err.msg)),
3398                "EFSMountConnectivityException" => {
3399                    return RusotoError::Service(InvokeError::EFSMountConnectivity(err.msg))
3400                }
3401                "EFSMountFailureException" => {
3402                    return RusotoError::Service(InvokeError::EFSMountFailure(err.msg))
3403                }
3404                "EFSMountTimeoutException" => {
3405                    return RusotoError::Service(InvokeError::EFSMountTimeout(err.msg))
3406                }
3407                "ENILimitReachedException" => {
3408                    return RusotoError::Service(InvokeError::ENILimitReached(err.msg))
3409                }
3410                "InvalidParameterValueException" => {
3411                    return RusotoError::Service(InvokeError::InvalidParameterValue(err.msg))
3412                }
3413                "InvalidRequestContentException" => {
3414                    return RusotoError::Service(InvokeError::InvalidRequestContent(err.msg))
3415                }
3416                "InvalidRuntimeException" => {
3417                    return RusotoError::Service(InvokeError::InvalidRuntime(err.msg))
3418                }
3419                "InvalidSecurityGroupIDException" => {
3420                    return RusotoError::Service(InvokeError::InvalidSecurityGroupID(err.msg))
3421                }
3422                "InvalidSubnetIDException" => {
3423                    return RusotoError::Service(InvokeError::InvalidSubnetID(err.msg))
3424                }
3425                "InvalidZipFileException" => {
3426                    return RusotoError::Service(InvokeError::InvalidZipFile(err.msg))
3427                }
3428                "KMSAccessDeniedException" => {
3429                    return RusotoError::Service(InvokeError::KMSAccessDenied(err.msg))
3430                }
3431                "KMSDisabledException" => {
3432                    return RusotoError::Service(InvokeError::KMSDisabled(err.msg))
3433                }
3434                "KMSInvalidStateException" => {
3435                    return RusotoError::Service(InvokeError::KMSInvalidState(err.msg))
3436                }
3437                "KMSNotFoundException" => {
3438                    return RusotoError::Service(InvokeError::KMSNotFound(err.msg))
3439                }
3440                "RequestTooLargeException" => {
3441                    return RusotoError::Service(InvokeError::RequestTooLarge(err.msg))
3442                }
3443                "ResourceConflictException" => {
3444                    return RusotoError::Service(InvokeError::ResourceConflict(err.msg))
3445                }
3446                "ResourceNotFoundException" => {
3447                    return RusotoError::Service(InvokeError::ResourceNotFound(err.msg))
3448                }
3449                "ResourceNotReadyException" => {
3450                    return RusotoError::Service(InvokeError::ResourceNotReady(err.msg))
3451                }
3452                "ServiceException" => return RusotoError::Service(InvokeError::Service(err.msg)),
3453                "SubnetIPAddressLimitReachedException" => {
3454                    return RusotoError::Service(InvokeError::SubnetIPAddressLimitReached(err.msg))
3455                }
3456                "TooManyRequestsException" => {
3457                    return RusotoError::Service(InvokeError::TooManyRequests(err.msg))
3458                }
3459                "UnsupportedMediaTypeException" => {
3460                    return RusotoError::Service(InvokeError::UnsupportedMediaType(err.msg))
3461                }
3462                "ValidationException" => return RusotoError::Validation(err.msg),
3463                _ => {}
3464            }
3465        }
3466        RusotoError::Unknown(res)
3467    }
3468}
3469impl fmt::Display for InvokeError {
3470    #[allow(unused_variables)]
3471    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3472        match *self {
3473            InvokeError::EC2AccessDenied(ref cause) => write!(f, "{}", cause),
3474            InvokeError::EC2Throttled(ref cause) => write!(f, "{}", cause),
3475            InvokeError::EC2Unexpected(ref cause) => write!(f, "{}", cause),
3476            InvokeError::EFSIO(ref cause) => write!(f, "{}", cause),
3477            InvokeError::EFSMountConnectivity(ref cause) => write!(f, "{}", cause),
3478            InvokeError::EFSMountFailure(ref cause) => write!(f, "{}", cause),
3479            InvokeError::EFSMountTimeout(ref cause) => write!(f, "{}", cause),
3480            InvokeError::ENILimitReached(ref cause) => write!(f, "{}", cause),
3481            InvokeError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3482            InvokeError::InvalidRequestContent(ref cause) => write!(f, "{}", cause),
3483            InvokeError::InvalidRuntime(ref cause) => write!(f, "{}", cause),
3484            InvokeError::InvalidSecurityGroupID(ref cause) => write!(f, "{}", cause),
3485            InvokeError::InvalidSubnetID(ref cause) => write!(f, "{}", cause),
3486            InvokeError::InvalidZipFile(ref cause) => write!(f, "{}", cause),
3487            InvokeError::KMSAccessDenied(ref cause) => write!(f, "{}", cause),
3488            InvokeError::KMSDisabled(ref cause) => write!(f, "{}", cause),
3489            InvokeError::KMSInvalidState(ref cause) => write!(f, "{}", cause),
3490            InvokeError::KMSNotFound(ref cause) => write!(f, "{}", cause),
3491            InvokeError::RequestTooLarge(ref cause) => write!(f, "{}", cause),
3492            InvokeError::ResourceConflict(ref cause) => write!(f, "{}", cause),
3493            InvokeError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3494            InvokeError::ResourceNotReady(ref cause) => write!(f, "{}", cause),
3495            InvokeError::Service(ref cause) => write!(f, "{}", cause),
3496            InvokeError::SubnetIPAddressLimitReached(ref cause) => write!(f, "{}", cause),
3497            InvokeError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3498            InvokeError::UnsupportedMediaType(ref cause) => write!(f, "{}", cause),
3499        }
3500    }
3501}
3502impl Error for InvokeError {}
3503/// Errors returned by InvokeAsync
3504#[derive(Debug, PartialEq)]
3505pub enum InvokeAsyncError {
3506    /// <p>The request body could not be parsed as JSON.</p>
3507    InvalidRequestContent(String),
3508    /// <p>The runtime or runtime version specified is not supported.</p>
3509    InvalidRuntime(String),
3510    /// <p>The resource already exists, or another operation is in progress.</p>
3511    ResourceConflict(String),
3512    /// <p>The resource specified in the request does not exist.</p>
3513    ResourceNotFound(String),
3514    /// <p>The AWS Lambda service encountered an internal error.</p>
3515    Service(String),
3516}
3517
3518impl InvokeAsyncError {
3519    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InvokeAsyncError> {
3520        if let Some(err) = proto::json::Error::parse_rest(&res) {
3521            match err.typ.as_str() {
3522                "InvalidRequestContentException" => {
3523                    return RusotoError::Service(InvokeAsyncError::InvalidRequestContent(err.msg))
3524                }
3525                "InvalidRuntimeException" => {
3526                    return RusotoError::Service(InvokeAsyncError::InvalidRuntime(err.msg))
3527                }
3528                "ResourceConflictException" => {
3529                    return RusotoError::Service(InvokeAsyncError::ResourceConflict(err.msg))
3530                }
3531                "ResourceNotFoundException" => {
3532                    return RusotoError::Service(InvokeAsyncError::ResourceNotFound(err.msg))
3533                }
3534                "ServiceException" => {
3535                    return RusotoError::Service(InvokeAsyncError::Service(err.msg))
3536                }
3537                "ValidationException" => return RusotoError::Validation(err.msg),
3538                _ => {}
3539            }
3540        }
3541        RusotoError::Unknown(res)
3542    }
3543}
3544impl fmt::Display for InvokeAsyncError {
3545    #[allow(unused_variables)]
3546    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3547        match *self {
3548            InvokeAsyncError::InvalidRequestContent(ref cause) => write!(f, "{}", cause),
3549            InvokeAsyncError::InvalidRuntime(ref cause) => write!(f, "{}", cause),
3550            InvokeAsyncError::ResourceConflict(ref cause) => write!(f, "{}", cause),
3551            InvokeAsyncError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3552            InvokeAsyncError::Service(ref cause) => write!(f, "{}", cause),
3553        }
3554    }
3555}
3556impl Error for InvokeAsyncError {}
3557/// Errors returned by ListAliases
3558#[derive(Debug, PartialEq)]
3559pub enum ListAliasesError {
3560    /// <p>One of the parameters in the request is invalid.</p>
3561    InvalidParameterValue(String),
3562    /// <p>The resource specified in the request does not exist.</p>
3563    ResourceNotFound(String),
3564    /// <p>The AWS Lambda service encountered an internal error.</p>
3565    Service(String),
3566    /// <p>The request throughput limit was exceeded.</p>
3567    TooManyRequests(String),
3568}
3569
3570impl ListAliasesError {
3571    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAliasesError> {
3572        if let Some(err) = proto::json::Error::parse_rest(&res) {
3573            match err.typ.as_str() {
3574                "InvalidParameterValueException" => {
3575                    return RusotoError::Service(ListAliasesError::InvalidParameterValue(err.msg))
3576                }
3577                "ResourceNotFoundException" => {
3578                    return RusotoError::Service(ListAliasesError::ResourceNotFound(err.msg))
3579                }
3580                "ServiceException" => {
3581                    return RusotoError::Service(ListAliasesError::Service(err.msg))
3582                }
3583                "TooManyRequestsException" => {
3584                    return RusotoError::Service(ListAliasesError::TooManyRequests(err.msg))
3585                }
3586                "ValidationException" => return RusotoError::Validation(err.msg),
3587                _ => {}
3588            }
3589        }
3590        RusotoError::Unknown(res)
3591    }
3592}
3593impl fmt::Display for ListAliasesError {
3594    #[allow(unused_variables)]
3595    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3596        match *self {
3597            ListAliasesError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3598            ListAliasesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3599            ListAliasesError::Service(ref cause) => write!(f, "{}", cause),
3600            ListAliasesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3601        }
3602    }
3603}
3604impl Error for ListAliasesError {}
3605/// Errors returned by ListEventSourceMappings
3606#[derive(Debug, PartialEq)]
3607pub enum ListEventSourceMappingsError {
3608    /// <p>One of the parameters in the request is invalid.</p>
3609    InvalidParameterValue(String),
3610    /// <p>The resource specified in the request does not exist.</p>
3611    ResourceNotFound(String),
3612    /// <p>The AWS Lambda service encountered an internal error.</p>
3613    Service(String),
3614    /// <p>The request throughput limit was exceeded.</p>
3615    TooManyRequests(String),
3616}
3617
3618impl ListEventSourceMappingsError {
3619    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListEventSourceMappingsError> {
3620        if let Some(err) = proto::json::Error::parse_rest(&res) {
3621            match err.typ.as_str() {
3622                "InvalidParameterValueException" => {
3623                    return RusotoError::Service(
3624                        ListEventSourceMappingsError::InvalidParameterValue(err.msg),
3625                    )
3626                }
3627                "ResourceNotFoundException" => {
3628                    return RusotoError::Service(ListEventSourceMappingsError::ResourceNotFound(
3629                        err.msg,
3630                    ))
3631                }
3632                "ServiceException" => {
3633                    return RusotoError::Service(ListEventSourceMappingsError::Service(err.msg))
3634                }
3635                "TooManyRequestsException" => {
3636                    return RusotoError::Service(ListEventSourceMappingsError::TooManyRequests(
3637                        err.msg,
3638                    ))
3639                }
3640                "ValidationException" => return RusotoError::Validation(err.msg),
3641                _ => {}
3642            }
3643        }
3644        RusotoError::Unknown(res)
3645    }
3646}
3647impl fmt::Display for ListEventSourceMappingsError {
3648    #[allow(unused_variables)]
3649    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3650        match *self {
3651            ListEventSourceMappingsError::InvalidParameterValue(ref cause) => {
3652                write!(f, "{}", cause)
3653            }
3654            ListEventSourceMappingsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3655            ListEventSourceMappingsError::Service(ref cause) => write!(f, "{}", cause),
3656            ListEventSourceMappingsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3657        }
3658    }
3659}
3660impl Error for ListEventSourceMappingsError {}
3661/// Errors returned by ListFunctionEventInvokeConfigs
3662#[derive(Debug, PartialEq)]
3663pub enum ListFunctionEventInvokeConfigsError {
3664    /// <p>One of the parameters in the request is invalid.</p>
3665    InvalidParameterValue(String),
3666    /// <p>The resource specified in the request does not exist.</p>
3667    ResourceNotFound(String),
3668    /// <p>The AWS Lambda service encountered an internal error.</p>
3669    Service(String),
3670    /// <p>The request throughput limit was exceeded.</p>
3671    TooManyRequests(String),
3672}
3673
3674impl ListFunctionEventInvokeConfigsError {
3675    pub fn from_response(
3676        res: BufferedHttpResponse,
3677    ) -> RusotoError<ListFunctionEventInvokeConfigsError> {
3678        if let Some(err) = proto::json::Error::parse_rest(&res) {
3679            match err.typ.as_str() {
3680                "InvalidParameterValueException" => {
3681                    return RusotoError::Service(
3682                        ListFunctionEventInvokeConfigsError::InvalidParameterValue(err.msg),
3683                    )
3684                }
3685                "ResourceNotFoundException" => {
3686                    return RusotoError::Service(
3687                        ListFunctionEventInvokeConfigsError::ResourceNotFound(err.msg),
3688                    )
3689                }
3690                "ServiceException" => {
3691                    return RusotoError::Service(ListFunctionEventInvokeConfigsError::Service(
3692                        err.msg,
3693                    ))
3694                }
3695                "TooManyRequestsException" => {
3696                    return RusotoError::Service(
3697                        ListFunctionEventInvokeConfigsError::TooManyRequests(err.msg),
3698                    )
3699                }
3700                "ValidationException" => return RusotoError::Validation(err.msg),
3701                _ => {}
3702            }
3703        }
3704        RusotoError::Unknown(res)
3705    }
3706}
3707impl fmt::Display for ListFunctionEventInvokeConfigsError {
3708    #[allow(unused_variables)]
3709    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3710        match *self {
3711            ListFunctionEventInvokeConfigsError::InvalidParameterValue(ref cause) => {
3712                write!(f, "{}", cause)
3713            }
3714            ListFunctionEventInvokeConfigsError::ResourceNotFound(ref cause) => {
3715                write!(f, "{}", cause)
3716            }
3717            ListFunctionEventInvokeConfigsError::Service(ref cause) => write!(f, "{}", cause),
3718            ListFunctionEventInvokeConfigsError::TooManyRequests(ref cause) => {
3719                write!(f, "{}", cause)
3720            }
3721        }
3722    }
3723}
3724impl Error for ListFunctionEventInvokeConfigsError {}
3725/// Errors returned by ListFunctions
3726#[derive(Debug, PartialEq)]
3727pub enum ListFunctionsError {
3728    /// <p>One of the parameters in the request is invalid.</p>
3729    InvalidParameterValue(String),
3730    /// <p>The AWS Lambda service encountered an internal error.</p>
3731    Service(String),
3732    /// <p>The request throughput limit was exceeded.</p>
3733    TooManyRequests(String),
3734}
3735
3736impl ListFunctionsError {
3737    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFunctionsError> {
3738        if let Some(err) = proto::json::Error::parse_rest(&res) {
3739            match err.typ.as_str() {
3740                "InvalidParameterValueException" => {
3741                    return RusotoError::Service(ListFunctionsError::InvalidParameterValue(err.msg))
3742                }
3743                "ServiceException" => {
3744                    return RusotoError::Service(ListFunctionsError::Service(err.msg))
3745                }
3746                "TooManyRequestsException" => {
3747                    return RusotoError::Service(ListFunctionsError::TooManyRequests(err.msg))
3748                }
3749                "ValidationException" => return RusotoError::Validation(err.msg),
3750                _ => {}
3751            }
3752        }
3753        RusotoError::Unknown(res)
3754    }
3755}
3756impl fmt::Display for ListFunctionsError {
3757    #[allow(unused_variables)]
3758    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3759        match *self {
3760            ListFunctionsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3761            ListFunctionsError::Service(ref cause) => write!(f, "{}", cause),
3762            ListFunctionsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3763        }
3764    }
3765}
3766impl Error for ListFunctionsError {}
3767/// Errors returned by ListLayerVersions
3768#[derive(Debug, PartialEq)]
3769pub enum ListLayerVersionsError {
3770    /// <p>One of the parameters in the request is invalid.</p>
3771    InvalidParameterValue(String),
3772    /// <p>The resource specified in the request does not exist.</p>
3773    ResourceNotFound(String),
3774    /// <p>The AWS Lambda service encountered an internal error.</p>
3775    Service(String),
3776    /// <p>The request throughput limit was exceeded.</p>
3777    TooManyRequests(String),
3778}
3779
3780impl ListLayerVersionsError {
3781    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLayerVersionsError> {
3782        if let Some(err) = proto::json::Error::parse_rest(&res) {
3783            match err.typ.as_str() {
3784                "InvalidParameterValueException" => {
3785                    return RusotoError::Service(ListLayerVersionsError::InvalidParameterValue(
3786                        err.msg,
3787                    ))
3788                }
3789                "ResourceNotFoundException" => {
3790                    return RusotoError::Service(ListLayerVersionsError::ResourceNotFound(err.msg))
3791                }
3792                "ServiceException" => {
3793                    return RusotoError::Service(ListLayerVersionsError::Service(err.msg))
3794                }
3795                "TooManyRequestsException" => {
3796                    return RusotoError::Service(ListLayerVersionsError::TooManyRequests(err.msg))
3797                }
3798                "ValidationException" => return RusotoError::Validation(err.msg),
3799                _ => {}
3800            }
3801        }
3802        RusotoError::Unknown(res)
3803    }
3804}
3805impl fmt::Display for ListLayerVersionsError {
3806    #[allow(unused_variables)]
3807    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3808        match *self {
3809            ListLayerVersionsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3810            ListLayerVersionsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3811            ListLayerVersionsError::Service(ref cause) => write!(f, "{}", cause),
3812            ListLayerVersionsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3813        }
3814    }
3815}
3816impl Error for ListLayerVersionsError {}
3817/// Errors returned by ListLayers
3818#[derive(Debug, PartialEq)]
3819pub enum ListLayersError {
3820    /// <p>One of the parameters in the request is invalid.</p>
3821    InvalidParameterValue(String),
3822    /// <p>The AWS Lambda service encountered an internal error.</p>
3823    Service(String),
3824    /// <p>The request throughput limit was exceeded.</p>
3825    TooManyRequests(String),
3826}
3827
3828impl ListLayersError {
3829    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLayersError> {
3830        if let Some(err) = proto::json::Error::parse_rest(&res) {
3831            match err.typ.as_str() {
3832                "InvalidParameterValueException" => {
3833                    return RusotoError::Service(ListLayersError::InvalidParameterValue(err.msg))
3834                }
3835                "ServiceException" => {
3836                    return RusotoError::Service(ListLayersError::Service(err.msg))
3837                }
3838                "TooManyRequestsException" => {
3839                    return RusotoError::Service(ListLayersError::TooManyRequests(err.msg))
3840                }
3841                "ValidationException" => return RusotoError::Validation(err.msg),
3842                _ => {}
3843            }
3844        }
3845        RusotoError::Unknown(res)
3846    }
3847}
3848impl fmt::Display for ListLayersError {
3849    #[allow(unused_variables)]
3850    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3851        match *self {
3852            ListLayersError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3853            ListLayersError::Service(ref cause) => write!(f, "{}", cause),
3854            ListLayersError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3855        }
3856    }
3857}
3858impl Error for ListLayersError {}
3859/// Errors returned by ListProvisionedConcurrencyConfigs
3860#[derive(Debug, PartialEq)]
3861pub enum ListProvisionedConcurrencyConfigsError {
3862    /// <p>One of the parameters in the request is invalid.</p>
3863    InvalidParameterValue(String),
3864    /// <p>The resource specified in the request does not exist.</p>
3865    ResourceNotFound(String),
3866    /// <p>The AWS Lambda service encountered an internal error.</p>
3867    Service(String),
3868    /// <p>The request throughput limit was exceeded.</p>
3869    TooManyRequests(String),
3870}
3871
3872impl ListProvisionedConcurrencyConfigsError {
3873    pub fn from_response(
3874        res: BufferedHttpResponse,
3875    ) -> RusotoError<ListProvisionedConcurrencyConfigsError> {
3876        if let Some(err) = proto::json::Error::parse_rest(&res) {
3877            match err.typ.as_str() {
3878                "InvalidParameterValueException" => {
3879                    return RusotoError::Service(
3880                        ListProvisionedConcurrencyConfigsError::InvalidParameterValue(err.msg),
3881                    )
3882                }
3883                "ResourceNotFoundException" => {
3884                    return RusotoError::Service(
3885                        ListProvisionedConcurrencyConfigsError::ResourceNotFound(err.msg),
3886                    )
3887                }
3888                "ServiceException" => {
3889                    return RusotoError::Service(ListProvisionedConcurrencyConfigsError::Service(
3890                        err.msg,
3891                    ))
3892                }
3893                "TooManyRequestsException" => {
3894                    return RusotoError::Service(
3895                        ListProvisionedConcurrencyConfigsError::TooManyRequests(err.msg),
3896                    )
3897                }
3898                "ValidationException" => return RusotoError::Validation(err.msg),
3899                _ => {}
3900            }
3901        }
3902        RusotoError::Unknown(res)
3903    }
3904}
3905impl fmt::Display for ListProvisionedConcurrencyConfigsError {
3906    #[allow(unused_variables)]
3907    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3908        match *self {
3909            ListProvisionedConcurrencyConfigsError::InvalidParameterValue(ref cause) => {
3910                write!(f, "{}", cause)
3911            }
3912            ListProvisionedConcurrencyConfigsError::ResourceNotFound(ref cause) => {
3913                write!(f, "{}", cause)
3914            }
3915            ListProvisionedConcurrencyConfigsError::Service(ref cause) => write!(f, "{}", cause),
3916            ListProvisionedConcurrencyConfigsError::TooManyRequests(ref cause) => {
3917                write!(f, "{}", cause)
3918            }
3919        }
3920    }
3921}
3922impl Error for ListProvisionedConcurrencyConfigsError {}
3923/// Errors returned by ListTags
3924#[derive(Debug, PartialEq)]
3925pub enum ListTagsError {
3926    /// <p>One of the parameters in the request is invalid.</p>
3927    InvalidParameterValue(String),
3928    /// <p>The resource specified in the request does not exist.</p>
3929    ResourceNotFound(String),
3930    /// <p>The AWS Lambda service encountered an internal error.</p>
3931    Service(String),
3932    /// <p>The request throughput limit was exceeded.</p>
3933    TooManyRequests(String),
3934}
3935
3936impl ListTagsError {
3937    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsError> {
3938        if let Some(err) = proto::json::Error::parse_rest(&res) {
3939            match err.typ.as_str() {
3940                "InvalidParameterValueException" => {
3941                    return RusotoError::Service(ListTagsError::InvalidParameterValue(err.msg))
3942                }
3943                "ResourceNotFoundException" => {
3944                    return RusotoError::Service(ListTagsError::ResourceNotFound(err.msg))
3945                }
3946                "ServiceException" => return RusotoError::Service(ListTagsError::Service(err.msg)),
3947                "TooManyRequestsException" => {
3948                    return RusotoError::Service(ListTagsError::TooManyRequests(err.msg))
3949                }
3950                "ValidationException" => return RusotoError::Validation(err.msg),
3951                _ => {}
3952            }
3953        }
3954        RusotoError::Unknown(res)
3955    }
3956}
3957impl fmt::Display for ListTagsError {
3958    #[allow(unused_variables)]
3959    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3960        match *self {
3961            ListTagsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3962            ListTagsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3963            ListTagsError::Service(ref cause) => write!(f, "{}", cause),
3964            ListTagsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
3965        }
3966    }
3967}
3968impl Error for ListTagsError {}
3969/// Errors returned by ListVersionsByFunction
3970#[derive(Debug, PartialEq)]
3971pub enum ListVersionsByFunctionError {
3972    /// <p>One of the parameters in the request is invalid.</p>
3973    InvalidParameterValue(String),
3974    /// <p>The resource specified in the request does not exist.</p>
3975    ResourceNotFound(String),
3976    /// <p>The AWS Lambda service encountered an internal error.</p>
3977    Service(String),
3978    /// <p>The request throughput limit was exceeded.</p>
3979    TooManyRequests(String),
3980}
3981
3982impl ListVersionsByFunctionError {
3983    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVersionsByFunctionError> {
3984        if let Some(err) = proto::json::Error::parse_rest(&res) {
3985            match err.typ.as_str() {
3986                "InvalidParameterValueException" => {
3987                    return RusotoError::Service(
3988                        ListVersionsByFunctionError::InvalidParameterValue(err.msg),
3989                    )
3990                }
3991                "ResourceNotFoundException" => {
3992                    return RusotoError::Service(ListVersionsByFunctionError::ResourceNotFound(
3993                        err.msg,
3994                    ))
3995                }
3996                "ServiceException" => {
3997                    return RusotoError::Service(ListVersionsByFunctionError::Service(err.msg))
3998                }
3999                "TooManyRequestsException" => {
4000                    return RusotoError::Service(ListVersionsByFunctionError::TooManyRequests(
4001                        err.msg,
4002                    ))
4003                }
4004                "ValidationException" => return RusotoError::Validation(err.msg),
4005                _ => {}
4006            }
4007        }
4008        RusotoError::Unknown(res)
4009    }
4010}
4011impl fmt::Display for ListVersionsByFunctionError {
4012    #[allow(unused_variables)]
4013    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4014        match *self {
4015            ListVersionsByFunctionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4016            ListVersionsByFunctionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4017            ListVersionsByFunctionError::Service(ref cause) => write!(f, "{}", cause),
4018            ListVersionsByFunctionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4019        }
4020    }
4021}
4022impl Error for ListVersionsByFunctionError {}
4023/// Errors returned by PublishLayerVersion
4024#[derive(Debug, PartialEq)]
4025pub enum PublishLayerVersionError {
4026    /// <p>You have exceeded your maximum total code size per account. <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">Learn more</a> </p>
4027    CodeStorageExceeded(String),
4028    /// <p>One of the parameters in the request is invalid.</p>
4029    InvalidParameterValue(String),
4030    /// <p>The resource specified in the request does not exist.</p>
4031    ResourceNotFound(String),
4032    /// <p>The AWS Lambda service encountered an internal error.</p>
4033    Service(String),
4034    /// <p>The request throughput limit was exceeded.</p>
4035    TooManyRequests(String),
4036}
4037
4038impl PublishLayerVersionError {
4039    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PublishLayerVersionError> {
4040        if let Some(err) = proto::json::Error::parse_rest(&res) {
4041            match err.typ.as_str() {
4042                "CodeStorageExceededException" => {
4043                    return RusotoError::Service(PublishLayerVersionError::CodeStorageExceeded(
4044                        err.msg,
4045                    ))
4046                }
4047                "InvalidParameterValueException" => {
4048                    return RusotoError::Service(PublishLayerVersionError::InvalidParameterValue(
4049                        err.msg,
4050                    ))
4051                }
4052                "ResourceNotFoundException" => {
4053                    return RusotoError::Service(PublishLayerVersionError::ResourceNotFound(
4054                        err.msg,
4055                    ))
4056                }
4057                "ServiceException" => {
4058                    return RusotoError::Service(PublishLayerVersionError::Service(err.msg))
4059                }
4060                "TooManyRequestsException" => {
4061                    return RusotoError::Service(PublishLayerVersionError::TooManyRequests(err.msg))
4062                }
4063                "ValidationException" => return RusotoError::Validation(err.msg),
4064                _ => {}
4065            }
4066        }
4067        RusotoError::Unknown(res)
4068    }
4069}
4070impl fmt::Display for PublishLayerVersionError {
4071    #[allow(unused_variables)]
4072    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4073        match *self {
4074            PublishLayerVersionError::CodeStorageExceeded(ref cause) => write!(f, "{}", cause),
4075            PublishLayerVersionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4076            PublishLayerVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4077            PublishLayerVersionError::Service(ref cause) => write!(f, "{}", cause),
4078            PublishLayerVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4079        }
4080    }
4081}
4082impl Error for PublishLayerVersionError {}
4083/// Errors returned by PublishVersion
4084#[derive(Debug, PartialEq)]
4085pub enum PublishVersionError {
4086    /// <p>You have exceeded your maximum total code size per account. <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">Learn more</a> </p>
4087    CodeStorageExceeded(String),
4088    /// <p>One of the parameters in the request is invalid.</p>
4089    InvalidParameterValue(String),
4090    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the <code>GetFunction</code> or the <code>GetAlias</code> API to retrieve the latest RevisionId for your resource.</p>
4091    PreconditionFailed(String),
4092    /// <p>The resource already exists, or another operation is in progress.</p>
4093    ResourceConflict(String),
4094    /// <p>The resource specified in the request does not exist.</p>
4095    ResourceNotFound(String),
4096    /// <p>The AWS Lambda service encountered an internal error.</p>
4097    Service(String),
4098    /// <p>The request throughput limit was exceeded.</p>
4099    TooManyRequests(String),
4100}
4101
4102impl PublishVersionError {
4103    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PublishVersionError> {
4104        if let Some(err) = proto::json::Error::parse_rest(&res) {
4105            match err.typ.as_str() {
4106                "CodeStorageExceededException" => {
4107                    return RusotoError::Service(PublishVersionError::CodeStorageExceeded(err.msg))
4108                }
4109                "InvalidParameterValueException" => {
4110                    return RusotoError::Service(PublishVersionError::InvalidParameterValue(
4111                        err.msg,
4112                    ))
4113                }
4114                "PreconditionFailedException" => {
4115                    return RusotoError::Service(PublishVersionError::PreconditionFailed(err.msg))
4116                }
4117                "ResourceConflictException" => {
4118                    return RusotoError::Service(PublishVersionError::ResourceConflict(err.msg))
4119                }
4120                "ResourceNotFoundException" => {
4121                    return RusotoError::Service(PublishVersionError::ResourceNotFound(err.msg))
4122                }
4123                "ServiceException" => {
4124                    return RusotoError::Service(PublishVersionError::Service(err.msg))
4125                }
4126                "TooManyRequestsException" => {
4127                    return RusotoError::Service(PublishVersionError::TooManyRequests(err.msg))
4128                }
4129                "ValidationException" => return RusotoError::Validation(err.msg),
4130                _ => {}
4131            }
4132        }
4133        RusotoError::Unknown(res)
4134    }
4135}
4136impl fmt::Display for PublishVersionError {
4137    #[allow(unused_variables)]
4138    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4139        match *self {
4140            PublishVersionError::CodeStorageExceeded(ref cause) => write!(f, "{}", cause),
4141            PublishVersionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4142            PublishVersionError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
4143            PublishVersionError::ResourceConflict(ref cause) => write!(f, "{}", cause),
4144            PublishVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4145            PublishVersionError::Service(ref cause) => write!(f, "{}", cause),
4146            PublishVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4147        }
4148    }
4149}
4150impl Error for PublishVersionError {}
4151/// Errors returned by PutFunctionConcurrency
4152#[derive(Debug, PartialEq)]
4153pub enum PutFunctionConcurrencyError {
4154    /// <p>One of the parameters in the request is invalid.</p>
4155    InvalidParameterValue(String),
4156    /// <p>The resource already exists, or another operation is in progress.</p>
4157    ResourceConflict(String),
4158    /// <p>The resource specified in the request does not exist.</p>
4159    ResourceNotFound(String),
4160    /// <p>The AWS Lambda service encountered an internal error.</p>
4161    Service(String),
4162    /// <p>The request throughput limit was exceeded.</p>
4163    TooManyRequests(String),
4164}
4165
4166impl PutFunctionConcurrencyError {
4167    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutFunctionConcurrencyError> {
4168        if let Some(err) = proto::json::Error::parse_rest(&res) {
4169            match err.typ.as_str() {
4170                "InvalidParameterValueException" => {
4171                    return RusotoError::Service(
4172                        PutFunctionConcurrencyError::InvalidParameterValue(err.msg),
4173                    )
4174                }
4175                "ResourceConflictException" => {
4176                    return RusotoError::Service(PutFunctionConcurrencyError::ResourceConflict(
4177                        err.msg,
4178                    ))
4179                }
4180                "ResourceNotFoundException" => {
4181                    return RusotoError::Service(PutFunctionConcurrencyError::ResourceNotFound(
4182                        err.msg,
4183                    ))
4184                }
4185                "ServiceException" => {
4186                    return RusotoError::Service(PutFunctionConcurrencyError::Service(err.msg))
4187                }
4188                "TooManyRequestsException" => {
4189                    return RusotoError::Service(PutFunctionConcurrencyError::TooManyRequests(
4190                        err.msg,
4191                    ))
4192                }
4193                "ValidationException" => return RusotoError::Validation(err.msg),
4194                _ => {}
4195            }
4196        }
4197        RusotoError::Unknown(res)
4198    }
4199}
4200impl fmt::Display for PutFunctionConcurrencyError {
4201    #[allow(unused_variables)]
4202    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4203        match *self {
4204            PutFunctionConcurrencyError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4205            PutFunctionConcurrencyError::ResourceConflict(ref cause) => write!(f, "{}", cause),
4206            PutFunctionConcurrencyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4207            PutFunctionConcurrencyError::Service(ref cause) => write!(f, "{}", cause),
4208            PutFunctionConcurrencyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4209        }
4210    }
4211}
4212impl Error for PutFunctionConcurrencyError {}
4213/// Errors returned by PutFunctionEventInvokeConfig
4214#[derive(Debug, PartialEq)]
4215pub enum PutFunctionEventInvokeConfigError {
4216    /// <p>One of the parameters in the request is invalid.</p>
4217    InvalidParameterValue(String),
4218    /// <p>The resource specified in the request does not exist.</p>
4219    ResourceNotFound(String),
4220    /// <p>The AWS Lambda service encountered an internal error.</p>
4221    Service(String),
4222    /// <p>The request throughput limit was exceeded.</p>
4223    TooManyRequests(String),
4224}
4225
4226impl PutFunctionEventInvokeConfigError {
4227    pub fn from_response(
4228        res: BufferedHttpResponse,
4229    ) -> RusotoError<PutFunctionEventInvokeConfigError> {
4230        if let Some(err) = proto::json::Error::parse_rest(&res) {
4231            match err.typ.as_str() {
4232                "InvalidParameterValueException" => {
4233                    return RusotoError::Service(
4234                        PutFunctionEventInvokeConfigError::InvalidParameterValue(err.msg),
4235                    )
4236                }
4237                "ResourceNotFoundException" => {
4238                    return RusotoError::Service(
4239                        PutFunctionEventInvokeConfigError::ResourceNotFound(err.msg),
4240                    )
4241                }
4242                "ServiceException" => {
4243                    return RusotoError::Service(PutFunctionEventInvokeConfigError::Service(
4244                        err.msg,
4245                    ))
4246                }
4247                "TooManyRequestsException" => {
4248                    return RusotoError::Service(
4249                        PutFunctionEventInvokeConfigError::TooManyRequests(err.msg),
4250                    )
4251                }
4252                "ValidationException" => return RusotoError::Validation(err.msg),
4253                _ => {}
4254            }
4255        }
4256        RusotoError::Unknown(res)
4257    }
4258}
4259impl fmt::Display for PutFunctionEventInvokeConfigError {
4260    #[allow(unused_variables)]
4261    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4262        match *self {
4263            PutFunctionEventInvokeConfigError::InvalidParameterValue(ref cause) => {
4264                write!(f, "{}", cause)
4265            }
4266            PutFunctionEventInvokeConfigError::ResourceNotFound(ref cause) => {
4267                write!(f, "{}", cause)
4268            }
4269            PutFunctionEventInvokeConfigError::Service(ref cause) => write!(f, "{}", cause),
4270            PutFunctionEventInvokeConfigError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4271        }
4272    }
4273}
4274impl Error for PutFunctionEventInvokeConfigError {}
4275/// Errors returned by PutProvisionedConcurrencyConfig
4276#[derive(Debug, PartialEq)]
4277pub enum PutProvisionedConcurrencyConfigError {
4278    /// <p>One of the parameters in the request is invalid.</p>
4279    InvalidParameterValue(String),
4280    /// <p>The resource already exists, or another operation is in progress.</p>
4281    ResourceConflict(String),
4282    /// <p>The resource specified in the request does not exist.</p>
4283    ResourceNotFound(String),
4284    /// <p>The AWS Lambda service encountered an internal error.</p>
4285    Service(String),
4286    /// <p>The request throughput limit was exceeded.</p>
4287    TooManyRequests(String),
4288}
4289
4290impl PutProvisionedConcurrencyConfigError {
4291    pub fn from_response(
4292        res: BufferedHttpResponse,
4293    ) -> RusotoError<PutProvisionedConcurrencyConfigError> {
4294        if let Some(err) = proto::json::Error::parse_rest(&res) {
4295            match err.typ.as_str() {
4296                "InvalidParameterValueException" => {
4297                    return RusotoError::Service(
4298                        PutProvisionedConcurrencyConfigError::InvalidParameterValue(err.msg),
4299                    )
4300                }
4301                "ResourceConflictException" => {
4302                    return RusotoError::Service(
4303                        PutProvisionedConcurrencyConfigError::ResourceConflict(err.msg),
4304                    )
4305                }
4306                "ResourceNotFoundException" => {
4307                    return RusotoError::Service(
4308                        PutProvisionedConcurrencyConfigError::ResourceNotFound(err.msg),
4309                    )
4310                }
4311                "ServiceException" => {
4312                    return RusotoError::Service(PutProvisionedConcurrencyConfigError::Service(
4313                        err.msg,
4314                    ))
4315                }
4316                "TooManyRequestsException" => {
4317                    return RusotoError::Service(
4318                        PutProvisionedConcurrencyConfigError::TooManyRequests(err.msg),
4319                    )
4320                }
4321                "ValidationException" => return RusotoError::Validation(err.msg),
4322                _ => {}
4323            }
4324        }
4325        RusotoError::Unknown(res)
4326    }
4327}
4328impl fmt::Display for PutProvisionedConcurrencyConfigError {
4329    #[allow(unused_variables)]
4330    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4331        match *self {
4332            PutProvisionedConcurrencyConfigError::InvalidParameterValue(ref cause) => {
4333                write!(f, "{}", cause)
4334            }
4335            PutProvisionedConcurrencyConfigError::ResourceConflict(ref cause) => {
4336                write!(f, "{}", cause)
4337            }
4338            PutProvisionedConcurrencyConfigError::ResourceNotFound(ref cause) => {
4339                write!(f, "{}", cause)
4340            }
4341            PutProvisionedConcurrencyConfigError::Service(ref cause) => write!(f, "{}", cause),
4342            PutProvisionedConcurrencyConfigError::TooManyRequests(ref cause) => {
4343                write!(f, "{}", cause)
4344            }
4345        }
4346    }
4347}
4348impl Error for PutProvisionedConcurrencyConfigError {}
4349/// Errors returned by RemoveLayerVersionPermission
4350#[derive(Debug, PartialEq)]
4351pub enum RemoveLayerVersionPermissionError {
4352    /// <p>One of the parameters in the request is invalid.</p>
4353    InvalidParameterValue(String),
4354    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the <code>GetFunction</code> or the <code>GetAlias</code> API to retrieve the latest RevisionId for your resource.</p>
4355    PreconditionFailed(String),
4356    /// <p>The resource specified in the request does not exist.</p>
4357    ResourceNotFound(String),
4358    /// <p>The AWS Lambda service encountered an internal error.</p>
4359    Service(String),
4360    /// <p>The request throughput limit was exceeded.</p>
4361    TooManyRequests(String),
4362}
4363
4364impl RemoveLayerVersionPermissionError {
4365    pub fn from_response(
4366        res: BufferedHttpResponse,
4367    ) -> RusotoError<RemoveLayerVersionPermissionError> {
4368        if let Some(err) = proto::json::Error::parse_rest(&res) {
4369            match err.typ.as_str() {
4370                "InvalidParameterValueException" => {
4371                    return RusotoError::Service(
4372                        RemoveLayerVersionPermissionError::InvalidParameterValue(err.msg),
4373                    )
4374                }
4375                "PreconditionFailedException" => {
4376                    return RusotoError::Service(
4377                        RemoveLayerVersionPermissionError::PreconditionFailed(err.msg),
4378                    )
4379                }
4380                "ResourceNotFoundException" => {
4381                    return RusotoError::Service(
4382                        RemoveLayerVersionPermissionError::ResourceNotFound(err.msg),
4383                    )
4384                }
4385                "ServiceException" => {
4386                    return RusotoError::Service(RemoveLayerVersionPermissionError::Service(
4387                        err.msg,
4388                    ))
4389                }
4390                "TooManyRequestsException" => {
4391                    return RusotoError::Service(
4392                        RemoveLayerVersionPermissionError::TooManyRequests(err.msg),
4393                    )
4394                }
4395                "ValidationException" => return RusotoError::Validation(err.msg),
4396                _ => {}
4397            }
4398        }
4399        RusotoError::Unknown(res)
4400    }
4401}
4402impl fmt::Display for RemoveLayerVersionPermissionError {
4403    #[allow(unused_variables)]
4404    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4405        match *self {
4406            RemoveLayerVersionPermissionError::InvalidParameterValue(ref cause) => {
4407                write!(f, "{}", cause)
4408            }
4409            RemoveLayerVersionPermissionError::PreconditionFailed(ref cause) => {
4410                write!(f, "{}", cause)
4411            }
4412            RemoveLayerVersionPermissionError::ResourceNotFound(ref cause) => {
4413                write!(f, "{}", cause)
4414            }
4415            RemoveLayerVersionPermissionError::Service(ref cause) => write!(f, "{}", cause),
4416            RemoveLayerVersionPermissionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4417        }
4418    }
4419}
4420impl Error for RemoveLayerVersionPermissionError {}
4421/// Errors returned by RemovePermission
4422#[derive(Debug, PartialEq)]
4423pub enum RemovePermissionError {
4424    /// <p>One of the parameters in the request is invalid.</p>
4425    InvalidParameterValue(String),
4426    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the <code>GetFunction</code> or the <code>GetAlias</code> API to retrieve the latest RevisionId for your resource.</p>
4427    PreconditionFailed(String),
4428    /// <p>The resource specified in the request does not exist.</p>
4429    ResourceNotFound(String),
4430    /// <p>The AWS Lambda service encountered an internal error.</p>
4431    Service(String),
4432    /// <p>The request throughput limit was exceeded.</p>
4433    TooManyRequests(String),
4434}
4435
4436impl RemovePermissionError {
4437    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemovePermissionError> {
4438        if let Some(err) = proto::json::Error::parse_rest(&res) {
4439            match err.typ.as_str() {
4440                "InvalidParameterValueException" => {
4441                    return RusotoError::Service(RemovePermissionError::InvalidParameterValue(
4442                        err.msg,
4443                    ))
4444                }
4445                "PreconditionFailedException" => {
4446                    return RusotoError::Service(RemovePermissionError::PreconditionFailed(err.msg))
4447                }
4448                "ResourceNotFoundException" => {
4449                    return RusotoError::Service(RemovePermissionError::ResourceNotFound(err.msg))
4450                }
4451                "ServiceException" => {
4452                    return RusotoError::Service(RemovePermissionError::Service(err.msg))
4453                }
4454                "TooManyRequestsException" => {
4455                    return RusotoError::Service(RemovePermissionError::TooManyRequests(err.msg))
4456                }
4457                "ValidationException" => return RusotoError::Validation(err.msg),
4458                _ => {}
4459            }
4460        }
4461        RusotoError::Unknown(res)
4462    }
4463}
4464impl fmt::Display for RemovePermissionError {
4465    #[allow(unused_variables)]
4466    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4467        match *self {
4468            RemovePermissionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4469            RemovePermissionError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
4470            RemovePermissionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4471            RemovePermissionError::Service(ref cause) => write!(f, "{}", cause),
4472            RemovePermissionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4473        }
4474    }
4475}
4476impl Error for RemovePermissionError {}
4477/// Errors returned by TagResource
4478#[derive(Debug, PartialEq)]
4479pub enum TagResourceError {
4480    /// <p>One of the parameters in the request is invalid.</p>
4481    InvalidParameterValue(String),
4482    /// <p>The resource already exists, or another operation is in progress.</p>
4483    ResourceConflict(String),
4484    /// <p>The resource specified in the request does not exist.</p>
4485    ResourceNotFound(String),
4486    /// <p>The AWS Lambda service encountered an internal error.</p>
4487    Service(String),
4488    /// <p>The request throughput limit was exceeded.</p>
4489    TooManyRequests(String),
4490}
4491
4492impl TagResourceError {
4493    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
4494        if let Some(err) = proto::json::Error::parse_rest(&res) {
4495            match err.typ.as_str() {
4496                "InvalidParameterValueException" => {
4497                    return RusotoError::Service(TagResourceError::InvalidParameterValue(err.msg))
4498                }
4499                "ResourceConflictException" => {
4500                    return RusotoError::Service(TagResourceError::ResourceConflict(err.msg))
4501                }
4502                "ResourceNotFoundException" => {
4503                    return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
4504                }
4505                "ServiceException" => {
4506                    return RusotoError::Service(TagResourceError::Service(err.msg))
4507                }
4508                "TooManyRequestsException" => {
4509                    return RusotoError::Service(TagResourceError::TooManyRequests(err.msg))
4510                }
4511                "ValidationException" => return RusotoError::Validation(err.msg),
4512                _ => {}
4513            }
4514        }
4515        RusotoError::Unknown(res)
4516    }
4517}
4518impl fmt::Display for TagResourceError {
4519    #[allow(unused_variables)]
4520    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4521        match *self {
4522            TagResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4523            TagResourceError::ResourceConflict(ref cause) => write!(f, "{}", cause),
4524            TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4525            TagResourceError::Service(ref cause) => write!(f, "{}", cause),
4526            TagResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4527        }
4528    }
4529}
4530impl Error for TagResourceError {}
4531/// Errors returned by UntagResource
4532#[derive(Debug, PartialEq)]
4533pub enum UntagResourceError {
4534    /// <p>One of the parameters in the request is invalid.</p>
4535    InvalidParameterValue(String),
4536    /// <p>The resource already exists, or another operation is in progress.</p>
4537    ResourceConflict(String),
4538    /// <p>The resource specified in the request does not exist.</p>
4539    ResourceNotFound(String),
4540    /// <p>The AWS Lambda service encountered an internal error.</p>
4541    Service(String),
4542    /// <p>The request throughput limit was exceeded.</p>
4543    TooManyRequests(String),
4544}
4545
4546impl UntagResourceError {
4547    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
4548        if let Some(err) = proto::json::Error::parse_rest(&res) {
4549            match err.typ.as_str() {
4550                "InvalidParameterValueException" => {
4551                    return RusotoError::Service(UntagResourceError::InvalidParameterValue(err.msg))
4552                }
4553                "ResourceConflictException" => {
4554                    return RusotoError::Service(UntagResourceError::ResourceConflict(err.msg))
4555                }
4556                "ResourceNotFoundException" => {
4557                    return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
4558                }
4559                "ServiceException" => {
4560                    return RusotoError::Service(UntagResourceError::Service(err.msg))
4561                }
4562                "TooManyRequestsException" => {
4563                    return RusotoError::Service(UntagResourceError::TooManyRequests(err.msg))
4564                }
4565                "ValidationException" => return RusotoError::Validation(err.msg),
4566                _ => {}
4567            }
4568        }
4569        RusotoError::Unknown(res)
4570    }
4571}
4572impl fmt::Display for UntagResourceError {
4573    #[allow(unused_variables)]
4574    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4575        match *self {
4576            UntagResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4577            UntagResourceError::ResourceConflict(ref cause) => write!(f, "{}", cause),
4578            UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4579            UntagResourceError::Service(ref cause) => write!(f, "{}", cause),
4580            UntagResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4581        }
4582    }
4583}
4584impl Error for UntagResourceError {}
4585/// Errors returned by UpdateAlias
4586#[derive(Debug, PartialEq)]
4587pub enum UpdateAliasError {
4588    /// <p>One of the parameters in the request is invalid.</p>
4589    InvalidParameterValue(String),
4590    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the <code>GetFunction</code> or the <code>GetAlias</code> API to retrieve the latest RevisionId for your resource.</p>
4591    PreconditionFailed(String),
4592    /// <p>The resource already exists, or another operation is in progress.</p>
4593    ResourceConflict(String),
4594    /// <p>The resource specified in the request does not exist.</p>
4595    ResourceNotFound(String),
4596    /// <p>The AWS Lambda service encountered an internal error.</p>
4597    Service(String),
4598    /// <p>The request throughput limit was exceeded.</p>
4599    TooManyRequests(String),
4600}
4601
4602impl UpdateAliasError {
4603    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAliasError> {
4604        if let Some(err) = proto::json::Error::parse_rest(&res) {
4605            match err.typ.as_str() {
4606                "InvalidParameterValueException" => {
4607                    return RusotoError::Service(UpdateAliasError::InvalidParameterValue(err.msg))
4608                }
4609                "PreconditionFailedException" => {
4610                    return RusotoError::Service(UpdateAliasError::PreconditionFailed(err.msg))
4611                }
4612                "ResourceConflictException" => {
4613                    return RusotoError::Service(UpdateAliasError::ResourceConflict(err.msg))
4614                }
4615                "ResourceNotFoundException" => {
4616                    return RusotoError::Service(UpdateAliasError::ResourceNotFound(err.msg))
4617                }
4618                "ServiceException" => {
4619                    return RusotoError::Service(UpdateAliasError::Service(err.msg))
4620                }
4621                "TooManyRequestsException" => {
4622                    return RusotoError::Service(UpdateAliasError::TooManyRequests(err.msg))
4623                }
4624                "ValidationException" => return RusotoError::Validation(err.msg),
4625                _ => {}
4626            }
4627        }
4628        RusotoError::Unknown(res)
4629    }
4630}
4631impl fmt::Display for UpdateAliasError {
4632    #[allow(unused_variables)]
4633    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4634        match *self {
4635            UpdateAliasError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4636            UpdateAliasError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
4637            UpdateAliasError::ResourceConflict(ref cause) => write!(f, "{}", cause),
4638            UpdateAliasError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4639            UpdateAliasError::Service(ref cause) => write!(f, "{}", cause),
4640            UpdateAliasError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4641        }
4642    }
4643}
4644impl Error for UpdateAliasError {}
4645/// Errors returned by UpdateEventSourceMapping
4646#[derive(Debug, PartialEq)]
4647pub enum UpdateEventSourceMappingError {
4648    /// <p>One of the parameters in the request is invalid.</p>
4649    InvalidParameterValue(String),
4650    /// <p>The resource already exists, or another operation is in progress.</p>
4651    ResourceConflict(String),
4652    /// <p>The operation conflicts with the resource's availability. For example, you attempted to update an EventSource Mapping in CREATING, or tried to delete a EventSource mapping currently in the UPDATING state.</p>
4653    ResourceInUse(String),
4654    /// <p>The resource specified in the request does not exist.</p>
4655    ResourceNotFound(String),
4656    /// <p>The AWS Lambda service encountered an internal error.</p>
4657    Service(String),
4658    /// <p>The request throughput limit was exceeded.</p>
4659    TooManyRequests(String),
4660}
4661
4662impl UpdateEventSourceMappingError {
4663    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateEventSourceMappingError> {
4664        if let Some(err) = proto::json::Error::parse_rest(&res) {
4665            match err.typ.as_str() {
4666                "InvalidParameterValueException" => {
4667                    return RusotoError::Service(
4668                        UpdateEventSourceMappingError::InvalidParameterValue(err.msg),
4669                    )
4670                }
4671                "ResourceConflictException" => {
4672                    return RusotoError::Service(UpdateEventSourceMappingError::ResourceConflict(
4673                        err.msg,
4674                    ))
4675                }
4676                "ResourceInUseException" => {
4677                    return RusotoError::Service(UpdateEventSourceMappingError::ResourceInUse(
4678                        err.msg,
4679                    ))
4680                }
4681                "ResourceNotFoundException" => {
4682                    return RusotoError::Service(UpdateEventSourceMappingError::ResourceNotFound(
4683                        err.msg,
4684                    ))
4685                }
4686                "ServiceException" => {
4687                    return RusotoError::Service(UpdateEventSourceMappingError::Service(err.msg))
4688                }
4689                "TooManyRequestsException" => {
4690                    return RusotoError::Service(UpdateEventSourceMappingError::TooManyRequests(
4691                        err.msg,
4692                    ))
4693                }
4694                "ValidationException" => return RusotoError::Validation(err.msg),
4695                _ => {}
4696            }
4697        }
4698        RusotoError::Unknown(res)
4699    }
4700}
4701impl fmt::Display for UpdateEventSourceMappingError {
4702    #[allow(unused_variables)]
4703    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4704        match *self {
4705            UpdateEventSourceMappingError::InvalidParameterValue(ref cause) => {
4706                write!(f, "{}", cause)
4707            }
4708            UpdateEventSourceMappingError::ResourceConflict(ref cause) => write!(f, "{}", cause),
4709            UpdateEventSourceMappingError::ResourceInUse(ref cause) => write!(f, "{}", cause),
4710            UpdateEventSourceMappingError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4711            UpdateEventSourceMappingError::Service(ref cause) => write!(f, "{}", cause),
4712            UpdateEventSourceMappingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4713        }
4714    }
4715}
4716impl Error for UpdateEventSourceMappingError {}
4717/// Errors returned by UpdateFunctionCode
4718#[derive(Debug, PartialEq)]
4719pub enum UpdateFunctionCodeError {
4720    /// <p>You have exceeded your maximum total code size per account. <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">Learn more</a> </p>
4721    CodeStorageExceeded(String),
4722    /// <p>One of the parameters in the request is invalid.</p>
4723    InvalidParameterValue(String),
4724    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the <code>GetFunction</code> or the <code>GetAlias</code> API to retrieve the latest RevisionId for your resource.</p>
4725    PreconditionFailed(String),
4726    /// <p>The resource already exists, or another operation is in progress.</p>
4727    ResourceConflict(String),
4728    /// <p>The resource specified in the request does not exist.</p>
4729    ResourceNotFound(String),
4730    /// <p>The AWS Lambda service encountered an internal error.</p>
4731    Service(String),
4732    /// <p>The request throughput limit was exceeded.</p>
4733    TooManyRequests(String),
4734}
4735
4736impl UpdateFunctionCodeError {
4737    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFunctionCodeError> {
4738        if let Some(err) = proto::json::Error::parse_rest(&res) {
4739            match err.typ.as_str() {
4740                "CodeStorageExceededException" => {
4741                    return RusotoError::Service(UpdateFunctionCodeError::CodeStorageExceeded(
4742                        err.msg,
4743                    ))
4744                }
4745                "InvalidParameterValueException" => {
4746                    return RusotoError::Service(UpdateFunctionCodeError::InvalidParameterValue(
4747                        err.msg,
4748                    ))
4749                }
4750                "PreconditionFailedException" => {
4751                    return RusotoError::Service(UpdateFunctionCodeError::PreconditionFailed(
4752                        err.msg,
4753                    ))
4754                }
4755                "ResourceConflictException" => {
4756                    return RusotoError::Service(UpdateFunctionCodeError::ResourceConflict(err.msg))
4757                }
4758                "ResourceNotFoundException" => {
4759                    return RusotoError::Service(UpdateFunctionCodeError::ResourceNotFound(err.msg))
4760                }
4761                "ServiceException" => {
4762                    return RusotoError::Service(UpdateFunctionCodeError::Service(err.msg))
4763                }
4764                "TooManyRequestsException" => {
4765                    return RusotoError::Service(UpdateFunctionCodeError::TooManyRequests(err.msg))
4766                }
4767                "ValidationException" => return RusotoError::Validation(err.msg),
4768                _ => {}
4769            }
4770        }
4771        RusotoError::Unknown(res)
4772    }
4773}
4774impl fmt::Display for UpdateFunctionCodeError {
4775    #[allow(unused_variables)]
4776    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4777        match *self {
4778            UpdateFunctionCodeError::CodeStorageExceeded(ref cause) => write!(f, "{}", cause),
4779            UpdateFunctionCodeError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4780            UpdateFunctionCodeError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
4781            UpdateFunctionCodeError::ResourceConflict(ref cause) => write!(f, "{}", cause),
4782            UpdateFunctionCodeError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4783            UpdateFunctionCodeError::Service(ref cause) => write!(f, "{}", cause),
4784            UpdateFunctionCodeError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4785        }
4786    }
4787}
4788impl Error for UpdateFunctionCodeError {}
4789/// Errors returned by UpdateFunctionConfiguration
4790#[derive(Debug, PartialEq)]
4791pub enum UpdateFunctionConfigurationError {
4792    /// <p>One of the parameters in the request is invalid.</p>
4793    InvalidParameterValue(String),
4794    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the <code>GetFunction</code> or the <code>GetAlias</code> API to retrieve the latest RevisionId for your resource.</p>
4795    PreconditionFailed(String),
4796    /// <p>The resource already exists, or another operation is in progress.</p>
4797    ResourceConflict(String),
4798    /// <p>The resource specified in the request does not exist.</p>
4799    ResourceNotFound(String),
4800    /// <p>The AWS Lambda service encountered an internal error.</p>
4801    Service(String),
4802    /// <p>The request throughput limit was exceeded.</p>
4803    TooManyRequests(String),
4804}
4805
4806impl UpdateFunctionConfigurationError {
4807    pub fn from_response(
4808        res: BufferedHttpResponse,
4809    ) -> RusotoError<UpdateFunctionConfigurationError> {
4810        if let Some(err) = proto::json::Error::parse_rest(&res) {
4811            match err.typ.as_str() {
4812                "InvalidParameterValueException" => {
4813                    return RusotoError::Service(
4814                        UpdateFunctionConfigurationError::InvalidParameterValue(err.msg),
4815                    )
4816                }
4817                "PreconditionFailedException" => {
4818                    return RusotoError::Service(
4819                        UpdateFunctionConfigurationError::PreconditionFailed(err.msg),
4820                    )
4821                }
4822                "ResourceConflictException" => {
4823                    return RusotoError::Service(
4824                        UpdateFunctionConfigurationError::ResourceConflict(err.msg),
4825                    )
4826                }
4827                "ResourceNotFoundException" => {
4828                    return RusotoError::Service(
4829                        UpdateFunctionConfigurationError::ResourceNotFound(err.msg),
4830                    )
4831                }
4832                "ServiceException" => {
4833                    return RusotoError::Service(UpdateFunctionConfigurationError::Service(err.msg))
4834                }
4835                "TooManyRequestsException" => {
4836                    return RusotoError::Service(UpdateFunctionConfigurationError::TooManyRequests(
4837                        err.msg,
4838                    ))
4839                }
4840                "ValidationException" => return RusotoError::Validation(err.msg),
4841                _ => {}
4842            }
4843        }
4844        RusotoError::Unknown(res)
4845    }
4846}
4847impl fmt::Display for UpdateFunctionConfigurationError {
4848    #[allow(unused_variables)]
4849    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4850        match *self {
4851            UpdateFunctionConfigurationError::InvalidParameterValue(ref cause) => {
4852                write!(f, "{}", cause)
4853            }
4854            UpdateFunctionConfigurationError::PreconditionFailed(ref cause) => {
4855                write!(f, "{}", cause)
4856            }
4857            UpdateFunctionConfigurationError::ResourceConflict(ref cause) => write!(f, "{}", cause),
4858            UpdateFunctionConfigurationError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4859            UpdateFunctionConfigurationError::Service(ref cause) => write!(f, "{}", cause),
4860            UpdateFunctionConfigurationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
4861        }
4862    }
4863}
4864impl Error for UpdateFunctionConfigurationError {}
4865/// Errors returned by UpdateFunctionEventInvokeConfig
4866#[derive(Debug, PartialEq)]
4867pub enum UpdateFunctionEventInvokeConfigError {
4868    /// <p>One of the parameters in the request is invalid.</p>
4869    InvalidParameterValue(String),
4870    /// <p>The resource specified in the request does not exist.</p>
4871    ResourceNotFound(String),
4872    /// <p>The AWS Lambda service encountered an internal error.</p>
4873    Service(String),
4874    /// <p>The request throughput limit was exceeded.</p>
4875    TooManyRequests(String),
4876}
4877
4878impl UpdateFunctionEventInvokeConfigError {
4879    pub fn from_response(
4880        res: BufferedHttpResponse,
4881    ) -> RusotoError<UpdateFunctionEventInvokeConfigError> {
4882        if let Some(err) = proto::json::Error::parse_rest(&res) {
4883            match err.typ.as_str() {
4884                "InvalidParameterValueException" => {
4885                    return RusotoError::Service(
4886                        UpdateFunctionEventInvokeConfigError::InvalidParameterValue(err.msg),
4887                    )
4888                }
4889                "ResourceNotFoundException" => {
4890                    return RusotoError::Service(
4891                        UpdateFunctionEventInvokeConfigError::ResourceNotFound(err.msg),
4892                    )
4893                }
4894                "ServiceException" => {
4895                    return RusotoError::Service(UpdateFunctionEventInvokeConfigError::Service(
4896                        err.msg,
4897                    ))
4898                }
4899                "TooManyRequestsException" => {
4900                    return RusotoError::Service(
4901                        UpdateFunctionEventInvokeConfigError::TooManyRequests(err.msg),
4902                    )
4903                }
4904                "ValidationException" => return RusotoError::Validation(err.msg),
4905                _ => {}
4906            }
4907        }
4908        RusotoError::Unknown(res)
4909    }
4910}
4911impl fmt::Display for UpdateFunctionEventInvokeConfigError {
4912    #[allow(unused_variables)]
4913    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4914        match *self {
4915            UpdateFunctionEventInvokeConfigError::InvalidParameterValue(ref cause) => {
4916                write!(f, "{}", cause)
4917            }
4918            UpdateFunctionEventInvokeConfigError::ResourceNotFound(ref cause) => {
4919                write!(f, "{}", cause)
4920            }
4921            UpdateFunctionEventInvokeConfigError::Service(ref cause) => write!(f, "{}", cause),
4922            UpdateFunctionEventInvokeConfigError::TooManyRequests(ref cause) => {
4923                write!(f, "{}", cause)
4924            }
4925        }
4926    }
4927}
4928impl Error for UpdateFunctionEventInvokeConfigError {}
4929/// Trait representing the capabilities of the AWS Lambda API. AWS Lambda clients implement this trait.
4930#[async_trait]
4931pub trait Lambda {
4932    /// <p>Adds permissions to the resource-based policy of a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.</p> <p>To revoke permission, call <a>RemoveLayerVersionPermission</a> with the statement ID that you specified when you added it.</p>
4933    async fn add_layer_version_permission(
4934        &self,
4935        input: AddLayerVersionPermissionRequest,
4936    ) -> Result<AddLayerVersionPermissionResponse, RusotoError<AddLayerVersionPermissionError>>;
4937
4938    /// <p>Grants an AWS service or another account permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.</p> <p>To grant permission to another account, specify the account ID as the <code>Principal</code>. For AWS services, the principal is a domain-style identifier defined by the service, like <code>s3.amazonaws.com</code> or <code>sns.amazonaws.com</code>. For AWS services, you can also specify the ARN of the associated resource as the <code>SourceArn</code>. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.</p> <p>This action adds a statement to a resource-based permissions policy for the function. For more information about function policies, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">Lambda Function Policies</a>. </p>
4939    async fn add_permission(
4940        &self,
4941        input: AddPermissionRequest,
4942    ) -> Result<AddPermissionResponse, RusotoError<AddPermissionError>>;
4943
4944    /// <p>Creates an <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a> for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.</p> <p>You can also map an alias to split invocation requests between two versions. Use the <code>RoutingConfig</code> parameter to specify a second version and the percentage of invocation requests that it receives.</p>
4945    async fn create_alias(
4946        &self,
4947        input: CreateAliasRequest,
4948    ) -> Result<AliasConfiguration, RusotoError<CreateAliasError>>;
4949
4950    /// <p><p>Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.</p> <p>For details about each event source type, see the following topics.</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html">Using AWS Lambda with Amazon DynamoDB</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html">Using AWS Lambda with Amazon Kinesis</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html">Using AWS Lambda with Amazon SQS</a> </p> </li> </ul> <p>The following error handling options are only available for stream sources (DynamoDB and Kinesis):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age.</p> </li> <li> <p> <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries.</p> </li> <li> <p> <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p> </li> </ul></p>
4951    async fn create_event_source_mapping(
4952        &self,
4953        input: CreateEventSourceMappingRequest,
4954    ) -> Result<EventSourceMappingConfiguration, RusotoError<CreateEventSourceMappingError>>;
4955
4956    /// <p>Creates a Lambda function. To create a function, you need a <a href="https://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html">deployment package</a> and an <a href="https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role">execution role</a>. The deployment package contains your function code. The execution role grants the function permission to use AWS services, such as Amazon CloudWatch Logs for log streaming and AWS X-Ray for request tracing.</p> <p>When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a> indicate when the function is ready to invoke. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Function States</a>.</p> <p>A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the <code>Publish</code> parameter to create version <code>1</code> of your function from its initial configuration.</p> <p>The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with <a>UpdateFunctionConfiguration</a>. Function-level settings apply to both the unpublished and published versions of the function, and include tags (<a>TagResource</a>) and per-function concurrency limits (<a>PutFunctionConcurrency</a>).</p> <p>If another account or an AWS service invokes your function, use <a>AddPermission</a> to grant permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version, or on an alias.</p> <p>To invoke your function directly, use <a>Invoke</a>. To invoke your function in response to events in other AWS services, create an event source mapping (<a>CreateEventSourceMapping</a>), or configure a function trigger in the other service. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html">Invoking Functions</a>.</p>
4957    async fn create_function(
4958        &self,
4959        input: CreateFunctionRequest,
4960    ) -> Result<FunctionConfiguration, RusotoError<CreateFunctionError>>;
4961
4962    /// <p>Deletes a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
4963    async fn delete_alias(
4964        &self,
4965        input: DeleteAliasRequest,
4966    ) -> Result<(), RusotoError<DeleteAliasError>>;
4967
4968    /// <p>Deletes an <a href="https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html">event source mapping</a>. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p> <p>When you delete an event source mapping, it enters a <code>Deleting</code> state and might not be completely deleted for several seconds.</p>
4969    async fn delete_event_source_mapping(
4970        &self,
4971        input: DeleteEventSourceMappingRequest,
4972    ) -> Result<EventSourceMappingConfiguration, RusotoError<DeleteEventSourceMappingError>>;
4973
4974    /// <p>Deletes a Lambda function. To delete a specific function version, use the <code>Qualifier</code> parameter. Otherwise, all versions and aliases are deleted.</p> <p>To delete Lambda event source mappings that invoke a function, use <a>DeleteEventSourceMapping</a>. For AWS services and resources that invoke your function directly, delete the trigger in the service where you originally configured it.</p>
4975    async fn delete_function(
4976        &self,
4977        input: DeleteFunctionRequest,
4978    ) -> Result<(), RusotoError<DeleteFunctionError>>;
4979
4980    /// <p>Removes a concurrent execution limit from a function.</p>
4981    async fn delete_function_concurrency(
4982        &self,
4983        input: DeleteFunctionConcurrencyRequest,
4984    ) -> Result<(), RusotoError<DeleteFunctionConcurrencyError>>;
4985
4986    /// <p>Deletes the configuration for asynchronous invocation for a function, version, or alias.</p> <p>To configure options for asynchronous invocation, use <a>PutFunctionEventInvokeConfig</a>.</p>
4987    async fn delete_function_event_invoke_config(
4988        &self,
4989        input: DeleteFunctionEventInvokeConfigRequest,
4990    ) -> Result<(), RusotoError<DeleteFunctionEventInvokeConfigError>>;
4991
4992    /// <p>Deletes a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. Deleted versions can no longer be viewed or added to functions. To avoid breaking functions, a copy of the version remains in Lambda until no functions refer to it.</p>
4993    async fn delete_layer_version(
4994        &self,
4995        input: DeleteLayerVersionRequest,
4996    ) -> Result<(), RusotoError<DeleteLayerVersionError>>;
4997
4998    /// <p>Deletes the provisioned concurrency configuration for a function.</p>
4999    async fn delete_provisioned_concurrency_config(
5000        &self,
5001        input: DeleteProvisionedConcurrencyConfigRequest,
5002    ) -> Result<(), RusotoError<DeleteProvisionedConcurrencyConfigError>>;
5003
5004    /// <p>Retrieves details about your account's <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">limits</a> and usage in an AWS Region.</p>
5005    async fn get_account_settings(
5006        &self,
5007    ) -> Result<GetAccountSettingsResponse, RusotoError<GetAccountSettingsError>>;
5008
5009    /// <p>Returns details about a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
5010    async fn get_alias(
5011        &self,
5012        input: GetAliasRequest,
5013    ) -> Result<AliasConfiguration, RusotoError<GetAliasError>>;
5014
5015    /// <p>Returns details about an event source mapping. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p>
5016    async fn get_event_source_mapping(
5017        &self,
5018        input: GetEventSourceMappingRequest,
5019    ) -> Result<EventSourceMappingConfiguration, RusotoError<GetEventSourceMappingError>>;
5020
5021    /// <p>Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.</p>
5022    async fn get_function(
5023        &self,
5024        input: GetFunctionRequest,
5025    ) -> Result<GetFunctionResponse, RusotoError<GetFunctionError>>;
5026
5027    /// <p>Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use <a>PutFunctionConcurrency</a>.</p>
5028    async fn get_function_concurrency(
5029        &self,
5030        input: GetFunctionConcurrencyRequest,
5031    ) -> Result<GetFunctionConcurrencyResponse, RusotoError<GetFunctionConcurrencyError>>;
5032
5033    /// <p>Returns the version-specific settings of a Lambda function or version. The output includes only options that can vary between versions of a function. To modify these settings, use <a>UpdateFunctionConfiguration</a>.</p> <p>To get all of a function's details, including function-level settings, use <a>GetFunction</a>.</p>
5034    async fn get_function_configuration(
5035        &self,
5036        input: GetFunctionConfigurationRequest,
5037    ) -> Result<FunctionConfiguration, RusotoError<GetFunctionConfigurationError>>;
5038
5039    /// <p>Retrieves the configuration for asynchronous invocation for a function, version, or alias.</p> <p>To configure options for asynchronous invocation, use <a>PutFunctionEventInvokeConfig</a>.</p>
5040    async fn get_function_event_invoke_config(
5041        &self,
5042        input: GetFunctionEventInvokeConfigRequest,
5043    ) -> Result<FunctionEventInvokeConfig, RusotoError<GetFunctionEventInvokeConfigError>>;
5044
5045    /// <p>Returns information about a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>, with a link to download the layer archive that's valid for 10 minutes.</p>
5046    async fn get_layer_version(
5047        &self,
5048        input: GetLayerVersionRequest,
5049    ) -> Result<GetLayerVersionResponse, RusotoError<GetLayerVersionError>>;
5050
5051    /// <p>Returns information about a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>, with a link to download the layer archive that's valid for 10 minutes.</p>
5052    async fn get_layer_version_by_arn(
5053        &self,
5054        input: GetLayerVersionByArnRequest,
5055    ) -> Result<GetLayerVersionResponse, RusotoError<GetLayerVersionByArnError>>;
5056
5057    /// <p>Returns the permission policy for a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. For more information, see <a>AddLayerVersionPermission</a>.</p>
5058    async fn get_layer_version_policy(
5059        &self,
5060        input: GetLayerVersionPolicyRequest,
5061    ) -> Result<GetLayerVersionPolicyResponse, RusotoError<GetLayerVersionPolicyError>>;
5062
5063    /// <p>Returns the <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">resource-based IAM policy</a> for a function, version, or alias.</p>
5064    async fn get_policy(
5065        &self,
5066        input: GetPolicyRequest,
5067    ) -> Result<GetPolicyResponse, RusotoError<GetPolicyError>>;
5068
5069    /// <p>Retrieves the provisioned concurrency configuration for a function's alias or version.</p>
5070    async fn get_provisioned_concurrency_config(
5071        &self,
5072        input: GetProvisionedConcurrencyConfigRequest,
5073    ) -> Result<
5074        GetProvisionedConcurrencyConfigResponse,
5075        RusotoError<GetProvisionedConcurrencyConfigError>,
5076    >;
5077
5078    /// <p>Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set <code>InvocationType</code> to <code>Event</code>.</p> <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html">synchronous invocation</a>, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html">execution log</a> and <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html">trace</a>.</p> <p>When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html">Retry Behavior</a>.</p> <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html">asynchronous invocation</a>, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple times, even if no error occurs. To retain events that were not processed, configure your function with a <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq">dead-letter queue</a>.</p> <p>The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">limit errors</a>, or issues with your function's code and configuration. For example, Lambda returns <code>TooManyRequestsException</code> if executing the function would cause you to exceed a concurrency limit at either the account level (<code>ConcurrentInvocationLimitExceeded</code>) or function level (<code>ReservedFunctionConcurrentInvocationLimitExceeded</code>).</p> <p>For functions with a long timeout, your client might be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.</p> <p>This operation requires permission for the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html">lambda:InvokeFunction</a> action.</p>
5079    async fn invoke(
5080        &self,
5081        input: InvocationRequest,
5082    ) -> Result<InvocationResponse, RusotoError<InvokeError>>;
5083
5084    /// <p><important> <p>For asynchronous function invocation, use <a>Invoke</a>.</p> </important> <p>Invokes a function asynchronously.</p></p>
5085    async fn invoke_async(
5086        &self,
5087        input: InvokeAsyncRequest,
5088    ) -> Result<InvokeAsyncResponse, RusotoError<InvokeAsyncError>>;
5089
5090    /// <p>Returns a list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">aliases</a> for a Lambda function.</p>
5091    async fn list_aliases(
5092        &self,
5093        input: ListAliasesRequest,
5094    ) -> Result<ListAliasesResponse, RusotoError<ListAliasesError>>;
5095
5096    /// <p>Lists event source mappings. Specify an <code>EventSourceArn</code> to only show event source mappings for a single event source.</p>
5097    async fn list_event_source_mappings(
5098        &self,
5099        input: ListEventSourceMappingsRequest,
5100    ) -> Result<ListEventSourceMappingsResponse, RusotoError<ListEventSourceMappingsError>>;
5101
5102    /// <p>Retrieves a list of configurations for asynchronous invocation for a function.</p> <p>To configure options for asynchronous invocation, use <a>PutFunctionEventInvokeConfig</a>.</p>
5103    async fn list_function_event_invoke_configs(
5104        &self,
5105        input: ListFunctionEventInvokeConfigsRequest,
5106    ) -> Result<
5107        ListFunctionEventInvokeConfigsResponse,
5108        RusotoError<ListFunctionEventInvokeConfigsError>,
5109    >;
5110
5111    /// <p>Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.</p> <p>Set <code>FunctionVersion</code> to <code>ALL</code> to include all published versions of each function in addition to the unpublished version. To get more information about a function or version, use <a>GetFunction</a>.</p>
5112    async fn list_functions(
5113        &self,
5114        input: ListFunctionsRequest,
5115    ) -> Result<ListFunctionsResponse, RusotoError<ListFunctionsError>>;
5116
5117    /// <p>Lists the versions of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. Versions that have been deleted aren't listed. Specify a <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">runtime identifier</a> to list only versions that indicate that they're compatible with that runtime.</p>
5118    async fn list_layer_versions(
5119        &self,
5120        input: ListLayerVersionsRequest,
5121    ) -> Result<ListLayerVersionsResponse, RusotoError<ListLayerVersionsError>>;
5122
5123    /// <p>Lists <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layers</a> and shows information about the latest version of each. Specify a <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">runtime identifier</a> to list only layers that indicate that they're compatible with that runtime.</p>
5124    async fn list_layers(
5125        &self,
5126        input: ListLayersRequest,
5127    ) -> Result<ListLayersResponse, RusotoError<ListLayersError>>;
5128
5129    /// <p>Retrieves a list of provisioned concurrency configurations for a function.</p>
5130    async fn list_provisioned_concurrency_configs(
5131        &self,
5132        input: ListProvisionedConcurrencyConfigsRequest,
5133    ) -> Result<
5134        ListProvisionedConcurrencyConfigsResponse,
5135        RusotoError<ListProvisionedConcurrencyConfigsError>,
5136    >;
5137
5138    /// <p>Returns a function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a>. You can also view tags with <a>GetFunction</a>.</p>
5139    async fn list_tags(
5140        &self,
5141        input: ListTagsRequest,
5142    ) -> Result<ListTagsResponse, RusotoError<ListTagsError>>;
5143
5144    /// <p>Returns a list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">versions</a>, with the version-specific configuration of each. Lambda returns up to 50 versions per call.</p>
5145    async fn list_versions_by_function(
5146        &self,
5147        input: ListVersionsByFunctionRequest,
5148    ) -> Result<ListVersionsByFunctionResponse, RusotoError<ListVersionsByFunctionError>>;
5149
5150    /// <p>Creates an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a> from a ZIP archive. Each time you call <code>PublishLayerVersion</code> with the same layer name, a new version is created.</p> <p>Add layers to your function with <a>CreateFunction</a> or <a>UpdateFunctionConfiguration</a>.</p>
5151    async fn publish_layer_version(
5152        &self,
5153        input: PublishLayerVersionRequest,
5154    ) -> Result<PublishLayerVersionResponse, RusotoError<PublishLayerVersionError>>;
5155
5156    /// <p>Creates a <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">version</a> from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change.</p> <p>AWS Lambda doesn't publish a version if the function's configuration and code haven't changed since the last version. Use <a>UpdateFunctionCode</a> or <a>UpdateFunctionConfiguration</a> to update the function before publishing a version.</p> <p>Clients can invoke versions directly or with an alias. To create an alias, use <a>CreateAlias</a>.</p>
5157    async fn publish_version(
5158        &self,
5159        input: PublishVersionRequest,
5160    ) -> Result<FunctionConfiguration, RusotoError<PublishVersionError>>;
5161
5162    /// <p>Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency level.</p> <p>Concurrency settings apply to the function as a whole, including all published versions and the unpublished version. Reserving concurrency both ensures that your function has capacity to process the specified number of events simultaneously, and prevents it from scaling beyond that level. Use <a>GetFunction</a> to see the current setting for a function.</p> <p>Use <a>GetAccountSettings</a> to see your Regional concurrency limit. You can reserve concurrency for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that aren't configured with a per-function limit. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html">Managing Concurrency</a>.</p>
5163    async fn put_function_concurrency(
5164        &self,
5165        input: PutFunctionConcurrencyRequest,
5166    ) -> Result<Concurrency, RusotoError<PutFunctionConcurrencyError>>;
5167
5168    /// <p>Configures options for <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html">asynchronous invocation</a> on a function, version, or alias. If a configuration already exists for a function, version, or alias, this operation overwrites it. If you exclude any settings, they are removed. To set one option without affecting existing settings for other options, use <a>UpdateFunctionEventInvokeConfig</a>.</p> <p>By default, Lambda retries an asynchronous invocation twice if the function returns an error. It retains events in a queue for up to six hours. When an event fails all processing attempts or stays in the asynchronous invocation queue for too long, Lambda discards it. To retain discarded events, configure a dead-letter queue with <a>UpdateFunctionConfiguration</a>.</p> <p>To send an invocation record to a queue, topic, function, or event bus, specify a <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations">destination</a>. You can configure separate destinations for successful invocations (on-success) and events that fail all processing attempts (on-failure). You can configure destinations in addition to or instead of a dead-letter queue.</p>
5169    async fn put_function_event_invoke_config(
5170        &self,
5171        input: PutFunctionEventInvokeConfigRequest,
5172    ) -> Result<FunctionEventInvokeConfig, RusotoError<PutFunctionEventInvokeConfigError>>;
5173
5174    /// <p>Adds a provisioned concurrency configuration to a function's alias or version.</p>
5175    async fn put_provisioned_concurrency_config(
5176        &self,
5177        input: PutProvisionedConcurrencyConfigRequest,
5178    ) -> Result<
5179        PutProvisionedConcurrencyConfigResponse,
5180        RusotoError<PutProvisionedConcurrencyConfigError>,
5181    >;
5182
5183    /// <p>Removes a statement from the permissions policy for a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. For more information, see <a>AddLayerVersionPermission</a>.</p>
5184    async fn remove_layer_version_permission(
5185        &self,
5186        input: RemoveLayerVersionPermissionRequest,
5187    ) -> Result<(), RusotoError<RemoveLayerVersionPermissionError>>;
5188
5189    /// <p>Revokes function-use permission from an AWS service or another account. You can get the ID of the statement from the output of <a>GetPolicy</a>.</p>
5190    async fn remove_permission(
5191        &self,
5192        input: RemovePermissionRequest,
5193    ) -> Result<(), RusotoError<RemovePermissionError>>;
5194
5195    /// <p>Adds <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to a function.</p>
5196    async fn tag_resource(
5197        &self,
5198        input: TagResourceRequest,
5199    ) -> Result<(), RusotoError<TagResourceError>>;
5200
5201    /// <p>Removes <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> from a function.</p>
5202    async fn untag_resource(
5203        &self,
5204        input: UntagResourceRequest,
5205    ) -> Result<(), RusotoError<UntagResourceError>>;
5206
5207    /// <p>Updates the configuration of a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
5208    async fn update_alias(
5209        &self,
5210        input: UpdateAliasRequest,
5211    ) -> Result<AliasConfiguration, RusotoError<UpdateAliasError>>;
5212
5213    /// <p><p>Updates an event source mapping. You can change the function that AWS Lambda invokes, or pause invocation and resume later from the same location.</p> <p>The following error handling options are only available for stream sources (DynamoDB and Kinesis):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age.</p> </li> <li> <p> <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries.</p> </li> <li> <p> <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p> </li> </ul></p>
5214    async fn update_event_source_mapping(
5215        &self,
5216        input: UpdateEventSourceMappingRequest,
5217    ) -> Result<EventSourceMappingConfiguration, RusotoError<UpdateEventSourceMappingError>>;
5218
5219    /// <p>Updates a Lambda function's code.</p> <p>The function's code is locked when you publish a version. You can't modify the code of a published version, only the unpublished version.</p>
5220    async fn update_function_code(
5221        &self,
5222        input: UpdateFunctionCodeRequest,
5223    ) -> Result<FunctionConfiguration, RusotoError<UpdateFunctionCodeError>>;
5224
5225    /// <p>Modify the version-specific settings of a Lambda function.</p> <p>When you update a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute. During this time, you can't modify the function, but you can still invoke it. The <code>LastUpdateStatus</code>, <code>LastUpdateStatusReason</code>, and <code>LastUpdateStatusReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a> indicate when the update is complete and the function is processing events with the new configuration. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Function States</a>.</p> <p>These settings can vary between versions of a function and are locked when you publish a version. You can't modify the configuration of a published version, only the unpublished version.</p> <p>To configure function concurrency, use <a>PutFunctionConcurrency</a>. To grant invoke permissions to an account or AWS service, use <a>AddPermission</a>.</p>
5226    async fn update_function_configuration(
5227        &self,
5228        input: UpdateFunctionConfigurationRequest,
5229    ) -> Result<FunctionConfiguration, RusotoError<UpdateFunctionConfigurationError>>;
5230
5231    /// <p>Updates the configuration for asynchronous invocation for a function, version, or alias.</p> <p>To configure options for asynchronous invocation, use <a>PutFunctionEventInvokeConfig</a>.</p>
5232    async fn update_function_event_invoke_config(
5233        &self,
5234        input: UpdateFunctionEventInvokeConfigRequest,
5235    ) -> Result<FunctionEventInvokeConfig, RusotoError<UpdateFunctionEventInvokeConfigError>>;
5236}
5237/// A client for the AWS Lambda API.
5238#[derive(Clone)]
5239pub struct LambdaClient {
5240    client: Client,
5241    region: region::Region,
5242}
5243
5244impl LambdaClient {
5245    /// Creates a client backed by the default tokio event loop.
5246    ///
5247    /// The client will use the default credentials provider and tls client.
5248    pub fn new(region: region::Region) -> LambdaClient {
5249        LambdaClient {
5250            client: Client::shared(),
5251            region,
5252        }
5253    }
5254
5255    pub fn new_with<P, D>(
5256        request_dispatcher: D,
5257        credentials_provider: P,
5258        region: region::Region,
5259    ) -> LambdaClient
5260    where
5261        P: ProvideAwsCredentials + Send + Sync + 'static,
5262        D: DispatchSignedRequest + Send + Sync + 'static,
5263    {
5264        LambdaClient {
5265            client: Client::new_with(credentials_provider, request_dispatcher),
5266            region,
5267        }
5268    }
5269
5270    pub fn new_with_client(client: Client, region: region::Region) -> LambdaClient {
5271        LambdaClient { client, region }
5272    }
5273}
5274
5275#[async_trait]
5276impl Lambda for LambdaClient {
5277    /// <p>Adds permissions to the resource-based policy of a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.</p> <p>To revoke permission, call <a>RemoveLayerVersionPermission</a> with the statement ID that you specified when you added it.</p>
5278    #[allow(unused_mut)]
5279    async fn add_layer_version_permission(
5280        &self,
5281        input: AddLayerVersionPermissionRequest,
5282    ) -> Result<AddLayerVersionPermissionResponse, RusotoError<AddLayerVersionPermissionError>>
5283    {
5284        let request_uri = format!(
5285            "/2018-10-31/layers/{layer_name}/versions/{version_number}/policy",
5286            layer_name = input.layer_name,
5287            version_number = input.version_number
5288        );
5289
5290        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
5291        request.set_content_type("application/x-amz-json-1.1".to_owned());
5292
5293        let encoded = Some(serde_json::to_vec(&input).unwrap());
5294        request.set_payload(encoded);
5295
5296        let mut params = Params::new();
5297        if let Some(ref x) = input.revision_id {
5298            params.put("RevisionId", x);
5299        }
5300        request.set_params(params);
5301
5302        let mut response = self
5303            .client
5304            .sign_and_dispatch(request)
5305            .await
5306            .map_err(RusotoError::from)?;
5307        if response.status.as_u16() == 201 {
5308            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5309            let result = proto::json::ResponsePayload::new(&response)
5310                .deserialize::<AddLayerVersionPermissionResponse, _>()?;
5311
5312            Ok(result)
5313        } else {
5314            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5315            Err(AddLayerVersionPermissionError::from_response(response))
5316        }
5317    }
5318
5319    /// <p>Grants an AWS service or another account permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.</p> <p>To grant permission to another account, specify the account ID as the <code>Principal</code>. For AWS services, the principal is a domain-style identifier defined by the service, like <code>s3.amazonaws.com</code> or <code>sns.amazonaws.com</code>. For AWS services, you can also specify the ARN of the associated resource as the <code>SourceArn</code>. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.</p> <p>This action adds a statement to a resource-based permissions policy for the function. For more information about function policies, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">Lambda Function Policies</a>. </p>
5320    #[allow(unused_mut)]
5321    async fn add_permission(
5322        &self,
5323        input: AddPermissionRequest,
5324    ) -> Result<AddPermissionResponse, RusotoError<AddPermissionError>> {
5325        let request_uri = format!(
5326            "/2015-03-31/functions/{function_name}/policy",
5327            function_name = input.function_name
5328        );
5329
5330        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
5331        request.set_content_type("application/x-amz-json-1.1".to_owned());
5332
5333        let encoded = Some(serde_json::to_vec(&input).unwrap());
5334        request.set_payload(encoded);
5335
5336        let mut params = Params::new();
5337        if let Some(ref x) = input.qualifier {
5338            params.put("Qualifier", x);
5339        }
5340        request.set_params(params);
5341
5342        let mut response = self
5343            .client
5344            .sign_and_dispatch(request)
5345            .await
5346            .map_err(RusotoError::from)?;
5347        if response.status.as_u16() == 201 {
5348            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5349            let result = proto::json::ResponsePayload::new(&response)
5350                .deserialize::<AddPermissionResponse, _>()?;
5351
5352            Ok(result)
5353        } else {
5354            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5355            Err(AddPermissionError::from_response(response))
5356        }
5357    }
5358
5359    /// <p>Creates an <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a> for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.</p> <p>You can also map an alias to split invocation requests between two versions. Use the <code>RoutingConfig</code> parameter to specify a second version and the percentage of invocation requests that it receives.</p>
5360    #[allow(unused_mut)]
5361    async fn create_alias(
5362        &self,
5363        input: CreateAliasRequest,
5364    ) -> Result<AliasConfiguration, RusotoError<CreateAliasError>> {
5365        let request_uri = format!(
5366            "/2015-03-31/functions/{function_name}/aliases",
5367            function_name = input.function_name
5368        );
5369
5370        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
5371        request.set_content_type("application/x-amz-json-1.1".to_owned());
5372
5373        let encoded = Some(serde_json::to_vec(&input).unwrap());
5374        request.set_payload(encoded);
5375
5376        let mut response = self
5377            .client
5378            .sign_and_dispatch(request)
5379            .await
5380            .map_err(RusotoError::from)?;
5381        if response.status.as_u16() == 201 {
5382            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5383            let result = proto::json::ResponsePayload::new(&response)
5384                .deserialize::<AliasConfiguration, _>()?;
5385
5386            Ok(result)
5387        } else {
5388            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5389            Err(CreateAliasError::from_response(response))
5390        }
5391    }
5392
5393    /// <p><p>Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.</p> <p>For details about each event source type, see the following topics.</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html">Using AWS Lambda with Amazon DynamoDB</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html">Using AWS Lambda with Amazon Kinesis</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html">Using AWS Lambda with Amazon SQS</a> </p> </li> </ul> <p>The following error handling options are only available for stream sources (DynamoDB and Kinesis):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age.</p> </li> <li> <p> <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries.</p> </li> <li> <p> <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p> </li> </ul></p>
5394    #[allow(unused_mut)]
5395    async fn create_event_source_mapping(
5396        &self,
5397        input: CreateEventSourceMappingRequest,
5398    ) -> Result<EventSourceMappingConfiguration, RusotoError<CreateEventSourceMappingError>> {
5399        let request_uri = "/2015-03-31/event-source-mappings/";
5400
5401        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
5402        request.set_content_type("application/x-amz-json-1.1".to_owned());
5403
5404        let encoded = Some(serde_json::to_vec(&input).unwrap());
5405        request.set_payload(encoded);
5406
5407        let mut response = self
5408            .client
5409            .sign_and_dispatch(request)
5410            .await
5411            .map_err(RusotoError::from)?;
5412        if response.status.as_u16() == 202 {
5413            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5414            let result = proto::json::ResponsePayload::new(&response)
5415                .deserialize::<EventSourceMappingConfiguration, _>()?;
5416
5417            Ok(result)
5418        } else {
5419            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5420            Err(CreateEventSourceMappingError::from_response(response))
5421        }
5422    }
5423
5424    /// <p>Creates a Lambda function. To create a function, you need a <a href="https://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html">deployment package</a> and an <a href="https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role">execution role</a>. The deployment package contains your function code. The execution role grants the function permission to use AWS services, such as Amazon CloudWatch Logs for log streaming and AWS X-Ray for request tracing.</p> <p>When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a> indicate when the function is ready to invoke. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Function States</a>.</p> <p>A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the <code>Publish</code> parameter to create version <code>1</code> of your function from its initial configuration.</p> <p>The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with <a>UpdateFunctionConfiguration</a>. Function-level settings apply to both the unpublished and published versions of the function, and include tags (<a>TagResource</a>) and per-function concurrency limits (<a>PutFunctionConcurrency</a>).</p> <p>If another account or an AWS service invokes your function, use <a>AddPermission</a> to grant permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version, or on an alias.</p> <p>To invoke your function directly, use <a>Invoke</a>. To invoke your function in response to events in other AWS services, create an event source mapping (<a>CreateEventSourceMapping</a>), or configure a function trigger in the other service. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html">Invoking Functions</a>.</p>
5425    #[allow(unused_mut)]
5426    async fn create_function(
5427        &self,
5428        input: CreateFunctionRequest,
5429    ) -> Result<FunctionConfiguration, RusotoError<CreateFunctionError>> {
5430        let request_uri = "/2015-03-31/functions";
5431
5432        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
5433        request.set_content_type("application/x-amz-json-1.1".to_owned());
5434
5435        let encoded = Some(serde_json::to_vec(&input).unwrap());
5436        request.set_payload(encoded);
5437
5438        let mut response = self
5439            .client
5440            .sign_and_dispatch(request)
5441            .await
5442            .map_err(RusotoError::from)?;
5443        if response.status.as_u16() == 201 {
5444            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5445            let result = proto::json::ResponsePayload::new(&response)
5446                .deserialize::<FunctionConfiguration, _>()?;
5447
5448            Ok(result)
5449        } else {
5450            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5451            Err(CreateFunctionError::from_response(response))
5452        }
5453    }
5454
5455    /// <p>Deletes a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
5456    #[allow(unused_mut)]
5457    async fn delete_alias(
5458        &self,
5459        input: DeleteAliasRequest,
5460    ) -> Result<(), RusotoError<DeleteAliasError>> {
5461        let request_uri = format!(
5462            "/2015-03-31/functions/{function_name}/aliases/{name}",
5463            function_name = input.function_name,
5464            name = input.name
5465        );
5466
5467        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
5468        request.set_content_type("application/x-amz-json-1.1".to_owned());
5469
5470        let mut response = self
5471            .client
5472            .sign_and_dispatch(request)
5473            .await
5474            .map_err(RusotoError::from)?;
5475        if response.status.as_u16() == 204 {
5476            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5477            let result = ::std::mem::drop(response);
5478
5479            Ok(result)
5480        } else {
5481            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5482            Err(DeleteAliasError::from_response(response))
5483        }
5484    }
5485
5486    /// <p>Deletes an <a href="https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html">event source mapping</a>. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p> <p>When you delete an event source mapping, it enters a <code>Deleting</code> state and might not be completely deleted for several seconds.</p>
5487    #[allow(unused_mut)]
5488    async fn delete_event_source_mapping(
5489        &self,
5490        input: DeleteEventSourceMappingRequest,
5491    ) -> Result<EventSourceMappingConfiguration, RusotoError<DeleteEventSourceMappingError>> {
5492        let request_uri = format!(
5493            "/2015-03-31/event-source-mappings/{uuid}",
5494            uuid = input.uuid
5495        );
5496
5497        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
5498        request.set_content_type("application/x-amz-json-1.1".to_owned());
5499
5500        let mut response = self
5501            .client
5502            .sign_and_dispatch(request)
5503            .await
5504            .map_err(RusotoError::from)?;
5505        if response.status.as_u16() == 202 {
5506            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5507            let result = proto::json::ResponsePayload::new(&response)
5508                .deserialize::<EventSourceMappingConfiguration, _>()?;
5509
5510            Ok(result)
5511        } else {
5512            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5513            Err(DeleteEventSourceMappingError::from_response(response))
5514        }
5515    }
5516
5517    /// <p>Deletes a Lambda function. To delete a specific function version, use the <code>Qualifier</code> parameter. Otherwise, all versions and aliases are deleted.</p> <p>To delete Lambda event source mappings that invoke a function, use <a>DeleteEventSourceMapping</a>. For AWS services and resources that invoke your function directly, delete the trigger in the service where you originally configured it.</p>
5518    #[allow(unused_mut)]
5519    async fn delete_function(
5520        &self,
5521        input: DeleteFunctionRequest,
5522    ) -> Result<(), RusotoError<DeleteFunctionError>> {
5523        let request_uri = format!(
5524            "/2015-03-31/functions/{function_name}",
5525            function_name = input.function_name
5526        );
5527
5528        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
5529        request.set_content_type("application/x-amz-json-1.1".to_owned());
5530
5531        let mut params = Params::new();
5532        if let Some(ref x) = input.qualifier {
5533            params.put("Qualifier", x);
5534        }
5535        request.set_params(params);
5536
5537        let mut response = self
5538            .client
5539            .sign_and_dispatch(request)
5540            .await
5541            .map_err(RusotoError::from)?;
5542        if response.status.as_u16() == 204 {
5543            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5544            let result = ::std::mem::drop(response);
5545
5546            Ok(result)
5547        } else {
5548            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5549            Err(DeleteFunctionError::from_response(response))
5550        }
5551    }
5552
5553    /// <p>Removes a concurrent execution limit from a function.</p>
5554    #[allow(unused_mut)]
5555    async fn delete_function_concurrency(
5556        &self,
5557        input: DeleteFunctionConcurrencyRequest,
5558    ) -> Result<(), RusotoError<DeleteFunctionConcurrencyError>> {
5559        let request_uri = format!(
5560            "/2017-10-31/functions/{function_name}/concurrency",
5561            function_name = input.function_name
5562        );
5563
5564        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
5565        request.set_content_type("application/x-amz-json-1.1".to_owned());
5566
5567        let mut response = self
5568            .client
5569            .sign_and_dispatch(request)
5570            .await
5571            .map_err(RusotoError::from)?;
5572        if response.status.as_u16() == 204 {
5573            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5574            let result = ::std::mem::drop(response);
5575
5576            Ok(result)
5577        } else {
5578            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5579            Err(DeleteFunctionConcurrencyError::from_response(response))
5580        }
5581    }
5582
5583    /// <p>Deletes the configuration for asynchronous invocation for a function, version, or alias.</p> <p>To configure options for asynchronous invocation, use <a>PutFunctionEventInvokeConfig</a>.</p>
5584    #[allow(unused_mut)]
5585    async fn delete_function_event_invoke_config(
5586        &self,
5587        input: DeleteFunctionEventInvokeConfigRequest,
5588    ) -> Result<(), RusotoError<DeleteFunctionEventInvokeConfigError>> {
5589        let request_uri = format!(
5590            "/2019-09-25/functions/{function_name}/event-invoke-config",
5591            function_name = input.function_name
5592        );
5593
5594        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
5595        request.set_content_type("application/x-amz-json-1.1".to_owned());
5596
5597        let mut params = Params::new();
5598        if let Some(ref x) = input.qualifier {
5599            params.put("Qualifier", x);
5600        }
5601        request.set_params(params);
5602
5603        let mut response = self
5604            .client
5605            .sign_and_dispatch(request)
5606            .await
5607            .map_err(RusotoError::from)?;
5608        if response.status.as_u16() == 204 {
5609            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5610            let result = ::std::mem::drop(response);
5611
5612            Ok(result)
5613        } else {
5614            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5615            Err(DeleteFunctionEventInvokeConfigError::from_response(
5616                response,
5617            ))
5618        }
5619    }
5620
5621    /// <p>Deletes a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. Deleted versions can no longer be viewed or added to functions. To avoid breaking functions, a copy of the version remains in Lambda until no functions refer to it.</p>
5622    #[allow(unused_mut)]
5623    async fn delete_layer_version(
5624        &self,
5625        input: DeleteLayerVersionRequest,
5626    ) -> Result<(), RusotoError<DeleteLayerVersionError>> {
5627        let request_uri = format!(
5628            "/2018-10-31/layers/{layer_name}/versions/{version_number}",
5629            layer_name = input.layer_name,
5630            version_number = input.version_number
5631        );
5632
5633        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
5634        request.set_content_type("application/x-amz-json-1.1".to_owned());
5635
5636        let mut response = self
5637            .client
5638            .sign_and_dispatch(request)
5639            .await
5640            .map_err(RusotoError::from)?;
5641        if response.status.as_u16() == 204 {
5642            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5643            let result = ::std::mem::drop(response);
5644
5645            Ok(result)
5646        } else {
5647            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5648            Err(DeleteLayerVersionError::from_response(response))
5649        }
5650    }
5651
5652    /// <p>Deletes the provisioned concurrency configuration for a function.</p>
5653    #[allow(unused_mut)]
5654    async fn delete_provisioned_concurrency_config(
5655        &self,
5656        input: DeleteProvisionedConcurrencyConfigRequest,
5657    ) -> Result<(), RusotoError<DeleteProvisionedConcurrencyConfigError>> {
5658        let request_uri = format!(
5659            "/2019-09-30/functions/{function_name}/provisioned-concurrency",
5660            function_name = input.function_name
5661        );
5662
5663        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
5664        request.set_content_type("application/x-amz-json-1.1".to_owned());
5665
5666        let mut params = Params::new();
5667        params.put("Qualifier", &input.qualifier);
5668        request.set_params(params);
5669
5670        let mut response = self
5671            .client
5672            .sign_and_dispatch(request)
5673            .await
5674            .map_err(RusotoError::from)?;
5675        if response.status.as_u16() == 204 {
5676            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5677            let result = ::std::mem::drop(response);
5678
5679            Ok(result)
5680        } else {
5681            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5682            Err(DeleteProvisionedConcurrencyConfigError::from_response(
5683                response,
5684            ))
5685        }
5686    }
5687
5688    /// <p>Retrieves details about your account's <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">limits</a> and usage in an AWS Region.</p>
5689    #[allow(unused_mut)]
5690    async fn get_account_settings(
5691        &self,
5692    ) -> Result<GetAccountSettingsResponse, RusotoError<GetAccountSettingsError>> {
5693        let request_uri = "/2016-08-19/account-settings/";
5694
5695        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5696        request.set_content_type("application/x-amz-json-1.1".to_owned());
5697
5698        let mut response = self
5699            .client
5700            .sign_and_dispatch(request)
5701            .await
5702            .map_err(RusotoError::from)?;
5703        if response.status.as_u16() == 200 {
5704            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5705            let result = proto::json::ResponsePayload::new(&response)
5706                .deserialize::<GetAccountSettingsResponse, _>()?;
5707
5708            Ok(result)
5709        } else {
5710            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5711            Err(GetAccountSettingsError::from_response(response))
5712        }
5713    }
5714
5715    /// <p>Returns details about a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
5716    #[allow(unused_mut)]
5717    async fn get_alias(
5718        &self,
5719        input: GetAliasRequest,
5720    ) -> Result<AliasConfiguration, RusotoError<GetAliasError>> {
5721        let request_uri = format!(
5722            "/2015-03-31/functions/{function_name}/aliases/{name}",
5723            function_name = input.function_name,
5724            name = input.name
5725        );
5726
5727        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5728        request.set_content_type("application/x-amz-json-1.1".to_owned());
5729
5730        let mut response = self
5731            .client
5732            .sign_and_dispatch(request)
5733            .await
5734            .map_err(RusotoError::from)?;
5735        if response.status.as_u16() == 200 {
5736            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5737            let result = proto::json::ResponsePayload::new(&response)
5738                .deserialize::<AliasConfiguration, _>()?;
5739
5740            Ok(result)
5741        } else {
5742            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5743            Err(GetAliasError::from_response(response))
5744        }
5745    }
5746
5747    /// <p>Returns details about an event source mapping. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p>
5748    #[allow(unused_mut)]
5749    async fn get_event_source_mapping(
5750        &self,
5751        input: GetEventSourceMappingRequest,
5752    ) -> Result<EventSourceMappingConfiguration, RusotoError<GetEventSourceMappingError>> {
5753        let request_uri = format!(
5754            "/2015-03-31/event-source-mappings/{uuid}",
5755            uuid = input.uuid
5756        );
5757
5758        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5759        request.set_content_type("application/x-amz-json-1.1".to_owned());
5760
5761        let mut response = self
5762            .client
5763            .sign_and_dispatch(request)
5764            .await
5765            .map_err(RusotoError::from)?;
5766        if response.status.as_u16() == 200 {
5767            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5768            let result = proto::json::ResponsePayload::new(&response)
5769                .deserialize::<EventSourceMappingConfiguration, _>()?;
5770
5771            Ok(result)
5772        } else {
5773            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5774            Err(GetEventSourceMappingError::from_response(response))
5775        }
5776    }
5777
5778    /// <p>Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.</p>
5779    #[allow(unused_mut)]
5780    async fn get_function(
5781        &self,
5782        input: GetFunctionRequest,
5783    ) -> Result<GetFunctionResponse, RusotoError<GetFunctionError>> {
5784        let request_uri = format!(
5785            "/2015-03-31/functions/{function_name}",
5786            function_name = input.function_name
5787        );
5788
5789        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5790        request.set_content_type("application/x-amz-json-1.1".to_owned());
5791
5792        let mut params = Params::new();
5793        if let Some(ref x) = input.qualifier {
5794            params.put("Qualifier", x);
5795        }
5796        request.set_params(params);
5797
5798        let mut response = self
5799            .client
5800            .sign_and_dispatch(request)
5801            .await
5802            .map_err(RusotoError::from)?;
5803        if response.status.as_u16() == 200 {
5804            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5805            let result = proto::json::ResponsePayload::new(&response)
5806                .deserialize::<GetFunctionResponse, _>()?;
5807
5808            Ok(result)
5809        } else {
5810            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5811            Err(GetFunctionError::from_response(response))
5812        }
5813    }
5814
5815    /// <p>Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use <a>PutFunctionConcurrency</a>.</p>
5816    #[allow(unused_mut)]
5817    async fn get_function_concurrency(
5818        &self,
5819        input: GetFunctionConcurrencyRequest,
5820    ) -> Result<GetFunctionConcurrencyResponse, RusotoError<GetFunctionConcurrencyError>> {
5821        let request_uri = format!(
5822            "/2019-09-30/functions/{function_name}/concurrency",
5823            function_name = input.function_name
5824        );
5825
5826        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5827        request.set_content_type("application/x-amz-json-1.1".to_owned());
5828
5829        let mut response = self
5830            .client
5831            .sign_and_dispatch(request)
5832            .await
5833            .map_err(RusotoError::from)?;
5834        if response.status.as_u16() == 200 {
5835            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5836            let result = proto::json::ResponsePayload::new(&response)
5837                .deserialize::<GetFunctionConcurrencyResponse, _>()?;
5838
5839            Ok(result)
5840        } else {
5841            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5842            Err(GetFunctionConcurrencyError::from_response(response))
5843        }
5844    }
5845
5846    /// <p>Returns the version-specific settings of a Lambda function or version. The output includes only options that can vary between versions of a function. To modify these settings, use <a>UpdateFunctionConfiguration</a>.</p> <p>To get all of a function's details, including function-level settings, use <a>GetFunction</a>.</p>
5847    #[allow(unused_mut)]
5848    async fn get_function_configuration(
5849        &self,
5850        input: GetFunctionConfigurationRequest,
5851    ) -> Result<FunctionConfiguration, RusotoError<GetFunctionConfigurationError>> {
5852        let request_uri = format!(
5853            "/2015-03-31/functions/{function_name}/configuration",
5854            function_name = input.function_name
5855        );
5856
5857        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5858        request.set_content_type("application/x-amz-json-1.1".to_owned());
5859
5860        let mut params = Params::new();
5861        if let Some(ref x) = input.qualifier {
5862            params.put("Qualifier", x);
5863        }
5864        request.set_params(params);
5865
5866        let mut response = self
5867            .client
5868            .sign_and_dispatch(request)
5869            .await
5870            .map_err(RusotoError::from)?;
5871        if response.status.as_u16() == 200 {
5872            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5873            let result = proto::json::ResponsePayload::new(&response)
5874                .deserialize::<FunctionConfiguration, _>()?;
5875
5876            Ok(result)
5877        } else {
5878            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5879            Err(GetFunctionConfigurationError::from_response(response))
5880        }
5881    }
5882
5883    /// <p>Retrieves the configuration for asynchronous invocation for a function, version, or alias.</p> <p>To configure options for asynchronous invocation, use <a>PutFunctionEventInvokeConfig</a>.</p>
5884    #[allow(unused_mut)]
5885    async fn get_function_event_invoke_config(
5886        &self,
5887        input: GetFunctionEventInvokeConfigRequest,
5888    ) -> Result<FunctionEventInvokeConfig, RusotoError<GetFunctionEventInvokeConfigError>> {
5889        let request_uri = format!(
5890            "/2019-09-25/functions/{function_name}/event-invoke-config",
5891            function_name = input.function_name
5892        );
5893
5894        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5895        request.set_content_type("application/x-amz-json-1.1".to_owned());
5896
5897        let mut params = Params::new();
5898        if let Some(ref x) = input.qualifier {
5899            params.put("Qualifier", x);
5900        }
5901        request.set_params(params);
5902
5903        let mut response = self
5904            .client
5905            .sign_and_dispatch(request)
5906            .await
5907            .map_err(RusotoError::from)?;
5908        if response.status.as_u16() == 200 {
5909            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5910            let result = proto::json::ResponsePayload::new(&response)
5911                .deserialize::<FunctionEventInvokeConfig, _>()?;
5912
5913            Ok(result)
5914        } else {
5915            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5916            Err(GetFunctionEventInvokeConfigError::from_response(response))
5917        }
5918    }
5919
5920    /// <p>Returns information about a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>, with a link to download the layer archive that's valid for 10 minutes.</p>
5921    #[allow(unused_mut)]
5922    async fn get_layer_version(
5923        &self,
5924        input: GetLayerVersionRequest,
5925    ) -> Result<GetLayerVersionResponse, RusotoError<GetLayerVersionError>> {
5926        let request_uri = format!(
5927            "/2018-10-31/layers/{layer_name}/versions/{version_number}",
5928            layer_name = input.layer_name,
5929            version_number = input.version_number
5930        );
5931
5932        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5933        request.set_content_type("application/x-amz-json-1.1".to_owned());
5934
5935        let mut response = self
5936            .client
5937            .sign_and_dispatch(request)
5938            .await
5939            .map_err(RusotoError::from)?;
5940        if response.status.as_u16() == 200 {
5941            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5942            let result = proto::json::ResponsePayload::new(&response)
5943                .deserialize::<GetLayerVersionResponse, _>()?;
5944
5945            Ok(result)
5946        } else {
5947            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5948            Err(GetLayerVersionError::from_response(response))
5949        }
5950    }
5951
5952    /// <p>Returns information about a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>, with a link to download the layer archive that's valid for 10 minutes.</p>
5953    #[allow(unused_mut)]
5954    async fn get_layer_version_by_arn(
5955        &self,
5956        input: GetLayerVersionByArnRequest,
5957    ) -> Result<GetLayerVersionResponse, RusotoError<GetLayerVersionByArnError>> {
5958        let request_uri = "/2018-10-31/layers";
5959
5960        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5961        request.set_content_type("application/x-amz-json-1.1".to_owned());
5962
5963        let mut params = Params::new();
5964        params.put("Arn", &input.arn);
5965        params.put("find", "LayerVersion");
5966        request.set_params(params);
5967
5968        let mut response = self
5969            .client
5970            .sign_and_dispatch(request)
5971            .await
5972            .map_err(RusotoError::from)?;
5973        if response.status.as_u16() == 200 {
5974            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5975            let result = proto::json::ResponsePayload::new(&response)
5976                .deserialize::<GetLayerVersionResponse, _>()?;
5977
5978            Ok(result)
5979        } else {
5980            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5981            Err(GetLayerVersionByArnError::from_response(response))
5982        }
5983    }
5984
5985    /// <p>Returns the permission policy for a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. For more information, see <a>AddLayerVersionPermission</a>.</p>
5986    #[allow(unused_mut)]
5987    async fn get_layer_version_policy(
5988        &self,
5989        input: GetLayerVersionPolicyRequest,
5990    ) -> Result<GetLayerVersionPolicyResponse, RusotoError<GetLayerVersionPolicyError>> {
5991        let request_uri = format!(
5992            "/2018-10-31/layers/{layer_name}/versions/{version_number}/policy",
5993            layer_name = input.layer_name,
5994            version_number = input.version_number
5995        );
5996
5997        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
5998        request.set_content_type("application/x-amz-json-1.1".to_owned());
5999
6000        let mut response = self
6001            .client
6002            .sign_and_dispatch(request)
6003            .await
6004            .map_err(RusotoError::from)?;
6005        if response.status.as_u16() == 200 {
6006            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6007            let result = proto::json::ResponsePayload::new(&response)
6008                .deserialize::<GetLayerVersionPolicyResponse, _>()?;
6009
6010            Ok(result)
6011        } else {
6012            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6013            Err(GetLayerVersionPolicyError::from_response(response))
6014        }
6015    }
6016
6017    /// <p>Returns the <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">resource-based IAM policy</a> for a function, version, or alias.</p>
6018    #[allow(unused_mut)]
6019    async fn get_policy(
6020        &self,
6021        input: GetPolicyRequest,
6022    ) -> Result<GetPolicyResponse, RusotoError<GetPolicyError>> {
6023        let request_uri = format!(
6024            "/2015-03-31/functions/{function_name}/policy",
6025            function_name = input.function_name
6026        );
6027
6028        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6029        request.set_content_type("application/x-amz-json-1.1".to_owned());
6030
6031        let mut params = Params::new();
6032        if let Some(ref x) = input.qualifier {
6033            params.put("Qualifier", x);
6034        }
6035        request.set_params(params);
6036
6037        let mut response = self
6038            .client
6039            .sign_and_dispatch(request)
6040            .await
6041            .map_err(RusotoError::from)?;
6042        if response.status.as_u16() == 200 {
6043            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6044            let result = proto::json::ResponsePayload::new(&response)
6045                .deserialize::<GetPolicyResponse, _>()?;
6046
6047            Ok(result)
6048        } else {
6049            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6050            Err(GetPolicyError::from_response(response))
6051        }
6052    }
6053
6054    /// <p>Retrieves the provisioned concurrency configuration for a function's alias or version.</p>
6055    #[allow(unused_mut)]
6056    async fn get_provisioned_concurrency_config(
6057        &self,
6058        input: GetProvisionedConcurrencyConfigRequest,
6059    ) -> Result<
6060        GetProvisionedConcurrencyConfigResponse,
6061        RusotoError<GetProvisionedConcurrencyConfigError>,
6062    > {
6063        let request_uri = format!(
6064            "/2019-09-30/functions/{function_name}/provisioned-concurrency",
6065            function_name = input.function_name
6066        );
6067
6068        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6069        request.set_content_type("application/x-amz-json-1.1".to_owned());
6070
6071        let mut params = Params::new();
6072        params.put("Qualifier", &input.qualifier);
6073        request.set_params(params);
6074
6075        let mut response = self
6076            .client
6077            .sign_and_dispatch(request)
6078            .await
6079            .map_err(RusotoError::from)?;
6080        if response.status.as_u16() == 200 {
6081            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6082            let result = proto::json::ResponsePayload::new(&response)
6083                .deserialize::<GetProvisionedConcurrencyConfigResponse, _>()?;
6084
6085            Ok(result)
6086        } else {
6087            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6088            Err(GetProvisionedConcurrencyConfigError::from_response(
6089                response,
6090            ))
6091        }
6092    }
6093
6094    /// <p>Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set <code>InvocationType</code> to <code>Event</code>.</p> <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html">synchronous invocation</a>, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html">execution log</a> and <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html">trace</a>.</p> <p>When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html">Retry Behavior</a>.</p> <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html">asynchronous invocation</a>, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple times, even if no error occurs. To retain events that were not processed, configure your function with a <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq">dead-letter queue</a>.</p> <p>The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">limit errors</a>, or issues with your function's code and configuration. For example, Lambda returns <code>TooManyRequestsException</code> if executing the function would cause you to exceed a concurrency limit at either the account level (<code>ConcurrentInvocationLimitExceeded</code>) or function level (<code>ReservedFunctionConcurrentInvocationLimitExceeded</code>).</p> <p>For functions with a long timeout, your client might be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.</p> <p>This operation requires permission for the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html">lambda:InvokeFunction</a> action.</p>
6095    #[allow(unused_mut)]
6096    async fn invoke(
6097        &self,
6098        input: InvocationRequest,
6099    ) -> Result<InvocationResponse, RusotoError<InvokeError>> {
6100        let request_uri = format!(
6101            "/2015-03-31/functions/{function_name}/invocations",
6102            function_name = input.function_name
6103        );
6104
6105        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
6106        request.set_content_type("application/x-amz-json-1.1".to_owned());
6107
6108        let encoded = if let Some(ref payload) = input.payload {
6109            Some(payload.to_owned())
6110        } else {
6111            None
6112        };
6113        request.set_payload(encoded);
6114        request.add_optional_header("X-Amz-Client-Context", input.client_context.as_ref());
6115        request.add_optional_header("X-Amz-Invocation-Type", input.invocation_type.as_ref());
6116        request.add_optional_header("X-Amz-Log-Type", input.log_type.as_ref());
6117        let mut params = Params::new();
6118        if let Some(ref x) = input.qualifier {
6119            params.put("Qualifier", x);
6120        }
6121        request.set_params(params);
6122
6123        let mut response = self
6124            .client
6125            .sign_and_dispatch(request)
6126            .await
6127            .map_err(RusotoError::from)?;
6128        if response.status.is_success() {
6129            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6130
6131            let mut result = InvocationResponse::default();
6132            result.payload = Some(response.body);
6133
6134            result.executed_version = response.headers.remove("X-Amz-Executed-Version");
6135            result.function_error = response.headers.remove("X-Amz-Function-Error");
6136            result.log_result = response.headers.remove("X-Amz-Log-Result");
6137            result.status_code = Some(response.status.as_u16() as i64);
6138            Ok(result)
6139        } else {
6140            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6141            Err(InvokeError::from_response(response))
6142        }
6143    }
6144
6145    /// <p><important> <p>For asynchronous function invocation, use <a>Invoke</a>.</p> </important> <p>Invokes a function asynchronously.</p></p>
6146    #[allow(unused_mut)]
6147    async fn invoke_async(
6148        &self,
6149        input: InvokeAsyncRequest,
6150    ) -> Result<InvokeAsyncResponse, RusotoError<InvokeAsyncError>> {
6151        let request_uri = format!(
6152            "/2014-11-13/functions/{function_name}/invoke-async/",
6153            function_name = input.function_name
6154        );
6155
6156        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
6157        request.set_content_type("application/x-amz-json-1.1".to_owned());
6158
6159        let encoded = Some(input.invoke_args.to_owned());
6160        request.set_payload(encoded);
6161
6162        let mut response = self
6163            .client
6164            .sign_and_dispatch(request)
6165            .await
6166            .map_err(RusotoError::from)?;
6167        if response.status.as_u16() == 202 {
6168            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6169            let mut result = proto::json::ResponsePayload::new(&response)
6170                .deserialize::<InvokeAsyncResponse, _>()?;
6171
6172            result.status = Some(response.status.as_u16() as i64);
6173            Ok(result)
6174        } else {
6175            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6176            Err(InvokeAsyncError::from_response(response))
6177        }
6178    }
6179
6180    /// <p>Returns a list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">aliases</a> for a Lambda function.</p>
6181    #[allow(unused_mut)]
6182    async fn list_aliases(
6183        &self,
6184        input: ListAliasesRequest,
6185    ) -> Result<ListAliasesResponse, RusotoError<ListAliasesError>> {
6186        let request_uri = format!(
6187            "/2015-03-31/functions/{function_name}/aliases",
6188            function_name = input.function_name
6189        );
6190
6191        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6192        request.set_content_type("application/x-amz-json-1.1".to_owned());
6193
6194        let mut params = Params::new();
6195        if let Some(ref x) = input.function_version {
6196            params.put("FunctionVersion", x);
6197        }
6198        if let Some(ref x) = input.marker {
6199            params.put("Marker", x);
6200        }
6201        if let Some(ref x) = input.max_items {
6202            params.put("MaxItems", x);
6203        }
6204        request.set_params(params);
6205
6206        let mut response = self
6207            .client
6208            .sign_and_dispatch(request)
6209            .await
6210            .map_err(RusotoError::from)?;
6211        if response.status.as_u16() == 200 {
6212            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6213            let result = proto::json::ResponsePayload::new(&response)
6214                .deserialize::<ListAliasesResponse, _>()?;
6215
6216            Ok(result)
6217        } else {
6218            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6219            Err(ListAliasesError::from_response(response))
6220        }
6221    }
6222
6223    /// <p>Lists event source mappings. Specify an <code>EventSourceArn</code> to only show event source mappings for a single event source.</p>
6224    #[allow(unused_mut)]
6225    async fn list_event_source_mappings(
6226        &self,
6227        input: ListEventSourceMappingsRequest,
6228    ) -> Result<ListEventSourceMappingsResponse, RusotoError<ListEventSourceMappingsError>> {
6229        let request_uri = "/2015-03-31/event-source-mappings/";
6230
6231        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6232        request.set_content_type("application/x-amz-json-1.1".to_owned());
6233
6234        let mut params = Params::new();
6235        if let Some(ref x) = input.event_source_arn {
6236            params.put("EventSourceArn", x);
6237        }
6238        if let Some(ref x) = input.function_name {
6239            params.put("FunctionName", x);
6240        }
6241        if let Some(ref x) = input.marker {
6242            params.put("Marker", x);
6243        }
6244        if let Some(ref x) = input.max_items {
6245            params.put("MaxItems", x);
6246        }
6247        request.set_params(params);
6248
6249        let mut response = self
6250            .client
6251            .sign_and_dispatch(request)
6252            .await
6253            .map_err(RusotoError::from)?;
6254        if response.status.as_u16() == 200 {
6255            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6256            let result = proto::json::ResponsePayload::new(&response)
6257                .deserialize::<ListEventSourceMappingsResponse, _>()?;
6258
6259            Ok(result)
6260        } else {
6261            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6262            Err(ListEventSourceMappingsError::from_response(response))
6263        }
6264    }
6265
6266    /// <p>Retrieves a list of configurations for asynchronous invocation for a function.</p> <p>To configure options for asynchronous invocation, use <a>PutFunctionEventInvokeConfig</a>.</p>
6267    #[allow(unused_mut)]
6268    async fn list_function_event_invoke_configs(
6269        &self,
6270        input: ListFunctionEventInvokeConfigsRequest,
6271    ) -> Result<
6272        ListFunctionEventInvokeConfigsResponse,
6273        RusotoError<ListFunctionEventInvokeConfigsError>,
6274    > {
6275        let request_uri = format!(
6276            "/2019-09-25/functions/{function_name}/event-invoke-config/list",
6277            function_name = input.function_name
6278        );
6279
6280        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6281        request.set_content_type("application/x-amz-json-1.1".to_owned());
6282
6283        let mut params = Params::new();
6284        if let Some(ref x) = input.marker {
6285            params.put("Marker", x);
6286        }
6287        if let Some(ref x) = input.max_items {
6288            params.put("MaxItems", x);
6289        }
6290        request.set_params(params);
6291
6292        let mut response = self
6293            .client
6294            .sign_and_dispatch(request)
6295            .await
6296            .map_err(RusotoError::from)?;
6297        if response.status.as_u16() == 200 {
6298            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6299            let result = proto::json::ResponsePayload::new(&response)
6300                .deserialize::<ListFunctionEventInvokeConfigsResponse, _>()?;
6301
6302            Ok(result)
6303        } else {
6304            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6305            Err(ListFunctionEventInvokeConfigsError::from_response(response))
6306        }
6307    }
6308
6309    /// <p>Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.</p> <p>Set <code>FunctionVersion</code> to <code>ALL</code> to include all published versions of each function in addition to the unpublished version. To get more information about a function or version, use <a>GetFunction</a>.</p>
6310    #[allow(unused_mut)]
6311    async fn list_functions(
6312        &self,
6313        input: ListFunctionsRequest,
6314    ) -> Result<ListFunctionsResponse, RusotoError<ListFunctionsError>> {
6315        let request_uri = "/2015-03-31/functions/";
6316
6317        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6318        request.set_content_type("application/x-amz-json-1.1".to_owned());
6319
6320        let mut params = Params::new();
6321        if let Some(ref x) = input.function_version {
6322            params.put("FunctionVersion", x);
6323        }
6324        if let Some(ref x) = input.marker {
6325            params.put("Marker", x);
6326        }
6327        if let Some(ref x) = input.master_region {
6328            params.put("MasterRegion", x);
6329        }
6330        if let Some(ref x) = input.max_items {
6331            params.put("MaxItems", x);
6332        }
6333        request.set_params(params);
6334
6335        let mut response = self
6336            .client
6337            .sign_and_dispatch(request)
6338            .await
6339            .map_err(RusotoError::from)?;
6340        if response.status.as_u16() == 200 {
6341            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6342            let result = proto::json::ResponsePayload::new(&response)
6343                .deserialize::<ListFunctionsResponse, _>()?;
6344
6345            Ok(result)
6346        } else {
6347            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6348            Err(ListFunctionsError::from_response(response))
6349        }
6350    }
6351
6352    /// <p>Lists the versions of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. Versions that have been deleted aren't listed. Specify a <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">runtime identifier</a> to list only versions that indicate that they're compatible with that runtime.</p>
6353    #[allow(unused_mut)]
6354    async fn list_layer_versions(
6355        &self,
6356        input: ListLayerVersionsRequest,
6357    ) -> Result<ListLayerVersionsResponse, RusotoError<ListLayerVersionsError>> {
6358        let request_uri = format!(
6359            "/2018-10-31/layers/{layer_name}/versions",
6360            layer_name = input.layer_name
6361        );
6362
6363        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6364        request.set_content_type("application/x-amz-json-1.1".to_owned());
6365
6366        let mut params = Params::new();
6367        if let Some(ref x) = input.compatible_runtime {
6368            params.put("CompatibleRuntime", x);
6369        }
6370        if let Some(ref x) = input.marker {
6371            params.put("Marker", x);
6372        }
6373        if let Some(ref x) = input.max_items {
6374            params.put("MaxItems", x);
6375        }
6376        request.set_params(params);
6377
6378        let mut response = self
6379            .client
6380            .sign_and_dispatch(request)
6381            .await
6382            .map_err(RusotoError::from)?;
6383        if response.status.as_u16() == 200 {
6384            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6385            let result = proto::json::ResponsePayload::new(&response)
6386                .deserialize::<ListLayerVersionsResponse, _>()?;
6387
6388            Ok(result)
6389        } else {
6390            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6391            Err(ListLayerVersionsError::from_response(response))
6392        }
6393    }
6394
6395    /// <p>Lists <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layers</a> and shows information about the latest version of each. Specify a <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">runtime identifier</a> to list only layers that indicate that they're compatible with that runtime.</p>
6396    #[allow(unused_mut)]
6397    async fn list_layers(
6398        &self,
6399        input: ListLayersRequest,
6400    ) -> Result<ListLayersResponse, RusotoError<ListLayersError>> {
6401        let request_uri = "/2018-10-31/layers";
6402
6403        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6404        request.set_content_type("application/x-amz-json-1.1".to_owned());
6405
6406        let mut params = Params::new();
6407        if let Some(ref x) = input.compatible_runtime {
6408            params.put("CompatibleRuntime", x);
6409        }
6410        if let Some(ref x) = input.marker {
6411            params.put("Marker", x);
6412        }
6413        if let Some(ref x) = input.max_items {
6414            params.put("MaxItems", x);
6415        }
6416        request.set_params(params);
6417
6418        let mut response = self
6419            .client
6420            .sign_and_dispatch(request)
6421            .await
6422            .map_err(RusotoError::from)?;
6423        if response.status.as_u16() == 200 {
6424            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6425            let result = proto::json::ResponsePayload::new(&response)
6426                .deserialize::<ListLayersResponse, _>()?;
6427
6428            Ok(result)
6429        } else {
6430            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6431            Err(ListLayersError::from_response(response))
6432        }
6433    }
6434
6435    /// <p>Retrieves a list of provisioned concurrency configurations for a function.</p>
6436    #[allow(unused_mut)]
6437    async fn list_provisioned_concurrency_configs(
6438        &self,
6439        input: ListProvisionedConcurrencyConfigsRequest,
6440    ) -> Result<
6441        ListProvisionedConcurrencyConfigsResponse,
6442        RusotoError<ListProvisionedConcurrencyConfigsError>,
6443    > {
6444        let request_uri = format!(
6445            "/2019-09-30/functions/{function_name}/provisioned-concurrency",
6446            function_name = input.function_name
6447        );
6448
6449        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6450        request.set_content_type("application/x-amz-json-1.1".to_owned());
6451
6452        let mut params = Params::new();
6453        if let Some(ref x) = input.marker {
6454            params.put("Marker", x);
6455        }
6456        if let Some(ref x) = input.max_items {
6457            params.put("MaxItems", x);
6458        }
6459        params.put("List", "ALL");
6460        request.set_params(params);
6461
6462        let mut response = self
6463            .client
6464            .sign_and_dispatch(request)
6465            .await
6466            .map_err(RusotoError::from)?;
6467        if response.status.as_u16() == 200 {
6468            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6469            let result = proto::json::ResponsePayload::new(&response)
6470                .deserialize::<ListProvisionedConcurrencyConfigsResponse, _>()?;
6471
6472            Ok(result)
6473        } else {
6474            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6475            Err(ListProvisionedConcurrencyConfigsError::from_response(
6476                response,
6477            ))
6478        }
6479    }
6480
6481    /// <p>Returns a function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a>. You can also view tags with <a>GetFunction</a>.</p>
6482    #[allow(unused_mut)]
6483    async fn list_tags(
6484        &self,
6485        input: ListTagsRequest,
6486    ) -> Result<ListTagsResponse, RusotoError<ListTagsError>> {
6487        let request_uri = format!("/2017-03-31/tags/{arn}", arn = input.resource);
6488
6489        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6490        request.set_content_type("application/x-amz-json-1.1".to_owned());
6491
6492        let mut response = self
6493            .client
6494            .sign_and_dispatch(request)
6495            .await
6496            .map_err(RusotoError::from)?;
6497        if response.status.is_success() {
6498            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6499            let result = proto::json::ResponsePayload::new(&response)
6500                .deserialize::<ListTagsResponse, _>()?;
6501
6502            Ok(result)
6503        } else {
6504            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6505            Err(ListTagsError::from_response(response))
6506        }
6507    }
6508
6509    /// <p>Returns a list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">versions</a>, with the version-specific configuration of each. Lambda returns up to 50 versions per call.</p>
6510    #[allow(unused_mut)]
6511    async fn list_versions_by_function(
6512        &self,
6513        input: ListVersionsByFunctionRequest,
6514    ) -> Result<ListVersionsByFunctionResponse, RusotoError<ListVersionsByFunctionError>> {
6515        let request_uri = format!(
6516            "/2015-03-31/functions/{function_name}/versions",
6517            function_name = input.function_name
6518        );
6519
6520        let mut request = SignedRequest::new("GET", "lambda", &self.region, &request_uri);
6521        request.set_content_type("application/x-amz-json-1.1".to_owned());
6522
6523        let mut params = Params::new();
6524        if let Some(ref x) = input.marker {
6525            params.put("Marker", x);
6526        }
6527        if let Some(ref x) = input.max_items {
6528            params.put("MaxItems", x);
6529        }
6530        request.set_params(params);
6531
6532        let mut response = self
6533            .client
6534            .sign_and_dispatch(request)
6535            .await
6536            .map_err(RusotoError::from)?;
6537        if response.status.as_u16() == 200 {
6538            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6539            let result = proto::json::ResponsePayload::new(&response)
6540                .deserialize::<ListVersionsByFunctionResponse, _>()?;
6541
6542            Ok(result)
6543        } else {
6544            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6545            Err(ListVersionsByFunctionError::from_response(response))
6546        }
6547    }
6548
6549    /// <p>Creates an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a> from a ZIP archive. Each time you call <code>PublishLayerVersion</code> with the same layer name, a new version is created.</p> <p>Add layers to your function with <a>CreateFunction</a> or <a>UpdateFunctionConfiguration</a>.</p>
6550    #[allow(unused_mut)]
6551    async fn publish_layer_version(
6552        &self,
6553        input: PublishLayerVersionRequest,
6554    ) -> Result<PublishLayerVersionResponse, RusotoError<PublishLayerVersionError>> {
6555        let request_uri = format!(
6556            "/2018-10-31/layers/{layer_name}/versions",
6557            layer_name = input.layer_name
6558        );
6559
6560        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
6561        request.set_content_type("application/x-amz-json-1.1".to_owned());
6562
6563        let encoded = Some(serde_json::to_vec(&input).unwrap());
6564        request.set_payload(encoded);
6565
6566        let mut response = self
6567            .client
6568            .sign_and_dispatch(request)
6569            .await
6570            .map_err(RusotoError::from)?;
6571        if response.status.as_u16() == 201 {
6572            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6573            let result = proto::json::ResponsePayload::new(&response)
6574                .deserialize::<PublishLayerVersionResponse, _>()?;
6575
6576            Ok(result)
6577        } else {
6578            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6579            Err(PublishLayerVersionError::from_response(response))
6580        }
6581    }
6582
6583    /// <p>Creates a <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">version</a> from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change.</p> <p>AWS Lambda doesn't publish a version if the function's configuration and code haven't changed since the last version. Use <a>UpdateFunctionCode</a> or <a>UpdateFunctionConfiguration</a> to update the function before publishing a version.</p> <p>Clients can invoke versions directly or with an alias. To create an alias, use <a>CreateAlias</a>.</p>
6584    #[allow(unused_mut)]
6585    async fn publish_version(
6586        &self,
6587        input: PublishVersionRequest,
6588    ) -> Result<FunctionConfiguration, RusotoError<PublishVersionError>> {
6589        let request_uri = format!(
6590            "/2015-03-31/functions/{function_name}/versions",
6591            function_name = input.function_name
6592        );
6593
6594        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
6595        request.set_content_type("application/x-amz-json-1.1".to_owned());
6596
6597        let encoded = Some(serde_json::to_vec(&input).unwrap());
6598        request.set_payload(encoded);
6599
6600        let mut response = self
6601            .client
6602            .sign_and_dispatch(request)
6603            .await
6604            .map_err(RusotoError::from)?;
6605        if response.status.as_u16() == 201 {
6606            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6607            let result = proto::json::ResponsePayload::new(&response)
6608                .deserialize::<FunctionConfiguration, _>()?;
6609
6610            Ok(result)
6611        } else {
6612            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6613            Err(PublishVersionError::from_response(response))
6614        }
6615    }
6616
6617    /// <p>Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency level.</p> <p>Concurrency settings apply to the function as a whole, including all published versions and the unpublished version. Reserving concurrency both ensures that your function has capacity to process the specified number of events simultaneously, and prevents it from scaling beyond that level. Use <a>GetFunction</a> to see the current setting for a function.</p> <p>Use <a>GetAccountSettings</a> to see your Regional concurrency limit. You can reserve concurrency for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that aren't configured with a per-function limit. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html">Managing Concurrency</a>.</p>
6618    #[allow(unused_mut)]
6619    async fn put_function_concurrency(
6620        &self,
6621        input: PutFunctionConcurrencyRequest,
6622    ) -> Result<Concurrency, RusotoError<PutFunctionConcurrencyError>> {
6623        let request_uri = format!(
6624            "/2017-10-31/functions/{function_name}/concurrency",
6625            function_name = input.function_name
6626        );
6627
6628        let mut request = SignedRequest::new("PUT", "lambda", &self.region, &request_uri);
6629        request.set_content_type("application/x-amz-json-1.1".to_owned());
6630
6631        let encoded = Some(serde_json::to_vec(&input).unwrap());
6632        request.set_payload(encoded);
6633
6634        let mut response = self
6635            .client
6636            .sign_and_dispatch(request)
6637            .await
6638            .map_err(RusotoError::from)?;
6639        if response.status.as_u16() == 200 {
6640            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6641            let result =
6642                proto::json::ResponsePayload::new(&response).deserialize::<Concurrency, _>()?;
6643
6644            Ok(result)
6645        } else {
6646            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6647            Err(PutFunctionConcurrencyError::from_response(response))
6648        }
6649    }
6650
6651    /// <p>Configures options for <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html">asynchronous invocation</a> on a function, version, or alias. If a configuration already exists for a function, version, or alias, this operation overwrites it. If you exclude any settings, they are removed. To set one option without affecting existing settings for other options, use <a>UpdateFunctionEventInvokeConfig</a>.</p> <p>By default, Lambda retries an asynchronous invocation twice if the function returns an error. It retains events in a queue for up to six hours. When an event fails all processing attempts or stays in the asynchronous invocation queue for too long, Lambda discards it. To retain discarded events, configure a dead-letter queue with <a>UpdateFunctionConfiguration</a>.</p> <p>To send an invocation record to a queue, topic, function, or event bus, specify a <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations">destination</a>. You can configure separate destinations for successful invocations (on-success) and events that fail all processing attempts (on-failure). You can configure destinations in addition to or instead of a dead-letter queue.</p>
6652    #[allow(unused_mut)]
6653    async fn put_function_event_invoke_config(
6654        &self,
6655        input: PutFunctionEventInvokeConfigRequest,
6656    ) -> Result<FunctionEventInvokeConfig, RusotoError<PutFunctionEventInvokeConfigError>> {
6657        let request_uri = format!(
6658            "/2019-09-25/functions/{function_name}/event-invoke-config",
6659            function_name = input.function_name
6660        );
6661
6662        let mut request = SignedRequest::new("PUT", "lambda", &self.region, &request_uri);
6663        request.set_content_type("application/x-amz-json-1.1".to_owned());
6664
6665        let encoded = Some(serde_json::to_vec(&input).unwrap());
6666        request.set_payload(encoded);
6667
6668        let mut params = Params::new();
6669        if let Some(ref x) = input.qualifier {
6670            params.put("Qualifier", x);
6671        }
6672        request.set_params(params);
6673
6674        let mut response = self
6675            .client
6676            .sign_and_dispatch(request)
6677            .await
6678            .map_err(RusotoError::from)?;
6679        if response.status.as_u16() == 200 {
6680            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6681            let result = proto::json::ResponsePayload::new(&response)
6682                .deserialize::<FunctionEventInvokeConfig, _>()?;
6683
6684            Ok(result)
6685        } else {
6686            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6687            Err(PutFunctionEventInvokeConfigError::from_response(response))
6688        }
6689    }
6690
6691    /// <p>Adds a provisioned concurrency configuration to a function's alias or version.</p>
6692    #[allow(unused_mut)]
6693    async fn put_provisioned_concurrency_config(
6694        &self,
6695        input: PutProvisionedConcurrencyConfigRequest,
6696    ) -> Result<
6697        PutProvisionedConcurrencyConfigResponse,
6698        RusotoError<PutProvisionedConcurrencyConfigError>,
6699    > {
6700        let request_uri = format!(
6701            "/2019-09-30/functions/{function_name}/provisioned-concurrency",
6702            function_name = input.function_name
6703        );
6704
6705        let mut request = SignedRequest::new("PUT", "lambda", &self.region, &request_uri);
6706        request.set_content_type("application/x-amz-json-1.1".to_owned());
6707
6708        let encoded = Some(serde_json::to_vec(&input).unwrap());
6709        request.set_payload(encoded);
6710
6711        let mut params = Params::new();
6712        params.put("Qualifier", &input.qualifier);
6713        request.set_params(params);
6714
6715        let mut response = self
6716            .client
6717            .sign_and_dispatch(request)
6718            .await
6719            .map_err(RusotoError::from)?;
6720        if response.status.as_u16() == 202 {
6721            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6722            let result = proto::json::ResponsePayload::new(&response)
6723                .deserialize::<PutProvisionedConcurrencyConfigResponse, _>()?;
6724
6725            Ok(result)
6726        } else {
6727            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6728            Err(PutProvisionedConcurrencyConfigError::from_response(
6729                response,
6730            ))
6731        }
6732    }
6733
6734    /// <p>Removes a statement from the permissions policy for a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">AWS Lambda layer</a>. For more information, see <a>AddLayerVersionPermission</a>.</p>
6735    #[allow(unused_mut)]
6736    async fn remove_layer_version_permission(
6737        &self,
6738        input: RemoveLayerVersionPermissionRequest,
6739    ) -> Result<(), RusotoError<RemoveLayerVersionPermissionError>> {
6740        let request_uri = format!(
6741            "/2018-10-31/layers/{layer_name}/versions/{version_number}/policy/{statement_id}",
6742            layer_name = input.layer_name,
6743            statement_id = input.statement_id,
6744            version_number = input.version_number
6745        );
6746
6747        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
6748        request.set_content_type("application/x-amz-json-1.1".to_owned());
6749
6750        let mut params = Params::new();
6751        if let Some(ref x) = input.revision_id {
6752            params.put("RevisionId", x);
6753        }
6754        request.set_params(params);
6755
6756        let mut response = self
6757            .client
6758            .sign_and_dispatch(request)
6759            .await
6760            .map_err(RusotoError::from)?;
6761        if response.status.as_u16() == 204 {
6762            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6763            let result = ::std::mem::drop(response);
6764
6765            Ok(result)
6766        } else {
6767            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6768            Err(RemoveLayerVersionPermissionError::from_response(response))
6769        }
6770    }
6771
6772    /// <p>Revokes function-use permission from an AWS service or another account. You can get the ID of the statement from the output of <a>GetPolicy</a>.</p>
6773    #[allow(unused_mut)]
6774    async fn remove_permission(
6775        &self,
6776        input: RemovePermissionRequest,
6777    ) -> Result<(), RusotoError<RemovePermissionError>> {
6778        let request_uri = format!(
6779            "/2015-03-31/functions/{function_name}/policy/{statement_id}",
6780            function_name = input.function_name,
6781            statement_id = input.statement_id
6782        );
6783
6784        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
6785        request.set_content_type("application/x-amz-json-1.1".to_owned());
6786
6787        let mut params = Params::new();
6788        if let Some(ref x) = input.qualifier {
6789            params.put("Qualifier", x);
6790        }
6791        if let Some(ref x) = input.revision_id {
6792            params.put("RevisionId", x);
6793        }
6794        request.set_params(params);
6795
6796        let mut response = self
6797            .client
6798            .sign_and_dispatch(request)
6799            .await
6800            .map_err(RusotoError::from)?;
6801        if response.status.as_u16() == 204 {
6802            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6803            let result = ::std::mem::drop(response);
6804
6805            Ok(result)
6806        } else {
6807            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6808            Err(RemovePermissionError::from_response(response))
6809        }
6810    }
6811
6812    /// <p>Adds <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to a function.</p>
6813    #[allow(unused_mut)]
6814    async fn tag_resource(
6815        &self,
6816        input: TagResourceRequest,
6817    ) -> Result<(), RusotoError<TagResourceError>> {
6818        let request_uri = format!("/2017-03-31/tags/{arn}", arn = input.resource);
6819
6820        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
6821        request.set_content_type("application/x-amz-json-1.1".to_owned());
6822
6823        let encoded = Some(serde_json::to_vec(&input).unwrap());
6824        request.set_payload(encoded);
6825
6826        let mut response = self
6827            .client
6828            .sign_and_dispatch(request)
6829            .await
6830            .map_err(RusotoError::from)?;
6831        if response.status.as_u16() == 204 {
6832            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6833            let result = ::std::mem::drop(response);
6834
6835            Ok(result)
6836        } else {
6837            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6838            Err(TagResourceError::from_response(response))
6839        }
6840    }
6841
6842    /// <p>Removes <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> from a function.</p>
6843    #[allow(unused_mut)]
6844    async fn untag_resource(
6845        &self,
6846        input: UntagResourceRequest,
6847    ) -> Result<(), RusotoError<UntagResourceError>> {
6848        let request_uri = format!("/2017-03-31/tags/{arn}", arn = input.resource);
6849
6850        let mut request = SignedRequest::new("DELETE", "lambda", &self.region, &request_uri);
6851        request.set_content_type("application/x-amz-json-1.1".to_owned());
6852
6853        let mut params = Params::new();
6854        for item in input.tag_keys.iter() {
6855            params.put("tagKeys", item);
6856        }
6857        request.set_params(params);
6858
6859        let mut response = self
6860            .client
6861            .sign_and_dispatch(request)
6862            .await
6863            .map_err(RusotoError::from)?;
6864        if response.status.as_u16() == 204 {
6865            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6866            let result = ::std::mem::drop(response);
6867
6868            Ok(result)
6869        } else {
6870            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6871            Err(UntagResourceError::from_response(response))
6872        }
6873    }
6874
6875    /// <p>Updates the configuration of a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
6876    #[allow(unused_mut)]
6877    async fn update_alias(
6878        &self,
6879        input: UpdateAliasRequest,
6880    ) -> Result<AliasConfiguration, RusotoError<UpdateAliasError>> {
6881        let request_uri = format!(
6882            "/2015-03-31/functions/{function_name}/aliases/{name}",
6883            function_name = input.function_name,
6884            name = input.name
6885        );
6886
6887        let mut request = SignedRequest::new("PUT", "lambda", &self.region, &request_uri);
6888        request.set_content_type("application/x-amz-json-1.1".to_owned());
6889
6890        let encoded = Some(serde_json::to_vec(&input).unwrap());
6891        request.set_payload(encoded);
6892
6893        let mut response = self
6894            .client
6895            .sign_and_dispatch(request)
6896            .await
6897            .map_err(RusotoError::from)?;
6898        if response.status.as_u16() == 200 {
6899            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6900            let result = proto::json::ResponsePayload::new(&response)
6901                .deserialize::<AliasConfiguration, _>()?;
6902
6903            Ok(result)
6904        } else {
6905            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6906            Err(UpdateAliasError::from_response(response))
6907        }
6908    }
6909
6910    /// <p><p>Updates an event source mapping. You can change the function that AWS Lambda invokes, or pause invocation and resume later from the same location.</p> <p>The following error handling options are only available for stream sources (DynamoDB and Kinesis):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age.</p> </li> <li> <p> <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries.</p> </li> <li> <p> <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p> </li> </ul></p>
6911    #[allow(unused_mut)]
6912    async fn update_event_source_mapping(
6913        &self,
6914        input: UpdateEventSourceMappingRequest,
6915    ) -> Result<EventSourceMappingConfiguration, RusotoError<UpdateEventSourceMappingError>> {
6916        let request_uri = format!(
6917            "/2015-03-31/event-source-mappings/{uuid}",
6918            uuid = input.uuid
6919        );
6920
6921        let mut request = SignedRequest::new("PUT", "lambda", &self.region, &request_uri);
6922        request.set_content_type("application/x-amz-json-1.1".to_owned());
6923
6924        let encoded = Some(serde_json::to_vec(&input).unwrap());
6925        request.set_payload(encoded);
6926
6927        let mut response = self
6928            .client
6929            .sign_and_dispatch(request)
6930            .await
6931            .map_err(RusotoError::from)?;
6932        if response.status.as_u16() == 202 {
6933            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6934            let result = proto::json::ResponsePayload::new(&response)
6935                .deserialize::<EventSourceMappingConfiguration, _>()?;
6936
6937            Ok(result)
6938        } else {
6939            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6940            Err(UpdateEventSourceMappingError::from_response(response))
6941        }
6942    }
6943
6944    /// <p>Updates a Lambda function's code.</p> <p>The function's code is locked when you publish a version. You can't modify the code of a published version, only the unpublished version.</p>
6945    #[allow(unused_mut)]
6946    async fn update_function_code(
6947        &self,
6948        input: UpdateFunctionCodeRequest,
6949    ) -> Result<FunctionConfiguration, RusotoError<UpdateFunctionCodeError>> {
6950        let request_uri = format!(
6951            "/2015-03-31/functions/{function_name}/code",
6952            function_name = input.function_name
6953        );
6954
6955        let mut request = SignedRequest::new("PUT", "lambda", &self.region, &request_uri);
6956        request.set_content_type("application/x-amz-json-1.1".to_owned());
6957
6958        let encoded = Some(serde_json::to_vec(&input).unwrap());
6959        request.set_payload(encoded);
6960
6961        let mut response = self
6962            .client
6963            .sign_and_dispatch(request)
6964            .await
6965            .map_err(RusotoError::from)?;
6966        if response.status.as_u16() == 200 {
6967            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6968            let result = proto::json::ResponsePayload::new(&response)
6969                .deserialize::<FunctionConfiguration, _>()?;
6970
6971            Ok(result)
6972        } else {
6973            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6974            Err(UpdateFunctionCodeError::from_response(response))
6975        }
6976    }
6977
6978    /// <p>Modify the version-specific settings of a Lambda function.</p> <p>When you update a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute. During this time, you can't modify the function, but you can still invoke it. The <code>LastUpdateStatus</code>, <code>LastUpdateStatusReason</code>, and <code>LastUpdateStatusReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a> indicate when the update is complete and the function is processing events with the new configuration. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Function States</a>.</p> <p>These settings can vary between versions of a function and are locked when you publish a version. You can't modify the configuration of a published version, only the unpublished version.</p> <p>To configure function concurrency, use <a>PutFunctionConcurrency</a>. To grant invoke permissions to an account or AWS service, use <a>AddPermission</a>.</p>
6979    #[allow(unused_mut)]
6980    async fn update_function_configuration(
6981        &self,
6982        input: UpdateFunctionConfigurationRequest,
6983    ) -> Result<FunctionConfiguration, RusotoError<UpdateFunctionConfigurationError>> {
6984        let request_uri = format!(
6985            "/2015-03-31/functions/{function_name}/configuration",
6986            function_name = input.function_name
6987        );
6988
6989        let mut request = SignedRequest::new("PUT", "lambda", &self.region, &request_uri);
6990        request.set_content_type("application/x-amz-json-1.1".to_owned());
6991
6992        let encoded = Some(serde_json::to_vec(&input).unwrap());
6993        request.set_payload(encoded);
6994
6995        let mut response = self
6996            .client
6997            .sign_and_dispatch(request)
6998            .await
6999            .map_err(RusotoError::from)?;
7000        if response.status.as_u16() == 200 {
7001            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7002            let result = proto::json::ResponsePayload::new(&response)
7003                .deserialize::<FunctionConfiguration, _>()?;
7004
7005            Ok(result)
7006        } else {
7007            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7008            Err(UpdateFunctionConfigurationError::from_response(response))
7009        }
7010    }
7011
7012    /// <p>Updates the configuration for asynchronous invocation for a function, version, or alias.</p> <p>To configure options for asynchronous invocation, use <a>PutFunctionEventInvokeConfig</a>.</p>
7013    #[allow(unused_mut)]
7014    async fn update_function_event_invoke_config(
7015        &self,
7016        input: UpdateFunctionEventInvokeConfigRequest,
7017    ) -> Result<FunctionEventInvokeConfig, RusotoError<UpdateFunctionEventInvokeConfigError>> {
7018        let request_uri = format!(
7019            "/2019-09-25/functions/{function_name}/event-invoke-config",
7020            function_name = input.function_name
7021        );
7022
7023        let mut request = SignedRequest::new("POST", "lambda", &self.region, &request_uri);
7024        request.set_content_type("application/x-amz-json-1.1".to_owned());
7025
7026        let encoded = Some(serde_json::to_vec(&input).unwrap());
7027        request.set_payload(encoded);
7028
7029        let mut params = Params::new();
7030        if let Some(ref x) = input.qualifier {
7031            params.put("Qualifier", x);
7032        }
7033        request.set_params(params);
7034
7035        let mut response = self
7036            .client
7037            .sign_and_dispatch(request)
7038            .await
7039            .map_err(RusotoError::from)?;
7040        if response.status.as_u16() == 200 {
7041            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7042            let result = proto::json::ResponsePayload::new(&response)
7043                .deserialize::<FunctionEventInvokeConfig, _>()?;
7044
7045            Ok(result)
7046        } else {
7047            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7048            Err(UpdateFunctionEventInvokeConfigError::from_response(
7049                response,
7050            ))
7051        }
7052    }
7053}