Skip to content

Commit 2dc654e

Browse files
yoshi-automationsofisl
authored andcommittedAug 15, 2023
feat(run): update the API
#### run:v1 The following keys were changed: - schemas.Policy.description #### run:v2 The following keys were added: - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.description - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.flatPath - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.httpMethod - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.id - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.parameterOrder - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.parameters.name.description - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.parameters.name.location - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.parameters.name.pattern - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.parameters.name.required - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.parameters.name.type - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.path - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.request.$ref - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.response.$ref - resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.scopes - schemas.GoogleCloudRunV2CancelExecutionRequest.description - schemas.GoogleCloudRunV2CancelExecutionRequest.id - schemas.GoogleCloudRunV2CancelExecutionRequest.properties.etag.description - schemas.GoogleCloudRunV2CancelExecutionRequest.properties.etag.type - schemas.GoogleCloudRunV2CancelExecutionRequest.properties.validateOnly.description - schemas.GoogleCloudRunV2CancelExecutionRequest.properties.validateOnly.type - schemas.GoogleCloudRunV2CancelExecutionRequest.type - schemas.GoogleCloudRunV2Service.properties.trafficTagsCleanupThreshold.description - schemas.GoogleCloudRunV2Service.properties.trafficTagsCleanupThreshold.format - schemas.GoogleCloudRunV2Service.properties.trafficTagsCleanupThreshold.type The following keys were changed: - schemas.GoogleCloudRunV2Task.properties.createTime.description - schemas.GoogleIamV1Policy.description - schemas.GoogleLongrunningOperation.properties.response.description
1 parent 633a71b commit 2dc654e

File tree

4 files changed

+179
-10
lines changed

4 files changed

+179
-10
lines changed
 

‎discovery/run-v1.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@
22892289
}
22902290
}
22912291
},
2292-
"revision": "20230730",
2292+
"revision": "20230806",
22932293
"rootUrl": "https://run.googleapis.com/",
22942294
"schemas": {
22952295
"Addressable": {
@@ -3721,7 +3721,7 @@
37213721
"type": "object"
37223722
},
37233723
"Policy": {
3724-
"description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).",
3724+
"description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).",
37253725
"id": "Policy",
37263726
"properties": {
37273727
"auditConfigs": {

‎discovery/run-v2.json

+52-4
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,34 @@
407407
"resources": {
408408
"executions": {
409409
"methods": {
410+
"cancel": {
411+
"description": "Cancels an Execution.",
412+
"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions/{executionsId}:cancel",
413+
"httpMethod": "POST",
414+
"id": "run.projects.locations.jobs.executions.cancel",
415+
"parameterOrder": [
416+
"name"
417+
],
418+
"parameters": {
419+
"name": {
420+
"description": "Required. The name of the Execution to cancel. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number.",
421+
"location": "path",
422+
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$",
423+
"required": true,
424+
"type": "string"
425+
}
426+
},
427+
"path": "v2/{+name}:cancel",
428+
"request": {
429+
"$ref": "GoogleCloudRunV2CancelExecutionRequest"
430+
},
431+
"response": {
432+
"$ref": "GoogleLongrunningOperation"
433+
},
434+
"scopes": [
435+
"https://www.googleapis.com/auth/cloud-platform"
436+
]
437+
},
410438
"delete": {
411439
"description": "Deletes an Execution.",
412440
"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions/{executionsId}",
@@ -1087,7 +1115,7 @@
10871115
}
10881116
}
10891117
},
1090-
"revision": "20230730",
1118+
"revision": "20230806",
10911119
"rootUrl": "https://run.googleapis.com/",
10921120
"schemas": {
10931121
"GoogleCloudRunV2BinaryAuthorization": {
@@ -1105,6 +1133,21 @@
11051133
},
11061134
"type": "object"
11071135
},
1136+
"GoogleCloudRunV2CancelExecutionRequest": {
1137+
"description": "Request message for deleting an Execution.",
1138+
"id": "GoogleCloudRunV2CancelExecutionRequest",
1139+
"properties": {
1140+
"etag": {
1141+
"description": "A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates.",
1142+
"type": "string"
1143+
},
1144+
"validateOnly": {
1145+
"description": "Indicates that the request should be validated without actually cancelling any resources.",
1146+
"type": "boolean"
1147+
}
1148+
},
1149+
"type": "object"
1150+
},
11081151
"GoogleCloudRunV2CloudSqlInstance": {
11091152
"description": "Represents a set of Cloud SQL instances. Each one will be available under /cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.",
11101153
"id": "GoogleCloudRunV2CloudSqlInstance",
@@ -2546,6 +2589,11 @@
25462589
"readOnly": true,
25472590
"type": "array"
25482591
},
2592+
"trafficTagsCleanupThreshold": {
2593+
"description": "Optional. Override the traffic tag threshold limit. Garbage collection will start cleaning up non-serving tagged traffic targets based on creation item. The default value is 2000.",
2594+
"format": "int64",
2595+
"type": "string"
2596+
},
25492597
"uid": {
25502598
"description": "Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.",
25512599
"readOnly": true,
@@ -2611,7 +2659,7 @@
26112659
"type": "array"
26122660
},
26132661
"createTime": {
2614-
"description": "Output only. Represents time when the task was created by the job controller. It is not guaranteed to be set in happens-before order across separate operations.",
2662+
"description": "Output only. Represents time when the task was created by the system. It is not guaranteed to be set in happens-before order across separate operations.",
26152663
"format": "google-datetime",
26162664
"readOnly": true,
26172665
"type": "string"
@@ -3066,7 +3114,7 @@
30663114
"type": "object"
30673115
},
30683116
"GoogleIamV1Policy": {
3069-
"description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).",
3117+
"description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).",
30703118
"id": "GoogleIamV1Policy",
30713119
"properties": {
30723120
"auditConfigs": {
@@ -3187,7 +3235,7 @@
31873235
"description": "Properties of the object. Contains field @type with type URL.",
31883236
"type": "any"
31893237
},
3190-
"description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.",
3238+
"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.",
31913239
"type": "object"
31923240
}
31933241
},

‎src/apis/run/v1.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ export namespace run_v1 {
12491249
uid?: string | null;
12501250
}
12511251
/**
1252-
* An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1252+
* An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
12531253
*/
12541254
export interface Schema$Policy {
12551255
/**

‎src/apis/run/v2.ts

+124-3
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,19 @@ export namespace run_v2 {
137137
*/
138138
useDefault?: boolean | null;
139139
}
140+
/**
141+
* Request message for deleting an Execution.
142+
*/
143+
export interface Schema$GoogleCloudRunV2CancelExecutionRequest {
144+
/**
145+
* A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates.
146+
*/
147+
etag?: string | null;
148+
/**
149+
* Indicates that the request should be validated without actually cancelling any resources.
150+
*/
151+
validateOnly?: boolean | null;
152+
}
140153
/**
141154
* Represents a set of Cloud SQL instances. Each one will be available under /cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.
142155
*/
@@ -1048,6 +1061,10 @@ export namespace run_v2 {
10481061
* Output only. Detailed status information for corresponding traffic targets. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.
10491062
*/
10501063
trafficStatuses?: Schema$GoogleCloudRunV2TrafficTargetStatus[];
1064+
/**
1065+
* Optional. Override the traffic tag threshold limit. Garbage collection will start cleaning up non-serving tagged traffic targets based on creation item. The default value is 2000.
1066+
*/
1067+
trafficTagsCleanupThreshold?: string | null;
10511068
/**
10521069
* Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
10531070
*/
@@ -1082,7 +1099,7 @@ export namespace run_v2 {
10821099
*/
10831100
containers?: Schema$GoogleCloudRunV2Container[];
10841101
/**
1085-
* Output only. Represents time when the task was created by the job controller. It is not guaranteed to be set in happens-before order across separate operations.
1102+
* Output only. Represents time when the task was created by the system. It is not guaranteed to be set in happens-before order across separate operations.
10861103
*/
10871104
createTime?: string | null;
10881105
/**
@@ -1399,7 +1416,7 @@ export namespace run_v2 {
13991416
role?: string | null;
14001417
}
14011418
/**
1402-
* An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1419+
* An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
14031420
*/
14041421
export interface Schema$GoogleIamV1Policy {
14051422
/**
@@ -1484,7 +1501,7 @@ export namespace run_v2 {
14841501
*/
14851502
name?: string | null;
14861503
/**
1487-
* The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1504+
* The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
14881505
*/
14891506
response?: {[key: string]: any} | null;
14901507
}
@@ -2539,6 +2556,98 @@ export namespace run_v2 {
25392556
);
25402557
}
25412558

2559+
/**
2560+
* Cancels an Execution.
2561+
*
2562+
* @param params - Parameters for request
2563+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2564+
* @param callback - Optional callback that handles the response.
2565+
* @returns A promise if used with async/await, or void if used with a callback.
2566+
*/
2567+
cancel(
2568+
params: Params$Resource$Projects$Locations$Jobs$Executions$Cancel,
2569+
options: StreamMethodOptions
2570+
): GaxiosPromise<Readable>;
2571+
cancel(
2572+
params?: Params$Resource$Projects$Locations$Jobs$Executions$Cancel,
2573+
options?: MethodOptions
2574+
): GaxiosPromise<Schema$GoogleLongrunningOperation>;
2575+
cancel(
2576+
params: Params$Resource$Projects$Locations$Jobs$Executions$Cancel,
2577+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
2578+
callback: BodyResponseCallback<Readable>
2579+
): void;
2580+
cancel(
2581+
params: Params$Resource$Projects$Locations$Jobs$Executions$Cancel,
2582+
options:
2583+
| MethodOptions
2584+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>,
2585+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
2586+
): void;
2587+
cancel(
2588+
params: Params$Resource$Projects$Locations$Jobs$Executions$Cancel,
2589+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
2590+
): void;
2591+
cancel(
2592+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
2593+
): void;
2594+
cancel(
2595+
paramsOrCallback?:
2596+
| Params$Resource$Projects$Locations$Jobs$Executions$Cancel
2597+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
2598+
| BodyResponseCallback<Readable>,
2599+
optionsOrCallback?:
2600+
| MethodOptions
2601+
| StreamMethodOptions
2602+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
2603+
| BodyResponseCallback<Readable>,
2604+
callback?:
2605+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
2606+
| BodyResponseCallback<Readable>
2607+
):
2608+
| void
2609+
| GaxiosPromise<Schema$GoogleLongrunningOperation>
2610+
| GaxiosPromise<Readable> {
2611+
let params = (paramsOrCallback ||
2612+
{}) as Params$Resource$Projects$Locations$Jobs$Executions$Cancel;
2613+
let options = (optionsOrCallback || {}) as MethodOptions;
2614+
2615+
if (typeof paramsOrCallback === 'function') {
2616+
callback = paramsOrCallback;
2617+
params =
2618+
{} as Params$Resource$Projects$Locations$Jobs$Executions$Cancel;
2619+
options = {};
2620+
}
2621+
2622+
if (typeof optionsOrCallback === 'function') {
2623+
callback = optionsOrCallback;
2624+
options = {};
2625+
}
2626+
2627+
const rootUrl = options.rootUrl || 'https://run.googleapis.com/';
2628+
const parameters = {
2629+
options: Object.assign(
2630+
{
2631+
url: (rootUrl + '/v2/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
2632+
method: 'POST',
2633+
},
2634+
options
2635+
),
2636+
params,
2637+
requiredParams: ['name'],
2638+
pathParams: ['name'],
2639+
context: this.context,
2640+
};
2641+
if (callback) {
2642+
createAPIRequest<Schema$GoogleLongrunningOperation>(
2643+
parameters,
2644+
callback as BodyResponseCallback<unknown>
2645+
);
2646+
} else {
2647+
return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
2648+
}
2649+
}
2650+
25422651
/**
25432652
* Deletes an Execution.
25442653
*
@@ -2817,6 +2926,18 @@ export namespace run_v2 {
28172926
}
28182927
}
28192928

2929+
export interface Params$Resource$Projects$Locations$Jobs$Executions$Cancel
2930+
extends StandardParameters {
2931+
/**
2932+
* Required. The name of the Execution to cancel. Format: projects/{project\}/locations/{location\}/jobs/{job\}/executions/{execution\}, where {project\} can be project id or number.
2933+
*/
2934+
name?: string;
2935+
2936+
/**
2937+
* Request body metadata
2938+
*/
2939+
requestBody?: Schema$GoogleCloudRunV2CancelExecutionRequest;
2940+
}
28202941
export interface Params$Resource$Projects$Locations$Jobs$Executions$Delete
28212942
extends StandardParameters {
28222943
/**

0 commit comments

Comments
 (0)
Please sign in to comment.