Delete a Scheduled SQL job

更新时间:
复制 MD 格式

You can call the DeleteScheduledSQL operation to delete a Scheduled SQL job.

Note

The Simple Log Service SDK for Scheduled SQL is no longer updated. Use the Alibaba Cloud SDK to manage Scheduled SQL.

image

Prerequisites

Parameters

Request parameters

Name

Type

Required

Description

Example

project

String

Yes

The name of the project.

ali-test-project

jobName

String

Yes

The unique name of the Scheduled SQL job.

sql-123456789-123456

Response parameters

See DeleteScheduledSQL.

Sample code

import com.alibaba.fastjson.JSONObject;
import com.aliyun.openservices.log.Client;
import com.aliyun.openservices.log.exception.LogException;
import com.aliyun.openservices.log.request.DeleteScheduledSQLRequest;
import com.aliyun.openservices.log.response.DeleteScheduledSQLResponse;

public class DeleteScheduledSQL {
    static String accessId = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID");
    static String accessKey = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET");

    static String host = "cn-hangzhou.log.aliyuncs.com";
    static Client client = new Client(host, accessId, accessKey);

    public static void main(String[] args) throws LogException {
        String project = "ali-test-project";
        String jobName = "sql-123456789-123456";
        DeleteScheduledSQLResponse scheduledSQLResponse = client.deleteScheduledSQL(new DeleteScheduledSQLRequest(project, jobName));
        System.out.println(JSONObject.toJSONString(scheduledSQLResponse));
    }
}

References