Modifying Origin Server Details
Function
This API is used to modify the origin server settings of a domain name.
URI
PUT /v1.0/cdn/domains/{domain_id}/origin
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 |
Yes |
ResourceBody object |
Origin server. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
sources |
Yes |
Array of SourceWithPort objects |
Origin server settings. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
No |
String |
Domain name ID. |
ip_or_domain |
Yes |
String |
Specifies the IP address or domain name of the origin server. |
origin_type |
Yes |
String |
Origin server type, which can be origin server IP address, origin server domain name, and OBS bucket domain name. Enumeration values:
|
active_standby |
Yes |
Integer |
Whether the origin server is primary or standby. Possible values: 1 (primary) and 0 (standby). |
enable_obs_web_hosting |
No |
Integer |
Specifies whether static hosting is enabled for an OBS bucket. Possible values: 0 (disabled) and 1 (enabled). This parameter is passed only when origin_type is set to obs_bucket. |
http_port |
No |
Integer |
Specifies the HTTP port. Default value: 80. |
https_port |
No |
Integer |
Specifies the HTTPS port. Default value: 443. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
origin |
ResourceBody object |
Specifies the origin server. |
Parameter |
Type |
Description |
---|---|---|
sources |
Array of SourceWithPort objects |
Origin server settings. |
Parameter |
Type |
Description |
---|---|---|
domain_id |
String |
Domain name ID. |
ip_or_domain |
String |
Specifies the IP address or domain name of the origin server. |
origin_type |
String |
Origin server type, which can be origin server IP address, origin server domain name, and OBS bucket domain name. Enumeration values:
|
active_standby |
Integer |
Whether the origin server is primary or standby. Possible values: 1 (primary) and 0 (standby). |
enable_obs_web_hosting |
Integer |
Specifies whether static hosting is enabled for an OBS bucket. Possible values: 0 (disabled) and 1 (enabled). This parameter is passed only when origin_type is set to obs_bucket. |
http_port |
Integer |
Specifies the HTTP port. Default value: 80. |
https_port |
Integer |
Specifies the HTTPS port. Default value: 443. |
Example Requests
PUT https://cdn.myhuaweicloud.com/v1.0/cdn/domains/ff808**********************2d71/origin?enterprise_project_id=0 { "origin" : { "sources" : [ { "ip_or_domain" : "0.0.0.0", "origin_type" : "ipaddr", "active_standby" : 1, "http_port" : 80, "https_port" : 443 } ] } }
Example Responses
Status code: 200
OK
{ "origin" : { "sources" : [ { "domain_id" : "12ab***********************02b71", "origin_type" : "ipaddr", "ip_or_domain" : "0.0.0.0", "active_standby" : 1, "http_port" : 80, "https_port" : 443 } ] } }
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