tencent cloud

容器安全服务

ScanComplianceAssetsByPolicyItem

下载
聚焦模式
字号
最后更新时间: 2026-06-10 17:03:54

1. API Description

Domain name for API request: tcss.intl.tencentcloudapi.com.

This API is used to check the specified asset again with the specified check item and return the ID of the created compliance check task.

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: ScanComplianceAssetsByPolicyItem.
Version Yes String Common Params. The value used for this API: 2020-11-01.
Region No String Common Params. This parameter is not required.
CustomerPolicyItemId Yes Integer ID of the specified check item
CustomerAssetIdSet.N Yes Array of Integer List of IDs of customer assets to be scanned again
AssetType No String Type of assets to be scanned.
  • ASSET_CONTAINER: Docker container.
  • ASSET_IMAGE: Docker image.
  • ASSET_HOST: Docker host.
  • ASSET_K8S: Kubernetes.
  • ASSET_CONTAINERD: containerd host.
  • ASSET_CONTAINERD_CONTAINER: containerd container.
  • 3. Output Parameters

    Parameter Name Type Description
    TaskId Integer ID of another check task
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Rechecking Selected Assets with a Specified Check Item

    Input Example

    POST / HTTP/1.1
    Host: tcss.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ScanComplianceAssetsByPolicyItem
    <Common request parameters>
    
    {
        "CustomerPolicyItemId": 10001,
        "CustomerAssetIdSet": [
            111,
            456,
            789
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "8a64a4f9-864c-49c6-adcb-21b483de477a",
            "TaskId": 1001
        }
    }
    

    Example2 Detecting Assets Under a Policy

    Detecting Assets Under a Policy

    Input Example

    POST / HTTP/1.1
    Host: tcss.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ScanComplianceAssetsByPolicyItem
    <Common request parameters>
    
    {
        "CustomerPolicyItemId": 2798,
        "CustomerAssetIdSet": [
            2202462
        ],
        "AssetType": "ASSET_CONTAINER"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "1f25995a-d6f2-4b3d-aea5-719288998970",
            "TaskId": 2540
        }
    }
    

    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
    AuthFailure A CAM signature/authentication error occurred.
    FailedOperation The operation failed.
    InternalError An internal error occurred.
    InvalidParameter The parameter is incorrect.
    InvalidParameter.MissingParameter The required parameter is missing.
    OperationDenied The operation was denied.
    RequestLimitExceeded The number of requests exceeds the frequency limit.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈