VaporShell.CloudTrail.Classes.ps1

using namespace System
using namespace System.Collections
using namespace System.Collections.Generic
using namespace System.IO
using namespace System.Management.Automation
[CmdletBinding()]
Param()

Write-Verbose "Importing class 'CloudTrailTrailEventSelector'"

class CloudTrailTrailEventSelector : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSCloudTrailTrailEventSelector'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html'

    hidden [object] $_dataResources
    hidden [object] $_includeManagementEvents
    hidden [object] $_readWriteType
    hidden [object] $_excludeManagementEventSources

    [CloudTrailTrailDataResource[]] $DataResources
    [bool] $IncludeManagementEvents
    [string] $ReadWriteType
    [string[]] $ExcludeManagementEventSources

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name DataResources -Value {
            $this._dataResources
        } -SecondValue {
            param([ValidateType(([CloudTrailTrailDataResource], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this._dataResources = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name IncludeManagementEvents -Value {
            $this._includeManagementEvents
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._includeManagementEvents = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ReadWriteType -Value {
            $this._readWriteType
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._readWriteType = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ExcludeManagementEventSources -Value {
            $this._excludeManagementEventSources
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this._excludeManagementEventSources = @($value)
        }
    }

    CloudTrailTrailEventSelector() : base() {}
    CloudTrailTrailEventSelector([IDictionary] $props) : base($props) {}
    CloudTrailTrailEventSelector([psobject] $props) : base($props) {}
}

Write-Verbose "Importing class 'CloudTrailTrailDataResource'"

class CloudTrailTrailDataResource : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSCloudTrailTrailDataResource'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-dataresource.html'

    hidden [object] $_type
    hidden [object] $_values

    [string] $Type
    [string[]] $Values

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name Type -Value {
            $this._type
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._type = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Values -Value {
            $this._values
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this._values = @($value)
        }
    }

    CloudTrailTrailDataResource() : base() {}
    CloudTrailTrailDataResource([IDictionary] $props) : base($props) {}
    CloudTrailTrailDataResource([psobject] $props) : base($props) {}
}

Write-Verbose "Importing class 'CloudTrailTrailInsightSelector'"

class CloudTrailTrailInsightSelector : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSCloudTrailTrailInsightSelector'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-insightselector.html'

    hidden [object] $_insightType

    [string] $InsightType

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name InsightType -Value {
            $this._insightType
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._insightType = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
    }

    CloudTrailTrailInsightSelector() : base() {}
    CloudTrailTrailInsightSelector([IDictionary] $props) : base($props) {}
    CloudTrailTrailInsightSelector([psobject] $props) : base($props) {}
}

Write-Verbose "Importing class 'CloudTrailTrail'"

class CloudTrailTrail : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSCloudTrailTrail'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html'

    hidden [string[]] $_attributes = @('Arn','SnsTopicArn')
    hidden [object] $_condition

    [string] $Type = 'AWS::CloudTrail::Trail'
    [string] $CloudWatchLogsLogGroupArn
    [string] $CloudWatchLogsRoleArn
    [bool] $EnableLogFileValidation
    [CloudTrailTrailEventSelector[]] $EventSelectors
    [bool] $IncludeGlobalServiceEvents
    [bool] $IsLogging
    [bool] $IsMultiRegionTrail
    [bool] $IsOrganizationTrail
    [string] $KMSKeyId
    [string] $S3BucketName
    [string] $S3KeyPrefix
    [string] $SnsTopicName
    [VSTag[]] $Tags
    [string] $TrailName
    [CloudTrailTrailInsightSelector[]] $InsightSelectors
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name CloudWatchLogsLogGroupArn -Value {
            $this.Properties['CloudWatchLogsLogGroupArn']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['CloudWatchLogsLogGroupArn'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name CloudWatchLogsRoleArn -Value {
            $this.Properties['CloudWatchLogsRoleArn']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['CloudWatchLogsRoleArn'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name EnableLogFileValidation -Value {
            $this.Properties['EnableLogFileValidation']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['EnableLogFileValidation'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name EventSelectors -Value {
            $this.Properties['EventSelectors']
        } -SecondValue {
            param([ValidateType(([CloudTrailTrailEventSelector], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['EventSelectors'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name IncludeGlobalServiceEvents -Value {
            $this.Properties['IncludeGlobalServiceEvents']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['IncludeGlobalServiceEvents'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name IsLogging -Value {
            $this.Properties['IsLogging']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['IsLogging'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name IsMultiRegionTrail -Value {
            $this.Properties['IsMultiRegionTrail']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['IsMultiRegionTrail'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name IsOrganizationTrail -Value {
            $this.Properties['IsOrganizationTrail']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['IsOrganizationTrail'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name KMSKeyId -Value {
            $this.Properties['KMSKeyId']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['KMSKeyId'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name S3BucketName -Value {
            $this.Properties['S3BucketName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['S3BucketName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name S3KeyPrefix -Value {
            $this.Properties['S3KeyPrefix']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['S3KeyPrefix'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SnsTopicName -Value {
            $this.Properties['SnsTopicName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SnsTopicName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Tags -Value {
            $this.Properties['Tags']
        } -SecondValue {
            param([TransformTag()] [ValidateType(([IDictionary], [psobject], [VSTag]))] [object] $value)
            $this.Properties['Tags'] = [VSTag]::TransformTag($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name TrailName -Value {
            $this.Properties['TrailName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['TrailName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name InsightSelectors -Value {
            $this.Properties['InsightSelectors']
        } -SecondValue {
            param([ValidateType(([CloudTrailTrailInsightSelector], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['InsightSelectors'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

    CloudTrailTrail() : base() {}
    CloudTrailTrail([IDictionary] $props) : base($props) {}
    CloudTrailTrail([psobject] $props) : base($props) {}
}