forked from aws/aws-lambda-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
APIGatewayCustomAuthorizerPolicy.cs
56 lines (51 loc) · 1.73 KB
/
APIGatewayCustomAuthorizerPolicy.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
namespace Amazon.Lambda.APIGatewayEvents
{
using System.Collections.Generic;
/// <summary>
/// An object representing an IAM policy.
/// </summary>
public class APIGatewayCustomAuthorizerPolicy
{
/// <summary>
/// Gets or sets the IAM API version.
/// </summary>
#if NETCOREAPP_3_1
[System.Text.Json.Serialization.JsonPropertyName("Version")]
#endif
public string Version { get; set; } = "2012-10-17";
/// <summary>
/// Gets or sets a list of IAM policy statements to apply.
/// </summary>
#if NETCOREAPP_3_1
[System.Text.Json.Serialization.JsonPropertyName("Statement")]
#endif
public List<IAMPolicyStatement> Statement { get; set; } = new List<IAMPolicyStatement>();
/// <summary>
/// A class representing an IAM Policy Statement.
/// </summary>
public class IAMPolicyStatement
{
/// <summary>
/// Gets or sets the effect the statement has.
/// </summary>
#if NETCOREAPP_3_1
[System.Text.Json.Serialization.JsonPropertyName("Effect")]
#endif
public string Effect { get; set; } = "Allow";
/// <summary>
/// Gets or sets the action/s the statement has.
/// </summary>
#if NETCOREAPP_3_1
[System.Text.Json.Serialization.JsonPropertyName("Action")]
#endif
public HashSet<string> Action { get; set; }
/// <summary>
/// Gets or sets the resources the statement applies to.
/// </summary>
#if NETCOREAPP_3_1
[System.Text.Json.Serialization.JsonPropertyName("Resource")]
#endif
public HashSet<string> Resource { get; set; }
}
}
}