tencent cloud

Feedback

ModifyImageAuthorized

Last updated: 2024-07-22 11:07:03

    1. API Description

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

    This API is used to batch license images to be scanned (v2.0).

    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: ModifyImageAuthorized.
    Version Yes String Common Params. The value used for this API: 2020-11-01.
    Region No String Common Params. This parameter is not required.
    AllLocalImages Yes Boolean Whether to license all local images, which has a higher priority than licensing by local image ID. When it is true, UpdatedLocalImageCnt should be greater than 0.
    AllRegistryImages Yes Boolean Whether to license all repository images, with a higher priority than licensing by image ID. When it is true, UpdatedRegistryImageCnt should be greater than 0.
    UpdatedLocalImageCnt Yes Integer Specified number of local images to be licensed, with the highest priority. Any difference between this number and the actual number will be randomly ignored.
    UpdatedRegistryImageCnt Yes Integer Specified number of repository images to be licensed, with the highest priority. Any difference between this number and the actual number will be randomly ignored.
    ImageSourceType Yes String Licensing by eligible local images. Valid values of local image source: ASSETIMAGE (local image list); IMAGEALL (local image sync). This parameter is required when AllLocalImages is false, LocalImageIds is empty, and UpdatedLocalImageCnt is greater than 0.
    LocalImageFilter.N No Array of AssetFilters Licensing by eligible local images. This parameter is required when AllLocalImages is false, LocalImageIds is empty, and UpdatedLocalImageCnt is greater than 0.
    RegistryImageFilter.N No Array of AssetFilters Licensing by eligible repository images. This parameter is required when AllRegistryImages is false, RegistryImageIds is empty, and UpdatedRegistryImageCnt is greater than 0.
    ExcludeLocalImageIds.N No Array of String Licensing by eligible images, excluding specified local image IDs
    ExcludeRegistryImageIds.N No Array of String Licensing by eligible images, excluding specified repository image IDs
    LocalImageIds.N No Array of String Licensing by local image ID. This parameter has a higher priority than licensing by eligible images. It is required when AllLocalImages is false, LocalImageFilter is empty, and UpdatedLocalImageCnt is greater than 0.
    RegistryImageIds.N No Array of String Licensing by repository image ID. This parameter has a higher priority than licensing by eligible images. It is required when AllRegistryImages is false, RegistryImageFilter is empty, and UpdatedRegistryImageCnt is greater than 0.
    OnlyShowLatest No Boolean Whether to only include latest images. This parameter is required for repository images when RegistryImageFilter is not empty and UpdatedRegistryImageCnt is greater than 0.

    3. Output Parameters

    Parameter Name Type Description
    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 Batch licensing images to be scanned (v2.0)

    Input Example

    https://tcss.tencentcloudapi.com/?Action=ModifyImageAuthorized
    &AllLocalImages=false
    &UpdatedLocalImageCnt=1
    &LocalImageIds.0=xx
    &AllRegistryImages=false
    &UpdatedRegistryImageCnt=1
    &RegistryImageIds.0=xx
    &ImageSourceType=ASSETIMAGE
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RequestId": "xx"
        }
    }
    

    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.
    FailedOperation.AuthorizedNotEnough Licenses are insufficient.
    InternalError An internal error occurred.
    InternalError.MainDBFail The database operation failed.
    InvalidParameter The parameter is incorrect.
    InvalidParameter.InvalidFormat The parameter format is incorrect.
    InvalidParameter.MissingParameter The required parameter is missing.
    InvalidParameter.ParsingError A parameter parsing error occurred.
    InvalidParameterValue The parameter value is incorrect.
    ResourceNotFound The resource does not exist.