VaporShell.MWAA.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 'MWAAEnvironmentNetworkConfiguration'"

class MWAAEnvironmentNetworkConfiguration : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSMWAAEnvironmentNetworkConfiguration'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html'

    hidden [object] $_subnetIds
    hidden [object] $_securityGroupIds

    [string[]] $SubnetIds
    [string[]] $SecurityGroupIds

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name SubnetIds -Value {
            $this._subnetIds
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this._subnetIds = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SecurityGroupIds -Value {
            $this._securityGroupIds
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this._securityGroupIds = @($value)
        }
    }

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

Write-Verbose "Importing class 'MWAAEnvironmentModuleLoggingConfiguration'"

class MWAAEnvironmentModuleLoggingConfiguration : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSMWAAEnvironmentModuleLoggingConfiguration'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html'

    hidden [object] $_enabled
    hidden [object] $_logLevel
    hidden [object] $_cloudWatchLogGroupArn

    [bool] $Enabled
    [string] $LogLevel
    [string] $CloudWatchLogGroupArn

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

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

Write-Verbose "Importing class 'MWAAEnvironmentTagMap'"

class MWAAEnvironmentTagMap : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSMWAAEnvironmentTagMap'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-tagmap.html'



    hidden [void] _addAccessors() {
    }

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

Write-Verbose "Importing class 'MWAAEnvironmentLoggingConfiguration'"

class MWAAEnvironmentLoggingConfiguration : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSMWAAEnvironmentLoggingConfiguration'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html'

    hidden [object] $_dagProcessingLogs
    hidden [object] $_schedulerLogs
    hidden [object] $_webserverLogs
    hidden [object] $_workerLogs
    hidden [object] $_taskLogs

    [MWAAEnvironmentModuleLoggingConfiguration] $DagProcessingLogs
    [MWAAEnvironmentModuleLoggingConfiguration] $SchedulerLogs
    [MWAAEnvironmentModuleLoggingConfiguration] $WebserverLogs
    [MWAAEnvironmentModuleLoggingConfiguration] $WorkerLogs
    [MWAAEnvironmentModuleLoggingConfiguration] $TaskLogs

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name DagProcessingLogs -Value {
            $this._dagProcessingLogs
        } -SecondValue {
            param([ValidateType(([MWAAEnvironmentModuleLoggingConfiguration], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._dagProcessingLogs = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SchedulerLogs -Value {
            $this._schedulerLogs
        } -SecondValue {
            param([ValidateType(([MWAAEnvironmentModuleLoggingConfiguration], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._schedulerLogs = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name WebserverLogs -Value {
            $this._webserverLogs
        } -SecondValue {
            param([ValidateType(([MWAAEnvironmentModuleLoggingConfiguration], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._webserverLogs = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name WorkerLogs -Value {
            $this._workerLogs
        } -SecondValue {
            param([ValidateType(([MWAAEnvironmentModuleLoggingConfiguration], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._workerLogs = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name TaskLogs -Value {
            $this._taskLogs
        } -SecondValue {
            param([ValidateType(([MWAAEnvironmentModuleLoggingConfiguration], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._taskLogs = $value
        }
    }

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

Write-Verbose "Importing class 'MWAAEnvironment'"

class MWAAEnvironment : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSMWAAEnvironment'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html'

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

    [string] $Type = 'AWS::MWAA::Environment'
    [string] $Name
    [string] $ExecutionRoleArn
    [string] $KmsKey
    [string] $AirflowVersion
    [string] $SourceBucketArn
    [string] $DagS3Path
    [string] $PluginsS3Path
    [string] $PluginsS3ObjectVersion
    [string] $RequirementsS3Path
    [string] $RequirementsS3ObjectVersion
    [VSJson] $AirflowConfigurationOptions
    [string] $EnvironmentClass
    [int] $MaxWorkers
    [int] $MinWorkers
    [MWAAEnvironmentNetworkConfiguration] $NetworkConfiguration
    [MWAAEnvironmentLoggingConfiguration] $LoggingConfiguration
    [string] $WeeklyMaintenanceWindowStart
    [MWAAEnvironmentTagMap] $Tags
    [string] $WebserverAccessMode
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name Name -Value {
            $this.Properties['Name']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Name'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ExecutionRoleArn -Value {
            $this.Properties['ExecutionRoleArn']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ExecutionRoleArn'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name KmsKey -Value {
            $this.Properties['KmsKey']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['KmsKey'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name AirflowVersion -Value {
            $this.Properties['AirflowVersion']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['AirflowVersion'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SourceBucketArn -Value {
            $this.Properties['SourceBucketArn']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SourceBucketArn'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name DagS3Path -Value {
            $this.Properties['DagS3Path']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['DagS3Path'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name PluginsS3Path -Value {
            $this.Properties['PluginsS3Path']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['PluginsS3Path'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name PluginsS3ObjectVersion -Value {
            $this.Properties['PluginsS3ObjectVersion']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['PluginsS3ObjectVersion'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name RequirementsS3Path -Value {
            $this.Properties['RequirementsS3Path']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['RequirementsS3Path'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name RequirementsS3ObjectVersion -Value {
            $this.Properties['RequirementsS3ObjectVersion']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['RequirementsS3ObjectVersion'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name AirflowConfigurationOptions -Value {
            $this.Properties['AirflowConfigurationOptions']
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this.Properties['AirflowConfigurationOptions'] = [VSJson]::Transform($value)
            Write-Debug $this.Properties['AirflowConfigurationOptions']
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name EnvironmentClass -Value {
            $this.Properties['EnvironmentClass']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['EnvironmentClass'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name MaxWorkers -Value {
            $this.Properties['MaxWorkers']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['MaxWorkers'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name MinWorkers -Value {
            $this.Properties['MinWorkers']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['MinWorkers'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name NetworkConfiguration -Value {
            $this.Properties['NetworkConfiguration']
        } -SecondValue {
            param([ValidateType(([MWAAEnvironmentNetworkConfiguration], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['NetworkConfiguration'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name LoggingConfiguration -Value {
            $this.Properties['LoggingConfiguration']
        } -SecondValue {
            param([ValidateType(([MWAAEnvironmentLoggingConfiguration], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['LoggingConfiguration'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name WeeklyMaintenanceWindowStart -Value {
            $this.Properties['WeeklyMaintenanceWindowStart']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['WeeklyMaintenanceWindowStart'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Tags -Value {
            $this.Properties['Tags']
        } -SecondValue {
            param([ValidateType(([MWAAEnvironmentTagMap], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Tags'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name WebserverAccessMode -Value {
            $this.Properties['WebserverAccessMode']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['WebserverAccessMode'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

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