简体   繁体   中英

add tags to aws dynamo db

I am new to powershell and wants to know if there is way to tag Dynamo DB table (name: Testname) from powershell. I did try these commands: Add-DDBResourceTag -ResourceArn $dbarn -Tag @{Key="Department";Value="Stage"} where $dbarn is arn of DBtable 'Testname'.

Tag should be created as an object in powershell of type Amazon.Dynamodbv2.Model.Tag

Something like this

$Tagobject = New-Object Amazon.Dynamodbv2.Model.Tag
$Tagobject.Key = "Environment"
$Tagobject.Value = "Prod"

You can then use your command

Add-DDBResourceTag -ResourceArn $dbarn -Tag $Tagobject

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM