Skip to content

Commit

Permalink
feat(cloudtasks): update the API
Browse files Browse the repository at this point in the history
#### cloudtasks:v2
The following keys were changed:
- schemas.AppEngineHttpRequest.description
- schemas.AppEngineHttpRequest.properties.appEngineRouting.description

#### cloudtasks:v2beta3
The following keys were added:
- schemas.Queue.properties.type.description
- schemas.Queue.properties.type.enum
- schemas.Queue.properties.type.enumDescriptions
- schemas.Queue.properties.type.type
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jun 5, 2020
1 parent 11e33e0 commit d5b01a7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
6 changes: 3 additions & 3 deletions discovery/cloudtasks-v2.json
Expand Up @@ -675,16 +675,16 @@
}
}
},
"revision": "20200513",
"revision": "20200529",
"rootUrl": "https://cloudtasks.googleapis.com/",
"schemas": {
"AppEngineHttpRequest": {
"description": "App Engine HTTP request.\n\nThe message defines the HTTP request that is sent to an App Engine app when\nthe task is dispatched.\n\nUsing AppEngineHttpRequest requires\n[`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`\n\nThe task will be delivered to the App Engine app which belongs to the same\nproject as the queue. For more information, see\n[How Requests are\nRouted](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)\nand how routing is affected by\n[dispatch\nfiles](https://cloud.google.com/appengine/docs/python/config/dispatchref).\nTraffic is encrypted during transport and never leaves Google datacenters.\nBecause this traffic is carried over a communication mechanism internal to\nGoogle, you cannot explicitly set the protocol (for example, HTTP or HTTPS).\nThe request to the handler, however, will appear to have used the HTTP\nprotocol.\n\nThe AppEngineRouting used to construct the URL that the task is\ndelivered to can be set at the queue-level or task-level:\n\n* If app_engine_routing_override is set on the\n queue, this value is used for all\n tasks in the queue, no matter what the setting is for the task-level\n app_engine_routing.\n\n\nThe `url` that the task will be sent to is:\n\n* `url =` host `+`\n relative_uri\n\nTasks can be dispatched to secure app handlers, unsecure app handlers, and\nURIs restricted with\n[`login:\nadmin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).\nBecause tasks are not run as any user, they cannot be dispatched to URIs\nrestricted with\n[`login:\nrequired`](https://cloud.google.com/appengine/docs/standard/python/config/appref)\nTask dispatches also do not follow redirects.\n\nThe task attempt has succeeded if the app's request handler returns an HTTP\nresponse code in the range [`200` - `299`]. The task attempt has failed if\nthe app's handler returns a non-2xx response code or Cloud Tasks does\nnot receive response before the deadline. Failed\ntasks will be retried according to the\nretry configuration. `503` (Service Unavailable) is\nconsidered an App Engine system error instead of an application error and\nwill cause Cloud Tasks' traffic congestion control to temporarily throttle\nthe queue's dispatches. Unlike other types of task targets, a `429` (Too Many\nRequests) response from an app handler does not cause traffic congestion\ncontrol to throttle the queue.",
"description": "App Engine HTTP request.\n\nThe message defines the HTTP request that is sent to an App Engine app when\nthe task is dispatched.\n\nUsing AppEngineHttpRequest requires\n[`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`\n\nThe task will be delivered to the App Engine app which belongs to the same\nproject as the queue. For more information, see\n[How Requests are\nRouted](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)\nand how routing is affected by\n[dispatch\nfiles](https://cloud.google.com/appengine/docs/python/config/dispatchref).\nTraffic is encrypted during transport and never leaves Google datacenters.\nBecause this traffic is carried over a communication mechanism internal to\nGoogle, you cannot explicitly set the protocol (for example, HTTP or HTTPS).\nThe request to the handler, however, will appear to have used the HTTP\nprotocol.\n\nThe AppEngineRouting used to construct the URL that the task is\ndelivered to can be set at the queue-level or task-level:\n\n* If app_engine_routing_override is set on the\n queue, this value\n is used for all tasks in the queue, no matter what the setting is for the\n task-level\n app_engine_routing.\n\n\nThe `url` that the task will be sent to is:\n\n* `url =` host `+`\n relative_uri\n\nTasks can be dispatched to secure app handlers, unsecure app handlers, and\nURIs restricted with\n[`login:\nadmin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).\nBecause tasks are not run as any user, they cannot be dispatched to URIs\nrestricted with\n[`login:\nrequired`](https://cloud.google.com/appengine/docs/standard/python/config/appref)\nTask dispatches also do not follow redirects.\n\nThe task attempt has succeeded if the app's request handler returns an HTTP\nresponse code in the range [`200` - `299`]. The task attempt has failed if\nthe app's handler returns a non-2xx response code or Cloud Tasks does\nnot receive response before the deadline. Failed\ntasks will be retried according to the\nretry configuration. `503` (Service Unavailable) is\nconsidered an App Engine system error instead of an application error and\nwill cause Cloud Tasks' traffic congestion control to temporarily throttle\nthe queue's dispatches. Unlike other types of task targets, a `429` (Too Many\nRequests) response from an app handler does not cause traffic congestion\ncontrol to throttle the queue.",
"id": "AppEngineHttpRequest",
"properties": {
"appEngineRouting": {
"$ref": "AppEngineRouting",
"description": "Task-level setting for App Engine routing.\n\n* If app_engine_routing_override is set on the\n queue, this value is used for all\n tasks in the queue, no matter what the setting is for the task-level\n app_engine_routing."
"description": "Task-level setting for App Engine routing.\n\n* If app_engine_routing_override is set on the\n queue, this\n value is used for all tasks in the queue, no matter what the setting is\n for the task-level\n app_engine_routing."
},
"body": {
"description": "HTTP request body.\n\nA request body is allowed only if the HTTP method is POST or PUT. It is\nan error to set a body on a task with an incompatible HttpMethod.",
Expand Down
16 changes: 15 additions & 1 deletion discovery/cloudtasks-v2beta3.json
Expand Up @@ -675,7 +675,7 @@
}
}
},
"revision": "20200513",
"revision": "20200529",
"rootUrl": "https://cloudtasks.googleapis.com/",
"schemas": {
"AppEngineHttpQueue": {
Expand Down Expand Up @@ -1141,6 +1141,20 @@
"The queue is disabled.\n\nA queue becomes `DISABLED` when\n[queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)\nor\n[queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)\nis uploaded which does not contain the queue. You cannot directly disable\na queue.\n\nWhen a queue is disabled, tasks can still be added to a queue\nbut the tasks are not dispatched.\n\nTo permanently delete this queue and all of its tasks, call\nDeleteQueue."
],
"type": "string"
},
"type": {
"description": "Immutable. The type of a queue (push or pull).\n\n`Queue.type` is an immutable property of the queue that is set at the queue\ncreation time. When left unspecified, the default value of `PUSH` is\nselected.",
"enum": [
"TYPE_UNSPECIFIED",
"PULL",
"PUSH"
],
"enumDescriptions": [
"Default value.",
"A pull queue.",
"A push queue."
],
"type": "string"
}
},
"type": "object"
Expand Down
4 changes: 2 additions & 2 deletions src/apis/cloudtasks/v2.ts
Expand Up @@ -128,11 +128,11 @@ export namespace cloudtasks_v2 {
}

/**
* App Engine HTTP request. The message defines the HTTP request that is sent to an App Engine app when the task is dispatched. Using AppEngineHttpRequest requires [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) Google IAM permission for the project and the following scope: `https://www.googleapis.com/auth/cloud-platform` The task will be delivered to the App Engine app which belongs to the same project as the queue. For more information, see [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) and how routing is affected by [dispatch files](https://cloud.google.com/appengine/docs/python/config/dispatchref). Traffic is encrypted during transport and never leaves Google datacenters. Because this traffic is carried over a communication mechanism internal to Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). The request to the handler, however, will appear to have used the HTTP protocol. The AppEngineRouting used to construct the URL that the task is delivered to can be set at the queue-level or task-level: * If app_engine_routing_override is set on the queue, this value is used for all tasks in the queue, no matter what the setting is for the task-level app_engine_routing. The `url` that the task will be sent to is: * `url =` host `+` relative_uri Tasks can be dispatched to secure app handlers, unsecure app handlers, and URIs restricted with [`login: admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). Because tasks are not run as any user, they cannot be dispatched to URIs restricted with [`login: required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) Task dispatches also do not follow redirects. The task attempt has succeeded if the app's request handler returns an HTTP response code in the range [`200` - `299`]. The task attempt has failed if the app's handler returns a non-2xx response code or Cloud Tasks does not receive response before the deadline. Failed tasks will be retried according to the retry configuration. `503` (Service Unavailable) is considered an App Engine system error instead of an application error and will cause Cloud Tasks' traffic congestion control to temporarily throttle the queue's dispatches. Unlike other types of task targets, a `429` (Too Many Requests) response from an app handler does not cause traffic congestion control to throttle the queue.
* App Engine HTTP request. The message defines the HTTP request that is sent to an App Engine app when the task is dispatched. Using AppEngineHttpRequest requires [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) Google IAM permission for the project and the following scope: `https://www.googleapis.com/auth/cloud-platform` The task will be delivered to the App Engine app which belongs to the same project as the queue. For more information, see [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) and how routing is affected by [dispatch files](https://cloud.google.com/appengine/docs/python/config/dispatchref). Traffic is encrypted during transport and never leaves Google datacenters. Because this traffic is carried over a communication mechanism internal to Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). The request to the handler, however, will appear to have used the HTTP protocol. The AppEngineRouting used to construct the URL that the task is delivered to can be set at the queue-level or task-level: * If app_engine_routing_override is set on the queue, this value is used for all tasks in the queue, no matter what the setting is for the task-level app_engine_routing. The `url` that the task will be sent to is: * `url =` host `+` relative_uri Tasks can be dispatched to secure app handlers, unsecure app handlers, and URIs restricted with [`login: admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). Because tasks are not run as any user, they cannot be dispatched to URIs restricted with [`login: required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) Task dispatches also do not follow redirects. The task attempt has succeeded if the app's request handler returns an HTTP response code in the range [`200` - `299`]. The task attempt has failed if the app's handler returns a non-2xx response code or Cloud Tasks does not receive response before the deadline. Failed tasks will be retried according to the retry configuration. `503` (Service Unavailable) is considered an App Engine system error instead of an application error and will cause Cloud Tasks' traffic congestion control to temporarily throttle the queue's dispatches. Unlike other types of task targets, a `429` (Too Many Requests) response from an app handler does not cause traffic congestion control to throttle the queue.
*/
export interface Schema$AppEngineHttpRequest {
/**
* Task-level setting for App Engine routing. * If app_engine_routing_override is set on the queue, this value is used for all tasks in the queue, no matter what the setting is for the task-level app_engine_routing.
* Task-level setting for App Engine routing. * If app_engine_routing_override is set on the queue, this value is used for all tasks in the queue, no matter what the setting is for the task-level app_engine_routing.
*/
appEngineRouting?: Schema$AppEngineRouting;
/**
Expand Down
28 changes: 20 additions & 8 deletions src/apis/cloudtasks/v2beta3.ts
Expand Up @@ -452,6 +452,10 @@ export namespace cloudtasks_v2beta3 {
* Output only. The state of the queue. `state` can only be changed by called PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`.
*/
state?: string | null;
/**
* Immutable. The type of a queue (push or pull). `Queue.type` is an immutable property of the queue that is set at the queue creation time. When left unspecified, the default value of `PUSH` is selected.
*/
type?: string | null;
}
/**
* Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits.
Expand Down Expand Up @@ -987,7 +991,8 @@ export namespace cloudtasks_v2beta3 {
* // "rateLimits": {},
* // "retryConfig": {},
* // "stackdriverLoggingConfig": {},
* // "state": "my_state"
* // "state": "my_state",
* // "type": "my_type"
* // }
* },
* });
Expand All @@ -1001,7 +1006,8 @@ export namespace cloudtasks_v2beta3 {
* // "rateLimits": {},
* // "retryConfig": {},
* // "stackdriverLoggingConfig": {},
* // "state": "my_state"
* // "state": "my_state",
* // "type": "my_type"
* // }
* }
*
Expand Down Expand Up @@ -1267,7 +1273,8 @@ export namespace cloudtasks_v2beta3 {
* // "rateLimits": {},
* // "retryConfig": {},
* // "stackdriverLoggingConfig": {},
* // "state": "my_state"
* // "state": "my_state",
* // "type": "my_type"
* // }
* }
*
Expand Down Expand Up @@ -1734,7 +1741,8 @@ export namespace cloudtasks_v2beta3 {
* // "rateLimits": {},
* // "retryConfig": {},
* // "stackdriverLoggingConfig": {},
* // "state": "my_state"
* // "state": "my_state",
* // "type": "my_type"
* // }
* },
* });
Expand All @@ -1748,7 +1756,8 @@ export namespace cloudtasks_v2beta3 {
* // "rateLimits": {},
* // "retryConfig": {},
* // "stackdriverLoggingConfig": {},
* // "state": "my_state"
* // "state": "my_state",
* // "type": "my_type"
* // }
* }
*
Expand Down Expand Up @@ -1891,7 +1900,8 @@ export namespace cloudtasks_v2beta3 {
* // "rateLimits": {},
* // "retryConfig": {},
* // "stackdriverLoggingConfig": {},
* // "state": "my_state"
* // "state": "my_state",
* // "type": "my_type"
* // }
* }
*
Expand Down Expand Up @@ -2036,7 +2046,8 @@ export namespace cloudtasks_v2beta3 {
* // "rateLimits": {},
* // "retryConfig": {},
* // "stackdriverLoggingConfig": {},
* // "state": "my_state"
* // "state": "my_state",
* // "type": "my_type"
* // }
* }
*
Expand Down Expand Up @@ -2181,7 +2192,8 @@ export namespace cloudtasks_v2beta3 {
* // "rateLimits": {},
* // "retryConfig": {},
* // "stackdriverLoggingConfig": {},
* // "state": "my_state"
* // "state": "my_state",
* // "type": "my_type"
* // }
* }
*
Expand Down

0 comments on commit d5b01a7

Please sign in to comment.