Skip to content

EC2  >  Operations  >  reset_instance_attribute

reset_instance_attribute

Operation

reset_instance_attribute async

reset_instance_attribute(input: ResetInstanceAttributeInput, plugins: list[Plugin] | None = None) -> ResetInstanceAttributeOutput

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:

Name Type Description Default
input ResetInstanceAttributeInput

An instance of ResetInstanceAttributeInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ResetInstanceAttributeOutput

An instance of ResetInstanceAttributeOutput.

Input

ResetInstanceAttributeInput dataclass

Bases: _SerdeShape

Dataclass for ResetInstanceAttributeInput structure.

Attributes

attribute class-attribute instance-attribute
attribute: str | None = ...

The attribute to reset.

Warning

You can only reset the following attributes: kernel | ramdisk | sourceDestCheck.

dry_run class-attribute instance-attribute
dry_run: bool | 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 is UnauthorizedOperation.

instance_id class-attribute instance-attribute
instance_id: str | None = ...

The ID of the instance.

Output

ResetInstanceAttributeOutput dataclass

Bases: _SerdeShape

Dataclass for ResetInstanceAttributeOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.