EC2.Client.
reset_instance_attribute
(**kwargs)¶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 .
See also: AWS API Documentation
Request Syntax
response = client.reset_instance_attribute(
Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop',
DryRun=True|False,
InstanceId='string'
)
[REQUIRED]
The attribute to reset.
Warning
You can only reset the following attributes: kernel
| ramdisk
| sourceDestCheck
.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.[REQUIRED]
The ID of the instance.
None
Examples
This example resets the sourceDestCheck attribute for the specified instance.
response = client.reset_instance_attribute(
Attribute='sourceDestCheck',
InstanceId='i-1234567890abcdef0',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}