Modifies the two-factor authentication settings of a bastion host.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:ModifyInstanceTwoFactor |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the bastion host. Note
You can call the DescribeInstances operation to query the ID of the bastion host. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
The region ID of the bastion host. Note
For more information about the mapping between region IDs and region names, see Regions and zones. |
cn-hangzhou |
| EnableTwoFactor |
string |
No |
Specifies whether to enable two-factor authentication. Valid values:
|
true |
| TwoFactorMethods |
string |
No |
The method used to send a verification code for two-factor authentication. If EnableTwoFactor is set to true, you must specify at least one method. Valid values:
|
["sms"] |
| SkipTwoFactorTime |
string |
No |
The duration within which two-factor authentication is not required after a user passes two-factor authentication. Valid values: 0 to 168. Unit: hours. If you set this parameter to 0, the user must pass two-factor authentication every time the user logs on to the bastion host. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request, which is used to locate and troubleshoot issues. |
9CE1A352-15E9-5EB4-B589-87A8DEECB20D |
Examples
Success response
JSON format
{
"RequestId": "9CE1A352-15E9-5EB4-B589-87A8DEECB20D"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The argument is invalid. | The argument is invalid. |
| 500 | InternalError | An unknown error occurred. | An unknown error occurred. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.