Audit.NET.AmazonQLDB
23.0.0
See the version list below for details.
dotnet add package Audit.NET.AmazonQLDB --version 23.0.0
NuGet\Install-Package Audit.NET.AmazonQLDB -Version 23.0.0
<PackageReference Include="Audit.NET.AmazonQLDB" Version="23.0.0" />
paket add Audit.NET.AmazonQLDB --version 23.0.0
#r "nuget: Audit.NET.AmazonQLDB, 23.0.0"
// Install Audit.NET.AmazonQLDB as a Cake Addin #addin nuget:?package=Audit.NET.AmazonQLDB&version=23.0.0 // Install Audit.NET.AmazonQLDB as a Cake Tool #tool nuget:?package=Audit.NET.AmazonQLDB&version=23.0.0
Audit.NET.AmazonQLDB
Amazon Amazon QLDB provider for Audit.NET library (An extensible framework to audit executing operations in .NET).
Store the audit events in Amazon QLDB tables using the Amazon.QLDB.Driver library.
Install
NuGet Package To install the package run the following command on the Package Manager Console:
PM> Install-Package Audit.NET.AmazonQLDB
Usage
Please see the Audit.NET Readme
Configuration
Set the static Audit.Core.Configuration.DataProvider
property to set the Amazon QLDB data provider, or call the UseAmazonQLDB
method on the fluent configuration. This should be done before any AuditScope
creation, i.e. during application startup.
For example:
Audit.Core.Configuration.DataProvider = new AmazonQldbDataProvider()
{
QldbDriver = Lazy<IQldbDriver>(() => QldbDriver.Builder()
.WithLedger("AuditEvents")
.Build()),
TableNameBuilder = ev => "MyTable"
};
Or even shorter using the constructor overload that accepts a fluent API:
Audit.Core.Configuration.DataProvider = new AmazonQldbDataProvider(config => config
.WithQldbDriver(QldbDriver.Builder()
.WithLedger("AuditEvents")
.Build())
.Table("MyTable"));
Or by using the global setup extension UseAmazonQldb()
:
Audit.Core.Configuration.Setup()
.UseAmazonQldb(config => config
.WithQldbDriver(QldbDriver.Builder()
.WithLedger("AuditEvents")
.Build())
.Table("MyTable"));
You can provide the table name setting as a string or as a function of the Audit Event.
Provider Options
- QldbDriver: The Amazon Qldb driver creator
QldbDriver
. - TableNameBuilder: A function of the audit event that returns the Table Name to use.
- CustomAttributes: A dictionary with additional fields to be included in the document and as custom fields on the audit event.
Fluent API Methods
The provider options can be set with a fluent API described by the following methods:
Connection level
- WithQldbDriver(): Use the given AmazonQLDB driver instance (
QldbDriver
). - chaining UseXXX() as an alternative to
WithQldbDriver()
for having the possibility to build a QldbDriver with one or more options- UseLedger() - use a driver with the given ledger name
- UseAwsCredentials() - use a driver with the given AWS credentials
- UseLogger() - use a driver with the given logger
- UseQldbSessionConfig() - use a driver with the given session config
- UseRetryLogging() - use a driver with logging on retry
Table level
- Table(): To specify the table name (as a string or a function of the audit event).
Attributes level
- SetAttribute(): To specify additional top-level attributes on the document before saving.
Audit.Core.Configuration.Setup()
.UseAmazonQldb(config =>
{
config
.UseLedger("AuditEvents")
.UseQldbSessionConfig(new AmazonQLDBSessionConfig
{
AllowAutoRedirect = true
})
.UseMaxConcurrentTransactions(5)
.And
.Table(ev => ev.EventType)
.SetAttribute("Source", ev => "Production");
});
Query events
This provider implements GetEvent
and GetEventAsync
methods to obtain an audit event by id:
var event = AmazonQldbDataProvider.GetEvent();
The
eventId
parameter on the genericGetEvent(object eventId)
must be of type (ValueTuple<
string, string>
), The first element must be the documentId, and the second element should be the table name.
// Get event with the given documentId and table name
var event = AmazonQldbDataProvider.GetEvent(("GpIvgdXq44f7QRuLLgldYJ", "AuditEvents"));
Constraints
This provider has the following constraints:
- The ledger to store the audit events must exists on AmazonQLDB.
(Note you can add properties to the AuditEvent as Custom Fields with the
SetAttribute()
method on the provider configuration)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Amazon.QLDB.Driver (>= 1.4.1)
- Audit.NET (>= 23.0.0)
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
27.2.0 | 4 | 11/23/2024 |
27.1.1 | 74 | 10/28/2024 |
27.1.0 | 77 | 10/24/2024 |
27.0.3 | 87 | 9/25/2024 |
27.0.2 | 101 | 9/19/2024 |
27.0.1 | 103 | 9/4/2024 |
27.0.0 | 94 | 9/3/2024 |
26.0.1 | 123 | 8/22/2024 |
26.0.0 | 101 | 7/19/2024 |
25.0.7 | 80 | 7/4/2024 |
25.0.6 | 97 | 6/24/2024 |
25.0.5 | 93 | 6/18/2024 |
25.0.4 | 119 | 3/24/2024 |
25.0.3 | 127 | 3/13/2024 |
25.0.2 | 111 | 3/12/2024 |
25.0.1 | 107 | 2/28/2024 |
25.0.0 | 122 | 2/16/2024 |
24.0.1 | 129 | 2/12/2024 |
24.0.0 | 107 | 2/12/2024 |
23.0.0 | 216 | 12/14/2023 |
22.1.0 | 1,014 | 12/9/2023 |
22.0.2 | 166 | 12/1/2023 |
22.0.1 | 156 | 11/16/2023 |
22.0.0 | 133 | 11/14/2023 |
21.1.0 | 176 | 10/9/2023 |
21.0.4 | 158 | 9/15/2023 |
21.0.3 | 208 | 7/9/2023 |
21.0.2 | 188 | 7/6/2023 |
21.0.1 | 194 | 5/27/2023 |
21.0.0 | 235 | 4/15/2023 |
20.2.4 | 284 | 3/27/2023 |
20.2.3 | 292 | 3/17/2023 |
20.2.2 | 267 | 3/14/2023 |
20.2.1 | 263 | 3/11/2023 |
20.2.0 | 264 | 3/7/2023 |
20.1.6 | 320 | 2/23/2023 |
20.1.5 | 292 | 2/9/2023 |
20.1.4 | 330 | 1/28/2023 |
20.1.3 | 334 | 12/21/2022 |
20.1.2 | 358 | 12/14/2022 |
20.1.1 | 350 | 12/12/2022 |
20.1.0 | 372 | 12/4/2022 |
20.0.4 | 373 | 11/30/2022 |
20.0.3 | 424 | 10/28/2022 |
20.0.2 | 418 | 10/26/2022 |
20.0.1 | 456 | 10/21/2022 |
20.0.0 | 447 | 10/1/2022 |
19.4.1 | 488 | 9/10/2022 |
19.4.0 | 479 | 9/2/2022 |
19.3.0 | 474 | 8/23/2022 |
19.2.2 | 488 | 8/11/2022 |
19.2.1 | 507 | 8/6/2022 |
19.2.0 | 507 | 7/24/2022 |
19.1.4 | 540 | 5/23/2022 |
19.1.3 | 508 | 5/22/2022 |
19.1.2 | 490 | 5/18/2022 |
19.1.1 | 500 | 4/28/2022 |
19.1.0 | 506 | 4/10/2022 |
19.0.7 | 466 | 3/13/2022 |
19.0.6 | 511 | 3/7/2022 |
19.0.5 | 542 | 1/28/2022 |
19.0.4 | 538 | 1/23/2022 |
19.0.3 | 392 | 12/14/2021 |
19.0.2 | 378 | 12/11/2021 |
19.0.1 | 721 | 11/20/2021 |
19.0.0 | 382 | 11/11/2021 |
19.0.0-rc.net60.2 | 155 | 9/26/2021 |
19.0.0-rc.net60.1 | 196 | 9/16/2021 |
18.1.6 | 451 | 9/26/2021 |
18.1.5 | 452 | 9/7/2021 |
18.1.4 | 423 | 9/6/2021 |
18.1.3 | 468 | 8/19/2021 |
18.1.2 | 532 | 8/8/2021 |
18.1.1 | 436 | 8/5/2021 |
18.1.0 | 489 | 8/1/2021 |
18.0.1 | 530 | 7/30/2021 |
18.0.0 | 514 | 7/26/2021 |
17.0.8 | 503 | 7/7/2021 |
17.0.7 | 521 | 6/16/2021 |
17.0.6 | 481 | 6/5/2021 |
17.0.5 | 485 | 5/28/2021 |
17.0.4 | 434 | 5/4/2021 |
17.0.3 | 445 | 5/1/2021 |
17.0.2 | 472 | 4/22/2021 |
17.0.1 | 454 | 4/18/2021 |
17.0.0 | 505 | 3/26/2021 |
16.5.6 | 491 | 3/25/2021 |
16.5.5 | 464 | 3/23/2021 |
16.5.4 | 577 | 3/9/2021 |
16.5.3 | 436 | 2/26/2021 |
16.5.2 | 434 | 2/23/2021 |
16.5.1 | 468 | 2/21/2021 |
16.5.0 | 461 | 2/17/2021 |
16.4.5 | 468 | 2/15/2021 |
16.4.4 | 479 | 2/5/2021 |
16.4.3 | 466 | 1/27/2021 |
16.4.2 | 496 | 1/22/2021 |
16.4.1 | 539 | 1/21/2021 |
16.4.0 | 519 | 1/11/2021 |
16.3.3 | 523 | 1/8/2021 |
16.3.2 | 554 | 1/3/2021 |
16.3.1 | 508 | 12/31/2020 |
16.3.0 | 466 | 12/30/2020 |
16.2.1 | 505 | 12/27/2020 |
16.2.0 | 900 | 10/13/2020 |
16.1.5 | 694 | 10/4/2020 |
16.1.4 | 603 | 9/17/2020 |
16.1.3 | 668 | 9/13/2020 |
16.1.2 | 555 | 9/9/2020 |
16.1.1 | 562 | 9/3/2020 |
16.1.0 | 569 | 8/19/2020 |
16.0.3 | 600 | 8/15/2020 |
16.0.2 | 599 | 8/9/2020 |
16.0.1 | 656 | 8/8/2020 |
16.0.0 | 618 | 8/7/2020 |
15.3.0 | 633 | 7/23/2020 |
15.2.3 | 573 | 7/14/2020 |