AWS TRANSCRIBE - Delete Job (Excluir Transcrição)
O que é esta operação?
A operação deleteJob do AWS Transcribe é responsável por excluir um trabalho de transcrição e seus metadados (não exclui o áudio original).
Código
private async deleteJob(client: TranscribeClient, data: any, context: ExecutionContext): Promise<any> {
const jobName = this.replaceVariables(data.jobName, context.variables);
const command = new DeleteTranscriptionJobCommand({
TranscriptionJobName: jobName,
});
await client.send(command);
return {
deleted: true,
jobName,
};
}
Parâmetros
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| operation | string | Sim | "deleteJob" |
| jobName | string | Sim | Nome do job para excluir |
| responseVariable | string | Sim | Variável para resultado |
Exemplo
{
"name": "Excluir Transcrição Antiga",
"nodes": [
{
"id": "start_1",
"type": "start",
"position": { "x": 100, "y": 100 },
"data": { "label": "Início" }
},
{
"id": "transcribe_1",
"type": "aws_transcribe",
"position": { "x": 300, "y": 100 },
"data": {
"label": "Excluir Job",
"operation": "deleteJob",
"config": {
"region": "us-east-1",
"accessKeyId": "KEY",
"secretAccessKey": "SECRET"
},
"jobName": "{{oldJobName}}",
"responseVariable": "deleteResult"
}
},
{
"id": "message_1",
"type": "message",
"position": { "x": 500, "y": 100 },
"data": {
"label": "Confirmação",
"parameters": {
"message": "✅ Job {{deleteResult.jobName}} foi excluído."
}
}
},
{
"id": "end_1",
"type": "end",
"position": { "x": 700, "y": 100 },
"data": { "label": "Fim" }
}
],
"edges": [
{ "source": "start_1", "target": "transcribe_1" },
{ "source": "transcribe_1", "target": "message_1" },
{ "source": "message_1", "target": "end_1" }
]
}
💡 Dica: Útil para limpeza de jobs antigos e gerenciamento de quotas da AWS.