Public/Resource Property Types/Add-VSIAMUserLoginProfile.ps1
function Add-VSIAMUserLoginProfile { <# .SYNOPSIS Adds an AWS::IAM::User.LoginProfile resource property to the template .DESCRIPTION Adds an AWS::IAM::User.LoginProfile resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user-loginprofile.html .PARAMETER Password Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user-loginprofile.html#cfn-iam-user-loginprofile-password PrimitiveType: String Required: True UpdateType: Mutable .PARAMETER PasswordResetRequired Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user-loginprofile.html#cfn-iam-user-loginprofile-passwordresetrequired PrimitiveType: Boolean Required: False UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.IAM.User.LoginProfile')] [cmdletbinding()] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingPlainTextForPassword","Password")] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingPlainTextForPassword","PasswordResetRequired")] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPasswordParams","")] Param ( [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 ", ").")) } })] $Password, [parameter(Mandatory = $false)] [System.Boolean] $PasswordResetRequired ) Begin { $obj = [PSCustomObject]@{} } Process { foreach ($key in $PSBoundParameters.Keys) { $obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key } } End { $obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IAM.User.LoginProfile' } } |