AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
ConvertTo-DDBItem-InputObject <IDictionary[]>
String will be converted to SBoolean will be converted to BOOLNMemoryStream will be converted to BHashtable will be converted to MHashSet<String> will be converted to SSNSHashSet<MemoryStream> will be converted to BSArray will be converted to LArrayList will be converted to LL| Required? | False |
| Position? | 1 |
| Accept pipeline input? | True (ByValue, ByPropertyName) |
@{
SongTitle = 'Somewhere Down The Road'
Artist = 'No One You Know'
} | ConvertTo-DDBItem
Key Value
--- -----
SongTitle Amazon.DynamoDBv2.Model.AttributeValue
Artist Amazon.DynamoDBv2.Model.AttributeValueAn example for converting a hashtable into a dictionary of DynamoDB attribute values.
@{
MyMap = @{
MyString = 'my string'
}
MyStringSet = [System.Collections.Generic.HashSet[String]]@('my', 'string')
MyNumericSet = [System.Collections.Generic.HashSet[Int]]@(1, 2, 3)
MyBinarySet = [System.Collections.Generic.HashSet[System.IO.MemoryStream]]@(
([IO.MemoryStream]::new([Text.Encoding]::UTF8.GetBytes('my'))),
([IO.MemoryStream]::new([Text.Encoding]::UTF8.GetBytes('string')))
)
MyList1 = @('my', 'string')
MyList2 = [System.Collections.Generic.List[Int]]@(1, 2)
MyList3 = [System.Collections.ArrayList]@('one', 2, $true)
} | ConvertTo-DDBItem
Key Value
--- -----
MyStringSet Amazon.DynamoDBv2.Model.AttributeValue
MyList1 Amazon.DynamoDBv2.Model.AttributeValue
MyNumericSet Amazon.DynamoDBv2.Model.AttributeValue
MyList2 Amazon.DynamoDBv2.Model.AttributeValue
MyBinarySet Amazon.DynamoDBv2.Model.AttributeValue
MyMap Amazon.DynamoDBv2.Model.AttributeValue
MyList3 Amazon.DynamoDBv2.Model.AttributeValueAn example for converting a hashtable into a dictionary of DynamoDB attribute values.
AWS Tools for PowerShell: 2.x.y.z