Public/Resource Property Types/Add-VSElasticLoadBalancingLoadBalancerAccessLoggingPolicy.ps1
function Add-VSElasticLoadBalancingLoadBalancerAccessLoggingPolicy { <# .SYNOPSIS Adds an AWS::ElasticLoadBalancing::LoadBalancer.AccessLoggingPolicy resource property to the template .DESCRIPTION Adds an AWS::ElasticLoadBalancing::LoadBalancer.AccessLoggingPolicy resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html .PARAMETER EmitInterval Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html#cfn-elb-accessloggingpolicy-emitinterval PrimitiveType: Integer Required: False UpdateType: Mutable .PARAMETER Enabled Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html#cfn-elb-accessloggingpolicy-enabled PrimitiveType: Boolean Required: True UpdateType: Mutable .PARAMETER S3BucketName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html#cfn-elb-accessloggingpolicy-s3bucketname PrimitiveType: String Required: True UpdateType: Mutable .PARAMETER S3BucketPrefix Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html#cfn-elb-accessloggingpolicy-s3bucketprefix PrimitiveType: String Required: False UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.ElasticLoadBalancing.LoadBalancer.AccessLoggingPolicy')] [cmdletbinding()] Param ( [parameter(Mandatory = $false)] [Int] $EmitInterval, [parameter(Mandatory = $true)] [System.Boolean] $Enabled, [parameter(Mandatory = $true)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ").")) } })] $S3BucketName, [parameter(Mandatory = $false)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ").")) } })] $S3BucketPrefix ) Begin { $obj = [PSCustomObject]@{} $commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable') } Process { foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) { $obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key } } End { $obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ElasticLoadBalancing.LoadBalancer.AccessLoggingPolicy' } } |