Framework/Models/AzSKEvent.ps1

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
Set-StrictMode -Version Latest
class AzSKRootEvent {
    static [string] $CustomMessage = "AzSK.CustomMessage"; 

    static [string] $GenerateRunIdentifier = "AzSK.GenerateRunIdentifier"; 
    static [string] $UnsupportedResources = "AzSK.UnsupportedResources";
    static [string] $WriteCSV = "AzSK.WriteCSV";
    static [string] $PublishCustomData = "AzSK.PublishCustomData"
    static [string] $WriteExcludedResources= "AzSK.WriteExcludedResources"


    #Command level event
    static [string] $CommandStarted = "AzSK.Command.Started"; 
    static [string] $CommandCompleted = "AzSK.Command.Completed"; 
    static [string] $CommandError = "AzSK.Command.Error"; 
    static [string] $CommandProcessing = "AzSK.Command.Processing";

    static [string] $PolicyMigrationCommandStarted = "AzSK.Command.PolicyMigrationStarted";
    static [string] $PolicyMigrationCommandCompleted = "AzSK.Command.PolicyMigrationCompleted"
}

class SubscriptionContext {
    [string] $SubscriptionId = "";
    [string] $SubscriptionName = "";
    [string] $Scope = "";
    hidden [hashtable] $SubscriptionMetadata = @{}
}

class AzSKRootEventArgument {
    [SubscriptionContext] $SubscriptionContext;
    [MessageData[]] $Messages = @();
    hidden [System.Management.Automation.ErrorRecord] $ExceptionMessage
}
class CustomData {
    [string] $Name
    [PSObject] $Value
}