File tree Expand file tree Collapse file tree 12 files changed +78
-6
lines changed
Libraries/src/Amazon.Lambda.Annotations Expand file tree Collapse file tree 12 files changed +78
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Lambda . Annotations . APIGateway
4
4
{
5
+ /// <summary>
6
+ /// Maps this parameter to the HTTP request body
7
+ /// </summary>
8
+ /// <remarks>
9
+ /// If the parameter is a complex type then the request body will be assumed to be JSON and deserialized into the type.
10
+ /// </remarks>
5
11
[ AttributeUsage ( AttributeTargets . Parameter ) ]
6
12
public class FromBodyAttribute : Attribute
7
13
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Lambda . Annotations . APIGateway
4
4
{
5
+ /// <summary>
6
+ /// Maps this parameter to an HTTP header value
7
+ /// </summary>
5
8
[ AttributeUsage ( AttributeTargets . Parameter ) ]
6
9
public class FromHeaderAttribute : Attribute , INamedAttribute
7
10
{
11
+ /// <summary>
12
+ /// Name of the parameter
13
+ /// </summary>
8
14
public string Name { get ; set ; }
9
15
}
10
16
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Lambda . Annotations . APIGateway
4
4
{
5
+ /// <summary>
6
+ /// Maps this parameter to a query string parameter
7
+ /// </summary>
5
8
[ AttributeUsage ( AttributeTargets . Parameter ) ]
6
9
public class FromQueryAttribute : Attribute , INamedAttribute
7
10
{
11
+ /// <summary>
12
+ /// Name of the parameter
13
+ /// </summary>
8
14
public string Name { get ; set ; }
9
15
}
10
16
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Lambda . Annotations . APIGateway
4
4
{
5
+ /// <summary>
6
+ /// Maps this parameter to a resource path segment
7
+ /// </summary>
5
8
[ AttributeUsage ( AttributeTargets . Parameter ) ]
6
9
public class FromRouteAttribute : Attribute , INamedAttribute
7
10
{
11
+ /// <summary>
12
+ /// Name of the parameter
13
+ /// </summary>
8
14
public string Name { get ; set ; }
9
15
}
10
16
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Lambda . Annotations . APIGateway
4
4
{
5
+ /// <summary>
6
+ /// Configures the Lambda function to be called from an API Gateway HTTP API
7
+ /// </summary>
8
+ /// <remarks>
9
+ /// The HTTP method, HTTP API payload version and resource path are required to be set on the attribute.
10
+ /// </remarks>
5
11
[ AttributeUsage ( AttributeTargets . Method ) ]
6
12
public class HttpApiAttribute : Attribute
7
13
{
14
+ /// <inheritdoc cref="HttpApiVersion"/>
8
15
public HttpApiVersion Version { get ; set ; } = HttpApiVersion . V2 ;
16
+
17
+ /// <summary>
18
+ /// Resource path
19
+ /// </summary>
9
20
public string Template { get ; set ; }
21
+
22
+ /// <inheritdoc cref="LambdaHttpMethod"/>
10
23
public LambdaHttpMethod Method { get ; set ; }
11
24
12
25
public HttpApiAttribute ( LambdaHttpMethod method , string template )
Original file line number Diff line number Diff line change 1
1
namespace Amazon . Lambda . Annotations . APIGateway
2
2
{
3
+ /// <summary>
4
+ /// The <see href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.proxy-format">
5
+ /// Payload Format Version</see> for an API Gateway HTTP API.
6
+ /// </summary>
3
7
public enum HttpApiVersion
4
8
{
5
9
V1 ,
Original file line number Diff line number Diff line change 1
1
namespace Amazon . Lambda . Annotations . APIGateway
2
2
{
3
+ /// <summary>
4
+ /// HTTP Method/Verb
5
+ /// </summary>
3
6
public enum LambdaHttpMethod
4
7
{
5
8
Any ,
Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Lambda . Annotations . APIGateway
4
4
{
5
+ /// <summary>
6
+ /// Configures the Lambda function to be called from an API Gateway REST API
7
+ /// </summary>
8
+ /// <remarks>
9
+ /// The HTTP method and resource path are required to be set on the attribute.
10
+ /// </remarks>
5
11
[ AttributeUsage ( AttributeTargets . Method ) ]
6
12
public class RestApiAttribute : Attribute
7
13
{
14
+ /// <summary>
15
+ /// Resource path
16
+ /// </summary>
8
17
public string Template { get ; set ; }
18
+
19
+ /// <inheritdoc cref="LambdaHttpMethod" />
9
20
public LambdaHttpMethod Method { get ; set ; }
10
21
11
22
public RestApiAttribute ( LambdaHttpMethod method , string template )
Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Lambda . Annotations
4
4
{
5
+ /// <summary>
6
+ /// Indicates that this service parameter will be injected into the Lambda function invocation.
7
+ /// </summary>
8
+ /// <remarks>
9
+ /// Services injected using the FromServices attribute are created within the scope
10
+ /// that is created for each Lambda invocation.
11
+ /// </remarks>
5
12
[ AttributeUsage ( AttributeTargets . Parameter ) ]
6
13
public class FromServicesAttribute : Attribute
7
14
{
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections . Generic ;
3
- using System . Text ;
4
2
5
3
namespace Amazon . Lambda . Annotations
6
4
{
5
+ /// <summary>
6
+ /// Indicates this method should be exposed as a Lambda function
7
+ /// </summary>
7
8
[ AttributeUsage ( AttributeTargets . Method ) ]
8
9
public class LambdaFunctionAttribute : Attribute
9
10
{
@@ -32,10 +33,7 @@ public class LambdaFunctionAttribute : Attribute
32
33
/// </summary>
33
34
public string Policies { get ; set ; }
34
35
35
- /// <summary>
36
- /// The deployment package type of the Lambda function. The supported values are Zip or Image. The default value is Zip.
37
- /// For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html">here</a>
38
- /// </summary>
36
+ /// <inheritdoc cref="LambdaPackageType" />
39
37
public LambdaPackageType PackageType { get ; set ; }
40
38
}
41
39
}
Original file line number Diff line number Diff line change 1
1
namespace Amazon . Lambda . Annotations
2
2
{
3
+ /// <summary>
4
+ /// The deployment package type of the Lambda function. The supported values are Zip or Image. The default value is Zip.
5
+ /// For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html">here</a>
6
+ /// </summary>
3
7
public enum LambdaPackageType
4
8
{
5
9
Zip = 0 ,
Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Lambda . Annotations
4
4
{
5
+ /// <summary>
6
+ /// Indicates that the class will be used for registering services that
7
+ /// can be injected into Lambda functions.
8
+ /// </summary>
9
+ /// <remarks>
10
+ /// The class should implement a ConfigureServices method that
11
+ /// adds one or more services to an IServiceCollection.
12
+ /// </remarks>
5
13
[ AttributeUsage ( AttributeTargets . Class ) ]
6
14
public class LambdaStartupAttribute : Attribute
7
15
{
You can’t perform that action at this time.
0 commit comments