All Products
Search
Document Center

Bastionhost:SetPolicyAccessTimeRangeConfig

Last Updated:Sep 19, 2024

Configures the logon period limits in a control policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-bastionhost:SetPolicyAccessTimeRangeConfig
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The bastion host ID.

Note You can call the DescribeInstances operation to query the bastion host ID.
bastionhost-cn-st220aw****
RegionIdstringNo

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
PolicyIdstringYes

The control policy ID.

Note You can call the ListPolicies operation to query the control policy ID.
13
AccessTimeRangeConfigobjectYes

The logon period limits.

EffectiveTimearray<object>No

The details about the periods during which users can log on to the assets.

objectNo
DaysarrayNo

The days of the week during which users can log on to the assets.

integerNo

The day of the week during which users can log on to the assets. Valid values:

  • 1: Monday.
  • 2: Tuesday.
  • 3: Wednesday.
  • 4: Thursday.
  • 5: Friday.
  • 6: Saturday.
  • 7: Sunday.
[7]
HoursarrayNo

The time periods of the day during which users can log on to the assets.

integerNo

The time periods of the day during which users can log on to the assets. Valid values:

  • 0: 00:00 to 01:00.
  • 1: 01:00 to 02:00.
  • 2: 02:00 to 03:00.
  • 3: 03:00 to 04:00.
  • 4: 04:00 to 05:00.
  • 5: 05:00 to 06:00.
  • 6: 06:00 to 07:00.
  • 7: 07:00 to 08:00.
  • 8: 08:00 to 09:00.
  • 9: 09:00 to 10:00.
  • 10: 10:00 to 11:00.
  • 11: 11:00 to 12:00.
  • 12: 12:00 to 13:00.
  • 13: 13:00 to 14:00.
  • 14: 14:00 to 15:00.
  • 15: 15:00 to 16:00.
  • 16: 16:00 to 17:00.
  • 17: 17:00 to 18:00.
  • 18: 18:00 to 19:00.
  • 19: 19:00 to 20:00.
  • 20: 20:00 to 21:00.
  • 21: 21:00 to 22:00.
  • 22: 22:00 to 23:00.
  • 23: 23:00 to 24:00.
[9, 14]

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

EC9BF0F4-8983-491A-BC8C-1B4DD94976DE

Examples

Sample success responses

JSONformat

{
  "RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe argument is invalid.The argument is invalid.
404PolicyNotFoundThe policy is not found.The policy is not found.
500InternalErrorAn unknown error occurred.An unknown error occurred.

For a list of error codes, visit the Service error codes.