All Products
Search
Document Center

ApsaraDB RDS:DescribeHostWebShell

最終更新日:Dec 05, 2024

Queries the webshell URL that is used to connect to the host of an ApsaraDB RDS for SQL Server instance.

Operation description

Supported database engine

  • SQL Server

Prerequisite

  • The instance meets the following requirements:

    • The instance resides in a region other than the China (Zhangjiakou) region.
    • The instance runs RDS Basic Edition, RDS Cluster Edition, or RDS High-availability Edition. If your instance runs RDS High-availability Edition, make sure that the instance runs SQL Server 2012 or later.
    • The instance belongs to the general-purpose or dedicated instance family. The shared instance family is not supported.
    • The instance resides in a virtual private cloud (VPC). For more information about how to change the network type of an RDS instance, see Change the network type.
    • If the instance runs RDS High-availability Edition or RDS Cluster Edition, the instance is created on or after January 1, 2021. If the instance runs RDS Basic Edition, the instance is created on or after September 02, 2022. You can view the Creation Time parameter of an instance in the Status section of the Basic Information page in the ApsaraDB RDS console.
  • Your Alibaba Cloud account is used for logons.

References

Note Before you call this operation, carefully read the following documentation. Make sure that you fully understand the prerequisites and impacts for calling this operation.

Create a host account and use the host account for logons

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
rds:DescribeHostWebShellget
*DBInstance
acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

rm-uf6wjk5xxxxxxx
RegionIDstringYes

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID.

cn-hangzhou
HostNamestringYes

The instance hostname. You can call the DescribeDBInstanceIpHostname operation to query the hostname.

testHost1
AccountNamestringYes

The username of the account that is used to log on to the host of the instance.

testOsAccount1
AccountPasswordstringYes

The password of the host account.

***

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

842B73C8-5776-4BD9-9872-69C8C46DD7D3
LoginUrlstring

The webshell URL.

***

Examples

Sample success responses

JSONformat

{
  "RequestId": "842B73C8-5776-4BD9-9872-69C8C46DD7D3",
  "LoginUrl": "***"
}

Error codes

HTTP status codeError codeError message
400InvalidUserId.NotSupportThe user ID has no permission.
400InvalidHostStatus.FormatSpecified host status is not valid.
403ClusterTypeNotSupportedThe current Instance ClusterType does not support this operation.
404HostInfo.NotFoundThe specified host info is not found.
404InvalidAccountName.NotFoundSpecified account name does not exist.

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

Change history

Change timeSummary of changesOperation
No change history