Configuring a Custom Domain Name for a Bucket
Function
This API sets a custom domain name for an OBS bucket.
Restrictions
- To use this API, you must be the bucket owner or have the required permission (obs:bucket:SetBucketCustomDomain in IAM or SetBucketCustomDomain in a bucket policy). For details, see Introduction to OBS Access Control, IAM Custom Policies, and Creating a Custom Bucket Policy.
- To learn about the mappings between OBS regions and endpoints, see Regions and Endpoints.
Method
ObsClient.setBucketCustomDomain(params)
Request Parameters
| Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
| Bucket | String | Yes | Explanation: Bucket name. Restrictions:
Default value: None |
| DomainName | String | Yes | Explanation: Custom domain name. Restrictions: None Value range: None Default value: None |
| Name | String | Yes | Explanation: Certificate name Restrictions: None Value range: The value can contain 3 to 63 characters. Default value: None |
| CertificateId | String | No | Explanation: Certificate ID on the CCM. Restrictions: None Value range: The value must contain 16 characters. Default value: None |
| Certificate | String | Yes | Explanation: Certificate content, which can contain intermediate and root certificates. If certificateChain contains a certificate chain, only the certificate itself will be extracted from certificate. Use escape characters \n or \r\n to replace line breaks. Restrictions: None Value range: None Default value: None |
| CertificateChain | String | No | Explanation: Certificate chain, which is optional and can be passed through the certificate parameter. Use escape characters \n or \r\n to replace line breaks. Restrictions: None Value range: None Default value: None |
| PrivateKey | String | Yes | Explanation: Private key of a certificate. An encrypted private key cannot be uploaded. Use escape characters \n or \r\n to replace line breaks. Restrictions: None Value range: None Default value: None |
| CertificateType | str | No | Explanation: Certificate type. Restrictions: The value is case sensitive. Value range:
Default value: If this parameter is not set, the default value server is used. |
| ENCCertificate | str | No | Explanation: Content of the SM encryption certificate. Restrictions: Use escape characters \n or \r\n to replace line breaks. Value range: The value can contain 0 to 65,536 characters. Default value: N/A |
| ENCPrivateKey | str | No | Explanation: Private encryption key of the SM certificate. Restrictions:
Value range: The value can contain 0 to 4,096 characters. Default value: N/A |
| DeleteCertificate | str | No | Explanation: Certificate operation type, indicating whether to delete the certificate. Restrictions: N/A Value range:
Default value: false |
Responses
| Parameter | Type | Description |
| Status | number | Explanation: HTTP status code returned by the OBS server. Value range: A status code is a group of digits indicating the status of a response. It ranges from 2xx (indicating successes) to 4xx or 5xx (indicating errors). For details, see Status Codes. |
| Code | string | Explanation: Error code returned by the OBS server. |
| Message | string | Explanation: Error description returned by the OBS server. |
| HostId | string | Explanation: Request server ID returned by the OBS server. |
| RequestId | string | Explanation: Request ID returned by the OBS server. |
| Id2 | string | Explanation: Request ID2 returned by the OBS server. |
| Indicator | string | Explanation: Error code details returned by the OBS server. |
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