Retrieves the primary domain name from a specified domain name.
Operation description
For more information about primary and subdomain name levels, see
Domain name levels. For example, if you enter www.abc.com, the output is abc.com.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alidns:GetMainDomainName |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Lang |
string |
No |
The language of the response. Valid values:
Default: zh |
en |
| InputString |
string |
Yes |
The domain name. |
www.example.com |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RR |
string |
The host record. |
www |
| RequestId |
string |
The unique request ID. |
536E9CAD-DB30-4647-AC87-AA5CC38C5382 |
| DomainName |
string |
The domain name. |
example.com |
| DomainLevel |
integer |
The level of the input domain name. |
2 |
Examples
Success response
JSON format
{
"RR": "www",
"RequestId": "536E9CAD-DB30-4647-AC87-AA5CC38C5382",
"DomainName": "example.com",
"DomainLevel": 2
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.