reset_instance_attribute
¶
reset_instance_attribute(
*,
config_overrides: Optional[EC2ClientConfig] = 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.
Source code in docs_src/capo_ec2/_services/ec2.py
57949 57950 57951 57952 57953 57954 57955 57956 57957 57958 57959 57960 57961 57962 57963 57964 57965 57966 57967 57968 57969 57970 57971 57972 57973 57974 57975 57976 57977 57978 57979 57980 57981 57982 57983 57984 57985 57986 57987 57988 57989 57990 57991 57992 57993 57994 57995 57996 57997 57998 57999 58000 58001 58002 58003 58004 58005 | |