Modifying the Host Header
Function
This API is used to modify the configuration of a retrieval host. A retrieval host is the domain name accessed by CDN nodes when the nodes retrieve content from the origin server. It is specified in the header of an HTTP retrieval request.
URI
PUT /v1.0/cdn/domains/{domain_id}/originhost
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
Yes |
String |
Specifies the acceleration domain name ID. For details, see Querying Details About a Domain Name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project that the domain name to be modified belongs to. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API. Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS). |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. The token can be obtained by calling the IAM API used to obtain a user token. The value of **X-Subject-Token** in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
origin_host |
Yes |
OriginHostBody object |
Host header settings for origin pull. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
origin_host_type |
Yes |
String |
Host type. Possible values: ipaddr (origin server IP address), domain (origin server domain name), and obs_bucket (OBS bucket domain name). Enumeration values:
|
customize_domain |
No |
String |
Specifies the custom domain name. This parameter is mandatory when origin_host_type is set to customize. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
origin_host |
DomainOriginHost object |
Host header settings for origin pull. |
Parameter |
Type |
Description |
---|---|---|
domain_id |
String |
Domain name ID. |
origin_host_type |
String |
Host type. Possible values: accelerate (Select the acceleration domain name as the retrieval host domain name), customize (Use the user-defined domain name as the retrieval host domain name). |
customize_domain |
String |
Specifies the custom domain name of the retrieval host. |
Example Requests
PUT https://cdn.myhuaweicloud.com/v1.0/cdn/domains/ff80*************************d71/originhost?enterprise_project_id=0 { "origin_host" : { "origin_host_type" : "customize", "customize_domain" : "www.example1.com" } }
Example Responses
Status code: 200
OK
{ "origin_host" : { "domain_id" : "ff80*************************d71", "origin_host_type" : "customize", "customize_domain" : "www.example1.com" } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot