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 S
Boolean
will be converted to BOOL
N
MemoryStream
will be converted to B
Hashtable
will be converted to M
HashSet<String>
will be converted to SS
NS
HashSet<MemoryStream>
will be converted to BS
Array
will be converted to L
ArrayList
will be converted to L
L
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