tencent cloud

文档反馈

UpdateCertificateInstance

最后更新时间:2023-12-01 16:21:30

    1. API Description

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

    This API is used to update old certificate resources with one click and is an asynchronous interface. After this API is called, the returned DeployRecordId being 0 indicates that the task is in progress, and the returned DeployRecordId being greater than 0 indicates that the task is successfully created. If the creation fails, an exception is returned.

    A maximum of 10 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: UpdateCertificateInstance.
    Version Yes String Common Params. The value used for this API: 2019-12-05.
    Region No String Common Params. This parameter is not required for this API.
    OldCertificateId Yes String One-click update old certificate ID
    ResourceTypes.N Yes Array of String Type of the resource that needs to be deployed. The following parameter values are optional: clb, cdn, waf, live, ddos, teo, apigateway, vod, tke, and tcb.
    CertificateId No String One-click update new certificate ID
    ResourceTypesRegions.N No Array of ResourceTypeRegions List of regions for which cloud resources need to be deployed
    CertificatePublicKey No String Public key of the certificate. If the public key of the certificate is uploaded, CertificateId does not need to be uploaded.
    CertificatePrivateKey No String Private key of the certificate. If the public key of the certificate is uploaded, the private key of the certificate is required.
    ExpiringNotificationSwitch No Integer Whether an expiration reminder is ignored for the old certificate. 0: The notification is not ignored. 1: The notification is ignored.
    Repeatable No Boolean Whether repeated uploading of the same certificate is allowed. If the public key of the certificate is uploaded, this parameter can be configured.
    AllowDownload No Boolean Whether downloading is allowed. If the public key of the certificate is uploaded, this parameter can be configured.
    Tags.N No Array of Tags Tag list. If the public key of the certificate is uploaded, this parameter can be configured.
    ProjectId No Integer Project ID. If the public key of the certificate is uploaded, this parameter can be configured.

    3. Output Parameters

    Parameter Name Type Description
    DeployRecordId Integer Cloud resource deployment task ID
    Note: This field may return null, indicating that no valid value can be obtained.
    DeployStatus Integer Deployment status. 1 indicates that the deployment succeeded, and 0 indicates that the deployment failed.
    UpdateSyncProgress Array of UpdateSyncProgress
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 One-Click Update Old Certificate Resources

    One-click update old certificate resources

    Input Example

    POST / HTTP/1.1
    Host: ssl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: UpdateCertificateInstance
    <Common request parameters>
    
    {
        "CertificateId": "abc",
        "OldCertificateId": "abc",
        "ResourceTypes": [
            "abc"
        ],
        "Regions": [
            "abc"
        ],
        "ResourceTypesRegions": [
            {
                "ResourceType": "abc",
                "Regions": [
                    "abc"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "DeployRecordId": 1,
            "DeployStatus": 1,
            "RequestId": "c9c9d2fb-41c0-43b6-8c10-44c81de553c1"
        }
    }
    

    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 Operation failed.
    FailedOperation.AuthError You do not have permission to perform this operation.
    FailedOperation.CertificateDeployHasPendingRecord There is a running certificate deployment task. Please try again after the deployment is complete.
    FailedOperation.CertificateDeployInstanceEmpty There is no instance for the selected cloud resource. Updating failed. Please try again after checking it.
    FailedOperation.CertificateExists The certificate already exists.
    FailedOperation.CertificateHostDeployCanNotAllow The current certificate is not allowed to use the one-click update function.
    FailedOperation.CertificateHostResourceInnerInterrupt Unable to use the deployment feature because the login account is an internal account with too many instance resources. Please contact us to handle it.
    FailedOperation.CertificateHostResourceInstanceHugeLimit There are too many instances under the current account. Loading cannot be performed properly. Please switch the loading mode. After switching, click "Refresh List" and wait for a period of time. Then, all the instances can be loaded.
    FailedOperation.CertificateHostResourceTypeInvalid The cloud resource type is invalid.
    FailedOperation.CertificateInvalid The certificate is invalid.
    FailedOperation.CertificateNotAvailable The certificate is not available. Please check and try again.
    FailedOperation.CertificateNotDeployInstance The certificate is not allowed to be deployed under the instance list.
    FailedOperation.CertificateNotFound The certificate does not exist.
    FailedOperation.InvalidParam Incorrect parameters.
    FailedOperation.NoProjectPermission You do not have the permission to operate on this project.
    FailedOperation.NoRealNameAuth You have not completed the identity verification.
    FailedOperation.RoleNotFoundAuthorization The role does not exist. Please authorize the role first.
    InternalError Internal error.
    InvalidParameter.WithDetailReason The parameter is incorrect.
    LimitExceeded.RateLimitExceeded The API rate limit is reached.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持