tencent cloud

文档反馈

UpdateScdnDomain

最后更新时间:2023-12-01 16:39:42

    1. API Description

    Domain name for API request: cdn.tencentcloudapi.com.

    This API is used to modify security configurations of SCDN acceleration domain names.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: UpdateScdnDomain.
    Version Yes String Common Params. The value used for this API: 2018-06-06.
    Region No String Common Params. This parameter is not required for this API.
    Domain Yes String Domain name
    Waf No ScdnWafConfig WAF configuration
    Acl No ScdnAclConfig Custom defense policy configuration
    CC No ScdnConfig CC attack defense configurations. CC attack defense is enabled by default.
    Ddos No ScdnDdosConfig DDoS defense configuration. DDoS defense is enabled by default.
    Bot No ScdnBotConfig Bot defense configuration

    3. Output Parameters

    Parameter Name Type Description
    Result String Result of the request. Success indicates that the configurations are updated.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Modifying SCDN domain name configuration

    This example shows you how to modify SCDN domain name configuration.

    Input Example

    https://cdn.tencentcloudapi.com/?Action=UpdateScdnDomain
    &Domain=www.test.com
    &Acl.Switch=on
    &Acl.ScriptData.0.RuleName=test
    &Acl.ScriptData.0.Result=refuse
    &Acl.ScriptData.0.Configure.0.MatchKey=params
    &Acl.ScriptData.0.Configure.0.LogiOperator=exclude
    &Acl.ScriptData.0.Configure.0.MatchValue=www.attatck.com
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RequestId": "08b287d9-6342-4b70-9ec7-201efcd93b9d",
            "Result": "Success"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.CdnConfigError Failed to update the domain name configuration. Please submit a ticket for troubleshooting.
    InternalError.CdnConfigError Failed to update the domain name configuration.
    InternalError.CdnDbError Internal data error. Please submit a ticket for troubleshooting.
    InternalError.CdnSystemError System error. Please submit a ticket for troubleshooting.
    InternalError.ScdnUserNoPackage The SCDN service is not activated. Please purchase or renew an SCDN packet and try again.
    InternalError.ScdnUserSuspend Your SCDN service is suspended. Please purchase a new SCDN packet.
    InvalidParameter.AccessPortOpenedHttps The access port 443 must be enabled for HTTPS configuration.
    InvalidParameter.CDNStatusInvalidDomain Invalid domain name status.
    InvalidParameter.CdnHostInternalHost This domain name belongs to another account. You are not allowed o connect it to CDN.
    InvalidParameter.CdnHostInvalidStatus Invalid domain name status.
    InvalidParameter.CdnInterfaceError Internal API error. Please submit a ticket for troubleshooting.
    InvalidParameter.CdnParamError Parameter error. Please see the sample parameters in the documentation.
    LimitExceeded.CdnHostOpTooOften Domain name operations are too frequent.
    ResourceInUse.CdnOpInProgress CDN resources are being operated.
    ResourceNotFound.CdnHostNotExists Unable to find the domain name. Please make sure the domain name is correct.
    ResourceNotFound.CdnUserNotExists The CDN service has not been activated. Please activate it first before using this API.
    ResourceUnavailable.CdnHostIsLocked The domain name is locked.
    ResourceUnavailable.ScdnUserNoPackage The SCDN service is not activated. Please purchase or renew an SCDN packet and try again.
    UnauthorizedOperation.CdnCamUnauthorized No CAM policy is configured for the sub-account.
    UnauthorizedOperation.CdnHostUnauthorized The sub-account has no access to the CDN-accelerated domain name.
    UnauthorizedOperation.CdnUserIsSuspended The CDN service has been suspended. Please restart it and try again.
    UnauthorizedOperation.CdnUserNoWhitelist You are not in the beta whitelist and thus have no permission to use this function.