All Products
Search
Document Center

Bastionhost:SetPolicyProtocolConfig

Last Updated:Oct 25, 2024

Modify the protocol control settings in a control policy.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:SetPolicyProtocolConfig
  • 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 ID of the control policy that you want to modify.

Note You can call the ListPolicies operation to query the control policy ID.
61
ProtocolConfigobjectYes

The protocol control settings.

RDPobjectNo

The settings of the Remote Desktop Protocol (RDP) options.

RecordKeyboardstringNo

Specifies whether to enable keyboard operation recording. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
DiskRedirectionstringNo

Specifies whether to enable driver mapping. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
ClipboardDownloadstringNo

Specifies whether to enable downloading from the clipboard. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
ClipboardUploadstringNo

Specifies whether to enable uploading from the clipboard. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
SSHobjectNo

The settings of the SSH and SSH Fine Transfer Protocol (SFTP) options.

X11ForwardingstringNo

Specifies whether to enable X11 forwarding. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
SFTPChannelstringNo

Specifies whether to enable SFTP channels. Valid values:

  • Enable
  • Disable
Note
  • If you do not specify this parameter, the default value Disable is used.

  • You must set at least one of the following parameters to Enable: SSHChannel and SFTPChannel.

  • If you select Enable Only SFTP Permission for a host account, do not set SSHChannel and SFTPChannel to Disable for the account. Otherwise, users of the bastion host cannot use the account to access the host.

Enable
SSHChannelstringNo

Specifies whether to enable SSH channels. Valid values:

  • Enable
  • Disable
Note
  • If you do not specify this parameter, the default value Disable is used.

  • You must set at least one of the following parameters to Enable: SSHChannel and SFTPChannel. If you set SSHChannel to Disable, SSH-based logon is disabled for the asset account. Proceed with caution.

  • If you select Enable Only SFTP Permission for a host account, do not set SSHChannel and SFTPChannel to Disable for the account. Otherwise, users of the bastion host cannot use the account to access the host.

Enable
ExecCommandstringNo

Specifies whether to enable remote command execution. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
SFTPUploadFilestringNo

Specifies whether to enable file uploading during SFTP-based O&M. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
SFTPDownloadFilestringNo

Specifies whether to enable file downloading during SFTP-based O&M. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
SFTPRemoveFilestringNo

Specifies whether to enable file deletion during SFTP-based O&M. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
SFTPRenameFilestringNo

Specifies whether to enable file renaming during SFTP-based O&M. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
SFTPMkdirstringNo

Specifies whether to enable folder creation during SFTP-based O&M. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable
SFTPRmdirstringNo

Specifies whether to enable folder deletion during SFTP-based O&M. Valid values:

  • Enable
  • Disable
Note If you do not specify this parameter, the default value Disable is used.
Enable

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

81500666-d7f5-4143-8329-0223cc738105

Examples

Sample success responses

JSONformat

{
  "RequestId": "81500666-d7f5-4143-8329-0223cc738105"
}

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.