AWS code-library documentation change
Summary
Added PowerShell V5 examples for CreateVolume including basic volume creation and tagging
Security assessment
The change adds usage examples but does not address security vulnerabilities or document security features. The example shows 'Encrypted: False' but this is standard demonstration rather than security guidance.
Diff
diff --git a/code-library/latest/ug/ec2_example_ec2_CreateVolume_section.md b/code-library/latest/ug/ec2_example_ec2_CreateVolume_section.md index fed21b6f3..bb6767f22 100644 --- a//code-library/latest/ug/ec2_example_ec2_CreateVolume_section.md +++ b//code-library/latest/ug/ec2_example_ec2_CreateVolume_section.md @@ -187,0 +188,42 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example creates the specified volume.** + + + New-EC2Volume -Size 50 -AvailabilityZone us-west-2a -VolumeType gp2 + + +**Output:** + + + Attachments : {} + AvailabilityZone : us-west-2a + CreateTime : 12/22/2015 1:42:07 AM + Encrypted : False + Iops : 150 + KmsKeyId : + Size : 50 + SnapshotId : + State : creating + Tags : {} + VolumeId : vol-12345678 + VolumeType : gp2 + +**Example 2: This example request creates a volume and applies a tag with a key of stack and a value of production.** + + + $tag = @{ Key="stack"; Value="production" } + + $tagspec = new-object Amazon.EC2.Model.TagSpecification + $tagspec.ResourceType = "volume" + $tagspec.Tags.Add($tag) + + New-EC2Volume -Size 80 -AvailabilityZone "us-west-2a" -TagSpecification $tagspec + + + * For API details, see [CreateVolume](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +