- Documentation
Elastic Compute Service
Elastic Compute Service
API Reference
Instances
ModifyInstanceMetadataOptions - Modifies the access mode of instance metadata
Instances
ModifyInstanceMetadataOptions - Modifies the access mode of instance metadata
ModifyInstanceMetadataOptions - Modifies the access mode of instance metadata
Call the ModifyInstanceMetadataOptions operation to modify the access mode of instance metadata.
Request description
When you call this operation, if you do not pass in optional parameters, the original configuration is retained.
Request parameters
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters. Action string required Sample value: ModifyInstanceMetadataOptions
The action that you want to perform. Value: ModifyInstanceMetadataOptions.
Version string required Sample value:2020-04-01
The API version. Value: 2020-04-01.
The access mode of instance metadata. You can set whether to enable the security hardening mode. Value:
- optional: Not mandatory (Normal Mode and Security Hardening Mode). This allows instance metadata access either directly through the standard method or via the token-based authentication method.
- required: Mandatory (Security Hardening Mode). This only allows accessing instance metadata through a token-based authentication method.
tip
- Security Hardening Mode is currently in Beta. If you need a trial, please contact your account manager to apply.
InstanceId string required Sample value: i-3tigy72q3u3vj0x2****
The specified instance ID.
Response parameters
This operation has no specific response parameters. For more information, refer to Response structure. Sample request
Sample response
Error codes
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes. Last updated: 2026.06.18 17:48:27