Skip to content

Commit f3bee48

Browse files
yoshi-automationsofisl
authored andcommitted
fix(batch): update the API
#### batch:v1 The following keys were changed: - resources.projects.resources.locations.resources.operations.methods.cancel.description - schemas.CloudLoggingOption.properties.useGenericTaskMonitoredResource.description - schemas.InstancePolicy.properties.reservation.description - schemas.InstancePolicyOrTemplate.properties.instanceTemplate.description - schemas.LogsPolicy.description - schemas.LogsPolicy.properties.cloudLoggingOption.description - schemas.LogsPolicy.properties.destination.description - schemas.LogsPolicy.properties.destination.enumDescriptions - schemas.LogsPolicy.properties.logsPath.description - schemas.OperationMetadata.properties.requestedCancellation.description
1 parent 4210af5 commit f3bee48

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

‎discovery/batch-v1.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@
404404
"operations": {
405405
"methods": {
406406
"cancel": {
407-
"description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
407+
"description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.",
408408
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
409409
"httpMethod": "POST",
410410
"id": "batch.projects.locations.operations.cancel",
@@ -561,7 +561,7 @@
561561
}
562562
}
563563
},
564-
"revision": "20240925",
564+
"revision": "20241204",
565565
"rootUrl": "https://batch.googleapis.com/",
566566
"schemas": {
567567
"Accelerator": {
@@ -1070,7 +1070,7 @@
10701070
"id": "CloudLoggingOption",
10711071
"properties": {
10721072
"useGenericTaskMonitoredResource": {
1073-
"description": "Optional. Set this flag to true to change the [monitored resource type](https://cloud.google.com/monitoring/api/resources) for Cloud Logging logs generated by this Batch job from the [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) type to the formerly used [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) type.",
1073+
"description": "Optional. Set this field to `true` to change the [monitored resource type](https://cloud.google.com/monitoring/api/resources) for Cloud Logging logs generated by this Batch job from the [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) type to the formerly used [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) type.",
10741074
"type": "boolean"
10751075
}
10761076
},
@@ -1264,7 +1264,7 @@
12641264
"type": "string"
12651265
},
12661266
"reservation": {
1267-
"description": "Optional. If specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation. Additionally, VMs will not consume any reservation if \"NO_RESERVATION\" is specified.",
1267+
"description": "Optional. If not specified (default), VMs will consume any applicable reservation. If \"NO_RESERVATION\" is specified, VMs will not consume any reservation. Otherwise, if specified, VMs will consume only the specified reservation.",
12681268
"type": "string"
12691269
}
12701270
},
@@ -1287,7 +1287,7 @@
12871287
"type": "boolean"
12881288
},
12891289
"instanceTemplate": {
1290-
"description": "Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid C++ keyword conflict. Batch only supports global instance templates. You can specify the global instance template as a full or partial URL.",
1290+
"description": "Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid C++ keyword conflict. Batch only supports global instance templates from the same project as the job. You can specify the global instance template as a full or partial URL.",
12911291
"type": "string"
12921292
},
12931293
"policy": {
@@ -1637,29 +1637,29 @@
16371637
"type": "object"
16381638
},
16391639
"LogsPolicy": {
1640-
"description": "LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved.",
1640+
"description": "LogsPolicy describes if and how a job's logs are preserved. Logs include information that is automatically written by the Batch service agent and any information that you configured the job's runnables to write to the `stdout` or `stderr` streams.",
16411641
"id": "LogsPolicy",
16421642
"properties": {
16431643
"cloudLoggingOption": {
16441644
"$ref": "CloudLoggingOption",
1645-
"description": "Optional. Additional settings for Cloud Logging. It will only take effect when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`."
1645+
"description": "Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging."
16461646
},
16471647
"destination": {
1648-
"description": "Where logs should be saved.",
1648+
"description": "If and where logs should be saved.",
16491649
"enum": [
16501650
"DESTINATION_UNSPECIFIED",
16511651
"CLOUD_LOGGING",
16521652
"PATH"
16531653
],
16541654
"enumDescriptions": [
1655-
"Logs are not preserved.",
1656-
"Logs are streamed to Cloud Logging.",
1657-
"Logs are saved to a file path."
1655+
"(Default) Logs are not preserved.",
1656+
"Logs are streamed to Cloud Logging. Optionally, you can configure additional settings in the `cloudLoggingOption` field.",
1657+
"Logs are saved to the file path specified in the `logsPath` field."
16581658
],
16591659
"type": "string"
16601660
},
16611661
"logsPath": {
1662-
"description": "The path to which logs are saved when the destination = PATH. This can be a local file path on the VM, or under the mount point of a Persistent Disk or Filestore, or a Cloud Storage path.",
1662+
"description": "When `destination` is set to `PATH`, you must set this field to the path where you want logs to be saved. This path can point to a local directory on the VM or (if congifured) a directory under the mount path of any Cloud Storage bucket, network file system (NFS), or writable persistent disk that is mounted to the job. For example, if the job has a bucket with `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the root directory of the `remotePath` of that bucket by setting this field to `/mnt/disks/my-bucket/`.",
16631663
"type": "string"
16641664
}
16651665
},
@@ -1835,7 +1835,7 @@
18351835
"type": "string"
18361836
},
18371837
"requestedCancellation": {
1838-
"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
1838+
"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
18391839
"readOnly": true,
18401840
"type": "boolean"
18411841
},

‎src/apis/batch/v1.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ export namespace batch_v1 {
504504
*/
505505
export interface Schema$CloudLoggingOption {
506506
/**
507-
* Optional. Set this flag to true to change the [monitored resource type](https://cloud.google.com/monitoring/api/resources) for Cloud Logging logs generated by this Batch job from the [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) type to the formerly used [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) type.
507+
* Optional. Set this field to `true` to change the [monitored resource type](https://cloud.google.com/monitoring/api/resources) for Cloud Logging logs generated by this Batch job from the [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) type to the formerly used [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) type.
508508
*/
509509
useGenericTaskMonitoredResource?: boolean | null;
510510
}
@@ -650,7 +650,7 @@ export namespace batch_v1 {
650650
*/
651651
provisioningModel?: string | null;
652652
/**
653-
* Optional. If specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation. Additionally, VMs will not consume any reservation if "NO_RESERVATION" is specified.
653+
* Optional. If not specified (default), VMs will consume any applicable reservation. If "NO_RESERVATION" is specified, VMs will not consume any reservation. Otherwise, if specified, VMs will consume only the specified reservation.
654654
*/
655655
reservation?: string | null;
656656
}
@@ -671,7 +671,7 @@ export namespace batch_v1 {
671671
*/
672672
installOpsAgent?: boolean | null;
673673
/**
674-
* Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid C++ keyword conflict. Batch only supports global instance templates. You can specify the global instance template as a full or partial URL.
674+
* Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid C++ keyword conflict. Batch only supports global instance templates from the same project as the job. You can specify the global instance template as a full or partial URL.
675675
*/
676676
instanceTemplate?: string | null;
677677
/**
@@ -898,19 +898,19 @@ export namespace batch_v1 {
898898
allowedLocations?: string[] | null;
899899
}
900900
/**
901-
* LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved.
901+
* LogsPolicy describes if and how a job's logs are preserved. Logs include information that is automatically written by the Batch service agent and any information that you configured the job's runnables to write to the `stdout` or `stderr` streams.
902902
*/
903903
export interface Schema$LogsPolicy {
904904
/**
905-
* Optional. Additional settings for Cloud Logging. It will only take effect when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`.
905+
* Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging.
906906
*/
907907
cloudLoggingOption?: Schema$CloudLoggingOption;
908908
/**
909-
* Where logs should be saved.
909+
* If and where logs should be saved.
910910
*/
911911
destination?: string | null;
912912
/**
913-
* The path to which logs are saved when the destination = PATH. This can be a local file path on the VM, or under the mount point of a Persistent Disk or Filestore, or a Cloud Storage path.
913+
* When `destination` is set to `PATH`, you must set this field to the path where you want logs to be saved. This path can point to a local directory on the VM or (if congifured) a directory under the mount path of any Cloud Storage bucket, network file system (NFS), or writable persistent disk that is mounted to the job. For example, if the job has a bucket with `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the root directory of the `remotePath` of that bucket by setting this field to `/mnt/disks/my-bucket/`.
914914
*/
915915
logsPath?: string | null;
916916
}
@@ -1012,7 +1012,7 @@ export namespace batch_v1 {
10121012
*/
10131013
endTime?: string | null;
10141014
/**
1015-
* Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1015+
* Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
10161016
*/
10171017
requestedCancellation?: boolean | null;
10181018
/**
@@ -2224,7 +2224,7 @@ export namespace batch_v1 {
22242224
}
22252225

22262226
/**
2227-
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
2227+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
22282228
*
22292229
* @param params - Parameters for request
22302230
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

0 commit comments

Comments
 (0)