Skip to content

Commit

Permalink
fix(batch): update the API
Browse files Browse the repository at this point in the history
#### 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
  • Loading branch information
yoshi-automation authored and sofisl committed Jan 29, 2025
1 parent 4210af5 commit f3bee48
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
26 changes: 13 additions & 13 deletions discovery/batch-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
"operations": {
"methods": {
"cancel": {
"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`.",
"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`.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
"httpMethod": "POST",
"id": "batch.projects.locations.operations.cancel",
Expand Down Expand Up @@ -561,7 +561,7 @@
}
}
},
"revision": "20240925",
"revision": "20241204",
"rootUrl": "https://batch.googleapis.com/",
"schemas": {
"Accelerator": {
Expand Down Expand Up @@ -1070,7 +1070,7 @@
"id": "CloudLoggingOption",
"properties": {
"useGenericTaskMonitoredResource": {
"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.",
"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.",
"type": "boolean"
}
},
Expand Down Expand Up @@ -1264,7 +1264,7 @@
"type": "string"
},
"reservation": {
"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.",
"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.",
"type": "string"
}
},
Expand All @@ -1287,7 +1287,7 @@
"type": "boolean"
},
"instanceTemplate": {
"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.",
"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.",
"type": "string"
},
"policy": {
Expand Down Expand Up @@ -1637,29 +1637,29 @@
"type": "object"
},
"LogsPolicy": {
"description": "LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved.",
"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.",
"id": "LogsPolicy",
"properties": {
"cloudLoggingOption": {
"$ref": "CloudLoggingOption",
"description": "Optional. Additional settings for Cloud Logging. It will only take effect when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`."
"description": "Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging."
},
"destination": {
"description": "Where logs should be saved.",
"description": "If and where logs should be saved.",
"enum": [
"DESTINATION_UNSPECIFIED",
"CLOUD_LOGGING",
"PATH"
],
"enumDescriptions": [
"Logs are not preserved.",
"Logs are streamed to Cloud Logging.",
"Logs are saved to a file path."
"(Default) Logs are not preserved.",
"Logs are streamed to Cloud Logging. Optionally, you can configure additional settings in the `cloudLoggingOption` field.",
"Logs are saved to the file path specified in the `logsPath` field."
],
"type": "string"
},
"logsPath": {
"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.",
"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/`.",
"type": "string"
}
},
Expand Down Expand Up @@ -1835,7 +1835,7 @@
"type": "string"
},
"requestedCancellation": {
"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`.",
"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`.",
"readOnly": true,
"type": "boolean"
},
Expand Down
18 changes: 9 additions & 9 deletions src/apis/batch/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ export namespace batch_v1 {
*/
export interface Schema$CloudLoggingOption {
/**
* 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.
* 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.
*/
useGenericTaskMonitoredResource?: boolean | null;
}
Expand Down Expand Up @@ -650,7 +650,7 @@ export namespace batch_v1 {
*/
provisioningModel?: string | null;
/**
* 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.
* 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.
*/
reservation?: string | null;
}
Expand All @@ -671,7 +671,7 @@ export namespace batch_v1 {
*/
installOpsAgent?: boolean | null;
/**
* 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.
* 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.
*/
instanceTemplate?: string | null;
/**
Expand Down Expand Up @@ -898,19 +898,19 @@ export namespace batch_v1 {
allowedLocations?: string[] | null;
}
/**
* LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved.
* 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.
*/
export interface Schema$LogsPolicy {
/**
* Optional. Additional settings for Cloud Logging. It will only take effect when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`.
* Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging.
*/
cloudLoggingOption?: Schema$CloudLoggingOption;
/**
* Where logs should be saved.
* If and where logs should be saved.
*/
destination?: string | null;
/**
* 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.
* 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/`.
*/
logsPath?: string | null;
}
Expand Down Expand Up @@ -1012,7 +1012,7 @@ export namespace batch_v1 {
*/
endTime?: string | null;
/**
* 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`.
* 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`.
*/
requestedCancellation?: boolean | null;
/**
Expand Down Expand Up @@ -2224,7 +2224,7 @@ export namespace batch_v1 {
}

/**
* 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`.
* 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`.
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
Expand Down

0 comments on commit f3bee48

Please sign in to comment.