All Products
Search
Document Center

Bastionhost:SetPolicyProtocolConfig

Last Updated:Jun 10, 2026

Mengatur opsi Remote Desktop Protocol (RDP), Secure Shell (SSH), dan SSH File Transfer Protocol (SFTP) untuk kebijakan kontrol.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

ID instans Host Bastion.

Catatan

Panggil operasi DescribeInstances untuk mendapatkan ID instans.

bastionhost-cn-st220aw****

RegionId

string

No

ID wilayah tempat instans Host Bastion berada.

Catatan

Untuk informasi lebih lanjut tentang pemetaan antara ID wilayah dan nama wilayah, lihat Wilayah dan zona.

cn-hangzhou

PolicyId

string

Yes

ID kebijakan kontrol yang ingin Anda ubah.

Catatan

Panggil operasi ListPolicies untuk mendapatkan ID kebijakan.

61

ProtocolConfig

object

Yes

Konfigurasi kontrol protokol.

RDP

object

No

The RDP options.

RecordKeyboard

string

No

Specifies whether to record keyboard input. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

DiskRedirection

string

No

Specifies whether to enable drive and printer mapping. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

ClipboardDownload

string

No

Specifies whether to allow clipboard content to be downloaded. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

ClipboardUpload

string

No

Specifies whether to allow clipboard content to be uploaded. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

DiskRedirectionUpload

string

No

Enable

DiskRedirectionDownload

string

No

Enable

SSH

object

No

The SSH and SFTP options.

X11Forwarding

string

No

Specifies whether to enable X11 forwarding. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

SFTPChannel

string

No

Specifies whether to enable the SFTP channel. Valid values:

  • Enable

  • Disable

Catatan
  • The default value is Disable.

  • At least one of the SSH channel and the SFTP channel must be enabled.

  • If you grant only SFTP permissions to a host account, do not disable the SSH and SFTP channels for that account in the control policy. Otherwise, you cannot use the host account to access the target server through Bastionhost.

Enable

SSHChannel

string

No

Specifies whether to enable the SSH channel. Valid values:

  • Enable

  • Disable

Catatan
  • The default value is Disable.

  • At least one of the SSH channel and the SFTP channel must be enabled. If you disable the SSH channel, you cannot use SSH permissions to log on to the asset account. Configure this parameter with caution.

  • If you grant only SFTP permissions to a host account, do not disable the SSH and SFTP channels for that account in the control policy. Otherwise, you cannot use the host account to access the target server through Bastionhost.

Enable

ExecCommand

string

No

Specifies whether to allow remote command execution. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

SFTPUploadFile

string

No

Specifies whether to allow file uploads over SFTP. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

SFTPDownloadFile

string

No

Specifies whether to allow file downloads over SFTP. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

SFTPRemoveFile

string

No

Specifies whether to allow file deletions over SFTP. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

SFTPRenameFile

string

No

Specifies whether to allow file renames over SFTP. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

SFTPMkdir

string

No

Specifies whether to allow folder creation over SFTP. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

SFTPRmdir

string

No

Specifies whether to allow folder deletion over SFTP. Valid values:

  • Enable

  • Disable

Catatan

The default value is Disable.

Enable

AllowDirectTcp

string

No

Enable

TcpForwarding

string

No

Enable

AllowTcpForwarding

string

No

Enable

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

81500666-d7f5-4143-8329-0223cc738105

Contoh

Respons sukses

JSONformat

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

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidParameter The argument is invalid.
500 InternalError An unknown error occurred.
404 PolicyNotFound The policy is not found.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.