开发者社区> 问答> 正文

如何通过 AGS 取消运行中的工作流?

如何通过 AGS 取消运行中的工作流?

展开
收起
小天使爱美 2020-03-31 21:23:14 865 0
2 条回答
写回答
取消 提交回答
  • 有点尴尬唉 你要寻找的东西已经被吃掉啦!

    [root@iZwz92q9h36kv8posr0i6uZ ~]# ags ags is the command line interface to Alibaba Cloud Genomics Compute Service

    Usage: ags [flags] ags [command]

    Available Commands: completion output shell completion code for the specified shell (bash or zsh) config setup ags client necessary info delete delete a workflow and its associated pods get display details about a workflow help Help about any command install install ags kubectl kubectl command lint validate a file or directory of workflow manifests list list workflows logs view logs of a workflow resubmit resubmit a workflow resume resume a workflow retry retry a workflow submit submit a workflow suspend suspend a workflow terminate terminate a workflow uninstall uninstall ags version Print version information wait waits for a workflow to complete watch watch a workflow until it completes

    Flags: --as string Username to impersonate for the operation --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. --certificate-authority string Path to a cert file for the certificate authority --client-certificate string Path to a client certificate file for TLS --client-key string Path to a client key file for TLS --cluster string The name of the kubeconfig cluster to use --context string The name of the kubeconfig context to use -h, --help help for ags --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure --kubeconfig string Path to a kube config. Only required if out-of-cluster -n, --namespace string If present, the namespace scope for this CLI request --password string Password for basic authentication to the API server --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") --server string The address and port of the Kubernetes API server --token string Bearer token for authentication to the API server --user string The name of the kubeconfig user to use --username string Username for basic authentication to the API server

    Use "ags [command] --help" for more information about a command.

    2020-04-03 22:42:01
    赞同 展开评论 打赏
  • 请求信息 返回信息 示例 调用 CancelWorkflow 取消正在运行中的工作流。

    请求信息 请求行 RequestLine

    PUT /gs/workflow/{workflowName} HTTP/1.1 特有请求头 RequestHead

    无,请参考 公共请求头部。

    请求体 RequestBody

    {
        "action": "cancel"
    }
    

    表 1. 请求体解释 名称 类型 描述 action String 执行的操作,目前只支持 cancel。 返回信息 返回行 ResponseLine

    HTTP/1.1 200 OK 特有返回头 ResponseHead

    无,请参考 公共返回头部。

    返回体 ResponseBody

    示例 请求示例(Python)

    #!/usr/bin/env python #coding=utf-8

    from aliyunsdkcore.client import AcsClient from aliyunsdkcore.request import CommonRequest import os client = AcsClient(os.environ['accessKeyID'], os.environ['accessKeySecret'], 'cn-beijing')

    request = CommonRequest() request.set_accept_format('json') request.set_method('PUT') request.set_protocol_type('https') # https | http request.set_domain('cs.cn-beijing.aliyuncs.com') request.set_version('2015-12-15')

    request.add_query_param('RegionId', "cn-beijing") request.add_header('Content-Type', 'application/json') request.set_uri_pattern('/gs/workflow/wgs-gpu-97xfn') body = '''{"action": "cancel"}''' request.set_content(body.encode('utf-8'))

    response = client.do_action_with_exception(request)

    print(response)

    2020-03-31 21:26:20
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载