Instance / Action / describe_attribute
describe_attribute¶
- EC2.Instance.describe_attribute(**kwargs)¶
Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Available attributes include SQL license exemption configuration for instances registered with the SQL LE service.
See also: AWS API Documentation
Request Syntax
response = instance.describe_attribute( DryRun=True|False, Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop' )
- Parameters:
DryRun (boolean) – Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation.Attribute (string) –
[REQUIRED]
The instance attribute.
Note that the
enaSupportattribute is not supported.
- Return type:
dict
- Returns:
Response Syntax
{ 'BlockDeviceMappings': [ { 'DeviceName': 'string', 'Ebs': { 'AttachTime': datetime(2015, 1, 1), 'DeleteOnTermination': True|False, 'Status': 'attaching'|'attached'|'detaching'|'detached', 'VolumeId': 'string', 'AssociatedResource': 'string', 'VolumeOwnerId': 'string', 'Operator': { 'Managed': True|False, 'Principal': 'string', 'HiddenByDefault': True|False }, 'EbsCardIndex': 123, 'MultiAvailabilityZoneConfiguration': { 'ConfigurationType': 'multi-az-1', 'StandbyAvailabilityZones': [ { 'AvailabilityZone': 'string', 'AvailabilityZoneId': 'string' }, ] }, 'TrimState': 'enabled'|'disabled' } }, ], 'DisableApiTermination': { 'Value': True|False }, 'EnaSupport': { 'Value': True|False }, 'EnclaveOptions': { 'Enabled': True|False }, 'EbsOptimized': { 'Value': True|False }, 'InstanceId': 'string', 'InstanceInitiatedShutdownBehavior': { 'Value': 'string' }, 'InstanceType': { 'Value': 'string' }, 'KernelId': { 'Value': 'string' }, 'ProductCodes': [ { 'ProductCodeId': 'string', 'ProductCodeType': 'devpay'|'marketplace' }, ], 'RamdiskId': { 'Value': 'string' }, 'RootDeviceName': { 'Value': 'string' }, 'SourceDestCheck': { 'Value': True|False }, 'SriovNetSupport': { 'Value': 'string' }, 'UserData': { 'Value': 'string' }, 'DisableApiStop': { 'Value': True|False }, 'Groups': [ { 'GroupId': 'string', 'GroupName': 'string' }, ] }
Response Structure
(dict) –
Describes an instance attribute.
BlockDeviceMappings (list) –
The block device mapping of the instance.
(dict) –
Describes a block device mapping.
DeviceName (string) –
The device name.
Ebs (dict) –
Parameters used to automatically set up EBS volumes when the instance is launched.
AttachTime (datetime) –
The time stamp when the attachment initiated.
DeleteOnTermination (boolean) –
Indicates whether the volume is deleted on instance termination.
Status (string) –
The attachment state.
VolumeId (string) –
The ID of the EBS volume.
AssociatedResource (string) –
The ARN of the Amazon Web Services-managed resource to which the volume is attached.
VolumeOwnerId (string) –
The ID of the Amazon Web Services account that owns the volume.
This parameter is returned only for volumes that are attached to Amazon Web Services-managed resources.
Operator (dict) –
The service provider that manages the EBS volume.
Managed (boolean) –
If
true, the resource is managed by a service provider.Principal (string) –
If
managedistrue, then the principal is returned. The principal is the service provider that manages the resource.HiddenByDefault (boolean) –
If
true, the resource is hidden by default based on the managed resource visibility settings for the account.
EbsCardIndex (integer) –
The index of the EBS card. Some instance types support multiple EBS cards. The default EBS card index is 0.
MultiAvailabilityZoneConfiguration (dict) –
The Multi-Availability Zone configuration of the volume. Returned only for Multi-Availability Zone volumes.
ConfigurationType (string) –
The type of Multi-Availability Zone configuration for the volume.
Valid values:
multi-az-1. For this configuration, the volume is synchronously replicated to a standby replica in a second Availability Zone.StandbyAvailabilityZones (list) –
The standby Availability Zone of the Multi-Availability Zone volume.
(dict) –
A standby Availability Zone of a Multi-Availability Zone volume.
AvailabilityZone (string) –
The name of the standby Availability Zone.
AvailabilityZoneId (string) –
The ID of the standby Availability Zone.
TrimState (string) –
A read-only value that indicates whether the volume is reporting TRIM support to the operating system for this attachment. Amazon EBS sets this value from the volume’s
TrimOnAttachsetting when the volume attaches, and the value doesn’t change for the life of the attachment. You can’t setTrimStatedirectly. To change it, modifyTrimOnAttach, then detach and reattach the volume. For volumes with Multi-Attach enabled, each attachment has its ownTrimState. This value isn’t returned for unattached volumes.Valid values:
enabled: The volume reports TRIM support to the operating system.disabled: The volume does not report TRIM support to the operating system.
DisableApiTermination (dict) –
Indicates whether termination protection is enabled. If the value is
true, you can’t terminate the instance using the Amazon EC2 console, command line tools, or API.Value (boolean) –
The attribute value. The valid values are
trueorfalse.
EnaSupport (dict) –
Indicates whether enhanced networking with ENA is enabled.
Value (boolean) –
The attribute value. The valid values are
trueorfalse.
EnclaveOptions (dict) –
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
Enabled (boolean) –
If this parameter is set to
true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.
EbsOptimized (dict) –
Indicates whether the instance is optimized for Amazon EBS I/O.
Value (boolean) –
The attribute value. The valid values are
trueorfalse.
InstanceId (string) –
The ID of the instance.
InstanceInitiatedShutdownBehavior (dict) –
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Value (string) –
The attribute value. The value is case-sensitive.
InstanceType (dict) –
The instance type.
Value (string) –
The attribute value. The value is case-sensitive.
KernelId (dict) –
The kernel ID.
Value (string) –
The attribute value. The value is case-sensitive.
ProductCodes (list) –
The product codes.
(dict) –
Describes a product code.
ProductCodeId (string) –
The product code.
ProductCodeType (string) –
The type of product code.
RamdiskId (dict) –
The RAM disk ID.
Value (string) –
The attribute value. The value is case-sensitive.
RootDeviceName (dict) –
The device name of the root device volume (for example,
/dev/sda1).Value (string) –
The attribute value. The value is case-sensitive.
SourceDestCheck (dict) –
Indicates whether source/destination checks are enabled.
Value (boolean) –
The attribute value. The valid values are
trueorfalse.
SriovNetSupport (dict) –
Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
Value (string) –
The attribute value. The value is case-sensitive.
UserData (dict) –
The user data.
Value (string) –
The attribute value. The value is case-sensitive.
DisableApiStop (dict) –
Indicates whether stop protection is enabled for the instance.
Value (boolean) –
The attribute value. The valid values are
trueorfalse.
Groups (list) –
The security groups associated with the instance.
(dict) –
Describes a security group.
GroupId (string) –
The ID of the security group.
GroupName (string) –
The name of the security group.