@maxim_mazurok/gapi.client.cloudtasks-v2beta3 0.0.20230809 → 0.0.20230927

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +163 -12
  2. package/package.json +1 -1
  3. package/tests.ts +17 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://cloudtasks.googleapis.com/$discovery/rest?version=v2beta3
12
- // Revision: 20230809
12
+ // Revision: 20230927
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -157,6 +157,17 @@ declare namespace gapi.client {
157
157
  task?:
158
158
  Task;
159
159
  }
160
+ interface CmekConfig {
161
+ /**
162
+ * Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be used to encrypt the Queues & Tasks
163
+ * in the region. Setting this as blank will turn off CMEK encryption.
164
+ */
165
+ kmsKey?:
166
+ string;
167
+ /** Output only. The config resource name which includes the project and location and must end in 'cmekConfig', in the format projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig` */
168
+ name?:
169
+ string;
170
+ }
160
171
  interface CreateTaskRequest {
161
172
  /**
162
173
  * The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as
@@ -487,16 +498,20 @@ declare namespace gapi.client {
487
498
  stats?:
488
499
  QueueStats;
489
500
  /**
490
- * The maximum amount of time that a task will be retained in this queue. Queues created by Cloud Tasks have a default `task_ttl` of 31 days. After a task has lived for `task_ttl`, the
491
- * task will be deleted regardless of whether it was dispatched or not. The `task_ttl` for queues created via queue.yaml/xml is equal to the maximum duration because there is a
492
- * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for these queues. To view the maximum valid duration, see the documentation for Duration.
501
+ * The maximum amount of time that a task will be retained in this queue. After a task has lived for `task_ttl`, the task will be deleted regardless of whether it was dispatched or
502
+ * not. The minimum value is 10 days. The maximum value is 10 years. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for "seconds").
503
+ * For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). Queues created by Cloud Tasks have a
504
+ * default `task_ttl` of 31 days. . Queues created by queue.yaml/xml have a fixed `task_ttl` of the maximum duration, because there is a [storage
505
+ * quota](https://cloud.google.com/appengine/quotas#Task_Queue) for these queues.
493
506
  */
494
507
  taskTtl?:
495
508
  string;
496
509
  /**
497
510
  * The task tombstone time to live (TTL). After a task is deleted or executed, the task's tombstone is retained for the length of time specified by `tombstone_ttl`. The tombstone is
498
511
  * used by task de-duplication; another task with the same name can't be created until the tombstone has expired. For more information about task de-duplication, see the documentation
499
- * for CreateTaskRequest. Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
512
+ * for CreateTaskRequest. The minimum value is 1 hour. The maximum value is 9 days. The value must be given as a string that indicates the length of time (in seconds) followed by `s`
513
+ * (for "seconds"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). Queues created by Cloud
514
+ * Tasks have a default `tombstone_ttl` of 1 hour.
500
515
  */
501
516
  tombstoneTtl?:
502
517
  string;
@@ -570,8 +585,9 @@ declare namespace gapi.client {
570
585
  number;
571
586
  /**
572
587
  * A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified
573
- * when the queue is created, Cloud Tasks will pick the default. `max_backoff` will be truncated to the nearest second. This field has the same meaning as [max_backoff_seconds in
574
- * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
588
+ * when the queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for "seconds"). For
589
+ * more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `max_backoff` will be truncated to the
590
+ * nearest second. This field has the same meaning as [max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
575
591
  */
576
592
  maxBackoff?:
577
593
  string;
@@ -587,15 +603,18 @@ declare namespace gapi.client {
587
603
  /**
588
604
  * If positive, `max_retry_duration` specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once `max_retry_duration` time has passed
589
605
  * *and* the task has been attempted max_attempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. If unspecified when the
590
- * queue is created, Cloud Tasks will pick the default. `max_retry_duration` will be truncated to the nearest second. This field has the same meaning as [task_age_limit in
606
+ * queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for "seconds"). For the
607
+ * maximum possible value or the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `max_retry_duration` will be truncated
608
+ * to the nearest second. This field has the same meaning as [task_age_limit in
591
609
  * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
592
610
  */
593
611
  maxRetryDuration?:
594
612
  string;
595
613
  /**
596
614
  * A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified
597
- * when the queue is created, Cloud Tasks will pick the default. `min_backoff` will be truncated to the nearest second. This field has the same meaning as [min_backoff_seconds in
598
- * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
615
+ * when the queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for "seconds"). For
616
+ * more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `min_backoff` will be truncated to the
617
+ * nearest second. This field has the same meaning as [min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
599
618
  */
600
619
  minBackoff?:
601
620
  string;
@@ -658,8 +677,9 @@ declare namespace gapi.client {
658
677
  * 10 minutes for standard apps with automatic scaling, 24 hours for standard apps with manual and basic scaling, and 60 minutes for flex apps. If the request deadline is set, it must
659
678
  * be in the interval [15 seconds, 24 hours 15 seconds]. Regardless of the task's `dispatch_deadline`, the app handler will not run for longer than than the service's timeout. We
660
679
  * recommend setting the `dispatch_deadline` to at most a few seconds more than the app handler's timeout. For more information see
661
- * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). `dispatch_deadline` will be truncated to the nearest millisecond. The deadline is an
662
- * approximate deadline.
680
+ * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). The value must be given as a string that indicates the length of time (in seconds) followed by
681
+ * `s` (for "seconds"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `dispatch_deadline`
682
+ * will be truncated to the nearest millisecond. The deadline is an approximate deadline.
663
683
  */
664
684
  dispatchDeadline?:
665
685
  string;
@@ -1932,6 +1952,45 @@ declare namespace gapi.client {
1932
1952
  uploadType?:
1933
1953
  string;
1934
1954
  }): Request<Location>;
1955
+ /** Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured. */
1956
+ getCmekConfig(request?: {
1957
+ /** V1 error format. */
1958
+ "$.xgafv"?:
1959
+ string;
1960
+ /** OAuth access token. */
1961
+ access_token?:
1962
+ string;
1963
+ /** Data format for response. */
1964
+ alt?:
1965
+ string;
1966
+ /** JSONP */
1967
+ callback?:
1968
+ string;
1969
+ /** Selector specifying which fields to include in a partial response. */
1970
+ fields?:
1971
+ string;
1972
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1973
+ key?:
1974
+ string;
1975
+ /** Required. The config resource name. For example: projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig` */
1976
+ name:
1977
+ string;
1978
+ /** OAuth 2.0 token for the current user. */
1979
+ oauth_token?:
1980
+ string;
1981
+ /** Returns response with indentations and line breaks. */
1982
+ prettyPrint?:
1983
+ boolean;
1984
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1985
+ quotaUser?:
1986
+ string;
1987
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1988
+ upload_protocol?:
1989
+ string;
1990
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1991
+ uploadType?:
1992
+ string;
1993
+ }): Request<CmekConfig>;
1935
1994
  /** Lists information about the supported locations for this service. */
1936
1995
  list(request?: {
1937
1996
  /** V1 error format. */
@@ -1983,6 +2042,98 @@ declare namespace gapi.client {
1983
2042
  uploadType?:
1984
2043
  string;
1985
2044
  }): Request<ListLocationsResponse>;
2045
+ /**
2046
+ * Creates or Updates a CMEK config. Updates the Customer Managed Encryption Key assotiated with the Cloud Tasks location (Creates if the key does not already exist). All new tasks
2047
+ * created in the location will be encrypted at-rest with the KMS-key provided in the config.
2048
+ */
2049
+ updateCmekConfig(request: {
2050
+ /** V1 error format. */
2051
+ "$.xgafv"?:
2052
+ string;
2053
+ /** OAuth access token. */
2054
+ access_token?:
2055
+ string;
2056
+ /** Data format for response. */
2057
+ alt?:
2058
+ string;
2059
+ /** JSONP */
2060
+ callback?:
2061
+ string;
2062
+ /** Selector specifying which fields to include in a partial response. */
2063
+ fields?:
2064
+ string;
2065
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2066
+ key?:
2067
+ string;
2068
+ locationsId:
2069
+ string;
2070
+ /** OAuth 2.0 token for the current user. */
2071
+ oauth_token?:
2072
+ string;
2073
+ /** Returns response with indentations and line breaks. */
2074
+ prettyPrint?:
2075
+ boolean;
2076
+ projectsId:
2077
+ string;
2078
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2079
+ quotaUser?:
2080
+ string;
2081
+ /** List of fields to be updated in this request. */
2082
+ updateMask?:
2083
+ string;
2084
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2085
+ upload_protocol?:
2086
+ string;
2087
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2088
+ uploadType?:
2089
+ string;
2090
+ /** Request body */
2091
+ resource:
2092
+ CmekConfig;
2093
+ }): Request<CmekConfig>;
2094
+ updateCmekConfig(request: {
2095
+ /** V1 error format. */
2096
+ "$.xgafv"?:
2097
+ string;
2098
+ /** OAuth access token. */
2099
+ access_token?:
2100
+ string;
2101
+ /** Data format for response. */
2102
+ alt?:
2103
+ string;
2104
+ /** JSONP */
2105
+ callback?:
2106
+ string;
2107
+ /** Selector specifying which fields to include in a partial response. */
2108
+ fields?:
2109
+ string;
2110
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2111
+ key?:
2112
+ string;
2113
+ locationsId:
2114
+ string;
2115
+ /** OAuth 2.0 token for the current user. */
2116
+ oauth_token?:
2117
+ string;
2118
+ /** Returns response with indentations and line breaks. */
2119
+ prettyPrint?:
2120
+ boolean;
2121
+ projectsId:
2122
+ string;
2123
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2124
+ quotaUser?:
2125
+ string;
2126
+ /** List of fields to be updated in this request. */
2127
+ updateMask?:
2128
+ string;
2129
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2130
+ upload_protocol?:
2131
+ string;
2132
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2133
+ uploadType?:
2134
+ string;
2135
+ },
2136
+ body: CmekConfig): Request<CmekConfig>;
1986
2137
  queues:
1987
2138
  QueuesResource;
1988
2139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudtasks-v2beta3",
3
- "version": "0.0.20230809",
3
+ "version": "0.0.20230927",
4
4
  "description": "TypeScript typings for Cloud Tasks API v2beta3",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230809
6
+ // Revision: 20230927
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -33,6 +33,10 @@ gapi.load('client', async () => {
33
33
  await gapi.client.cloudtasks.projects.locations.get({
34
34
  name: "Test string",
35
35
  });
36
+ /** Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured. */
37
+ await gapi.client.cloudtasks.projects.locations.getCmekConfig({
38
+ name: "Test string",
39
+ });
36
40
  /** Lists information about the supported locations for this service. */
37
41
  await gapi.client.cloudtasks.projects.locations.list({
38
42
  filter: "Test string",
@@ -40,6 +44,18 @@ gapi.load('client', async () => {
40
44
  pageSize: 42,
41
45
  pageToken: "Test string",
42
46
  });
47
+ /**
48
+ * Creates or Updates a CMEK config. Updates the Customer Managed Encryption Key assotiated with the Cloud Tasks location (Creates if the key does not already exist). All new tasks created
49
+ * in the location will be encrypted at-rest with the KMS-key provided in the config.
50
+ */
51
+ await gapi.client.cloudtasks.projects.locations.updateCmekConfig({
52
+ locationsId: "Test string",
53
+ projectsId: "Test string",
54
+ updateMask: "Test string",
55
+ }, {
56
+ kmsKey: "Test string",
57
+ name: "Test string",
58
+ });
43
59
  /**
44
60
  * Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was
45
61
  * dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of