forked from aws-powertools/powertools-lambda-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIPowertoolsConfigurations.cs
161 lines (136 loc) · 5.51 KB
/
IPowertoolsConfigurations.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace AWS.Lambda.Powertools.Common;
/// <summary>
/// Interface IPowertoolsConfigurations
/// </summary>
public interface IPowertoolsConfigurations
{
/// <summary>
/// Gets the service.
/// </summary>
/// <value>The service.</value>
string Service { get; }
/// <summary>
/// Gets a value indicating whether this instance is service defined.
/// </summary>
/// <value><c>true</c> if this instance is service defined; otherwise, <c>false</c>.</value>
bool IsServiceDefined { get; }
/// <summary>
/// Gets a value indicating whether [tracer capture response].
/// </summary>
/// <value><c>true</c> if [tracer capture response]; otherwise, <c>false</c>.</value>
bool TracerCaptureResponse { get; }
/// <summary>
/// Gets a value indicating whether [tracer capture error].
/// </summary>
/// <value><c>true</c> if [tracer capture error]; otherwise, <c>false</c>.</value>
bool TracerCaptureError { get; }
/// <summary>
/// Gets a value indicating whether this instance is sam local.
/// </summary>
/// <value><c>true</c> if this instance is sam local; otherwise, <c>false</c>.</value>
bool IsSamLocal { get; }
/// <summary>
/// Gets the metrics namespace.
/// </summary>
/// <value>The metrics namespace.</value>
string MetricsNamespace { get; }
/// <summary>
/// Gets the Powertools log level.
/// </summary>
/// <value>The log level.</value>
string LogLevel { get; }
/// <summary>
/// Gets the AWS Lambda log level.
/// </summary>
/// <value>The log level.</value>
string AWSLambdaLogLevel { get; }
/// <summary>
/// Gets the logger sample rate.
/// </summary>
/// <value>The logger sample rate.</value>
double? LoggerSampleRate { get; }
/// <summary>
/// Gets a value indicating whether [logger log event].
/// </summary>
/// <value><c>true</c> if [logger log event]; otherwise, <c>false</c>.</value>
bool LoggerLogEvent { get; }
/// <summary>
/// Gets the logger output casing.
/// </summary>
/// <value>The logger output casing. Defaults to snake case.</value>
string LoggerOutputCase { get; }
/// <summary>
/// Gets the X-Ray trace identifier.
/// </summary>
/// <value>The X-Ray trace identifier.</value>
string XRayTraceId { get; }
/// <summary>
/// Gets a value indicating whether this instance is Lambda.
/// </summary>
/// <value><c>true</c> if this instance is Lambda; otherwise, <c>false</c>.</value>
bool IsLambdaEnvironment { get; }
/// <summary>
/// Gets a value indicating whether [tracing is disabled].
/// </summary>
/// <value><c>true</c> if [tracing is disabled]; otherwise, <c>false</c>.</value>
bool TracingDisabled { get; }
/// <summary>
/// Gets the environment variable.
/// </summary>
/// <param name="variable">The variable.</param>
/// <returns>System.String.</returns>
string GetEnvironmentVariable(string variable);
/// <summary>
/// Gets the environment variable or default.
/// </summary>
/// <param name="variable">The variable.</param>
/// <param name="defaultValue">The default value.</param>
/// <returns>System.String.</returns>
string GetEnvironmentVariableOrDefault(string variable, string defaultValue);
/// <summary>
/// Gets the environment variable or default.
/// </summary>
/// <param name="variable">The variable.</param>
/// <param name="defaultValue">if set to <c>true</c> [default value].</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
bool GetEnvironmentVariableOrDefault(string variable, bool defaultValue);
/// <summary>
/// Sets the execution Environment Variable (AWS_EXECUTION_ENV)
/// </summary>
/// <param name="type"></param>
void SetExecutionEnvironment<T>(T type);
/// <summary>
/// Gets a value indicating whether [Idempotency is disabled].
/// </summary>
/// <value><c>true</c> if [Idempotency is disabled]; otherwise, <c>false</c>.</value>
bool IdempotencyDisabled { get; }
/// <summary>
/// Gets the error handling policy to apply during batch processing.
/// </summary>
/// <value>Defaults to 'DeriveFromEvent'.</value>
string BatchProcessingErrorHandlingPolicy { get; }
/// <summary>
/// Gets a value indicating whether Batch processing in parallel is enabled.
/// </summary>
/// <value>Defaults to false</value>
bool BatchParallelProcessingEnabled { get; }
/// <summary>
/// Gets the maximum degree of parallelism to apply during batch processing.
/// </summary>
/// <value>Defaults to 1 (no parallelism). Specify -1 to automatically use the value of <see cref="System.Environment.ProcessorCount">ProcessorCount</see>.</value>
int BatchProcessingMaxDegreeOfParallelism { get; }
}