reset_instance_attribute
async
¶
reset_instance_attribute(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
instance_id: Optional[InstanceId] = None,
attribute: Optional[InstanceAttributeName] = None,
) -> None
Resets an attribute of an instance to its default value. To reset the kernel or ramdisk, the instance must be in a stopped state. To reset the sourceDestCheck, the instance can be either running or stopped.
The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true, which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT instances in the Amazon VPC User Guide.
Parameters:
-
dry_run(Optional[Boolean], default:None) –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. -
instance_id(Optional[InstanceId], default:None) –The ID of the instance.
-
attribute(Optional[InstanceAttributeName], default:None) –The attribute to reset.
You can only reset the following attributes:
kernel|ramdisk|sourceDestCheck.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To reset the sourceDestCheck attribute This example resets the sourceDestCheck attribute for the specified instance.
>>> await client.reset_instance_attribute(attribute='sourceDestCheck', instance_id='i-1234567890abcdef0')
Source code in docs_src/capo_ec2/_services/async_ec2.py
58759 58760 58761 58762 58763 58764 58765 58766 58767 58768 58769 58770 58771 58772 58773 58774 58775 58776 58777 58778 58779 58780 58781 58782 58783 58784 58785 58786 58787 58788 58789 58790 58791 58792 58793 58794 58795 58796 58797 58798 58799 58800 58801 58802 58803 58804 58805 58806 58807 58808 58809 58810 58811 58812 58813 58814 58815 58816 | |