EC2.Client.
describe_volume_attribute
(**kwargs)¶Describes the specified attribute of the specified volume. You can specify only one attribute at a time.
For more information about EBS volumes, see Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
Request Syntax
response = client.describe_volume_attribute(
Attribute='autoEnableIO'|'productCodes',
VolumeId='string',
DryRun=True|False
)
[REQUIRED]
The attribute of the volume. This parameter is required.
[REQUIRED]
The ID of the volume.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.dict
Response Syntax
{
'AutoEnableIO': {
'Value': True|False
},
'ProductCodes': [
{
'ProductCodeId': 'string',
'ProductCodeType': 'devpay'|'marketplace'
},
],
'VolumeId': 'string'
}
Response Structure
(dict) --
AutoEnableIO (dict) --
The state of autoEnableIO
attribute.
Value (boolean) --
The attribute value. The valid values are true
or false
.
ProductCodes (list) --
A list of product codes.
(dict) --
Describes a product code.
ProductCodeId (string) --
The product code.
ProductCodeType (string) --
The type of product code.
VolumeId (string) --
The ID of the volume.
Examples
This example describes the autoEnableIo
attribute of the volume with the ID vol-049df61146c4d7901
.
response = client.describe_volume_attribute(
Attribute='autoEnableIO',
VolumeId='vol-049df61146c4d7901',
)
print(response)
Expected Output:
{
'AutoEnableIO': {
'Value': False,
},
'VolumeId': 'vol-049df61146c4d7901',
'ResponseMetadata': {
'...': '...',
},
}