signature
stringlengths
8
3.44k
body
stringlengths
0
1.41M
docstring
stringlengths
1
122k
id
stringlengths
5
17
async def ping(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Ping Server Respond without doing anything. This endpoint is used to check that the service is up. This method is ``stable``
f15740:c0:m0
async def githubWebHookConsumer(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Consume GitHub WebHook Capture a GitHub event and publish it via pulse, if it's a push, release or pull request. This method is ``experimental``
f15740:c0:m1
async def builds(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List of Builds A paginated list of builds that have been run in Taskcluster. Can be filtered on various git-specific fields. This method gives output: ``v1/build-list.json#`` This method is ``experimental``
f15740:c0:m2
async def badge(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Latest Build Status Badge Checks the status of the latest build of a given branch and returns corresponding badge svg. This method is ``experimental``
f15740:c0:m3
async def repository(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Repository Info Returns any repository metadata that is useful within Taskcluster related services. This method gives output: ``v1/repository.json#`` This method is ``experimental``
f15740:c0:m4
async def createStatus(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Post a status against a given changeset For a given changeset (SHA) of a repository, this will attach a "commit status" on github. These statuses are links displayed next to each revision. The status is either OK (green check) or FAILURE (red cross), made of a custom title and link. This method takes input: ``v1/create-status.json#`` This method is ``experimental``
f15740:c0:m6
async def createComment(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Post a comment on a given GitHub Issue or Pull Request For a given Issue or Pull Request of a repository, this will write a new message. This method takes input: ``v1/create-comment.json#`` This method is ``experimental``
f15740:c0:m7
def workerTypeCreated(self, *args, **kwargs):
ref = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT>': [<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>{<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>{<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>],<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>return self._makeTopicExchange(ref, *args, **kwargs)<EOL>
WorkerType Created Message When a new `workerType` is created a message will be published to this exchange. This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys: * routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required) * workerType: WorkerType that this message concerns. (required) * reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
f15741:c0:m0
def workerTypeUpdated(self, *args, **kwargs):
ref = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT>': [<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>{<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>{<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>],<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>return self._makeTopicExchange(ref, *args, **kwargs)<EOL>
WorkerType Updated Message When a `workerType` is updated a message will be published to this exchange. This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys: * routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required) * workerType: WorkerType that this message concerns. (required) * reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
f15741:c0:m1
def workerTypeRemoved(self, *args, **kwargs):
ref = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT>': [<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>{<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>{<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>],<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>return self._makeTopicExchange(ref, *args, **kwargs)<EOL>
WorkerType Removed Message When a `workerType` is removed a message will be published to this exchange. This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys: * routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required) * workerType: WorkerType that this message concerns. (required) * reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
f15741:c0:m2
async def ping(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Ping Server Respond without doing anything. This endpoint is used to check that the service is up. This method is ``stable``
f15742:c0:m0
async def findTask(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Find Indexed Task Find a task by index path, returning the highest-rank task with that path. If no task exists for the given path, this API end-point will respond with a 404 status. This method gives output: ``v1/indexed-task-response.json#`` This method is ``stable``
f15742:c0:m1
async def listNamespaces(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Namespaces List the namespaces immediately under a given namespace. This endpoint lists up to 1000 namespaces. If more namespaces are present, a `continuationToken` will be returned, which can be given in the next request. For the initial request, the payload should be an empty JSON object. This method gives output: ``v1/list-namespaces-response.json#`` This method is ``stable``
f15742:c0:m2
async def listTasks(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Tasks List the tasks immediately under a given namespace. This endpoint lists up to 1000 tasks. If more tasks are present, a `continuationToken` will be returned, which can be given in the next request. For the initial request, the payload should be an empty JSON object. **Remark**, this end-point is designed for humans browsing for tasks, not services, as that makes little sense. This method gives output: ``v1/list-tasks-response.json#`` This method is ``stable``
f15742:c0:m3
async def insertTask(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Insert Task into Index Insert a task into the index. If the new rank is less than the existing rank at the given index path, the task is not indexed but the response is still 200 OK. Please see the introduction above for information about indexing successfully completed tasks automatically using custom routes. This method takes input: ``v1/insert-task-request.json#`` This method gives output: ``v1/indexed-task-response.json#`` This method is ``stable``
f15742:c0:m4
async def findArtifactFromTask(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Artifact From Indexed Task Find a task by index path and redirect to the artifact on the most recent run with the given `name`. Note that multiple calls to this endpoint may return artifacts from differen tasks if a new task is inserted into the index between calls. Avoid using this method as a stable link to multiple, connected files if the index path does not contain a unique identifier. For example, the following two links may return unrelated files: * https://tc.example.com/api/index/v1/task/some-app.win64.latest.installer/artifacts/public/installer.exe` * https://tc.example.com/api/index/v1/task/some-app.win64.latest.installer/artifacts/public/debug-symbols.zip` This problem be remedied by including the revision in the index path or by bundling both installer and debug symbols into a single artifact. If no task exists for the given index path, this API end-point responds with 404. This method is ``stable``
f15742:c0:m5
async def ping(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Ping Server Respond without doing anything. This endpoint is used to check that the service is up. This method is ``stable``
f15743:c0:m0
async def listClients(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Clients Get a list of all clients. With `prefix`, only clients for which it is a prefix of the clientId are returned. By default this end-point will try to return up to 1000 clients in one request. But it **may return less, even none**. It may also return a `continuationToken` even though there are no more results. However, you can only be sure to have seen all results if you keep calling `listClients` with the last `continuationToken` until you get a result without a `continuationToken`. This method gives output: ``v1/list-clients-response.json#`` This method is ``stable``
f15743:c0:m1
async def client(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Client Get information about a single client. This method gives output: ``v1/get-client-response.json#`` This method is ``stable``
f15743:c0:m2
async def createClient(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Create Client Create a new client and get the `accessToken` for this client. You should store the `accessToken` from this API call as there is no other way to retrieve it. If you loose the `accessToken` you can call `resetAccessToken` to reset it, and a new `accessToken` will be returned, but you cannot retrieve the current `accessToken`. If a client with the same `clientId` already exists this operation will fail. Use `updateClient` if you wish to update an existing client. The caller's scopes must satisfy `scopes`. This method takes input: ``v1/create-client-request.json#`` This method gives output: ``v1/create-client-response.json#`` This method is ``stable``
f15743:c0:m3
async def resetAccessToken(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Reset `accessToken` Reset a clients `accessToken`, this will revoke the existing `accessToken`, generate a new `accessToken` and return it from this call. There is no way to retrieve an existing `accessToken`, so if you loose it you must reset the accessToken to acquire it again. This method gives output: ``v1/create-client-response.json#`` This method is ``stable``
f15743:c0:m4
async def updateClient(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Update Client Update an exisiting client. The `clientId` and `accessToken` cannot be updated, but `scopes` can be modified. The caller's scopes must satisfy all scopes being added to the client in the update operation. If no scopes are given in the request, the client's scopes remain unchanged This method takes input: ``v1/create-client-request.json#`` This method gives output: ``v1/get-client-response.json#`` This method is ``stable``
f15743:c0:m5
async def enableClient(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Enable Client Enable a client that was disabled with `disableClient`. If the client is already enabled, this does nothing. This is typically used by identity providers to re-enable clients that had been disabled when the corresponding identity's scopes changed. This method gives output: ``v1/get-client-response.json#`` This method is ``stable``
f15743:c0:m6
async def disableClient(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Disable Client Disable a client. If the client is already disabled, this does nothing. This is typically used by identity providers to disable clients when the corresponding identity's scopes no longer satisfy the client's scopes. This method gives output: ``v1/get-client-response.json#`` This method is ``stable``
f15743:c0:m7
async def deleteClient(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Delete Client Delete a client, please note that any roles related to this client must be deleted independently. This method is ``stable``
f15743:c0:m8
async def listRoles(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Roles Get a list of all roles, each role object also includes the list of scopes it expands to. This method gives output: ``v1/list-roles-response.json#`` This method is ``stable``
f15743:c0:m9
async def listRoleIds(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Role IDs If no limit is given, the roleIds of all roles are returned. Since this list may become long, callers can use the `limit` and `continuationToken` query arguments to page through the responses. This method gives output: ``v1/list-role-ids-response.json#`` This method is ``stable``
f15743:c0:m10
async def listRoles2(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Roles If no limit is given, all roles are returned. Since this list may become long, callers can use the `limit` and `continuationToken` query arguments to page through the responses. This method gives output: ``v1/list-roles2-response.json#`` This method is ``stable``
f15743:c0:m11
async def role(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Role Get information about a single role, including the set of scopes that the role expands to. This method gives output: ``v1/get-role-response.json#`` This method is ``stable``
f15743:c0:m12
async def createRole(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Create Role Create a new role. The caller's scopes must satisfy the new role's scopes. If there already exists a role with the same `roleId` this operation will fail. Use `updateRole` to modify an existing role. Creation of a role that will generate an infinite expansion will result in an error response. This method takes input: ``v1/create-role-request.json#`` This method gives output: ``v1/get-role-response.json#`` This method is ``stable``
f15743:c0:m13
async def updateRole(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Update Role Update an existing role. The caller's scopes must satisfy all of the new scopes being added, but need not satisfy all of the role's existing scopes. An update of a role that will generate an infinite expansion will result in an error response. This method takes input: ``v1/create-role-request.json#`` This method gives output: ``v1/get-role-response.json#`` This method is ``stable``
f15743:c0:m14
async def deleteRole(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Delete Role Delete a role. This operation will succeed regardless of whether or not the role exists. This method is ``stable``
f15743:c0:m15
async def expandScopesGet(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Expand Scopes Return an expanded copy of the given scopeset, with scopes implied by any roles included. This call uses the GET method with an HTTP body. It remains only for backward compatibility. This method takes input: ``v1/scopeset.json#`` This method gives output: ``v1/scopeset.json#`` This method is ``deprecated``
f15743:c0:m16
async def expandScopes(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Expand Scopes Return an expanded copy of the given scopeset, with scopes implied by any roles included. This method takes input: ``v1/scopeset.json#`` This method gives output: ``v1/scopeset.json#`` This method is ``stable``
f15743:c0:m17
async def currentScopes(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Current Scopes Return the expanded scopes available in the request, taking into account all sources of scopes and scope restrictions (temporary credentials, assumeScopes, client scopes, and roles). This method gives output: ``v1/scopeset.json#`` This method is ``stable``
f15743:c0:m18
async def awsS3Credentials(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Temporary Read/Write Credentials S3 Get temporary AWS credentials for `read-write` or `read-only` access to a given `bucket` and `prefix` within that bucket. The `level` parameter can be `read-write` or `read-only` and determines which type of credentials are returned. Please note that the `level` parameter is required in the scope guarding access. The bucket name must not contain `.`, as recommended by Amazon. This method can only allow access to a whitelisted set of buckets. To add a bucket to that whitelist, contact the Taskcluster team, who will add it to the appropriate IAM policy. If the bucket is in a different AWS account, you will also need to add a bucket policy allowing access from the Taskcluster account. That policy should look like this: ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "allow-taskcluster-auth-to-delegate-access", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::692406183521:root" }, "Action": [ "s3:ListBucket", "s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:GetBucketLocation" ], "Resource": [ "arn:aws:s3:::<bucket>", "arn:aws:s3:::<bucket>/*" ] } ] } ``` The credentials are set to expire after an hour, but this behavior is subject to change. Hence, you should always read the `expires` property from the response, if you intend to maintain active credentials in your application. Please note that your `prefix` may not start with slash `/`. Such a prefix is allowed on S3, but we forbid it here to discourage bad behavior. Also note that if your `prefix` doesn't end in a slash `/`, the STS credentials may allow access to unexpected keys, as S3 does not treat slashes specially. For example, a prefix of `my-folder` will allow access to `my-folder/file.txt` as expected, but also to `my-folder.txt`, which may not be intended. Finally, note that the `PutObjectAcl` call is not allowed. Passing a canned ACL other than `private` to `PutObject` is treated as a `PutObjectAcl` call, and will result in an access-denied error from AWS. This limitation is due to a security flaw in Amazon S3 which might otherwise allow indefinite access to uploaded objects. **EC2 metadata compatibility**, if the querystring parameter `?format=iam-role-compat` is given, the response will be compatible with the JSON exposed by the EC2 metadata service. This aims to ease compatibility for libraries and tools built to auto-refresh credentials. For details on the format returned by EC2 metadata service see: [EC2 User Guide](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#instance-metadata-security-credentials). This method gives output: ``v1/aws-s3-credentials-response.json#`` This method is ``stable``
f15743:c0:m19
async def azureAccounts(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Accounts Managed by Auth Retrieve a list of all Azure accounts managed by Taskcluster Auth. This method gives output: ``v1/azure-account-list-response.json#`` This method is ``stable``
f15743:c0:m20
async def azureTables(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Tables in an Account Managed by Auth Retrieve a list of all tables in an account. This method gives output: ``v1/azure-table-list-response.json#`` This method is ``stable``
f15743:c0:m21
async def azureTableSAS(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Shared-Access-Signature for Azure Table Get a shared access signature (SAS) string for use with a specific Azure Table Storage table. The `level` parameter can be `read-write` or `read-only` and determines which type of credentials are returned. If level is read-write, it will create the table if it doesn't already exist. This method gives output: ``v1/azure-table-access-response.json#`` This method is ``stable``
f15743:c0:m22
async def azureContainers(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List containers in an Account Managed by Auth Retrieve a list of all containers in an account. This method gives output: ``v1/azure-container-list-response.json#`` This method is ``stable``
f15743:c0:m23
async def azureContainerSAS(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Shared-Access-Signature for Azure Container Get a shared access signature (SAS) string for use with a specific Azure Blob Storage container. The `level` parameter can be `read-write` or `read-only` and determines which type of credentials are returned. If level is read-write, it will create the container if it doesn't already exist. This method gives output: ``v1/azure-container-response.json#`` This method is ``stable``
f15743:c0:m24
async def sentryDSN(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get DSN for Sentry Project Get temporary DSN (access credentials) for a sentry project. The credentials returned can be used with any Sentry client for up to 24 hours, after which the credentials will be automatically disabled. If the project doesn't exist it will be created, and assigned to the initial team configured for this component. Contact a Sentry admin to have the project transferred to a team you have access to if needed This method gives output: ``v1/sentry-dsn-response.json#`` This method is ``stable``
f15743:c0:m25
async def statsumToken(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Token for Statsum Project Get temporary `token` and `baseUrl` for sending metrics to statsum. The token is valid for 24 hours, clients should refresh after expiration. This method gives output: ``v1/statsum-token-response.json#`` This method is ``stable``
f15743:c0:m26
async def websocktunnelToken(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get a client token for the Websocktunnel service Get a temporary token suitable for use connecting to a [websocktunnel](https://github.com/taskcluster/websocktunnel) server. The resulting token will only be accepted by servers with a matching audience value. Reaching such a server is the callers responsibility. In general, a server URL or set of URLs should be provided to the caller as configuration along with the audience value. The token is valid for a limited time (on the scale of hours). Callers should refresh it before expiration. This method gives output: ``v1/websocktunnel-token-response.json#`` This method is ``stable``
f15743:c0:m27
async def authenticateHawk(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Authenticate Hawk Request Validate the request signature given on input and return list of scopes that the authenticating client has. This method is used by other services that wish rely on Taskcluster credentials for authentication. This way we can use Hawk without having the secret credentials leave this service. This method takes input: ``v1/authenticate-hawk-request.json#`` This method gives output: ``v1/authenticate-hawk-response.json#`` This method is ``stable``
f15743:c0:m28
async def ping(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Ping Server Respond without doing anything. This endpoint is used to check that the service is up. This method is ``stable``
f15744:c0:m0
async def listHookGroups(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List hook groups This endpoint will return a list of all hook groups with at least one hook. This method gives output: ``v1/list-hook-groups-response.json#`` This method is ``stable``
f15744:c0:m1
async def listHooks(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List hooks in a given group This endpoint will return a list of all the hook definitions within a given hook group. This method gives output: ``v1/list-hooks-response.json#`` This method is ``stable``
f15744:c0:m2
async def hook(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get hook definition This endpoint will return the hook definition for the given `hookGroupId` and hookId. This method gives output: ``v1/hook-definition.json#`` This method is ``stable``
f15744:c0:m3
async def getHookStatus(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get hook status This endpoint will return the current status of the hook. This represents a snapshot in time and may vary from one call to the next. This method is deprecated in favor of listLastFires. This method gives output: ``v1/hook-status.json#`` This method is ``deprecated``
f15744:c0:m4
async def createHook(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Create a hook This endpoint will create a new hook. The caller's credentials must include the role that will be used to create the task. That role must satisfy task.scopes as well as the necessary scopes to add the task to the queue. This method takes input: ``v1/create-hook-request.json#`` This method gives output: ``v1/hook-definition.json#`` This method is ``stable``
f15744:c0:m5
async def updateHook(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Update a hook This endpoint will update an existing hook. All fields except `hookGroupId` and `hookId` can be modified. This method takes input: ``v1/create-hook-request.json#`` This method gives output: ``v1/hook-definition.json#`` This method is ``stable``
f15744:c0:m6
async def removeHook(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Delete a hook This endpoint will remove a hook definition. This method is ``stable``
f15744:c0:m7
async def triggerHook(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Trigger a hook This endpoint will trigger the creation of a task from a hook definition. The HTTP payload must match the hooks `triggerSchema`. If it does, it is provided as the `payload` property of the JSON-e context used to render the task template. This method takes input: ``v1/trigger-hook.json#`` This method gives output: ``v1/trigger-hook-response.json#`` This method is ``stable``
f15744:c0:m8
async def getTriggerToken(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get a trigger token Retrieve a unique secret token for triggering the specified hook. This token can be deactivated with `resetTriggerToken`. This method gives output: ``v1/trigger-token-response.json#`` This method is ``stable``
f15744:c0:m9
async def resetTriggerToken(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Reset a trigger token Reset the token for triggering a given hook. This invalidates token that may have been issued via getTriggerToken with a new token. This method gives output: ``v1/trigger-token-response.json#`` This method is ``stable``
f15744:c0:m10
async def triggerHookWithToken(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Trigger a hook with a token This endpoint triggers a defined hook with a valid token. The HTTP payload must match the hooks `triggerSchema`. If it does, it is provided as the `payload` property of the JSON-e context used to render the task template. This method takes input: ``v1/trigger-hook.json#`` This method gives output: ``v1/trigger-hook-response.json#`` This method is ``stable``
f15744:c0:m11
async def listLastFires(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get information about recent hook fires This endpoint will return information about the the last few times this hook has been fired, including whether the hook was fired successfully or not This method gives output: ``v1/list-lastFires-response.json#`` This method is ``experimental``
f15744:c0:m12
async def ping(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Ping Server Respond without doing anything. This endpoint is used to check that the service is up. This method is ``stable``
f15745:c0:m0
async def listWorkerTypes(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
See the list of worker types which are known to be managed This method is only for debugging the ec2-manager This method gives output: ``v1/list-worker-types.json#`` This method is ``experimental``
f15745:c0:m1
async def runInstance(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Run an instance Request an instance of a worker type This method takes input: ``v1/run-instance-request.json#`` This method is ``experimental``
f15745:c0:m2
async def terminateWorkerType(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Terminate all resources from a worker type Terminate all instances for this worker type This method is ``experimental``
f15745:c0:m3
async def workerTypeStats(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Look up the resource stats for a workerType Return an object which has a generic state description. This only contains counts of instances This method gives output: ``v1/worker-type-resources.json#`` This method is ``experimental``
f15745:c0:m4
async def workerTypeHealth(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Look up the resource health for a workerType Return a view of the health of a given worker type This method gives output: ``v1/health.json#`` This method is ``experimental``
f15745:c0:m5
async def workerTypeErrors(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Look up the most recent errors of a workerType Return a list of the most recent errors encountered by a worker type This method gives output: ``v1/errors.json#`` This method is ``experimental``
f15745:c0:m6
async def workerTypeState(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Look up the resource state for a workerType Return state information for a given worker type This method gives output: ``v1/worker-type-state.json#`` This method is ``experimental``
f15745:c0:m7
async def ensureKeyPair(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Ensure a KeyPair for a given worker type exists Idempotently ensure that a keypair of a given name exists This method takes input: ``v1/create-key-pair.json#`` This method is ``experimental``
f15745:c0:m8
async def removeKeyPair(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Ensure a KeyPair for a given worker type does not exist Ensure that a keypair of a given name does not exist. This method is ``experimental``
f15745:c0:m9
async def terminateInstance(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Terminate an instance Terminate an instance in a specified region This method is ``experimental``
f15745:c0:m10
async def getPrices(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Request prices for EC2 Return a list of possible prices for EC2 This method gives output: ``v1/prices.json#`` This method is ``experimental``
f15745:c0:m11
async def getSpecificPrices(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Request prices for EC2 Return a list of possible prices for EC2 This method takes input: ``v1/prices-request.json#`` This method gives output: ``v1/prices.json#`` This method is ``experimental``
f15745:c0:m12
async def getHealth(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get EC2 account health metrics Give some basic stats on the health of our EC2 account This method gives output: ``v1/health.json#`` This method is ``experimental``
f15745:c0:m13
async def getRecentErrors(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Look up the most recent errors in the provisioner across all worker types Return a list of recent errors encountered This method gives output: ``v1/errors.json#`` This method is ``experimental``
f15745:c0:m14
async def regions(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
See the list of regions managed by this ec2-manager This method is only for debugging the ec2-manager This method is ``experimental``
f15745:c0:m15
async def amiUsage(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
See the list of AMIs and their usage List AMIs and their usage by returning a list of objects in the form: { region: string volumetype: string lastused: timestamp } This method is ``experimental``
f15745:c0:m16
async def ebsUsage(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
See the current EBS volume usage list Lists current EBS volume usage by returning a list of objects that are uniquely defined by {region, volumetype, state} in the form: { region: string, volumetype: string, state: string, totalcount: integer, totalgb: integer, touched: timestamp (last time that information was updated), } This method is ``experimental``
f15745:c0:m17
async def dbpoolStats(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Statistics on the Database client pool This method is only for debugging the ec2-manager This method is ``experimental``
f15745:c0:m18
async def allState(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List out the entire internal state This method is only for debugging the ec2-manager This method is ``experimental``
f15745:c0:m19
async def sqsStats(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Statistics on the sqs queues This method is only for debugging the ec2-manager This method is ``experimental``
f15745:c0:m20
async def purgeQueues(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Purge the SQS queues This method is only for debugging the ec2-manager This method is ``experimental``
f15745:c0:m21
async def makeHttpRequest(method, url, payload, headers, retries=utils.MAX_RETRIES, session=None):
retry = -<NUM_LIT:1><EOL>response = None<EOL>implicit = False<EOL>if session is None:<EOL><INDENT>implicit = True<EOL>session = aiohttp.ClientSession()<EOL><DEDENT>def cleanup():<EOL><INDENT>if implicit:<EOL><INDENT>loop = asyncio.get_event_loop()<EOL>loop.run_until_complete(session.close())<EOL><DEDENT><DEDENT>try:<EOL><INDENT>while True:<EOL><INDENT>retry += <NUM_LIT:1><EOL>if retry > <NUM_LIT:0>:<EOL><INDENT>snooze = float(retry * retry) / <NUM_LIT><EOL>log.info('<STR_LIT>', snooze)<EOL>await asyncio.sleep(snooze)<EOL><DEDENT>if hasattr(payload, '<STR_LIT>'):<EOL><INDENT>payload.seek(<NUM_LIT:0>)<EOL><DEDENT>log.debug('<STR_LIT>', retry)<EOL>try:<EOL><INDENT>with async_timeout.timeout(<NUM_LIT>):<EOL><INDENT>response = await makeSingleHttpRequest(method, url, payload, headers, session)<EOL><DEDENT><DEDENT>except aiohttp.ClientError as rerr:<EOL><INDENT>if retry < retries:<EOL><INDENT>log.warn('<STR_LIT>' % rerr)<EOL>continue<EOL><DEDENT>raise rerr<EOL><DEDENT>except ValueError as rerr:<EOL><INDENT>log.warn('<STR_LIT>')<EOL>raise rerr<EOL><DEDENT>except RuntimeError as rerr:<EOL><INDENT>log.warn('<STR_LIT>')<EOL>raise rerr<EOL><DEDENT>status = response.status<EOL>if <NUM_LIT> <= status and status < <NUM_LIT> and retry < retries:<EOL><INDENT>if retry < retries:<EOL><INDENT>log.warn('<STR_LIT>' % status)<EOL>continue<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.TaskclusterRestFailure("<STR_LIT>", superExc=None)<EOL><DEDENT><DEDENT>return response<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>cleanup()<EOL><DEDENT>assert False, "<STR_LIT>"<EOL>
Make an HTTP request and retry it until success, return request
f15746:m1
def jobs(self, *args, **kwargs):
ref = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT>': [<EOL>{<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>{<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>{<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>},<EOL>],<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>return self._makeTopicExchange(ref, *args, **kwargs)<EOL>
Job Messages When a task run is scheduled or resolved, a message is posted to this exchange in a Treeherder consumable format. This exchange outputs: ``v1/pulse-job.json#``This exchange takes the following keys: * destination: destination (required) * project: project (required) * reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
f15747:c0:m0
async def ping(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Ping Server Respond without doing anything. This endpoint is used to check that the service is up. This method is ``stable``
f15749:c0:m0
async def set(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Set Secret Set the secret associated with some key. If the secret already exists, it is updated instead. This method takes input: ``v1/secret.json#`` This method is ``stable``
f15749:c0:m1
async def remove(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Delete Secret Delete the secret associated with some key. This method is ``stable``
f15749:c0:m2
async def get(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Read Secret Read the secret associated with some key. If the secret has recently expired, the response code 410 is returned. If the caller lacks the scope necessary to get the secret, the call will fail with a 403 code regardless of whether the secret exists. This method gives output: ``v1/secret.json#`` This method is ``stable``
f15749:c0:m3
async def list(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT:list>"], *args, **kwargs)<EOL>
List Secrets List the names of all secrets. By default this end-point will try to return up to 1000 secret names in one request. But it **may return less**, even if more tasks are available. It may also return a `continuationToken` even though there are no more results. However, you can only be sure to have seen all results if you keep calling `listTaskGroup` with the last `continuationToken` until you get a result without a `continuationToken`. If you are not interested in listing all the members at once, you may use the query-string option `limit` to return fewer. This method gives output: ``v1/secret-list.json#`` This method is ``stable``
f15749:c0:m4
async def listWorkerTypeSummaries(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List worker types with details Return a list of worker types, including some summary information about current capacity for each. While this list includes all defined worker types, there may be running EC2 instances for deleted worker types that are not included here. The list is unordered. This method gives output: ``http://schemas.taskcluster.net/aws-provisioner/v1/list-worker-types-summaries-response.json#`` This method is ``stable``
f15750:c0:m0
async def createWorkerType(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Create new Worker Type Create a worker type. A worker type contains all the configuration needed for the provisioner to manage the instances. Each worker type knows which regions and which instance types are allowed for that worker type. Remember that Capacity is the number of concurrent tasks that can be run on a given EC2 resource and that Utility is the relative performance rate between different instance types. There is no way to configure different regions to have different sets of instance types so ensure that all instance types are available in all regions. This function is idempotent. Once a worker type is in the provisioner, a back ground process will begin creating instances for it based on its capacity bounds and its pending task count from the Queue. It is the worker's responsibility to shut itself down. The provisioner has a limit (currently 96hours) for all instances to prevent zombie instances from running indefinitely. The provisioner will ensure that all instances created are tagged with aws resource tags containing the provisioner id and the worker type. If provided, the secrets in the global, region and instance type sections are available using the secrets api. If specified, the scopes provided will be used to generate a set of temporary credentials available with the other secrets. This method takes input: ``http://schemas.taskcluster.net/aws-provisioner/v1/create-worker-type-request.json#`` This method gives output: ``http://schemas.taskcluster.net/aws-provisioner/v1/get-worker-type-response.json#`` This method is ``stable``
f15750:c0:m1
async def updateWorkerType(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Update Worker Type Provide a new copy of a worker type to replace the existing one. This will overwrite the existing worker type definition if there is already a worker type of that name. This method will return a 200 response along with a copy of the worker type definition created Note that if you are using the result of a GET on the worker-type end point that you will need to delete the lastModified and workerType keys from the object returned, since those fields are not allowed the request body for this method Otherwise, all input requirements and actions are the same as the create method. This method takes input: ``http://schemas.taskcluster.net/aws-provisioner/v1/create-worker-type-request.json#`` This method gives output: ``http://schemas.taskcluster.net/aws-provisioner/v1/get-worker-type-response.json#`` This method is ``stable``
f15750:c0:m2
async def workerTypeLastModified(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Worker Type Last Modified Time This method is provided to allow workers to see when they were last modified. The value provided through UserData can be compared against this value to see if changes have been made If the worker type definition has not been changed, the date should be identical as it is the same stored value. This method gives output: ``http://schemas.taskcluster.net/aws-provisioner/v1/get-worker-type-last-modified.json#`` This method is ``stable``
f15750:c0:m3
async def workerType(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get Worker Type Retrieve a copy of the requested worker type definition. This copy contains a lastModified field as well as the worker type name. As such, it will require manipulation to be able to use the results of this method to submit date to the update method. This method gives output: ``http://schemas.taskcluster.net/aws-provisioner/v1/get-worker-type-response.json#`` This method is ``stable``
f15750:c0:m4
async def removeWorkerType(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Delete Worker Type Delete a worker type definition. This method will only delete the worker type definition from the storage table. The actual deletion will be handled by a background worker. As soon as this method is called for a worker type, the background worker will immediately submit requests to cancel all spot requests for this worker type as well as killing all instances regardless of their state. If you want to gracefully remove a worker type, you must either ensure that no tasks are created with that worker type name or you could theoretically set maxCapacity to 0, though, this is not a supported or tested action This method is ``stable``
f15750:c0:m5
async def listWorkerTypes(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
List Worker Types Return a list of string worker type names. These are the names of all managed worker types known to the provisioner. This does not include worker types which are left overs from a deleted worker type definition but are still running in AWS. This method gives output: ``http://schemas.taskcluster.net/aws-provisioner/v1/list-worker-types-response.json#`` This method is ``stable``
f15750:c0:m6
async def createSecret(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Create new Secret Insert a secret into the secret storage. The supplied secrets will be provided verbatime via `getSecret`, while the supplied scopes will be converted into credentials by `getSecret`. This method is not ordinarily used in production; instead, the provisioner creates a new secret directly for each spot bid. This method takes input: ``http://schemas.taskcluster.net/aws-provisioner/v1/create-secret-request.json#`` This method is ``stable``
f15750:c0:m7
async def getSecret(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get a Secret Retrieve a secret from storage. The result contains any passwords or other restricted information verbatim as well as a temporary credential based on the scopes specified when the secret was created. It is important that this secret is deleted by the consumer (`removeSecret`), or else the secrets will be visible to any process which can access the user data associated with the instance. This method gives output: ``http://schemas.taskcluster.net/aws-provisioner/v1/get-secret-response.json#`` This method is ``stable``
f15750:c0:m8
async def instanceStarted(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Report an instance starting An instance will report in by giving its instance id as well as its security token. The token is given and checked to ensure that it matches a real token that exists to ensure that random machines do not check in. We could generate a different token but that seems like overkill This method is ``stable``
f15750:c0:m9
async def removeSecret(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Remove a Secret Remove a secret. After this call, a call to `getSecret` with the given token will return no information. It is very important that the consumer of a secret delete the secret from storage before handing over control to untrusted processes to prevent credential and/or secret leakage. This method is ``stable``
f15750:c0:m10
async def getLaunchSpecs(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT>"], *args, **kwargs)<EOL>
Get All Launch Specifications for WorkerType This method returns a preview of all possible launch specifications that this worker type definition could submit to EC2. It is used to test worker types, nothing more **This API end-point is experimental and may be subject to change without warning.** This method gives output: ``http://schemas.taskcluster.net/aws-provisioner/v1/get-launch-specs-response.json#`` This method is ``experimental``
f15750:c0:m11
async def state(self, *args, **kwargs):
return await self._makeApiCall(self.funcinfo["<STR_LIT:state>"], *args, **kwargs)<EOL>
Get AWS State for a worker type Return the state of a given workertype as stored by the provisioner. This state is stored as three lists: 1 for running instances, 1 for pending requests. The `summary` property contains an updated summary similar to that returned from `listWorkerTypeSummaries`. This method is ``stable``
f15750:c0:m12