ps/Modules/Alkami.PowerShell.Common/Public/New-DynamoMessageStringValue.ps1

21 lines
744 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function New-DynamoMessageStringValue {
<#
.SYNOPSIS
Create an Dynamo AttributeValue with a string value. Resulting AttribueValue object can be modified if other data types
are required.
.PARAMETER Value
Attribute Value.
#>
param (
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
[object]$Value
)
Import-AWSModule
$attribute = New-Object -TypeName Amazon.DynamoDBv2.Model.AttributeValue($Value)
# This typecast is required, because Powershell. Do not remove it.
return [Amazon.DynamoDBv2.Model.AttributeValue]$attribute
}
Set-Alias -Name AsDynamoMessageValue -Value New-DynamoMessageStringValue