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. - 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 is- UnauthorizedOperation.
- 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' } } }, ], '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 - managedis- true, then the principal is returned. The principal is the service provider that manages the resource.
 
 
 
 
- 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 - trueor- false.
 
- EnaSupport (dict) – - Indicates whether enhanced networking with ENA is enabled. - Value (boolean) – - The attribute value. The valid values are - trueor- false.
 
- 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 - trueor- false.
 
- 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 - trueor- false.
 
- 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 - trueor- false.
 
- 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.