GetSnapshotJob

更新时间:
复制 MD 格式

Queries the information about a snapshot job.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:GetSnapshotJob

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

JobId

string

Yes

The ID of the snapshot job.

****d80e4e4044975745c14b****

Response elements

Element

Type

Description

Example

object

PlainResponse

RequestId

string

The request ID.

******11-DB8D-4A9A-875B-275798******

SnapshotJob

object

The information about the snapshot job.

JobId

string

The job ID.

****d80e4e4044975745c14b****

TriggerSource

string

The request trigger source.

Valid values:

  • Console

  • Workflow

  • API

Valid values:

  • Console :
  • Workflow :
  • API :

    API

API

Name

string

The name of the job.

Test task

Type

string

Snapshot types

Valid values:

  • WebVtt

  • Sprite

  • Normal

Valid values:

  • WebVtt :
  • Sprite :
  • Normal :

Sprite

Input

object

The input of the job.

Type

string

The type of the input file. Valid values:

  1. OSS: an Object Storage Service (OSS) object.

  2. Media: a media asset.

OSS

Media

string

The input file. If Type is set to OSS, the URL of an OSS object is returned. If Type is set to Media, the ID of a media asset is returned. The URL of an OSS object can be in one of the following formats:

  1. oss://bucket/object

  2. http(s)://bucket.oss-[RegionId].aliyuncs.com/object In the URL, bucket specifies an OSS bucket that resides in the same region as the job, and object specifies the object URL in OSS.

oss://test-bucket/object.mp4

OssFile

object

The three key elements of OSS.

Bucket

string

The OSS bucket.

test-bucket

Location

string

The OSS location.

oss-cn-shanghai

Object

string

The OSS object.

object.mp4

Output

object

The output of the job.

Type

string

The type of the output file. Valid values:

  1. OSS: an OSS object.

  2. Media: a media asset.

OSS

Media

string

The output file. If Type is set to OSS, the URL of an OSS object is returned. If Type is set to Media, the ID of a media asset is returned. The URL of an OSS object can be in one of the following formats:

  1. oss://bucket/object

  2. http(s)://bucket.oss-[RegionId].aliyuncs.com/object

In the URL, bucket specifies an OSS bucket that resides in the same region as the job, and object specifies the object URL in OSS. If multiple static snapshots were captured, the object must contain the "{Count}" placeholder. In the case of a sprite, the object must contain the "{TileCount}" placeholder. The suffix of the WebVTT snapshot objects must be ".vtt".

http://test-bucket.oss-cn-shanghai.aliyuncs.com/output-{Count}.jpg

OssFile

object

The three key elements of OSS.

Bucket

string

The OSS bucket.

test-bucket

Location

string

The OSS location.

oss-cn-shanghai

Object

string

The OSS object.

output-{Count}.jpg

Count

integer

The number of snapshots.

8

Async

boolean

Indicates whether the snapshots were captured in asynchronous mode. Default value: true.

true

TemplateId

string

The template ID.

****d80e4e4044975745c14b****

TemplateConfig

string

The snapshot template configuration.

{"Type":"Normal","FrameType":"normal","Time":0,"Count":10}

PipelineId

string

The ID of the MPS queue to which the job was submitted.

****d80e4e4044975745c14b****

Status

string

The state of the job.

Valid values:

  • Init: The job is submitted.

  • Success: The job is successful.

  • Fail: The job failed.

Valid values:

  • Init :
  • Success :
  • Fail :

Success

Code

string

Error codes

ResourceNotFound

Message

string

The error message that is returned.

The specified resource for "Pipeline" could not be found.

SubmitTime

string

The time when the job was submitted.

2022-07-12T16:17:54Z

FinishTime

string

The time when the job was complete.

2022-07-12T16:30:54Z

UserData

string

The user-defined parameters.

{"test parameter": "test value"}

CreateTime

string

The time when the job was created.

2022-07-12T16:17:54Z

ModifiedTime

string

The time when the job was last modified.

2022-07-12T16:30:54Z

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "SnapshotJob": {
    "JobId": "****d80e4e4044975745c14b****",
    "TriggerSource": "API",
    "Name": "Test task",
    "Type": "Sprite",
    "Input": {
      "Type": "OSS",
      "Media": "oss://test-bucket/object.mp4",
      "OssFile": {
        "Bucket": "test-bucket",
        "Location": "oss-cn-shanghai",
        "Object": "object.mp4"
      }
    },
    "Output": {
      "Type": "OSS",
      "Media": "http://test-bucket.oss-cn-shanghai.aliyuncs.com/output-{Count}.jpg",
      "OssFile": {
        "Bucket": "test-bucket",
        "Location": "oss-cn-shanghai",
        "Object": "output-{Count}.jpg"
      }
    },
    "Count": 8,
    "Async": true,
    "TemplateId": "****d80e4e4044975745c14b****",
    "TemplateConfig": "{\"Type\":\"Normal\",\"FrameType\":\"normal\",\"Time\":0,\"Count\":10}",
    "PipelineId": "****d80e4e4044975745c14b****",
    "Status": "Success",
    "Code": "ResourceNotFound",
    "Message": "The specified resource for \"Pipeline\" could not be found.",
    "SubmitTime": "2022-07-12T16:17:54Z",
    "FinishTime": "2022-07-12T16:30:54Z",
    "UserData": "{\"test parameter\": \"test value\"}",
    "CreateTime": "2022-07-12T16:17:54Z",
    "ModifiedTime": "2022-07-12T16:30:54Z"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.