Deletes snapshots.
Usage notes
You can delete only snapshots that were captured in the last year.
QPS limit
You can call this operation up to 30 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | DeleteSnapshotFiles | The operation that you want to perform. Set the value to DeleteSnapshotFiles. |
CreateTimestampList.N | Long | No | 1653641526637 | The timestamp when the snapshot that you want to delete was captured. Unit: milliseconds. You can obtain the timestamp of a snapshot from the CreateTimestamp parameter in the response of the DescribeLiveStreamSnapshotInfo operation. |
DomainName | String | Yes | example.com | The main streaming domain. |
AppName | String | Yes | liveApp**** | The name of the application to which the live stream belongs. |
StreamName | String | Yes | liveStream**** | The name of the live stream. |
RemoveFile | Boolean | Yes | true | Specifies whether to also delete the corresponding file in Object Storage Service (OSS) at the same time. Value values:
|
Response parameters
Parameter |
Type |
Example |
Description |
FailureCount | Integer | 1 | The number of snapshots that failed to be deleted. |
RequestId | String | 90F60327-ABEC-5A93-BF1F-**** | The request ID. |
SnapshotDeleteInfoList | Array of SnapshotDeleteInfo | The information about the snapshots. |
|
SnapshotDeleteInfo | |||
CreateTimestamp | Long | 1653641526637 | The timestamp when the snapshot was captured. Unit: milliseconds. |
Message | String | OK | The processing result of the snapshot. Valid values:
|
SuccessCount | Integer | 1 | The number of snapshots that were deleted. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=DeleteSnapshotFiles
&AppName=liveApp****
&CreateTimestampList.1=1653641526637
&DomainName=example.com
&RemoveFile=true
&StreamName=liveStream****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteSnapshotFilesResponse>
<FailureCount>1</FailureCount>
<SnapshotDeleteInfoList>
<SnapshotDeleteInfo>
<Message>OK</Message>
<CreateTimestamp>1653641526637</CreateTimestamp>
</SnapshotDeleteInfo>
<SnapshotDeleteInfo>
<Message>Not Found</Message>
<CreateTimestamp>1656936778524</CreateTimestamp>
</SnapshotDeleteInfo>
</SnapshotDeleteInfoList>
<RequestId>90F60327-ABEC-5A93-BF1F-****</RequestId>
<SuccessCount>1</SuccessCount>
</DeleteSnapshotFilesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"FailureCount" : 1,
"SnapshotDeleteInfoList" : {
"SnapshotDeleteInfo" : [ {
"Message" : "OK",
"CreateTimestamp" : 1653641526637
}, {
"Message" : "Not Found",
"CreateTimestamp" : 1656936778524
} ]
},
"RequestId" : "90F60327-ABEC-5A93-BF1F-****",
"SuccessCount" : 1
}
Error codes
For a list of error codes, see Service error codes.
HTTP status code |
Error code |
Error message |
Description |
400 |
InvalidParams |
invalid JSON |
The request failed to be parsed. |
400 |
Cannot find task |
Stream not found |
The stream was not found. Check the snapshot settings such as the domain name and application name and the stream ingest status. |
400 |
InvalidParams |
Invalid request: missing |
The required parameters are missing. |
403 |
OSSAccessDenied |
OSS bucket not authorised |
You do not have the permissions on the OSS bucket where the snapshot files are stored. |
500 |
InternalError |
Server internal error |
An internal error occurred. Check the snapshot settings such as the domain name and application name and the stream ingest status. |