用于taskcluster的python客户端
taskcluster的Python项目详细描述
用于python的taskcluster客户端
这是一个用于在python程序中与taskcluster交互的库。它 向消费者展示整个rest api,并能够生成 由Hawk凭据签名的URL。它还可以为 收听来自taskcluster的脉冲消息。
库根据taskcluster存储库中提供的taskcluster api定义构建rest api方法。
生成临时凭据
如果您具有非临时taskcluster凭据,则可以生成一组 临时凭据如下。请注意,凭据不能持续更长时间 超过31天,您只能通过取消 用于发布(最多需要一小时)。
调用方不负责应用任何时钟漂移调整 到开始或到期时间-由身份验证服务直接处理。
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
不能使用临时凭据颁发新的临时凭据。你
必须具有auth:create client:<;name>;
才能创建命名的临时凭据,
但是,不管您的作用域如何,都可以创建未命名的临时凭据。
API文档
rest api方法记录在参考文档中。
查询字符串参数
现在支持查询字符串参数。为了使用它们,你可以打电话 像这样的方法:
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
只有使用此调用约定才支持这些查询字符串参数
同步与异步
taskcluster
下的对象(例如taskcluster.queue
)是
python2兼容并同步运行。
taskcluster.aio
下的对象(例如taskcluster.aio.queue
)需要
python>;=3.6
。异步对象使用异步协同路由进行并发;这
允许我们将I/O操作放在后台,因此需要
CPU可以更快发生。给定数十个可以同时运行的操作
(例如,取消中大型任务图),这可能会导致
性能改进。代码将类似于
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
其他异步代码示例可在此处找到。
这里有一张幻灯片,用于介绍异步python 下面是一个简单的命令: 方法有四种调用约定: 主题交换方法的选项可以是
字典参数或关键字参数。只允许一个表单 通常需要在不实际调用方法的情况下为api方法生成url。
为此,请使用 请注意,签名的URL是有时间限制的;可以使用客户端构造函数的 此客户端需要一个 从版本6.0.0开始,客户端不会读取标准的 有两种方法可以使用python客户端轻松完成分页。第一个是
在代码中实现分页: 还有一个实验特性支持内置的自动分页
在同步客户端中。此功能允许将回调作为
"paginationhandler"关键字参数。此函数将被传递给
API方法的响应体作为其唯一的位置数组。 这个内置分页的例子显示了任务列表是如何
构建并计数: 日志记录在 要生成slugid(taskcluster的客户端生成的唯一id),请使用
在某些情况下,可以创建从名称到
蛞蝓,能够多次产生相同的蛞蝓。
函数返回一个可调用的
就这个。 函数确定
假设满足一组所需作用域中的一个或多个
作用域,考虑*扩展。这有助于使本地
关于范围满意度的决定,但请注意 它获取假定作用域的列表,以及
析取范式,并检查是否有所需的作用域集
满意。 示例: 很多taskcluster api都要求将来使用iso 8601时间戳偏移量
作为提供到期日、截止日期等的方式,这些可以很容易地创建
但是,使用 默认情况下,如果偏移字符串
前缀为负( 偏移字符串不知道空格和大小写不敏感。它也可以
可以选择加上前缀 从现在起 taskcluster和相关
服务。如果您希望 什么都不做就回应。
此端点用于检查服务是否已启动。 获取所有客户的列表。带有前缀的客户机
返回clientid的前缀。 默认情况下,此端点将尝试一次返回多达1000个客户端
请求。但它可能会返回更少,甚至没有返回。
它还可能返回 具有所需的输出架构 获取有关单个客户端的信息。 接受以下参数: 具有所需的输出架构 创建一个新的客户机并获取此客户机的 如果松开 如果具有相同 调用方的作用域必须满足 接受以下参数: 具有必需的输入模式 具有所需的输出架构 重置客户端 无法检索现有的accessToken,因此如果您将其松开
您必须重置AccessToken才能再次获取它。 接受以下参数: 具有所需的输出架构 更新现有客户端。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 启用用 这通常由身份提供程序用于重新启用
已在相应标识的作用域更改时禁用。 接受以下参数: 具有所需的输出架构 禁用客户端。如果客户端已被禁用,则此操作将不起任何作用。 当
相应标识的作用域不再满足客户端的作用域。 接受以下参数: 具有所需的输出架构 删除客户端,请注意与此客户端相关的任何角色都必须
单独删除。 接受以下参数: 获取所有角色的列表。每个角色对象还包括
它扩展到的范围。这将始终返回单个http中的所有角色
请求, 要获得分页结果,请使用 具有所需的输出架构 获取所有角色的列表。每个角色对象还包括
它扩展到的范围。这类似于 如果没有给出限制,则返回所有角色。既然这样
列表可能变长,呼叫者可以使用 具有所需的输出架构 获取所有角色ID的列表。 如果没有给出限制,则返回所有角色的roleids。既然这样
列表可能变长,呼叫者可以使用 具有所需的输出架构 获取有关单个角色的信息,包括
角色扩展到。 接受以下参数: 具有所需的输出架构 创建新角色。 调用方的作用域必须满足新角色的作用域。 如果已经存在具有相同 创建将生成无限扩展的角色将导致
在错误响应中。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 更新现有角色。 调用方的作用域必须满足正在添加的所有新作用域,但是
不需要满足角色的所有现有作用域。 将生成无限扩展的角色的更新将导致
在错误响应中。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 删除角色。无论是否成功,此操作都将成功
角色已存在。 接受以下参数: 返回给定作用域集的扩展副本,其作用域由
包括角色。 具有必需的输入模式 具有所需的输出架构 返回请求中可用的扩展作用域,同时考虑所有源
作用域和作用域限制(临时凭据、assumescope、客户端作用域,
以及角色)。 具有所需的输出架构 获取临时aws凭据,以便访问
一个给定的 此方法只能允许访问白名单中的存储桶集。添加
将bucket添加到白名单中,联系taskcluster团队,后者将其添加到
适当的IAM政策。如果bucket在不同的aws帐户中,则
还需要添加允许从taskcluster访问的bucket策略
帐户。这个政策应该是这样的: 凭据设置为在一小时后过期,但此行为是
随时可能更改。因此,您应该始终读取 请注意,您的前缀不能以斜线开头。这样的前缀
在s3上是允许的,但我们禁止它来阻止不良行为。 还要注意,如果您的前缀没有以斜线结尾,那么sts
凭据可能允许访问意外的密钥,因为s3不处理
特别地划伤。例如,前缀 最后,请注意不允许使用 如果querystring参数
<代码>?format=iam role compat已给定,响应将兼容
使用ec2元数据服务公开的json。这是为了缓解
用于自动刷新凭据的库和工具的兼容性。
有关EC2元数据服务返回的格式的详细信息,请参见:
EC2用户指南 接受以下参数: 具有所需的输出架构 检索由taskcluster auth管理的所有azure帐户的列表。 具有所需的输出架构 检索帐户中所有表的列表。 接受以下参数: 具有所需的输出架构 获取用于特定azure的共享访问签名(sas)字符串
表存储表。 接受以下参数: 具有所需的输出架构 检索帐户中所有容器的列表。 接受以下参数: 具有所需的输出架构 获取用于特定azure的共享访问签名(sas)字符串
Blob存储容器。 接受以下参数: 具有所需的输出架构 获取哨兵项目的临时DSN(访问凭据)。
返回的凭据可用于任何哨兵客户端
24小时后,凭证将自动禁用。 如果项目不存在,则将创建该项目,并将其分配给
为此组件配置的初始团队。联系岗哨管理员
如果需要,将项目转移到您有权访问的团队中 接受以下参数: 有要求的输出UT模式 获取临时 令牌有效期为24小时,过期后客户端应刷新。 接受以下参数: 具有所需的输出架构 获取适合用于连接到
websocktunnel服务器。 生成的令牌将仅由具有匹配访问群体的服务器接受
价值。访问这样的服务器是调用方的责任。一般来说,
应将服务器URL或一组URL作为配置提供给调用方
以及观众价值。 令牌的有效期是有限的(以小时为单位)。呼叫者应该
到期前刷新。 接受以下参数: 具有所需的输出架构 获取给定项目中给定服务帐户的临时GCP凭据。 只允许预配置的项目。该项目中的任何ServiceAccount都可以
被使用。 如果ServiceAccount没有必要的策略,则调用会添加该策略。
凭据设置为在一小时后过期,但此行为是
随时可能更改。因此,您应该始终读取 接受以下参数: 具有所需的输出架构 验证作用域的输入和返回列表中给定的请求签名
验证客户端所拥有的。 此方法由希望依赖taskcluster的其他服务使用
身份验证的凭据。这样我们就可以不用
机密凭据将离开此服务。 具有必需的输入模式 具有所需的输出架构 测试taskcluster客户端实现的实用方法
身份验证。 此终结点接受带有
clientid 请求已通过验证,有任何证书、授权的副本等。
应用,并根据 具有必需的输入模式 具有所需的输出架构 类似于 此终结点接受带有
clientid 请求已通过验证,有任何证书、授权的副本等。
应用,并检查结果作用域,就像任何api调用一样。
成功时,响应包含clientid和scopes,如
API方法。 此方法稍后可能会被扩展以允许指定客户端和
通过查询参数所需的作用域。 具有所需的输出架构 auth服务负责存储凭据、管理
作用域的分配,以及来自其他方的请求签名的验证R
服务。 当凭据或角色为
更新。这主要是为了使auth服务的多个实例
可以清除其缓存并同步状态。但你当然是
欢迎将它们用于其他目的,例如监视更改。 aws provisioner负责在ec2上提供实例,以便在
任务集群。provisioner维护一组工人配置,其中
可以使用api进行管理,该api通常在
aws-provisioner.taskcluster.net/v1.这个api还可以执行基本实例
除了维护工人类型的内部状态之外的管理任务
配置信息。 provisioner以可配置的间隔运行。每次迭代
provisioner获取当前副本aws ec2 api报告的状态。在
每次迭代,我们都会询问队列该工作进程有多少任务等待执行
类型。根据挂起的任务数和缩放比例,我们可以
提交新实例的请求。我们使用定价信息、容量和
决定哪个区域中的实例类型的效用因子信息
成为最佳配置。 每个ec2实例类型都将声明一个容量和效用因子。能力是
给定计算机能够并发运行的任务数。
效用因子是两种实例类型之间性能的相对度量。
我们将效用因子乘以现货价格来比较实例类型和
进行投标选择时的地区。 当一个新的ec2实例被实例化时,它的用户数据在
返回工作类型的列表,包括有关
每个的当前容量。虽然此列表包含所有定义的工作机类型,
对于已删除的工作机类型,可能有正在运行的ec2实例
包括在这里。列表无序。 具有所需的输出架构 创建工作类型。工作类型包含所有配置
配置程序管理实例所需的。每种工人类型
知道允许哪些区域和哪些实例类型
工人类型。记住,容量是并发任务的数量
它可以在给定的ec2资源上运行,并且该实用程序是相对的
不同实例类型之间的性能比率。没有办法
配置不同的区域以具有不同的实例类型集
因此,请确保所有区域中的所有实例类型都可用。
这个函数是等幂的。 一旦provisioner中有一个worker类型,后台进程将
开始基于其容量界限和
队列中的挂起任务计数。这是工人的责任
关闭自己。提供程序有限制(当前为96小时)
以防止僵尸实例无限期运行。 provisioner将确保所有创建的实例都用
包含provisioner id和worker类型的aws资源标记。 如果提供了全局、区域和实例类型部分中的机密
可使用Secrets API。如果指定,则提供的作用域
将用于生成一组可用的临时凭据
其他的秘密。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 提供工作类型的新副本以替换现有的工作类型。
这将覆盖现有的工作机类型定义,如果存在
已经是该名称的工作类型。此方法将返回
200个响应以及创建的工作类型定义的副本
注意,如果您使用的是get on the worker类型的结果
需要删除LastModified和WorkerType的端点
返回对象中的键,因为不允许这些字段
此方法的请求正文 否则,所有输入需求和操作都与
创建方法。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 提供此方法是为了让工人看到
上次修改。通过userdata提供的值可以是
与此值进行比较以查看是否进行了更改
如果工作机类型定义尚未更改,则
应该与相同的存储值相同。 接受以下参数: 具有所需的输出架构 检索请求的工作机类型定义的副本。
此副本包含LastModified字段和Worker
类型名称。因此,它需要操纵才能
使用此方法的结果向更新提交日期
方法: 接受以下参数: 具有所需的输出架构 删除工作机类型定义。此方法将只删除
存储表中的工作机类型定义。实际
删除将由后台工作人员处理。一旦这样
方法是为工作类型调用的,后台工作进程将
立即提交请求以取消对此的所有当场请求
工作ER类型以及杀死所有实例
状态。如果要优雅地删除工作类型,则必须
请确保没有使用该工作类型名称创建任何任务
或者理论上可以将maxCapacity设置为0,不过,这是
不支持或测试的操作 接受以下参数: 返回字符串工作类型名称的列表。这些是名字
提供程序已知的所有托管工作机类型。这确实
不包括从已删除的工作进程遗留下来的工作进程类型
类型定义,但仍在AWS中运行。 具有所需的输出架构 将秘密插入秘密存储器。提供的机密将
通过 这种方法通常不在生产中使用;相反,它是
直接为每个现货出价创建一个新的秘密。 接受以下参数: 具有必需的输入模式 从存储器中检索机密。结果包含任何密码或
其他限制性信息以及临时凭证
基于创建机密时指定的作用域。 重要的是,消费者必须删除此机密( 接受以下参数: 具有所需的输出架构 实例也将通过提供其实例ID来报告
作为它的安全标志。给出并检查令牌以确保
它匹配一个真实的令牌以确保
机器不办理登机手续。我们可以生成一个不同的令牌
但这似乎有点过头了 接受以下参数: 删除一个秘密。在这个调用之后,调用
令牌将不返回任何信息。 非常重要的是,
机密在移交控制之前从存储中删除机密
到不受信任的进程,以防止凭据和/或机密泄漏。 接受以下参数: 此方法返回所有可能的启动规范的预览
这个工作类型定义可以提交给ec2。它习惯于
测试工作类型,仅此而已 此API端点是实验性的,可能会在没有警告的情况下更改。 接受以下参数: 具有所需的输出架构 返回设置程序存储的给定WorkerType的状态。
此状态存储为三个列表:1用于运行实例,1用于
挂起的请求。 接受以下参数: 此终结点用于显示上次设置程序
已经登记入住。通过死者的告密者办理登记手续
应用程序编程接口。它是在配置迭代结束时完成的
用于判断后台配置过程是否仍然
运行. 警告此API端点不稳定 具有所需的输出架构 什么都不做就回应。
此终结点是用于检查服务是否已启动。 管理ec2实例的taskcluster服务。除了使用名称 什么都不做就回应。
此端点用于检查服务是否已启动。 此方法仅用于调试EC2管理器 具有所需的输出架构 请求工作类型的实例 接受以下参数: 具有必需的输入模式 终止此工作机类型的所有实例 接受以下参数: 返回具有泛型状态描述的对象。它只包含实例的计数 接受以下参数: 具有所需的输出架构 返回给定工作类型的运行状况视图 接受以下参数: 具有所需的输出架构 返回工作类型遇到的最新错误的列表 接受以下参数: 具有所需的输出架构 返回给定工作类型的状态信息 接受以下参数: 具有所需的输出架构 等幂地确保给定名称的密钥对存在 接受以下参数: 具有必需的输入模式 确保给定名称的密钥对不存在。 接受以下参数: 在指定区域终止实例 接受以下参数: 返回EC2的可能价格列表 具有所需的输出架构 返回EC2的可能价格列表 具有必需的输入模式 具有所需的输出架构 提供有关EC2帐户运行状况的基本统计信息 具有所需的输出架构 返回最近遇到的错误列表 具有所需的输出架构 此方法仅用于调试EC2管理器 通过返回以下形式的对象列表列出AMI及其用法:
{
区域:字符串
volumetype:字符串
上次使用:时间戳
} 通过返回对象列表列出当前的ebs卷使用情况
由{region,volumetype,state}以以下形式唯一定义的:
{
区域:字符串,
volumetype:字符串,
状态:字符串,
总数:整数,
totalGB:整数,
触摸:timestamp(上次更新该信息时),
} 此方法仅用于调试EC2管理器 此方法仅用于调试EC2管理器 此方法仅用于调试EC2管理器 此方法仅用于调试EC2管理器 github服务负责在reposnse中创建任务
到github事件,并将结果发布到github ui。 本文档描述了使用github的api端点
网络挂钩,以及一些有用的消费者API。 当github禁止某个操作时,此服务返回一个http 403
带有代码禁止的GitHub。 什么都不做就回应。
此端点用于检查服务是否已启动。 捕获github事件并通过pulse发布,如果是push,
释放或拉动请求。 已在中运行的生成的分页列表
任务集群。可以在各种特定于git的
字段。
具有所需的输出架构 检查给定分支的最新生成的状态
并返回相应的徽章svg。 接受以下参数: 返回
在与taskcluster相关的服务中非常有用。 接受以下参数: 具有所需的输出架构 对于存储库的给定分支,这将始终指向
到由其触发的最新任务的状态页
分支: 注意:这是重定向而不是直接链接。 接受以下参数: 对于存储库的给定变更集(sha),这将附加一个"提交状态"
在吉瑟布上。这些状态是显示在每个修订旁边的链接。
状态为OK(绿色检查)或Failure(红十字)。
由自定义标题和链接组成。 接受以下参数: 具有必需的输入模式 对于存储库的给定问题或请求,这将写入一条新消息。 接受以下参数: 具有必需的输入模式 github服务发布脉冲
支持的github事件的消息,转换github webhook
事件转换成脉冲消息。 本文档描述了taskcluster提供的交换
GitHub服务 hooks服务提供了一种机制,用于创建响应事件的任务。 什么都不做就回应。
此端点用于检查服务是否已启动。 此终结点将返回包含至少一个挂钩的所有挂钩组的列表。 具有所需的输出架构 此终结点将返回
给定钩子组。 接受以下参数: 具有所需的输出架构 此终结点将返回给定 接受以下参数: 具有所需的输出架构 此端点将返回钩子的当前状态。这表示
及时拍摄快照,每次通话可能有所不同。 为了支持listlastfires,不推荐使用此方法。 接受以下参数: 具有所需的输出架构 此端点将创建一个新挂钩。 调用方的凭据必须包含将用于
创建任务。该角色必须满足task.scopes以及
将任务添加到队列所需的作用域。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 此终结点将更新现有挂钩。所有字段,除了
接受以下参数: 具有必需的输入模式 具有所需的输出架构 此端点将删除挂钩定义。 接受以下参数: 此终结点将触发从挂钩定义创建任务。 http负载必须与hook 接受以下参数: 具有必需的输入模式 具有所需的输出架构 检索用于触发指定挂钩的唯一密钥令牌。这个
使用 接受以下参数: 具有所需的输出架构 重置触发给定钩子的令牌。这将使
可能是通过带有新令牌的gettriggertoken发出的。 接受以下参数: 具有所需的输出架构 此终结点使用有效的令牌触发已定义的挂钩。 http负载必须与hook 接受以下参数: 具有必需的输入模式 具有所需的输出架构 这个端点将返回关于这个钩子最近几次
已激发,包括钩子是否已成功激发 接受以下参数: 具有所需的输出架构 hooks服务负责在特定时间或in创建任务。响应Webhooks和API调用。使用此交换可以生成钩子,钩子代表特定脉冲消息这些交换在创建、更新或删除钩子时提供通知。这样,在另一端的另一个hooks进程中运行的侦听器就可以指示由 索引服务负责索引任务。服务确保
任务可以通过用户定义的名称定位。 如服务文档中所述,任务通常通过pulse索引
消息,因此最常用的api方法是从索引中读取。 什么都不做就回应。
此端点用于检查服务是否已启动。 按索引路径查找任务,返回具有该路径的最高级别任务。如果没有
给定路径存在任务,此API端点将以404状态响应。 接受以下参数: 具有所需的输出架构 在给定的名称空间下面列出名称空间。 此终结点
最多列出1000个命名空间。如果存在更多名称空间,则
接受以下参数: 具有所需的输出架构 在给定的名称空间下列出任务。 此终结点
列出多达1000个任务。如果存在更多任务,则
备注此端点是为浏览任务的用户而设计的,而不是
服务,因为这没什么意义。 接受以下参数: 具有所需的输出架构 将任务插入索引。如果新等级小于现有等级
在给定的索引路径上,任务没有被索引,但响应仍然是200 OK。 有关信息,请参阅上面的介绍
关于使用自定义路由自动索引成功完成的任务。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 按索引路径查找任务并重定向到最近的项目
使用给定的 注意,对这个端点的多个调用可能从不同的任务返回工件
如果在调用之间将新任务插入索引。避免将此方法用作
如果索引路径不包含
唯一标识符。例如,以下两个链接可能返回不相关的文件: 此问题可以通过在索引路径中包含修订或将两者绑定来解决
在单个工件中安装和调试符号。 如果给定索引路径不存在任何任务,则此API端点将以404响应。 接受以下参数: 登录服务充当外部身份验证之间的接口
系统和任务群集凭据。 什么都不做就回应。
此端点用于检查服务是否已启动。 给定来自可信openid提供程序的oidc 此方法通常不与taskcluster客户端库一起调用
并且不接受Hawk凭据。 首先根据指定的
:提供程序,然后传递给提供程序的apiBuilder以检索用户
轮廓。然后使用该配置文件生成taskcluster凭据
适合用户。注意,生成的凭据可以
不包括 给定的凭据将在相对较短的时间内过期。呼叫者应该
监视此过期时间,必要时通过调用
如果端点已过期,请再次使用该端点。 接受以下参数: 具有所需的输出架构 通知服务侦听具有关联通知的任务
并处理发送电子邮件和发送脉冲消息的请求。 什么都不做就回应。
此端点用于检查服务是否已启动。 向 具有必需的输入模式 使用指定的 具有必需的输入模式 在irc上向特定频道或用户或特定用户发送消息
在特定频道上。 此api方法的成功并不意味着消息已成功
张贴。这个api方法只是将irc消息插入到队列中
将由后台进程处理。
这允许我们在连接出现问题时重新发送消息。 但是,如果用户未联机,则将删除消息
错误。我们也许将来会改进这种行为。现在你只要保持
请记住,IRC是尽力而为的服务。 具有必需的输入模式 将给定地址添加到通知denylist。住址
可以是三种支持的地址类型之一,即脉冲、电子邮件
或IRC(用户或频道)。将忽略denylist中的地址
通过通知服务。 具有必需的输入模式 从通知denylist中删除指定的地址。 具有必需的输入模式 列出所有非列表地址。 默认情况下,此端点将尝试在一个
请求。但即使有更多的任务可用,它返回的值也可能会更少。
它还可能返回 如果您不想一次列出所有成员,您可以
使用查询字符串选项 具有所需的输出架构 这几乎只包含简单的自由形式
从请求中可以从此服务发布的消息
任何有合适范围的人。 清除缓存服务负责跟踪缓存清除请求。 用户为特定工作线程上的特定缓存创建清除请求,以及
这些请求都有时间戳。工人咨询服务之前
启动新任务,并清除所有早于时间戳的缓存。 什么都不做就回应。
此端点用于检查服务是否已启动。 发布清除名为 如果已经存在这样的请求,则将其 接受以下参数: 具有必需的输入模式 查看所有活动清除请求。 这对于管理员查看
打开的清除请求集。它不应该
供工人使用。他们应该用搜查令
特定于其WorkerType和
供应标识。 具有所需的输出架构 列出此provisionerID的缓存
如果它们是在响应中给定的时间之前清除的。 这将被工作人员用来确定要清除哪些缓存。 接受以下参数: 具有所需的输出架构 队列服务负责接受ta跟踪他们的状态
因为他们是被工人处决的。为了确保他们最终
已解决。 本文档描述队列提供的api端点。这些
终点针对以下观众: 什么都不做就回应。
此端点用于检查服务是否已启动。 此端点将返回任务定义。注意任务
如果可选属性为
未指定队列可以提供默认值。 接受以下参数: 具有所需的输出架构 从 接受以下参数: 具有所需的输出架构 列出共享相同的任务 由于任务组可能包含无限数量的任务,因此此端点
可能返回 默认情况下,此端点将尝试一次返回多达1000个成员
请求。但即使有更多的任务可用,它返回的值也可能会更少。
它还可能返回 如果您不想一次列出所有成员,您可以
使用查询字符串选项 接受以下参数: 具有所需的输出架构 列出依赖于给定任务ID的任务
由于来自不同任务组的许多任务可能依赖于单个任务,
此端点可能返回 默认情况下,此端点将尝试在一个任务中返回多达1000个任务
请求。但即使有更多的任务可用,它返回的值也可能会更少。
它还可能返回 如果您对一次列出所有任务不感兴趣,可以
使用查询字符串选项 接受以下参数: 具有所需的输出架构 创建一个新任务,这是一个等幂的操作,因此如果
出现内部服务器错误或网络连接断开。 任务 任务过期时间:expires属性必须大于
任务 特定于任务的路由键:使用 依赖项:在 作用域:请注意,完成此API调用所需的作用域依赖于
关于 旧作用域:不带优先级的 接受以下参数: 具有必需的输入模式 具有所需的输出架构 已弃用,这与 接受以下参数: 具有必需的输入模式 具有所需的输出架构 ScheduleTask将安排要执行的任务,即使它已经
未解析的依赖项。否则,只有在
它的依赖关系已经解决。 如果定义了依赖于自身或依赖于
其他一些尚未解决的任务,但您希望该任务
立即安排。 这将宣布任务挂起,允许工人执行
申请并解决任务。 注意此操作是等幂的,不会失败或抱怨
如果使用已计划或甚至已解决的任务ID调用。
要重新安排以前已解决的任务,请使用 接受以下参数: 具有所需的输出架构 此方法重新运行先前解决的任务,即使它是
已完成。如果您的任务未能成功完成,并且
你只想从头开始。这也将重置
允许的重试次数。 不赞成使用此方法,而是使用相同的方法创建新任务
任务定义(但使用新的任务ID)。 请记住,在任务状态下的 备注如果尝试重新运行
不是 接受以下参数: 具有所需的输出架构 此方法将取消未计划的任务、挂起的任务或
备注如果您试图取消
不是计划外的、挂起的或正在运行的操作
返回当前任务状态。 接受以下参数: 具有所需的输出架构 为给定的 如果有工作可用(即使少于
任务,这将立即返回。否则,它将阻塞数十个
等待工作的秒数。如果没有工作,它将返回一个emtpy
任务列表。打电话的人应该睡一会儿(以避免拒绝
服务处于错误状态)并再次调用终结点。这是一个
简单实现"长轮询"。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 申请任务-从未记录 接受以下参数: 具有必需的输入模式 具有所需的输出架构 为给定的 如果超过 如果任务已解决,则此端点将返回 接受以下参数: 具有所需的输出架构 报告任务已完成,并将运行解析为 接受以下参数: 具有所需的输出架构 报告运行失败,将运行解析为 如果由于格式错误而无法运行任务,请不要使用此选项
有效载荷或其他意外情况。在这种情况下,我们有一项任务
异常,应使用 接受以下参数: 具有所需的输出架构 解决run as异常。通常,您需要将任务报告为
失败而不是异常。如果, 不要使用此命令来表示某个用户指定的代码因任何
特定于此代码的原因。如果特定于用户的代码命中
暂时不可用工作人员应报告任务失败 接受以下参数: 具有必需的输入模式 具有所需的输出架构 这个api端点为任务的特定运行创建一个工件。这个
应仅由当前正在执行此任务的工作人员使用,或
从任务内运行的进程(即在工作进程上)。 所有工件必须指定它们的过期时间,队列将
自动处理删除超过其
有效期。这个特性使得上传大的
数据处理应用程序的中间构件,如
工件可以设置为几天后过期。 我们目前支持3种不同的存储类型
特征略有不同,在某些情况下语义也有所不同。
我们还有两个不推荐使用的存储类型
向后兼容,不应在新实现中使用 blob工件对于存储大型文件非常有用。目前,这些
都存储在s3中,但是有一些工具可以添加对其他
在未来的后端。对此类工件的调用必须提供信息
关于将要上载的文件。这包括SHA256和大小。
此方法将返回已签名的常规表单http请求列表
由队列管理的aws s3凭据。一旦这些请求完成
请求返回的 s3工件,不推荐用于
存储在S3上。创建s3工件时,队列将返回
预签名的url,您可以对其执行 azure工件,已弃用的存储在azure blob存储服务中
它提供了azure提供的一致性保证和api接口
更适合在执行期间修改的工件
完成任务。例如,Docker Worker有一个特性,它将
每隔几秒将任务日志记录到azure blob存储中,创建一个
现场日志。创建azure工件的请求将返回一个url
具有共享访问签名警告:azure工件目前是一个实验性功能主题
更改和删除数据。 引用工件,仅包含队列将
为你储存。这些工件实际上只有一个 错误工件,仅包含队列将
为你储存。这些文物只是为了表明
工作进程或任务未能生成特定的项目
否则就会上传。例如,Docker Worker将上载
如果要上载的文件不存在或
原来是一个目录。请求错误工件的客户端将
获取 工件不变性,一般来说,不能覆盖
创建时的工件。但是如果你重复同样的要求
属性由于操作是等幂的,请求将成功。
如果需要在上载时刷新已签名的URL,则此功能非常有用。
不要滥用此功能覆盖其他实体创建的工件!
例如工作主机覆盖由工作代码创建的工件。 作为一种特殊情况,引用工件上的 接受以下参数: 具有必需的输入模式 具有所需的输出架构 此端点完成通过blob 接受以下参数: 具有必需的输入模式 从特定运行中通过 公共工件,为了获得工件,您需要范围
API客户端,此方法将重定向到工件,如果它是
存储在外部。无论如何,响应可能不是json。所以API
客户端用户可能希望为此端点生成签名的url,并且
将该url与能够正确处理响应的http客户端一起使用。 下载工件
对于那些下载
人工产品。此api端点设计为与http 1.1兼容
兼容客户端,但有额外的功能以确保下载有效。
强烈建议使用者使用taskcluster lib工件(js)。
taskcluster lib artifact go(go)或用go编写的cli与
工件。 要下载工件,必须执行以下操作: 标题
此方法的响应设置了以下重要标题: 对于blob工件,在对此方法的响应上设置以下重要的标题 缓存,工件可能缓存在靠近
工人为了降低带宽成本。这会导致更长的时间
响应时间。通过设置头可以跳过缓存
接受以下参数: 从任务的最后一次运行中通过 公共工件,为了获得工件,您需要范围
API客户端,如果是是
存储在外部。无论如何,响应可能不是json。所以API
客户端用户可能希望为此端点生成签名的url,并且
将该url与普通http客户端一起使用。 备注,此终点稍慢于
接受以下参数: 返回给定运行的工件和相关元数据的列表。 因为任务可能有许多工件,所以可能需要分页。如果这样
端点返回一个continuationtoken,您应该调用端点
再次使用 默认情况下,此端点将在单个页面中列出多达1000个工件
您可以使用查询字符串参数 接受以下参数: 具有所需的输出架构 返回最近运行的项目和相关元数据的列表
从给定的任务。 因为任务可能有许多工件,所以可能需要分页。如果这样
端点返回一个continuationtoken,您应该调用端点
再次使用 默认情况下,此端点将在单个页面中列出多达1000个工件
您可以使用查询字符串参数 接受以下参数: 具有所需的输出架构 获取所有活动的供应器。 术语"provisioner"被广泛地理解为任何带有provisionerid的东西。
这并不一定意味着存在执行任何
供应活动。 响应被分页。如果此端点返回 具有所需的输出架构 获取活动的供应器。 术语"provisioner"被广泛地理解为任何带有provisionerid的东西。
这并不一定意味着存在执行任何
供应活动。 接受以下参数: 具有所需的输出架构 声明一个provisioner,提供一些关于它的细节。 术语"provisioner"被广泛地理解为任何带有provisionerid的东西。
这并不一定意味着存在执行任何
供应活动。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 获取给定 底层的azure存储队列只会给我们一个估计。
皮毛Thermore,我们将结果缓存在内存中20秒。所以消费者
绝不能指望这是一个准确的数字。
但是,它是对挂起任务数量的可靠估计。 接受以下参数: 具有所需的输出架构 获取给定供应器的所有活动工作机类型。 响应被分页。如果此端点返回 接受以下参数: 具有所需的输出架构 从供应器获取工作类型。 接受以下参数: 具有所需的输出架构 声明一个WorkerType,并提供有关它的一些详细信息。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 获取一个WorkerType的所有活动工作线程的列表。 响应被分页。如果此端点返回 接受以下参数: 具有所需的输出架构 从工人类型中获取工人。 接受以下参数: 具有所需的输出架构 隔离工人 接受以下参数: 具有必需的输入模式 具有所需的输出架构 声明一个工人,并提供一些有关该工人的详细信息。 接受以下参数: 具有必需的输入模式 具有所需的输出架构 队列服务负责接受任务并跟踪红外态
因为他们是被工人处决的。为了确保他们最终
已解决。 本文档描述队列提供的AMQP交换,它允许
第三方监听器在任务进展到解决方案时监视任务。
这些交流的对象如下: 你会注意到文件中的所有交换都是相同的
路由密钥模式。这使得绑定到所有消息非常容易
关于某类任务。 特定于任务的路由,任务可以使用
用法
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
生成URL
buildurl
或对于需要身份验证的api方法,buildsignedurl
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
signedurlexpiration
选项设置过期,也可以使用expiration
关键字参数设置buildsignedurl
,这两个参数都以秒为单位。根url
rooturl
参数来标识taskcluster
要交谈的部署。在撰写本文时,生产集群具有rooturl
鳕鱼e>https://taskcluster.net环境变量
taskcluster
环境变量自动。要显式获取它们的值,请使用
taskcluster.optionsfromenvironment()
:auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
分页
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
0
日志记录
taskcluster/\u init.py
中设置。如果特别的
debug_taskcluster_client
环境变量已设置,则
模块将其记录器的日志记录
模块级别设置为
日志记录.debug
如果没有现有的处理程序,则添加
logging.streamhandler()
实例。这是为了帮助那些不想费心搞清楚
如何配置python日志模块,但需要调试消息蛞蝓
taskcluster.slugid()
,它将在每次调用时返回唯一的slugid。importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
1
范围
假定的范围必须是
扩展了范围,因为此函数无法执行扩展。
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
2
相对日期时间实用程序
datetime.datetime.isoformat()
,它可能很容易出错
将datetime.datetime
对象偏移到未来是很乏味的。因此
为此,此库提供了两个实用程序功能。importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
3
-
)日期对象将偏移到过去。这是
在某些角落情况下很有用。importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
4
+
(如果没有加上前缀负号),任何+
前缀都将是
忽略。但是,偏移字符串中的条目必须按照
从高到低,即2年1天
。此外,各种速记可能是
雇用,如下所示。importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
5
方法也可以被指定一个日期作为秒
争论。如果相对于任务偏移任务到期时间,这将非常有用
最后期限或做类似的事情。此参数也可以作为
Kwarg
dateobj
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
6
客户端库中包含的方法
taskcluster.auth中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
7
ping服务器
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
8
列出客户
continuationToken
结果。但是,只有当你
继续用最后一个continuationToken调用listclients
在不使用
continuationToken的情况下获取结果
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
9
获取客户端
客户id
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
0
创建客户端
accesstoken
。
您应该从这个api调用中存储accesstoken,因为没有
另一种检索方法。accesstoken
可以调用resetaccesstoken
重置
它将返回一个新的accessToken
,但您无法检索
当前访问令牌clientid
的客户端已存在,则此操作将
失败了。如果要更新现有客户端,请使用update client
。作用域
客户id
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
1
重置
访问令牌
accesstoken
,这将撤销现有的
accessToken
,生成一个新的accessToken
并从此返回
打电话. 客户id
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
2
更新客户端
clientid
和accesstoken
不能是
已更新,但可以修改范围。调用方的作用域必须
满足在更新操作中添加到客户端的所有作用域。
如果请求中没有给定作用域,则客户端的作用域将保留
不变客户id
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
3
启用客户端
disableclient
禁用的客户端。如果客户
已启用,这将不起任何作用。客户id
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
4
禁用客户端
客户id
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
5
删除客户端
客户id
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
6
列出角色(无分页)
listroles2
queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
7
列出角色
listroles
,但在
响应的格式。限制
和继续标记
查询参数以翻页查看响应。queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
8
列出角色ID
限制
和继续标记
查询参数以翻页查看响应。queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})
9
获取角色
roleid
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
0
创建角色
roleid
此操作的角色
会失败。使用updaterole
修改现有角色。roleid
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
1
更新角色
roleid
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
2
删除角色
roleid
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
3
扩展作用域
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
4
获取当前范围
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
5
获取临时读/写凭据s3
bucket
和前缀。
级别
参数可以是读写
或只读
并确定
返回哪种类型的凭据。请注意级别
参数在范围保护访问中是必需的。bucket名称必须
不包含亚马逊推荐的
。
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
6
expires
属性
从反应来看,如果你nd在您的
应用程序。my folder
将允许
按预期访问my folder/file.txt
,也可以访问my folder.txt
,
可能不是有意的。putobjectacl
调用。递罐头
acl而不是private
到putobject
被视为putobjectacl
调用,并且
将导致来自AWS的访问被拒绝错误。此限制是由于
AmazonS3中的安全漏洞,否则可能会允许对
上传的对象。级别
桶
前缀
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
7
列出由auth管理的帐户
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
8
列出由auth管理的帐户中的表
帐户
#!/usr/bin/env pythonimportaiohttpimportasynciofromtaskcluster.aioimportAuthasyncdefdo_ping():withaiohttp.ClientSession()assession:a=Auth(session=session)print(awaita.ping())loop=asyncio.get_event_loop()loop.run_until_complete(do_ping())
9
获取azure表的共享访问签名
级别
参数可以是读写
或只读
并确定
返回哪种类型的凭据。如果level是读写的,它将创建
如果表不存在,则返回表。帐户
表格
级别
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
0
列出由auth管理的帐户中的容器
帐户
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
1
获取azure容器的共享访问签名
级别
参数可以是读写
或只读
并确定
返回哪种类型的凭据。如果level是读写的,它将创建
容器(如果它不存在)。帐户
容器
级别
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
2
获取哨兵项目的DSN
项目
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
3
获取statsum项目的令牌
标记
和baseurl
以便将度量发送到statsum。项目
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
4
获取WebSockTunnel服务的客户端令牌
wstaudence
wstclient
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
5
获取临时GCP凭据
expires
属性
从响应中,如果要在
应用程序。projectd
服务帐户
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
6
验证Hawk请求
importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
7
测试身份验证
tester
和accesstokenno secret
。客户的作用域是
基于请求正文中的clientscopes
。RequiredScopes
从请求主体。成功时,响应包含clientid
以及API方法所看到的作用域。importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
8
测试身份验证(get)
testauthenticate
的实用方法,但是使用get方法,
因此它可以与签名的url(bewits)一起使用。tester
和accesstokenno secret
。客户的作用域是
['test:*,'auth:create client:test:*']
。如果
测试:authenticate get
作用域不可用。importtaskclusterindex=taskcluster.Index({'rootUrl':'https://tc.example.com','credentials':{'clientId':'id','accessToken':'accessToken'},})index.ping()
9
在
taskcluster.authEvents中交换
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
0
客户端创建的消息
authEvents.clientCreated(routingKeyPattern)->;routingKey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
客户端更新消息
authEvents.clientUpdated(routingKeyPattern)->;routingKey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
客户端删除的消息
authEvents.clientDeleted(routingKeyPattern)->;routingKey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
角色创建消息
authEvents.rolecreated(routingkeypattern)->;routingkey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
角色更新消息
authEvents.role已更新(routingKeyPattern)->;routingKey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
已删除角色的消息
authEvents.roledeleted(routingkeypattern)->;routingkey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
taskcluster.awsprovisioner中的方法
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
1
securitytoken
可与getsecret
方法一起使用以检索
工作人员的凭据和任何所需的密码或其他受限制的
信息。工作人员负责在
检索防止秘密传播到其他程序
可以读取实例用户数据。列出包含详细信息的工作机类型
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
2
创建新的工作类型
工作类型
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
3
更新工作类型
工作类型
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
4
获取工作类型上次修改时间
工作类型
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
5
获取工作类型
工作类型
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
6
删除工作类型
工作类型
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
7
列出工作类型
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
8
创建新机密
getsecret
逐字提供,而提供的作用域将
通过getsecret
转换为凭据
令牌
client.method(v1,v1,payload)client.method(payload,k1=v1,k2=v2)client.method(payload=payload,query=query,params={k1:v1,k2:v2})client.method(v1,v2,payload=payload,query=query)
9
获取秘密
RemoveSecret
),
否则,任何可以访问
与实例关联的用户数据。令牌
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
0
报告启动的实例
实例ID
令牌
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
1
删除机密
令牌
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
2
获取WorkerType的所有启动规范
工作类型
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
3
获取工作类型的aws状态
摘要
属性包含更新的摘要
类似于从listworkertypesummaries
工作类型
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
4
后端状态
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
5
ping服务器
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
6
taskcluster.ec2manager中的方法
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
7
workerType
来引用一组关联实例外,此服务无法从内部理解任何taskcluster概念。除非您正在为aws构建一个provisioner,否则您几乎肯定不想使用此服务ping服务器
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
8
请参见已知要管理的工作机类型列表
fromtaskclusterimportclientqEvt=client.QueueEvents({rootUrl:'https://tc.example.com'})# The following calls are equivalentqEvt.taskCompleted({'taskId':'atask'})qEvt.taskCompleted(taskId='atask')
9
运行实例
工作类型
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
0
终止工作类型中的所有资源
工作类型
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
1
查找WorkerType的资源统计信息
工作类型
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
2
查找WorkerType的资源运行状况
工作类型
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
3
查找WorkerType的最新错误
工作类型
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
4
查找WorkerType的资源状态
工作类型
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
5
确保给定工作类型的密钥对存在
名称
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
6
确保给定工作类型的密钥对不存在
名称
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
7
终止实例
地区
实例ID
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
8
EC2的请求价格
importtaskclusterindex=taskcluster.Index(taskcluster.optionsFromEnvironment())print(index.buildUrl('findTask','builds.v1.latest'))secrets=taskcluster.Secrets(taskcluster.optionsFromEnvironment())print(secret.buildSignedUrl('get','my-secret'))
9
EC2的请求价格
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
0
获取EC2帐户运行状况指标
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
1
查找所有工作机类型的Provisioner中的最新错误
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
2
请参阅由该EC2管理器管理的区域列表
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
3
查看AMI列表及其用法
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
4
查看当前EBS卷使用列表
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
5
数据库客户端池的统计信息
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
6
列出整个内部状态
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
7
有关SQS队列的统计信息
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
8
清除SQS队列
auth=taskcluster.Auth(taskcluster.optionsFromEnvironment())
9
taskcluster.github中的方法
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
0
ping服务器
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
1
使用Github Webhook
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
2
生成列表
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
3
最新生成状态标记
所有者
回购
分行
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
4
获取存储库信息
所有者
回购
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
5
分支机构的最新状态
所有者
回购
分行
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
6
根据给定的变更集发布状态
所有者
回购
sha
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
7
对给定的github问题或请求请求发表评论
所有者
回购
号码
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
8
在
taskcluster.githubevents中交换
importtaskclusterqueue=taskcluster.Queue({'rootUrl':'https://tc.example.com'})i=0tasks=0outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g')whileoutcome.get('continuationToken'):print('Response %d gave us %d more tasks'%(i,len(outcome['tasks'])))ifoutcome.get('continuationToken'):outcome=queue.listTaskGroup('JzTGxwxhQ76_Tt1dxkaG5g',query={'continuationToken':outcome.get('continuationToken')})i+=1tasks+=len(outcome.get('tasks',[]))print('Task Group %s has %d tasks'%(outcome['taskGroupId'],tasks))
9
Github请求事件
githubevents.pullrequest(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这总是"primary"
。组织
是必需的描述:发生事件的github组织
。所有的句点都被替换成了%-这样foo.bar就变成了foo%bar-并且除了-和之外的所有其他特殊字符都被删除了。存储库
是必需的描述:githubrepository
中有一个事件。所有的句点都被替换成了%-这样foo.bar就变成了foo%bar-除了-和-之外的所有其他特殊字符都被删除了。操作
是必需的描述:触发事件的github操作
。有关可能的值,请参阅Payload Actions属性。Github推送事件
githubevents.push(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这总是"primary"
。组织
是必需的描述:发生事件的github组织
。所有的句点都被替换成了%-这样foo.bar就变成了foo%bar-并且除了-和之外的所有其他特殊字符都被删除了。repository
是必需的描述:githubrepository
发生了一个事件。所有句点都被替换成了%-这样foo.bar就变成了foo%bar-并且除-和之外的所有其他特殊字符都被删除。Github发布事件
githubevents.release(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这总是"primary"
。组织
是必需的描述:发生事件的github组织
。所有的句点都被替换成了%-这样foo.bar就变成了foo%bar-并且除了-和之外的所有其他特殊字符都被删除了。repository
是必需的描述:githubrepository
发生了一个事件。所有句点都被替换成了%-这样foo.bar就变成了foo%bar-并且除-和之外的所有其他特殊字符都被删除。tc-gh请求队列服务创建组中的所有任务
githubevents.taskgroupcreationrequested(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这总是"primary"
。组织
是必需的描述:发生事件的github组织
。所有的句点都被替换成了%-这样foo.bar就变成了foo%bar-并且除了-和之外的所有其他特殊字符都被删除了。repository
是必需的描述:githubrepository
发生了一个事件。所有句点都被替换成了%-这样foo.bar就变成了foo%bar-并且除-和之外的所有其他特殊字符都被删除。taskcluster.hooks中的方法
α
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
00
ping服务器
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
01
列出挂钩组
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
02
列出给定组中的挂钩
hookgroupid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
03
获取挂钩定义
hookgroupid
和hookid。hookgroupid
hookid
获取挂钩状态
hookgroupid
hookid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
05
创建挂钩
hookgroupid
hookid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
06
更新挂钩
hookgroupid
和hookid
可以修改。hookgroupid
hookid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
07
删除挂钩
hookgroupid
hookid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
08
触发挂钩
triggerschema
匹配。如果是,那就是
作为用于呈现
任务模板。hookgroupid
hookid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
09
获取触发令牌
resettriggertoken
hookgroupid
hookid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
10
重置触发令牌
hookgroupid
hookid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
11
用令牌触发钩子
triggerschema
匹配。如果是,那就是
作为用于呈现
任务模板。hookgroupid
hookid
令牌
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
12
获取有关最近钩子火灾的信息
hookgroupid
hookid
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
13
在
taskcluster.hooksevents中交换
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
14
hookgroupid
和hookid
指定的另一个侦听器同步其绑定。但你当然可以用这些来做其他的聚氨酯例如,监视更改。挂钩创建的消息
hooksevents.hookcreated(routingkeypattern)->;routingkey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
挂钩更新的消息
hooksevents.hookupdated(routingkeypattern)->;routingkey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
挂接已删除的邮件
hooksevents.hookdeleted(routingkeypattern)->;routingkey
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
taskcluster.index中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
15
ping服务器
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
16
查找索引任务
索引xpath
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
17
列出命名空间
将返回continuationToken
,可在下一个
请求。对于初始请求,有效负载应该是空的json
对象:< /P>命名空间
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
18
列出任务
将返回continuationToken
,可在下一个
请求。对于初始请求,有效负载应该是空的json
对象:< /P>命名空间
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
19
将任务插入索引
命名空间
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
20
从索引任务中获取工件
名称运行
索引xpath
名称
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
21
taskcluster.login中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
22
ping服务器
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
23
获取给定合适的访问令牌的taskcluster凭据
访问令牌
,返回
用于代表标识的
用户,访问令牌
应该是
在授权中给出
标题:importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
24
证书
属性。打电话的人应该做好准备
可供选择。
提供商
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
25
taskcluster.notify中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
26
ping服务器
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
27
发送电子邮件
地址发送电子邮件。内容被标记并将被呈现
到HTML,但HTML和原始标记文本都将在
电子邮件。如果包含链接,它将被呈现为
电子邮件的HTML版本
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
28
发布脉冲消息
routingkey在pulse上发布消息
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
29
发布IRC消息
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
30
指定地址列表
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
31
删除非列表地址
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
32
列出非列表通知
continuationToken
结果。但是,只有当你
用最后一个ContinuationToken继续调用列表
在不使用
continuationToken的情况下获取结果
limit
返回更少的值。importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
33
在
taskcluster.notifyevents中交换
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
34
通知消息
notifyEvents.notify(routingKeyPattern)->;routingKey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
请求IRC通知
notifyevents.ircrequest(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
taskcluster.purgecache中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
35
ping服务器
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
36
清除工作缓存
cachename
的缓存的请求
打开provisionerID
/workerType
Workers。之前的时间戳更新为
当前时间。
设置ID
工作类型
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
37
所有打开的清除请求
打开provisionerID/workerType对的清除请求
设置ID
工作类型
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
39
taskcluster.queue中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
40
ping服务器
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
41
获取任务定义
任务ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
42
获取任务状态
taskid
任务ID
列出任务组
taskgroupid
continuationToken
。要继续列出任务,必须调用
再次使用continuationToken
作为
查询字符串选项continuationtoken
continuationToken
结果。但是,只有当你
用最后一个ContinuationToken继续调用listtaskGroup
在不使用
continuationToken的情况下获取结果
limit
返回更少的值。任务组id
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
44
列出依赖任务
continuationToken
。继续上市
必须使用
continuationtoken
作为查询字符串选项continuationtoken
continuationToken
结果。但是,只有当你
继续用最后一个continuationToken调用listDependentTasks
您将得到一个没有
continuationToken的结果
limit
返回更少的值。任务ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
45
创建新任务
截止日期
:deadline属性不能超过5天
走向未来。这是为了限制未执行的挂起任务的数量
好好照顾。理想情况下,您应该使用更短的截止日期。截止日期
。如果未提供,则默认为
截止日期
+1
年。注意,任务创建的工件必须过期任务开始前。task.routes
属性可以
定义特定于任务的路由密钥。如果任务具有特定的任务
路由密钥:<;route>;
,则当有关任务的AMQP消息是
发布后,将使用路由密钥抄送邮件:
路线。<;路线>;
。如果您希望其他组件监听,这将非常有用
对于已发布的已完成任务。调用方必须具有作用域
队列:路线:<;路线>;
每条路线。任务中引用的任何任务。依赖项
必须具有
已在呼叫时创建。作用域的内容
,路由
,调度ID
,优先级
,
provisionerID
和workerType
任务定义的属性。队列:创建任务:…
作用域和
将考虑队列:定义任务:…
和队列:任务组id:…
范围
遗留的,不应使用。注意,新的非遗留作用域需要
a队列:调度程序id:…
作用域以及适当优先级的作用域。任务ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
46
定义任务
createtask
相同,具有自依赖性。
这只为旧款提供。任务ID
计划定义的任务
重新分配任务
任务ID
重新运行已解决的任务
重试数
队列已启动,因为工作进程已停止响应,例如
因为一个点节点死了。
失败或
完成,此操作将返回
当前任务状态。
任务ID
取消任务
正在运行
。它将用
原因已解决
设置为已取消
。如果任务还没安排好。
它没有任何运行,初始运行将添加并解析为
如上所述。因此,在取消一个任务后,它不能被调度
,但可以使用
排队。重新运行
。这些语义相当于调用
queue.scheduletask
紧接着是queue.canceltask
任务ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
50
索赔工作
provisionerID
/workerType
队列申请挂起的任务。设置ID
工作类型
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
51
索赔任务
任务ID
运行ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
52
回收任务
taskid
刷新特定runid
的声明。此更新
属性并返回一组新的临时凭据
代表任务执行请求。这些凭据应该
代替索赔返回的凭证
回收任务
请求服务于:takenuntil
阻止队列解析
索赔已过期
,takenuntil
时间戳,队列将解析运行
由于异常原因索赔已过期
,继续重试
任务。这样可以确保任务被重试,即使工人消失了
没有警告。409
报告
请求冲突
。如果任务被取消,通常会发生这种情况
或已超过任务的最后期限。如果回收失败,工人
应该中止任务并忘记给定的runid
。没有
需要解决运行或上载工件。任务ID
运行ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
53
报告运行已完成
已完成
任务ID
运行ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
54
报告运行失败
失败
。用这个来解决
由于特定于任务的代码出现意外行为而失败的运行。
例如,任务退出时不是零,或者没有产生预期的输出。reportexception
报告。
任务ID
运行ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
55
报告任务,除了离子< /H4>
task.payload
无效,任务ID
运行ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
56
创建工件
etag
值列表必须传递给
队列completeartifact
methodput
请求以上载
伪影。注意put
request必须指定内容长度
header和必须为
内容类型指定与中相同的值
请求
createartifact
url
属性
当请求工件时,客户端将重定向url
提供303
(请参阅其他)重定向。请注意,我们不能
删除你上传到其他服务的工件,wE只能删除
当工件过期时,参考工件。424
(失败的依赖项)响应。这主要是为了
确保依赖任务可以区分
假设生成名称拼写错误的工件。url
属性可以是
更新。您应该只使用它来更新
引用您的流程创建的工件。任务ID
运行ID
名称
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
57
完成工件
storagetype
完成的上载。
队列将确保任务/运行仍允许项目
上传。对于单部分s3 blob工件,此端点
只需确保工件存在于s3中。对于多部分S3
工件,端点将执行多部分的提交步骤
上传流。作为多部件和单部件工件的最后一步,
present
实体字段将设置为true
以反映
工件现在已经存在,并将一条消息发布到pulse。注:此
必须为StorageType"blob"的所有工件调用endpoint任务ID
运行ID
名称
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
58
从运行中获取项目
<;name>;
获取工件。队列:获取工件:<;name>;
,其中<;name>;
是工件的名称。
但如果工件的名称以public开头,则身份验证和
获取工件不需要授权。位置
标题指定的位置。有多个工件存储
使用300系列重定向的类型。
reference缓存请求
不得出现
blob
且不具有
具有x-taskcluster-location-content-sha256或x-taskcluster-location-content-length
必须视为错误gzip
或identity
。当工件
已创建且未发生内容协商x-taskcluster-skip-cache:true
,这只应用于资源
其中请求量已知较低,而缓存不起作用。
(此功能将来可能会被禁用,请谨慎使用!)任务ID
运行ID
名称
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
59
从最新运行中获取工件
<;name>;
获取工件。队列:获取工件:<;name>;
,其中<;name>;
是工件的名称。
但如果工件的名称以public开头,则身份验证和
获取工件不需要授权。queue.getartifact
,如果您已经知道
最近的一次跑步。否则,我们就是最方便的API端点。任务ID
名称
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
60
从运行中获取工件
continuationtoken
作为查询字符串选项:
继续标记
limit
任务ID
运行ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
61
从最新运行中获取工件
continuationtoken
作为查询字符串选项:
继续标记
limit
任务ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
62
获取所有活动供应器的列表
continuationToken
,则
应使用continuationToken
作为查询字符串再次调用端点
选择权。默认情况下,此端点将在单个列表中列出多达1000个供应器
页。您可以使用查询字符串参数limit
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
63
获取活动的供应器
设置ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
64
更新配置程序
声明提供程序
允许更新一个或多个provisioner属性,只要所需的作用域是
拥有。例如,更新aws-provisioner-v1的请求
带有主体的provisioner
队列:declare provisioner:aws-provisioner-v1描述
设置ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
65
获取挂起任务的数目
provisionerID的大约挂起任务数
和
worker键入
设置ID
工作类型
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
66
获取所有活动工作机类型的列表
continuationToken
,则
应使用continuationToken
作为查询字符串再次调用端点
选择权。默认情况下,此端点将在单个中列出多达1000个工作者类型
页。您可以使用查询字符串参数limit
设置ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
67
获取工作类型
设置ID
工作类型
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
68
更新工作机类型
declareworkertype
允许更新工作类型的一个或多个属性,只要所需的作用域是
拥有。例如,请求更新aws-provisioner-v1中的
gecko-b-1-w2008
worker类型
具有主体{description:'this worker type is great'}
的provisioner将要求您具有
队列:声明工作类型:aws-provisioner-v1/gecko-b-1-w2008描述
设置ID
工作类型
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
69
获取某个工作类型的所有活动工作人员的列表
listworks
允许按隔离和非隔离的工作人员筛选响应。
若要筛选查询,应使用隔离的查询字符串选项调用端点
真值或假值。continuationToken
,则
应使用continuationToken
作为查询字符串再次调用端点
选择权。默认情况下,此端点将在一个单独的列表中列出多达1000个工人
页。您可以使用查询字符串参数limit
设置ID
工作类型
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
70
获取工作类型
设置ID
工作类型
工作组
工作ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
71
隔离工人
设置ID
工作类型
工作组
工作ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
72
申报工人
declareworker
只要所需的作用域是
着魔。设置ID
工作类型
工作组
工作ID
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
73
在
taskcluster.queueevents中交换
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
74
task.routes属性。有关详细信息,请参见任务创建文档
提供特定于任务的路由所需的权限。如果任务有
中的条目"notify.by email"
作为在中定义的特定于任务的路由
task.routes
有关此任务的所有消息都将与
路由键"route.notify.by email"
这些路由将始终加上前缀路由。
,这样就不会干扰
使用这里记录的主路由密钥。请注意
primary路由密钥总是加前缀primary。
。这是有保证的
在路由密钥引用中,因此API客户端将自动执行此操作。
请注意rabbitmq的工作方式,消息只会到达 在您的队列中加入一次,即使您可能已绑定到 多个路由密钥模式,与更多的cc'ed路由匹配 路由键。
传递保证,队列上的大多数操作都是等幂的, 这意味着如果用相同的参数重复,那么 将确保操作完成并返回相同的响应。 如果服务器崩溃或TCP连接中断,这将非常有用,但是 重新执行等幂运算时,队列也将重新发送 任何相关的AMQP消息。因此,消息可能会重复。
这应该不是什么大问题,因为使用 使用amqp确认消息至少是一次传递语义。因此, 这只会防止您最多获得一次传递语义。
备注,如果 服务器在错误的时间崩溃。理想情况下,我们会在 未来。现在我们建议你不要理会这个案子,通知我们 如果您关心这个角落的案子。
任务定义消息
queueevents.taskdefined(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥项保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务挂起消息
queueevents.taskPending(routingKeyPattern)->;routingKey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务运行消息
queueevents.taskrunning(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
是必需的描述:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
是必需的描述:workerid
任务的最新运行,如果任务没有运行,\code>则为该任务。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
工件创建消息
queueevents.artifactcreated(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
是必需的描述:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
是必需的描述:workerid
任务的最新运行,如果任务没有运行,\code>则为该任务。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务完成消息
queueevents.taskcompleted(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
是必需的描述:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
是必需的描述:workerid
任务的最新运行,如果任务没有运行,\code>则为该任务。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务失败消息
queueevents.taskfailed(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务异常消息
队列事件。任务异常(routingkeypattern)->;路由键
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务组已解析消息
queueevents.taskgroupresolved(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskgroupid
是必需的描述:taskgroupid
对于此消息涉及的任务组
schedulerID
是必需的描述:schedulerID
对于此消息涉及的任务组
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
taskcluster.secrets中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
75
queueevents.taskdefined(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥项保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
queueevents.taskPending(routingKeyPattern)->;routingKey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
queueevents.taskrunning(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
是必需的描述:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
是必需的描述:workerid
任务的最新运行,如果任务没有运行,\code>则为该任务。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
工件创建消息
queueevents.artifactcreated(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
是必需的描述:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
是必需的描述:workerid
任务的最新运行,如果任务没有运行,\code>则为该任务。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务完成消息
queueevents.taskcompleted(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
是必需的描述:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
是必需的描述:workerid
任务的最新运行,如果任务没有运行,\code>则为该任务。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务失败消息
queueevents.taskfailed(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务异常消息
队列事件。任务异常(routingkeypattern)->;路由键
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务组已解析消息
queueevents.taskgroupresolved(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskgroupid
是必需的描述:taskgroupid
对于此消息涉及的任务组
schedulerID
是必需的描述:schedulerID
对于此消息涉及的任务组
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
taskcluster.secrets中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
75
queueevents.artifactcreated(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
是必需的描述:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
是必需的描述:workerid
任务的最新运行,如果任务没有运行,\code>则为该任务。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
queueevents.taskcompleted(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务runid
是必需的描述:runid
任务的最新运行,如果任务不存在运行,\code>。
工作组
是必需的描述:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
是必需的描述:workerid
任务的最新运行,如果任务没有运行,\code>则为该任务。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
queueevents.taskfailed(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
任务异常消息
队列事件。任务异常(routingkeypattern)->;路由键
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务
runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
任务组已解析消息
queueevents.taskgroupresolved(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskgroupid
是必需的描述:taskgroupid
对于此消息涉及的任务组
schedulerID
是必需的描述:schedulerID
对于此消息涉及的任务组
保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
taskcluster.secrets中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
75
队列事件。任务异常(routingkeypattern)->;路由键
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskID
是必需的描述:taskID
对于此消息所涉及的任务runid
说明:runid
任务的最新运行,如果任务不存在运行,工作组
说明:工作组
任务的最新运行,如果任务不存在运行,/code>。
workerid
说明:workerid
任务的最新运行,如果任务不存在运行,\code>。
provisionerid
是必需的描述:provisionerid
此任务的目标。workertype
是必需的描述:workertype
此任务必须在其上运行。schedulerID
是必需的描述:schedulerID
此任务由创建。taskgroupid
是必需的描述:taskgroupid
此任务是在中创建的。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
queueevents.taskgroupresolved(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。taskgroupid
是必需的描述:taskgroupid
对于此消息涉及的任务组schedulerID
是必需的描述:schedulerID
对于此消息涉及的任务组保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
taskcluster.secrets中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
75
秘密服务为小秘密提供了一个简单的密钥/值存储 数据。访问受作用域限制,因此可以将值视为 没有相关范围的。
秘密也有到期日,一旦秘密到期就不能 读得更久。这对于短期的秘密很有用,比如 服务凭据或一次性签名密钥。
ping服务器
什么都不做就回应。 此端点用于检查服务是否已启动。
αααα176设置机密
设置与某个密钥关联的机密。如果秘密已经存在,那就是 已更新。
接受以下参数:
名称
具有必需的输入模式
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)77
删除机密
删除与某个密钥相关联的密钥。
接受以下参数:
名称
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)78
阅读机密
阅读与某个密钥相关联的机密。如果这个秘密最近 过期,返回响应代码410。如果来电者缺少 范围获取机密所必需的,调用将失败,并返回403代码 不管秘密是否存在。
接受以下参数:
名称
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)79
列出秘密
列出所有机密的名称。
默认情况下,此端点将尝试在一个
请求。但即使有更多的任务可用,它返回的值也可能会更少。
它还可能返回continuationToken
结果。但是,你只能是苏尔如果你看到了所有的结果
用最后一个ContinuationToken继续调用listtaskGroup
在不使用
continuationToken的情况下获取结果
如果您不想一次列出所有成员,您可以
使用查询字符串选项limit
返回更少的值。
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)80
taskcluster.workermanager中的方法
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
81
此服务管理工作进程,包括为动态工作进程池提供资源。
ping服务器
什么都不做就回应。
此端点用于检查服务是否已启动。
αααα182
列出提供程序
检索可用于工作池的提供程序列表。
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
83
创建工作池
创建新的工作池。如果工作池已存在,则会引发错误。
接受以下参数:
workerpoolid
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
84
更新工作池
给定一个现有的工作池定义,这将修改它并返回
新定义。
要删除工作池,请将其providerID
设置为"空提供程序"
。
在任何现有工作人员退出后,清理作业将删除
工人游泳池。在此期间,可以再次更新工作池,例如
将其providerID设置为真正的提供者。
接受以下参数:
workerpoolid
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
85
获取工作池
获取现有的工作池定义。
接受以下参数:
workerpoolid
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
86
列出所有工作池
获取所有现有工作池的列表。
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
87
报告工作人员的错误
报告工作进程上发生的错误。将包括此错误
还有listworkerpoolerrors(workerpoolid)
中的其他错误
工作人员可以使用此终结点报告启动或配置错误
可能与工作池配置关联,因此
工作池管理员感兴趣。
注意:错误是公开可见的。确保没有任何内容
包含机密或其他敏感信息。
接受以下参数:
workerpoolid
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
88
列出工作池错误
获取工作池错误列表。
接受以下参数:
workerpoolid
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
89
工作池中特定工作组中的工作人员
获取给定工作池中给定组中所有现有工作人员的列表。
接受以下参数:
workerpoolid
工作组
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
90
找个工人
找一个工人。
接受以下参数:
workerpoolid
工作组
工作ID
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
91
创建工作者
创建新工人。这种方法的精确行为取决于
在实现给定工作池的提供程序上。一些供应商
根本不支持创建工作线程,将返回400错误。
接受以下参数:
workerpoolid
工作组
工作ID
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
92
移除工人
移除现有工作进程。这种方法的精确行为取决于
关于提供者实现给定的工作者。一些供应商
根本不支持删除工作人员,并将返回400错误。
其他人可能会开始移除工人,但仍可以通过
之后的API(甚至可能处于运行状态)。
接受以下参数:
workerpoolid
工作组
工作ID
αααα193
工人池中的工人
获取给定工作池中所有现有工作人员的列表。
接受以下参数:
workerpoolid
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
94
注册正在运行的工作程序
注册正在运行的工作人员。工人在工人启动时调用此方法。
此调用将工作进程标记为正在运行并返回凭据
工人将要求执行其工作。工人必须提供
其身份的一些证明,并且该证明因提供者类型而异。
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
95
在taskcluster.workermanagervents中交换
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
96
这些交换在创建或更新工作池时提供通知。这样,在另一端的不同进程中运行的设置程序就可以与更改同步。当然,我们也欢迎您将它们用于其他目的,例如监视更改。
工作池创建的消息
workermanagervents.workerpoolcreated(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
工作池更新的消息
WorkerManager提醒。WorkerPoolUpdated(RoutingKeyPattern)->;RoutingKey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
推荐PyPI第三方库
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)81
此服务管理工作进程,包括为动态工作进程池提供资源。
ping服务器
什么都不做就回应。 此端点用于检查服务是否已启动。
αααα182列出提供程序
检索可用于工作池的提供程序列表。
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)83
创建工作池
创建新的工作池。如果工作池已存在,则会引发错误。
接受以下参数:
workerpoolid
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)84
更新工作池
给定一个现有的工作池定义,这将修改它并返回 新定义。
要删除工作池,请将其providerID
设置为"空提供程序"
。
在任何现有工作人员退出后,清理作业将删除
工人游泳池。在此期间,可以再次更新工作池,例如
将其providerID设置为真正的提供者。
接受以下参数:
workerpoolid
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)85
获取工作池
获取现有的工作池定义。
接受以下参数:
workerpoolid
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)86
列出所有工作池
获取所有现有工作池的列表。
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)87
报告工作人员的错误
报告工作进程上发生的错误。将包括此错误
还有listworkerpoolerrors(workerpoolid)
中的其他错误
工作人员可以使用此终结点报告启动或配置错误 可能与工作池配置关联,因此 工作池管理员感兴趣。
注意:错误是公开可见的。确保没有任何内容 包含机密或其他敏感信息。
接受以下参数:
workerpoolid
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)88
列出工作池错误
获取工作池错误列表。
接受以下参数:
workerpoolid
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)89
工作池中特定工作组中的工作人员
获取给定工作池中给定组中所有现有工作人员的列表。
接受以下参数:
workerpoolid
工作组
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)90
找个工人
找一个工人。
接受以下参数:
workerpoolid
工作组
工作ID
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)91
创建工作者
创建新工人。这种方法的精确行为取决于 在实现给定工作池的提供程序上。一些供应商 根本不支持创建工作线程,将返回400错误。
接受以下参数:
workerpoolid
工作组
工作ID
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)92
移除工人
移除现有工作进程。这种方法的精确行为取决于 关于提供者实现给定的工作者。一些供应商 根本不支持删除工作人员,并将返回400错误。 其他人可能会开始移除工人,但仍可以通过 之后的API(甚至可能处于运行状态)。
接受以下参数:
workerpoolid
工作组
工作ID
工人池中的工人
获取给定工作池中所有现有工作人员的列表。
接受以下参数:
workerpoolid
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)94
注册正在运行的工作程序
注册正在运行的工作人员。工人在工人启动时调用此方法。
此调用将工作进程标记为正在运行并返回凭据 工人将要求执行其工作。工人必须提供 其身份的一些证明,并且该证明因提供者类型而异。
具有必需的输入模式
具有所需的输出架构
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)95
在taskcluster.workermanagervents中交换
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)
96
这些交换在创建或更新工作池时提供通知。这样,在另一端的不同进程中运行的设置程序就可以与更改同步。当然,我们也欢迎您将它们用于其他目的,例如监视更改。
工作池创建的消息
workermanagervents.workerpoolcreated(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
工作池更新的消息
WorkerManager提醒。WorkerPoolUpdated(RoutingKeyPattern)->;RoutingKey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与
匹配。如果未指定,则由我们的工具自动完成。
推荐PyPI第三方库
importdatetimestart=datetime.datetime.now()expiry=start+datetime.timedelta(0,60)scopes=['ScopeA','ScopeB']name='foo'credentials=taskcluster.createTemporaryCredentials(# issuing clientIdclientId,# issuing accessTokenaccessToken,# Validity of temporary credentials starts here, in timestampstart,# Expiration of temporary credentials, in timestampexpiry,# Scopes to grant the temporary credentialsscopes,# credential name (optional)name)96
这些交换在创建或更新工作池时提供通知。这样,在另一端的不同进程中运行的设置程序就可以与更改同步。当然,我们也欢迎您将它们用于其他目的,例如监视更改。
工作池创建的消息
workermanagervents.workerpoolcreated(routingkeypattern)->;routingkey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。
工作池更新的消息
WorkerManager提醒。WorkerPoolUpdated(RoutingKeyPattern)->;RoutingKey
routing key kind
是常量primary
是必需的描述:路由密钥类型的标识符。对于正式的路由密钥,这始终是'primary'
。保留
说明:为将来的路由密钥条目保留的空间,您应该始终将此条目与匹配。如果未指定,则由我们的工具自动完成。