|
1 | | -// Copyright 2025 Google LLC |
| 1 | +// Copyright 2026 Google LLC |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -58,6 +58,9 @@ message Job { |
58 | 58 |
|
59 | 59 | // Terminated due to an unrecoverable failure. |
60 | 60 | FAILED = 4; |
| 61 | + |
| 62 | + // Queued but not yet started. |
| 63 | + QUEUED = 5; |
61 | 64 | } |
62 | 65 |
|
63 | 66 | // Identifier. The resource name of the Job. job_id is unique |
@@ -123,6 +126,97 @@ message Job { |
123 | 126 | // object count and, if the object configuration is a prefix list, the bytes |
124 | 127 | // found from source. No transformations will be performed. |
125 | 128 | bool dry_run = 22 [(google.api.field_behavior) = OPTIONAL]; |
| 129 | + |
| 130 | + // Output only. If true, this Job operates on multiple buckets. Multibucket |
| 131 | + // jobs are subject to different quota limits than single-bucket jobs. |
| 132 | + bool is_multi_bucket_job = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 133 | +} |
| 134 | + |
| 135 | +// BucketOperation represents a bucket-level breakdown of a Job. |
| 136 | +message BucketOperation { |
| 137 | + option (google.api.resource) = { |
| 138 | + type: "storagebatchoperations.googleapis.com/BucketOperation" |
| 139 | + pattern: "projects/{project}/locations/{location}/jobs/{job}/bucketOperations/{bucket_operation}" |
| 140 | + plural: "bucketoperations" |
| 141 | + singular: "bucketOperation" |
| 142 | + }; |
| 143 | + |
| 144 | + // Describes state of the BucketOperation. |
| 145 | + enum State { |
| 146 | + // Default value. This value is unused. |
| 147 | + STATE_UNSPECIFIED = 0; |
| 148 | + |
| 149 | + // Created but not yet started. |
| 150 | + QUEUED = 1; |
| 151 | + |
| 152 | + // In progress. |
| 153 | + RUNNING = 2; |
| 154 | + |
| 155 | + // Completed successfully. |
| 156 | + SUCCEEDED = 3; |
| 157 | + |
| 158 | + // Cancelled by the user. |
| 159 | + CANCELED = 4; |
| 160 | + |
| 161 | + // Terminated due to an unrecoverable failure. |
| 162 | + FAILED = 5; |
| 163 | + } |
| 164 | + |
| 165 | + // Identifier. The resource name of the BucketOperation. This is defined by |
| 166 | + // the service. Format: |
| 167 | + // projects/{project}/locations/global/jobs/{job_id}/bucketOperations/{bucket_operation}. |
| 168 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 169 | + |
| 170 | + // The bucket name of the objects to be transformed in the BucketOperation. |
| 171 | + string bucket_name = 2; |
| 172 | + |
| 173 | + // Specifies objects to be transformed in the BucketOperation. |
| 174 | + oneof object_configuration { |
| 175 | + // Specifies objects matching a prefix set. |
| 176 | + PrefixList prefix_list = 3; |
| 177 | + |
| 178 | + // Specifies objects in a manifest file. |
| 179 | + Manifest manifest = 4; |
| 180 | + } |
| 181 | + |
| 182 | + // Action to be performed on the objects. |
| 183 | + oneof transformation { |
| 184 | + // Changes object hold status. |
| 185 | + PutObjectHold put_object_hold = 11; |
| 186 | + |
| 187 | + // Delete objects. |
| 188 | + DeleteObject delete_object = 12; |
| 189 | + |
| 190 | + // Updates object metadata. Allows updating fixed-key and custom metadata |
| 191 | + // and fixed-key metadata i.e. Cache-Control, Content-Disposition, |
| 192 | + // Content-Encoding, Content-Language, Content-Type, Custom-Time. |
| 193 | + PutMetadata put_metadata = 13; |
| 194 | + |
| 195 | + // Rewrite the object and updates metadata like KMS key. |
| 196 | + RewriteObject rewrite_object = 14; |
| 197 | + } |
| 198 | + |
| 199 | + // Output only. The time that the BucketOperation was created. |
| 200 | + google.protobuf.Timestamp create_time = 5 |
| 201 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 202 | + |
| 203 | + // Output only. The time that the BucketOperation was started. |
| 204 | + google.protobuf.Timestamp start_time = 6 |
| 205 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 206 | + |
| 207 | + // Output only. The time that the BucketOperation was completed. |
| 208 | + google.protobuf.Timestamp complete_time = 7 |
| 209 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 210 | + |
| 211 | + // Output only. Information about the progress of the bucket operation. |
| 212 | + Counters counters = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 213 | + |
| 214 | + // Output only. Summarizes errors encountered with sample error log entries. |
| 215 | + repeated ErrorSummary error_summaries = 9 |
| 216 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 217 | + |
| 218 | + // Output only. State of the BucketOperation. |
| 219 | + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; |
126 | 220 | } |
127 | 221 |
|
128 | 222 | // Describes list of buckets and their objects to be transformed. |
|
0 commit comments