tencent cloud

文档反馈

DescribeInvocations

最后更新时间:2024-11-27 10:36:33

    1. API Description

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

    This API is used to query execution activity details.

    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: DescribeInvocations.
    Version Yes String Common Params. The value used for this API: 2020-10-28.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    InvocationIds.N No Array of String List of execution activity IDs. Up to 100 IDs are allowed for each request. InvocationIds and Filters cannot be specified at the same time.
    Filters.N No Array of Filter Filter conditions.
  • invocation-id - String - Required: No - (Filter condition) Filter by the execution activity ID.

  • command-id - String - Required: No - (Filter condition) Filter by the command ID.
  • command-created-by - String - Required: No - (Filter condition) Filter by the command type. Valid values: TAT (public commands) or USER (custom commands).
  • instance-kind - String - Required: No - (Filter condition) Filter by the instance type. Valid values: CVM or LIGHTHOUSE.

    Up to 10 Filters are allowed for each request. Each filter can have up to five Filter.Values. InvocationIds and Filters cannot be specified at the same time.
  • Limit No Integer Number of returned results. It defaults to 20. The maximum is 100. For more information on Limit, see the relevant section in the API Overview.
    Offset No Integer Offset. The default value is 0. For more information on Offset, see the relevant section in API Introduction.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Total number of matching execution activities.
    InvocationSet Array of Invocation List of execution activities.
    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 Querying the execution activities

    Input Example

    POST / HTTP/1.1
    Host: tat.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeInvocations
    <Common request parameters>
    
    {
        "Offset": 0,
        "Limit": 1,
        "InvocationIds": [
            "inv-q4zp60g0"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "958a3603-d0c3-4c97-a37d-6bc24eacddac",
            "TotalCount": 1,
            "InvocationSet": [
                {
                    "CommandId": "cmd-9dxzty3m",
                    "CommandContent": "cHdk",
                    "CommandType": "SHELL",
                    "Timeout": 60,
                    "InvocationSource": "USER",
                    "WorkingDirectory": "/root",
                    "InvocationId": "inv-q4zp60g0",
                    "InstanceKind": "CVM",
                    "InvocationStatus": "SUCCESS",
                    "Description": "Test Invocation",
                    "Parameters": "",
                    "DefaultParameters": "",
                    "Username": "root",
                    "OutputCOSKeyPrefix": "cosprefix",
                    "OutputCOSBucketUrl": "https://example-123456789.cos.ap-beijing.myqcloud.com",
                    "InvocationTaskBasicInfoSet": [
                        {
                            "InvocationTaskId": "invt-kakne8h2",
                            "TaskStatus": "SUCCESS",
                            "InstanceId": "ins-zj0f57ew"
                        },
                        {
                            "InvocationTaskId": "invt-jc2onrxm",
                            "TaskStatus": "SUCCESS",
                            "InstanceId": "ins-zj0f57ex"
                        },
                        {
                            "InvocationTaskId": "invt-6xmuisyq",
                            "TaskStatus": "SUCCESS",
                            "InstanceId": "ins-zj0f57ev"
                        }
                    ],
                    "StartTime": "2020-11-09T07:21:59+00:00",
                    "EndTime": "2020-11-09T07:22:08+00:00",
                    "CreatedTime": "2020-11-09T07:21:59+00:00",
                    "UpdatedTime": "2020-11-09T07:22:08+00:00"
                }
            ]
        }
    }
    

    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
    InternalError Internal error.
    InvalidParameter Invalid parameter.
    InvalidParameter.ConflictParameter Conflicting parameters.
    InvalidParameterValue.InvalidCommandId Invalid CommandId.
    InvalidParameterValue.InvalidFilter Invalid filter.
    InvalidParameterValue.InvalidInvocationId Invalid execution activity ID.
    InvalidParameterValue.LimitExceeded Parameter limit exceeded.
    LimitExceeded.FilterValueExceeded Too many Filter values.
    UnauthorizedOperation.CamAuthFailed CAM authentication failed.
    UnauthorizedOperation.InvalidToken Invalid token.
    UnauthorizedOperation.MFAExpired The Multi-factor authentication (MFA) code expired.
    UnauthorizedOperation.MFANotFound Multi-factor authentication (MFA) does not exist.