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.
Write-S3BucketTagging-BucketName <String>-TagSet <Tag[]>-ChecksumAlgorithm <ChecksumAlgorithm>-ExpectedBucketOwner <String>-Select <String>-Force <SwitchParameter>-ClientConfig <AmazonS3Config>-UseAccelerateEndpoint <SwitchParameter>-UseDualstackEndpoint <SwitchParameter>-ForcePathStyleAddressing <Boolean>
Required? | False |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
x-amz-checksum
or x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more information, see Checking object integrity in the Amazon S3 User Guide.If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
parameter. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
403 Forbidden
(access denied). Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | 2 |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TagSets |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
Write-S3BucketTagging -BucketName amzn-s3-demo-bucket -TagSet @( @{ Key="Stage"; Value="Test" }, @{ Key="Environment"; Value="Alpha" } )This command applies two tags to a bucket namedcloudtrail-test-2018
: a tag with a key of Stage and a value of Test, and a tag with a key of Environment and a value of Alpha. To verify that the tags were added to the bucket, runGet-S3BucketTagging -BucketName bucket_name
. The results should show the tags that you applied to the bucket in the first command. Note thatWrite-S3BucketTagging
overwrites the entire existing tag set on a bucket. To add or delete individual tags, run the Resource Groups and Tagging API cmdlets,Add-RGTResourceTag
andRemove-RGTResourceTag
. Alternatively, use Tag Editor in the AWS Management Console to manage S3 bucket tags.
Get-S3Bucket -BucketName amzn-s3-demo-bucket | Write-S3BucketTagging -TagSet @( @{ Key="Stage"; Value="Production" }, @{ Key="Department"; Value="Finance" } )This command pipes a bucket namedcloudtrail-test-2018
into theWrite-S3BucketTagging
cmdlet. It applies tags Stage:Production and Department:Finance to the bucket. Note thatWrite-S3BucketTagging
overwrites the entire existing tag set on a bucket.
AWS Tools for PowerShell: 2.x.y.z