Debian Codegraph @

docs/dyn/storagebatchoperations_v1.projects.locations.jobs.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="storagebatchoperations_v1.html">Storage Batch Operations API</a> . <a href="storagebatchoperations_v1.projects.html">projects</a> . <a href="storagebatchoperations_v1.projects.locations.html">locations</a> . <a href="storagebatchoperations_v1.projects.locations.jobs.html">jobs</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="storagebatchoperations_v1.projects.locations.jobs.bucketOperations.html">bucketOperations()</a></code>
79 </p>
80 <p class="firstline">Returns the bucketOperations Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p>
84 <p class="firstline">Cancels a batch job.</p>
85 <p class="toc_element">
86 <code><a href="#close">close()</a></code></p>
87 <p class="firstline">Close httplib2 connections.</p>
88 <p class="toc_element">
89 <code><a href="#create">create(parent, body=None, jobId=None, requestId=None, x__xgafv=None)</a></code></p>
90 <p class="firstline">Creates a batch job.</p>
91 <p class="toc_element">
92 <code><a href="#delete">delete(name, force=None, requestId=None, x__xgafv=None)</a></code></p>
93 <p class="firstline">Deletes a batch job.</p>
94 <p class="toc_element">
95 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
96 <p class="firstline">Gets a batch job.</p>
97 <p class="toc_element">
98 <code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
99 <p class="firstline">Lists Jobs in a given project.</p>
100 <p class="toc_element">
101 <code><a href="#list_next">list_next()</a></code></p>
102 <p class="firstline">Retrieves the next page of results.</p>
103 <h3>Method Details</h3>
104 <div class="method">
105 <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
106 <pre>Cancels a batch job.
107
108 Args:
109 name: string, Required. The `name` of the job to cancel. Format: `projects/{project_id}/locations/global/jobs/{job_id}`. (required)
110 body: object, The request body.
111 The object takes the form of:
112
113 { # Message for Job to Cancel
114 &quot;requestId&quot;: &quot;A String&quot;, # Optional. An optional request ID to identify requests. Specify a unique request ID in case you need to retry your request. Requests with same `request_id` are ignored for at least 60 minutes since the first request. The request ID must be a valid UUID with the exception that zero UUID isn&#x27;t supported (00000000-0000-0000-0000-000000000000).
115 }
116
117 x__xgafv: string, V1 error format.
118 Allowed values
119 1 - v1 error format
120 2 - v2 error format
121
122 Returns:
123 An object of the form:
124
125 { # Message for response to cancel Job.
126 }</pre>
127 </div>
128
129 <div class="method">
130 <code class="details" id="close">close()</code>
131 <pre>Close httplib2 connections.</pre>
132 </div>
133
134 <div class="method">
135 <code class="details" id="create">create(parent, body=None, jobId=None, requestId=None, x__xgafv=None)</code>
136 <pre>Creates a batch job.
137
138 Args:
139 parent: string, Required. The value for parent. (required)
140 body: object, The request body.
141 The object takes the form of:
142
143 { # The storage batch operations job description.
144 &quot;bucketList&quot;: { # Describes list of buckets and their objects to be transformed. # Specifies a list of buckets and their objects to be transformed.
145 &quot;buckets&quot;: [ # Required. List of buckets and their objects to be transformed. You can specify only one bucket per job. If multiple buckets are specified, an error occurs.
146 { # Describes configuration of a single bucket and its objects to be transformed.
147 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket name for the objects to be transformed.
148 &quot;manifest&quot;: { # Describes list of objects to be transformed. # Specifies objects in a manifest file.
149 &quot;manifestLocation&quot;: &quot;A String&quot;, # Required. Specify the manifest file location. The format of manifest location can be an absolute path to the object in the format of `gs://bucket_name/path/object_name`. For example, `gs://bucket_name/path/object_name.csv`. Alternatively, you can specify an absolute path with a single wildcard character in the file name, for example `gs://bucket_name/path/file_name*.csv`. If the manifest location is specified with a wildcard, objects in all manifest files matching the pattern will be acted upon. The manifest is a CSV file, uploaded to Cloud Storage, that contains one object or a list of objects that you want to process. Each row in the manifest must include the `bucket` and `name` of the object. You can optionally specify the `generation` of the object. If you don&#x27;t specify the `generation`, the current version of the object is used. You can optionally include a header row with the following format: `bucket,name,generation`. For example, bucket,name,generation bucket_1,object_1,generation_1 bucket_1,object_2,generation_2 bucket_1,object_3,generation_3 Note: The manifest file must specify only objects within the bucket provided to the job. Rows referencing objects in other buckets are ignored.
150 },
151 &quot;prefixList&quot;: { # Describes prefixes of objects to be transformed. # Specifies objects matching a prefix set.
152 &quot;includedObjectPrefixes&quot;: [ # Optional. Specify one or more object prefixes. For example: * To match one object, use a single prefix, `prefix1`. * To match multiple objects, use comma-separated prefixes, `prefix1, prefix2`. * To match all objects, use an empty prefix, `&#x27;&#x27;`
153 &quot;A String&quot;,
154 ],
155 },
156 },
157 ],
158 },
159 &quot;completeTime&quot;: &quot;A String&quot;, # Output only. The time that the job was completed.
160 &quot;counters&quot;: { # Describes details about the progress of the job. # Output only. Information about the progress of the job.
161 &quot;failedObjectCount&quot;: &quot;A String&quot;, # Output only. The number of objects that failed due to user errors or service errors.
162 &quot;objectCustomContextsCreated&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts created. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
163 &quot;objectCustomContextsDeleted&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts deleted. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
164 &quot;objectCustomContextsUpdated&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts updated. This counter tracks custom contexts where the key already existed, but the payload was modified. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
165 &quot;succeededObjectCount&quot;: &quot;A String&quot;, # Output only. Number of objects completed.
166 &quot;totalBytesFound&quot;: &quot;A String&quot;, # Output only. Number of bytes found from source. This field is only populated for jobs with a prefix list object configuration.
167 &quot;totalBytesTransformed&quot;: &quot;A String&quot;, # Output only. The total number of bytes affected by the transformation. For example, this counts bytes deleted for `DeleteObject` operations and bytes rewritten for `RewriteObject` operations.
168 &quot;totalObjectCount&quot;: &quot;A String&quot;, # Output only. Number of objects listed.
169 },
170 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the job was created.
171 &quot;deleteObject&quot;: { # Describes options to delete an object. # Delete objects.
172 &quot;permanentObjectDeletionEnabled&quot;: True or False, # Required. Controls deletion behavior when versioning is enabled for the object&#x27;s bucket. If true, both live and noncurrent objects will be permanently deleted. Otherwise live objects in versioned buckets will become noncurrent and objects that were already noncurrent will be skipped. This setting doesn&#x27;t have any impact on the Soft Delete feature. All objects deleted by this service can be be restored for the duration of the Soft Delete retention duration if enabled. If enabled and the manifest doesn&#x27;t specify an object&#x27;s generation, a `GetObjectMetadata` call is made to determine the live object generation.
173 },
174 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-provided description for the job. Maximum length: 1024 bytes when unicode-encoded.
175 &quot;dryRun&quot;: True or False, # Optional. If true, the job runs in dry run mode, returning the total object count and, if the object configuration is a prefix list, the bytes found from source. No transformations are performed.
176 &quot;errorSummaries&quot;: [ # Output only. Summarizes errors encountered with sample error log entries.
177 { # A summary of errors by error code, plus a count and sample error log entries.
178 &quot;errorCode&quot;: &quot;A String&quot;, # Required. The canonical error code.
179 &quot;errorCount&quot;: &quot;A String&quot;, # Required. Number of errors encountered per `error_code`.
180 &quot;errorLogEntries&quot;: [ # Required. Sample error logs.
181 { # An entry describing an error that has occurred.
182 &quot;errorDetails&quot;: [ # Optional. Output only. At most 5 error log entries are recorded for a given error code for a job.
183 &quot;A String&quot;,
184 ],
185 &quot;objectUri&quot;: &quot;A String&quot;, # Required. Output only. Object URL. e.g. gs://my_bucket/object.txt
186 },
187 ],
188 },
189 ],
190 &quot;isMultiBucketJob&quot;: True or False, # Output only. If true, this job operates on multiple buckets. Multi-bucket jobs are subject to different quota limits than single-bucket jobs.
191 &quot;loggingConfig&quot;: { # Specifies the Cloud Logging behavior. # Optional. Logging configuration.
192 &quot;logActionStates&quot;: [ # Required. States in which Action are logged.If empty, no logs are generated.
193 &quot;A String&quot;,
194 ],
195 &quot;logActions&quot;: [ # Required. Specifies the actions to be logged.
196 &quot;A String&quot;,
197 ],
198 },
199 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name of the job. Format: `projects/{project_id}/locations/global/jobs/{job_id}`. For example: `projects/123456/locations/global/jobs/job01`. `job_id` is unique in a given project.
200 &quot;projectSource&quot;: { # Describes the project source where the objects satisfying the filters will be transformed. # Specifies a project source and filters to identify objects to be transformed.
201 &quot;bucketFilters&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # Optional. Filters expressed in Common Expression Language (CEL) to apply to buckets to identify buckets with objects to be transformed.
202 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
203 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
204 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
205 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
206 },
207 &quot;dryRunJobId&quot;: &quot;A String&quot;, # Optional. The unique identifier of a dry run job to use as the baseline for the current job. Specifying this ID ensures the job is executed against the same set of objects validated during the dry run. The value corresponds to the {job_id} segment of the resource name: `projects/{project_id}/locations/{location}/jobs/{job_id}`.
208 &quot;insightsDatasetConfig&quot;: &quot;A String&quot;, # Required. The resource identifier of the Storage Insights dataset configuration. Storage batch operations uses the latest snapshot from this dataset as the source to list and filter target objects. Format: `projects/{project_id}/locations/{location}/datasetConfigs/{dataset_config}`.
209 &quot;objectFilters&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # Optional. Filters expressed in Common Expression Language (CEL) to apply to objects to identify objects to be transformed.
210 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
211 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
212 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
213 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
214 },
215 &quot;project&quot;: &quot;A String&quot;, # Required. Project name of the objects to be transformed. e.g. projects/my-project or projects/123456.
216 &quot;snapshotTime&quot;: &quot;A String&quot;, # Output only. The snapshot time used by the job to read the Storage Insights dataset for bucket and object discovery. This field is populated by the service and reflects the exact timestamp of the dataset snapshot used.
217 &quot;targetLocations&quot;: { # Describes the Cloud Storage locations to include in a ProjectSource job. # Optional. Specifies the Cloud Storage locations to include in the job. If provided, only buckets and objects within these locations will be discovered from the Storage Insights dataset as configured in the `insights_dataset_config`. If omitted, the job will discover buckets and objects from all locations configured in the `insights_dataset_config`.
218 &quot;locations&quot;: [ # Required. REQUIRED. A list of Cloud Storage locations (e.g., `us-central1`) to include in the job. If `snapshot_time` is omitted, the job automatically defaults to the most recent snapshot timestamp that is successfully populated in BOTH the `object_attributes_view` and `bucket_attributes_view` across ALL specified locations. For details on Storage Insights dataset snapshots and views, see: https://docs.cloud.google.com/storage/docs/insights/dataset-tables-and-schemas#schema
219 &quot;A String&quot;,
220 ],
221 &quot;snapshotTime&quot;: &quot;A String&quot;, # Optional. OPTIONAL. The exact Storage Insights snapshot timestamp to use for the job compatible with the RFC 3339 format (e.g., `2024-01-02T03:04:05Z`). If specified, this exact snapshot must exist in BOTH the `object_attributes_view` and `bucket_attributes_view` for every location listed in `locations`. If the snapshot is missing from either view in any of the locations, the job fails.
222 },
223 },
224 &quot;putMetadata&quot;: { # Describes options for object metadata update. # Updates object metadata. Allows updating fixed-key and custom metadata. For example, `Cache-Control`, `Content-Disposition`, `Content-Encoding`, `Content-Language`, `Content-Type`, `Custom-Time`, and `Retention configuration`.
225 &quot;cacheControl&quot;: &quot;A String&quot;, # Optional. Updates the objects `Cache-Control` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. Additionally, the value for `Custom-Time` can&#x27;t decrease. For details, see [Cache-Control](https://cloud.google.com/storage/docs/metadata#caching_data).
226 &quot;contentDisposition&quot;: &quot;A String&quot;, # Optional. Updates objects `Content-Disposition` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Disposition](https://cloud.google.com/storage/docs/metadata#content-disposition).
227 &quot;contentEncoding&quot;: &quot;A String&quot;, # Optional. Updates the objects `Content-Encoding` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Encoding](https://cloud.google.com/storage/docs/metadata#content-encoding).
228 &quot;contentLanguage&quot;: &quot;A String&quot;, # Optional. Updates the objects `Content-Language` fixed metadata. Metadata values must use ISO 639-1 language codes. The maximum length for metadata values is 100 characters. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Language](https://cloud.google.com/storage/docs/metadata#content-language).
229 &quot;contentType&quot;: &quot;A String&quot;, # Optional. Updates objects `Content-Type` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Type](https://cloud.google.com/storage/docs/metadata#content-type).
230 &quot;customMetadata&quot;: { # Optional. Updates the object&#x27;s custom metadata. This operation adds or sets individual custom metadata key-value pairs. Keys specified with empty values have their values cleared. Existing custom metadata keys not included in the request remain unchanged. For details, see [Custom metadata](https://cloud.google.com/storage/docs/metadata#custom-metadata).
231 &quot;a_key&quot;: &quot;A String&quot;,
232 },
233 &quot;customTime&quot;: &quot;A String&quot;, # Optional. Updates the objects `Custom-Time` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. The time must be specified in RFC 3339 format, for example `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS&#x27;Z&#x27;` or `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS.SS&#x27;Z&#x27;`. For details, see [Custom-Time](https://cloud.google.com/storage/docs/metadata#custom-time).
234 &quot;objectRetention&quot;: { # Describes options for object retention update. # Optional. Updates an object&#x27;s retention configuration. To clear an object&#x27;s retention, both `retentionMode` and `retainUntilTime` must be left unset (omitted). Setting `retentionMode` to `RETENTION_MODE_UNSPECIFIED` is treated as a no-op. Unlike an unset field, it doesn&#x27;t modify or clear the retention settings. An object with `LOCKED` retention mode can&#x27;t have its retention cleared or its `retainUntilTime` reduced. For more information, see [Object retention](https://cloud.google.com/storage/docs/batch-operations/create-manage-batch-operation-jobs#retain-until-time).
235 &quot;retainUntilTime&quot;: &quot;A String&quot;, # Required. The object&#x27;s retention expiration time, during which, the object is protected from being deleted or overwritten. The time must be specified in RFC 3339 format, for example `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS&#x27;Z&#x27;` or `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS.SS&#x27;Z&#x27;`. To clear an object&#x27;s retention, both `retentionMode` and `retainUntilTime` must be left unset (omitted). Setting `retentionMode` to `RETENTION_MODE_UNSPECIFIED` is treated as a no-op. Unlike an unset field, it doesn&#x27;t modify or clear the retention settings.
236 &quot;retentionMode&quot;: &quot;A String&quot;, # Required. The retention mode.
237 },
238 },
239 &quot;putObjectHold&quot;: { # Describes options to update object hold. # Changes object hold status.
240 &quot;eventBasedHold&quot;: &quot;A String&quot;, # Required. Updates object event based holds state. When object event based hold is set, object can&#x27;t be deleted or replaced. Resets object&#x27;s time in the bucket for the purposes of the retention period.
241 &quot;temporaryHold&quot;: &quot;A String&quot;, # Required. Updates object temporary holds state. When object temporary hold is set, object can&#x27;t be deleted or replaced.
242 },
243 &quot;rewriteObject&quot;: { # Describes options for object rewrite. # Rewrite the object and updates metadata like KMS key.
244 &quot;kmsKey&quot;: &quot;A String&quot;, # Optional. Resource name of the Cloud KMS key that is used to encrypt the object. The Cloud KMS key must be located in same location as the object. For details, see https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key Format: `projects/{project_id}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` For example: `projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key`. The object will be rewritten and set with the specified KMS key.
245 &quot;storageClass&quot;: &quot;A String&quot;, # Optional. Rewrites the object to the specified storage class. Setting this field will perform a full byte copy of the object if the storage class is different from the object&#x27;s current storage class. If Autoclass is enabled on the bucket, storage class changes are ignored by Cloud Storage.
246 },
247 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that the job was scheduled.
248 &quot;setObjectAcls&quot;: { # Describes options for setting object ACLs. # Updates object ACLs.
249 &quot;accessControlsUpdates&quot;: { # Represents updates to existing access-control entries on an object. # Required. Add, update, or remove grants from the object&#x27;s existing ACLs.
250 &quot;grants&quot;: [ # Optional. Grants to add or update. If a grant for same entity exists, its role is updated.
251 { # Represents an access control entry on an object.
252 &quot;entity&quot;: &quot;A String&quot;, # Required. The entity holding the permission, in one of the following forms: * `allUsers` * `allAuthenticatedUsers`
253 &quot;role&quot;: &quot;A String&quot;, # Required. The role to grant. Acceptable values are: * `READER` - gives read access to the object. * `OWNER` - gives owner access to the object.
254 },
255 ],
256 &quot;removeEntities&quot;: [ # Optional. Entities for which all grants should be removed. An entity can&#x27;t be in both `grants` and `remove_entities`.
257 &quot;A String&quot;,
258 ],
259 },
260 },
261 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
262 &quot;updateObjectCustomContext&quot;: { # Describes options to update object custom contexts. # Update object custom context.
263 &quot;clearAll&quot;: True or False, # If set, must be set to true and all existing object custom contexts are deleted.
264 &quot;customContextUpdates&quot;: { # Describes a collection of updates to apply to custom contexts identified by key. # A collection of updates to apply to specific custom contexts. Use this to add, update or delete individual contexts by key.
265 &quot;keysToClear&quot;: [ # Optional. Custom contexts to clear by key. A key can&#x27;t be present in both `updates` and `keys_to_clear`.
266 &quot;A String&quot;,
267 ],
268 &quot;updates&quot;: { # Optional. Insert or update the existing custom contexts.
269 &quot;a_key&quot;: { # Describes the payload of a user-defined object custom context.
270 &quot;value&quot;: &quot;A String&quot;, # The value of the object custom context. If set, `value` can&#x27;t be an empty string because it is a required field in custom context. If unset, `value` is ignored and no changes are made to the `value` field of the custom context payload.
271 },
272 },
273 },
274 },
275 }
276
277 jobId: string, Required. A unique identifier for the job. `job_id` must be up to 128 characters and must include only characters available in DNS names, as defined by RFC-1123.
278 requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID in case you need to retry your request. Requests with same `request_id` are ignored for at least 60 minutes since the first request. The request ID must be a valid UUID with the exception that zero UUID isn&#x27;t supported (00000000-0000-0000-0000-000000000000).
279 x__xgafv: string, V1 error format.
280 Allowed values
281 1 - v1 error format
282 2 - v2 error format
283
284 Returns:
285 An object of the form:
286
287 { # This resource represents a long-running operation that is the result of a network API call.
288 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
289 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
290 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
291 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
292 {
293 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
294 },
295 ],
296 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
297 },
298 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
299 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
300 },
301 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
302 &quot;response&quot;: { # 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`.
303 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
304 },
305 }</pre>
306 </div>
307
308 <div class="method">
309 <code class="details" id="delete">delete(name, force=None, requestId=None, x__xgafv=None)</code>
310 <pre>Deletes a batch job.
311
312 Args:
313 name: string, Required. The `name` of the job to delete. Format: `projects/{project_id}/locations/global/jobs/{job_id}`. (required)
314 force: boolean, Optional. If set to true, any child bucket operations of the job are deleted. We recommend setting this to `true`. You can&#x27;t mutate bucket operations directly, so only the `jobs.delete` permission is required to delete a job (and its child bucket operations).
315 requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID in case you need to retry your request. Requests with same `request_id` are ignored for at least 60 minutes since the first request. The request ID must be a valid UUID with the exception that zero UUID isn&#x27;t supported (00000000-0000-0000-0000-000000000000).
316 x__xgafv: string, V1 error format.
317 Allowed values
318 1 - v1 error format
319 2 - v2 error format
320
321 Returns:
322 An object of the form:
323
324 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
325 }</pre>
326 </div>
327
328 <div class="method">
329 <code class="details" id="get">get(name, x__xgafv=None)</code>
330 <pre>Gets a batch job.
331
332 Args:
333 name: string, Required. The `name` of the job to retrieve. Format: `projects/{project_id}/locations/global/jobs/{job_id}`. (required)
334 x__xgafv: string, V1 error format.
335 Allowed values
336 1 - v1 error format
337 2 - v2 error format
338
339 Returns:
340 An object of the form:
341
342 { # The storage batch operations job description.
343 &quot;bucketList&quot;: { # Describes list of buckets and their objects to be transformed. # Specifies a list of buckets and their objects to be transformed.
344 &quot;buckets&quot;: [ # Required. List of buckets and their objects to be transformed. You can specify only one bucket per job. If multiple buckets are specified, an error occurs.
345 { # Describes configuration of a single bucket and its objects to be transformed.
346 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket name for the objects to be transformed.
347 &quot;manifest&quot;: { # Describes list of objects to be transformed. # Specifies objects in a manifest file.
348 &quot;manifestLocation&quot;: &quot;A String&quot;, # Required. Specify the manifest file location. The format of manifest location can be an absolute path to the object in the format of `gs://bucket_name/path/object_name`. For example, `gs://bucket_name/path/object_name.csv`. Alternatively, you can specify an absolute path with a single wildcard character in the file name, for example `gs://bucket_name/path/file_name*.csv`. If the manifest location is specified with a wildcard, objects in all manifest files matching the pattern will be acted upon. The manifest is a CSV file, uploaded to Cloud Storage, that contains one object or a list of objects that you want to process. Each row in the manifest must include the `bucket` and `name` of the object. You can optionally specify the `generation` of the object. If you don&#x27;t specify the `generation`, the current version of the object is used. You can optionally include a header row with the following format: `bucket,name,generation`. For example, bucket,name,generation bucket_1,object_1,generation_1 bucket_1,object_2,generation_2 bucket_1,object_3,generation_3 Note: The manifest file must specify only objects within the bucket provided to the job. Rows referencing objects in other buckets are ignored.
349 },
350 &quot;prefixList&quot;: { # Describes prefixes of objects to be transformed. # Specifies objects matching a prefix set.
351 &quot;includedObjectPrefixes&quot;: [ # Optional. Specify one or more object prefixes. For example: * To match one object, use a single prefix, `prefix1`. * To match multiple objects, use comma-separated prefixes, `prefix1, prefix2`. * To match all objects, use an empty prefix, `&#x27;&#x27;`
352 &quot;A String&quot;,
353 ],
354 },
355 },
356 ],
357 },
358 &quot;completeTime&quot;: &quot;A String&quot;, # Output only. The time that the job was completed.
359 &quot;counters&quot;: { # Describes details about the progress of the job. # Output only. Information about the progress of the job.
360 &quot;failedObjectCount&quot;: &quot;A String&quot;, # Output only. The number of objects that failed due to user errors or service errors.
361 &quot;objectCustomContextsCreated&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts created. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
362 &quot;objectCustomContextsDeleted&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts deleted. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
363 &quot;objectCustomContextsUpdated&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts updated. This counter tracks custom contexts where the key already existed, but the payload was modified. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
364 &quot;succeededObjectCount&quot;: &quot;A String&quot;, # Output only. Number of objects completed.
365 &quot;totalBytesFound&quot;: &quot;A String&quot;, # Output only. Number of bytes found from source. This field is only populated for jobs with a prefix list object configuration.
366 &quot;totalBytesTransformed&quot;: &quot;A String&quot;, # Output only. The total number of bytes affected by the transformation. For example, this counts bytes deleted for `DeleteObject` operations and bytes rewritten for `RewriteObject` operations.
367 &quot;totalObjectCount&quot;: &quot;A String&quot;, # Output only. Number of objects listed.
368 },
369 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the job was created.
370 &quot;deleteObject&quot;: { # Describes options to delete an object. # Delete objects.
371 &quot;permanentObjectDeletionEnabled&quot;: True or False, # Required. Controls deletion behavior when versioning is enabled for the object&#x27;s bucket. If true, both live and noncurrent objects will be permanently deleted. Otherwise live objects in versioned buckets will become noncurrent and objects that were already noncurrent will be skipped. This setting doesn&#x27;t have any impact on the Soft Delete feature. All objects deleted by this service can be be restored for the duration of the Soft Delete retention duration if enabled. If enabled and the manifest doesn&#x27;t specify an object&#x27;s generation, a `GetObjectMetadata` call is made to determine the live object generation.
372 },
373 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-provided description for the job. Maximum length: 1024 bytes when unicode-encoded.
374 &quot;dryRun&quot;: True or False, # Optional. If true, the job runs in dry run mode, returning the total object count and, if the object configuration is a prefix list, the bytes found from source. No transformations are performed.
375 &quot;errorSummaries&quot;: [ # Output only. Summarizes errors encountered with sample error log entries.
376 { # A summary of errors by error code, plus a count and sample error log entries.
377 &quot;errorCode&quot;: &quot;A String&quot;, # Required. The canonical error code.
378 &quot;errorCount&quot;: &quot;A String&quot;, # Required. Number of errors encountered per `error_code`.
379 &quot;errorLogEntries&quot;: [ # Required. Sample error logs.
380 { # An entry describing an error that has occurred.
381 &quot;errorDetails&quot;: [ # Optional. Output only. At most 5 error log entries are recorded for a given error code for a job.
382 &quot;A String&quot;,
383 ],
384 &quot;objectUri&quot;: &quot;A String&quot;, # Required. Output only. Object URL. e.g. gs://my_bucket/object.txt
385 },
386 ],
387 },
388 ],
389 &quot;isMultiBucketJob&quot;: True or False, # Output only. If true, this job operates on multiple buckets. Multi-bucket jobs are subject to different quota limits than single-bucket jobs.
390 &quot;loggingConfig&quot;: { # Specifies the Cloud Logging behavior. # Optional. Logging configuration.
391 &quot;logActionStates&quot;: [ # Required. States in which Action are logged.If empty, no logs are generated.
392 &quot;A String&quot;,
393 ],
394 &quot;logActions&quot;: [ # Required. Specifies the actions to be logged.
395 &quot;A String&quot;,
396 ],
397 },
398 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name of the job. Format: `projects/{project_id}/locations/global/jobs/{job_id}`. For example: `projects/123456/locations/global/jobs/job01`. `job_id` is unique in a given project.
399 &quot;projectSource&quot;: { # Describes the project source where the objects satisfying the filters will be transformed. # Specifies a project source and filters to identify objects to be transformed.
400 &quot;bucketFilters&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # Optional. Filters expressed in Common Expression Language (CEL) to apply to buckets to identify buckets with objects to be transformed.
401 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
402 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
403 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
404 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
405 },
406 &quot;dryRunJobId&quot;: &quot;A String&quot;, # Optional. The unique identifier of a dry run job to use as the baseline for the current job. Specifying this ID ensures the job is executed against the same set of objects validated during the dry run. The value corresponds to the {job_id} segment of the resource name: `projects/{project_id}/locations/{location}/jobs/{job_id}`.
407 &quot;insightsDatasetConfig&quot;: &quot;A String&quot;, # Required. The resource identifier of the Storage Insights dataset configuration. Storage batch operations uses the latest snapshot from this dataset as the source to list and filter target objects. Format: `projects/{project_id}/locations/{location}/datasetConfigs/{dataset_config}`.
408 &quot;objectFilters&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # Optional. Filters expressed in Common Expression Language (CEL) to apply to objects to identify objects to be transformed.
409 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
410 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
411 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
412 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
413 },
414 &quot;project&quot;: &quot;A String&quot;, # Required. Project name of the objects to be transformed. e.g. projects/my-project or projects/123456.
415 &quot;snapshotTime&quot;: &quot;A String&quot;, # Output only. The snapshot time used by the job to read the Storage Insights dataset for bucket and object discovery. This field is populated by the service and reflects the exact timestamp of the dataset snapshot used.
416 &quot;targetLocations&quot;: { # Describes the Cloud Storage locations to include in a ProjectSource job. # Optional. Specifies the Cloud Storage locations to include in the job. If provided, only buckets and objects within these locations will be discovered from the Storage Insights dataset as configured in the `insights_dataset_config`. If omitted, the job will discover buckets and objects from all locations configured in the `insights_dataset_config`.
417 &quot;locations&quot;: [ # Required. REQUIRED. A list of Cloud Storage locations (e.g., `us-central1`) to include in the job. If `snapshot_time` is omitted, the job automatically defaults to the most recent snapshot timestamp that is successfully populated in BOTH the `object_attributes_view` and `bucket_attributes_view` across ALL specified locations. For details on Storage Insights dataset snapshots and views, see: https://docs.cloud.google.com/storage/docs/insights/dataset-tables-and-schemas#schema
418 &quot;A String&quot;,
419 ],
420 &quot;snapshotTime&quot;: &quot;A String&quot;, # Optional. OPTIONAL. The exact Storage Insights snapshot timestamp to use for the job compatible with the RFC 3339 format (e.g., `2024-01-02T03:04:05Z`). If specified, this exact snapshot must exist in BOTH the `object_attributes_view` and `bucket_attributes_view` for every location listed in `locations`. If the snapshot is missing from either view in any of the locations, the job fails.
421 },
422 },
423 &quot;putMetadata&quot;: { # Describes options for object metadata update. # Updates object metadata. Allows updating fixed-key and custom metadata. For example, `Cache-Control`, `Content-Disposition`, `Content-Encoding`, `Content-Language`, `Content-Type`, `Custom-Time`, and `Retention configuration`.
424 &quot;cacheControl&quot;: &quot;A String&quot;, # Optional. Updates the objects `Cache-Control` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. Additionally, the value for `Custom-Time` can&#x27;t decrease. For details, see [Cache-Control](https://cloud.google.com/storage/docs/metadata#caching_data).
425 &quot;contentDisposition&quot;: &quot;A String&quot;, # Optional. Updates objects `Content-Disposition` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Disposition](https://cloud.google.com/storage/docs/metadata#content-disposition).
426 &quot;contentEncoding&quot;: &quot;A String&quot;, # Optional. Updates the objects `Content-Encoding` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Encoding](https://cloud.google.com/storage/docs/metadata#content-encoding).
427 &quot;contentLanguage&quot;: &quot;A String&quot;, # Optional. Updates the objects `Content-Language` fixed metadata. Metadata values must use ISO 639-1 language codes. The maximum length for metadata values is 100 characters. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Language](https://cloud.google.com/storage/docs/metadata#content-language).
428 &quot;contentType&quot;: &quot;A String&quot;, # Optional. Updates objects `Content-Type` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Type](https://cloud.google.com/storage/docs/metadata#content-type).
429 &quot;customMetadata&quot;: { # Optional. Updates the object&#x27;s custom metadata. This operation adds or sets individual custom metadata key-value pairs. Keys specified with empty values have their values cleared. Existing custom metadata keys not included in the request remain unchanged. For details, see [Custom metadata](https://cloud.google.com/storage/docs/metadata#custom-metadata).
430 &quot;a_key&quot;: &quot;A String&quot;,
431 },
432 &quot;customTime&quot;: &quot;A String&quot;, # Optional. Updates the objects `Custom-Time` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. The time must be specified in RFC 3339 format, for example `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS&#x27;Z&#x27;` or `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS.SS&#x27;Z&#x27;`. For details, see [Custom-Time](https://cloud.google.com/storage/docs/metadata#custom-time).
433 &quot;objectRetention&quot;: { # Describes options for object retention update. # Optional. Updates an object&#x27;s retention configuration. To clear an object&#x27;s retention, both `retentionMode` and `retainUntilTime` must be left unset (omitted). Setting `retentionMode` to `RETENTION_MODE_UNSPECIFIED` is treated as a no-op. Unlike an unset field, it doesn&#x27;t modify or clear the retention settings. An object with `LOCKED` retention mode can&#x27;t have its retention cleared or its `retainUntilTime` reduced. For more information, see [Object retention](https://cloud.google.com/storage/docs/batch-operations/create-manage-batch-operation-jobs#retain-until-time).
434 &quot;retainUntilTime&quot;: &quot;A String&quot;, # Required. The object&#x27;s retention expiration time, during which, the object is protected from being deleted or overwritten. The time must be specified in RFC 3339 format, for example `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS&#x27;Z&#x27;` or `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS.SS&#x27;Z&#x27;`. To clear an object&#x27;s retention, both `retentionMode` and `retainUntilTime` must be left unset (omitted). Setting `retentionMode` to `RETENTION_MODE_UNSPECIFIED` is treated as a no-op. Unlike an unset field, it doesn&#x27;t modify or clear the retention settings.
435 &quot;retentionMode&quot;: &quot;A String&quot;, # Required. The retention mode.
436 },
437 },
438 &quot;putObjectHold&quot;: { # Describes options to update object hold. # Changes object hold status.
439 &quot;eventBasedHold&quot;: &quot;A String&quot;, # Required. Updates object event based holds state. When object event based hold is set, object can&#x27;t be deleted or replaced. Resets object&#x27;s time in the bucket for the purposes of the retention period.
440 &quot;temporaryHold&quot;: &quot;A String&quot;, # Required. Updates object temporary holds state. When object temporary hold is set, object can&#x27;t be deleted or replaced.
441 },
442 &quot;rewriteObject&quot;: { # Describes options for object rewrite. # Rewrite the object and updates metadata like KMS key.
443 &quot;kmsKey&quot;: &quot;A String&quot;, # Optional. Resource name of the Cloud KMS key that is used to encrypt the object. The Cloud KMS key must be located in same location as the object. For details, see https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key Format: `projects/{project_id}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` For example: `projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key`. The object will be rewritten and set with the specified KMS key.
444 &quot;storageClass&quot;: &quot;A String&quot;, # Optional. Rewrites the object to the specified storage class. Setting this field will perform a full byte copy of the object if the storage class is different from the object&#x27;s current storage class. If Autoclass is enabled on the bucket, storage class changes are ignored by Cloud Storage.
445 },
446 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that the job was scheduled.
447 &quot;setObjectAcls&quot;: { # Describes options for setting object ACLs. # Updates object ACLs.
448 &quot;accessControlsUpdates&quot;: { # Represents updates to existing access-control entries on an object. # Required. Add, update, or remove grants from the object&#x27;s existing ACLs.
449 &quot;grants&quot;: [ # Optional. Grants to add or update. If a grant for same entity exists, its role is updated.
450 { # Represents an access control entry on an object.
451 &quot;entity&quot;: &quot;A String&quot;, # Required. The entity holding the permission, in one of the following forms: * `allUsers` * `allAuthenticatedUsers`
452 &quot;role&quot;: &quot;A String&quot;, # Required. The role to grant. Acceptable values are: * `READER` - gives read access to the object. * `OWNER` - gives owner access to the object.
453 },
454 ],
455 &quot;removeEntities&quot;: [ # Optional. Entities for which all grants should be removed. An entity can&#x27;t be in both `grants` and `remove_entities`.
456 &quot;A String&quot;,
457 ],
458 },
459 },
460 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
461 &quot;updateObjectCustomContext&quot;: { # Describes options to update object custom contexts. # Update object custom context.
462 &quot;clearAll&quot;: True or False, # If set, must be set to true and all existing object custom contexts are deleted.
463 &quot;customContextUpdates&quot;: { # Describes a collection of updates to apply to custom contexts identified by key. # A collection of updates to apply to specific custom contexts. Use this to add, update or delete individual contexts by key.
464 &quot;keysToClear&quot;: [ # Optional. Custom contexts to clear by key. A key can&#x27;t be present in both `updates` and `keys_to_clear`.
465 &quot;A String&quot;,
466 ],
467 &quot;updates&quot;: { # Optional. Insert or update the existing custom contexts.
468 &quot;a_key&quot;: { # Describes the payload of a user-defined object custom context.
469 &quot;value&quot;: &quot;A String&quot;, # The value of the object custom context. If set, `value` can&#x27;t be an empty string because it is a required field in custom context. If unset, `value` is ignored and no changes are made to the `value` field of the custom context payload.
470 },
471 },
472 },
473 },
474 }</pre>
475 </div>
476
477 <div class="method">
478 <code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
479 <pre>Lists Jobs in a given project.
480
481 Args:
482 parent: string, Required. Format: projects/{project_id}/locations/global. (required)
483 filter: string, Optional. Filters results as defined by https://google.aip.dev/160.
484 orderBy: string, Optional. Field to sort by. Supported fields are `name` and `create_time`.
485 pageSize: integer, Optional. The list page size. The default page size is 100.
486 pageToken: string, Optional. The list page token.
487 x__xgafv: string, V1 error format.
488 Allowed values
489 1 - v1 error format
490 2 - v2 error format
491
492 Returns:
493 An object of the form:
494
495 { # Message for response to listing Jobs
496 &quot;jobs&quot;: [ # A list of storage batch jobs.
497 { # The storage batch operations job description.
498 &quot;bucketList&quot;: { # Describes list of buckets and their objects to be transformed. # Specifies a list of buckets and their objects to be transformed.
499 &quot;buckets&quot;: [ # Required. List of buckets and their objects to be transformed. You can specify only one bucket per job. If multiple buckets are specified, an error occurs.
500 { # Describes configuration of a single bucket and its objects to be transformed.
501 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket name for the objects to be transformed.
502 &quot;manifest&quot;: { # Describes list of objects to be transformed. # Specifies objects in a manifest file.
503 &quot;manifestLocation&quot;: &quot;A String&quot;, # Required. Specify the manifest file location. The format of manifest location can be an absolute path to the object in the format of `gs://bucket_name/path/object_name`. For example, `gs://bucket_name/path/object_name.csv`. Alternatively, you can specify an absolute path with a single wildcard character in the file name, for example `gs://bucket_name/path/file_name*.csv`. If the manifest location is specified with a wildcard, objects in all manifest files matching the pattern will be acted upon. The manifest is a CSV file, uploaded to Cloud Storage, that contains one object or a list of objects that you want to process. Each row in the manifest must include the `bucket` and `name` of the object. You can optionally specify the `generation` of the object. If you don&#x27;t specify the `generation`, the current version of the object is used. You can optionally include a header row with the following format: `bucket,name,generation`. For example, bucket,name,generation bucket_1,object_1,generation_1 bucket_1,object_2,generation_2 bucket_1,object_3,generation_3 Note: The manifest file must specify only objects within the bucket provided to the job. Rows referencing objects in other buckets are ignored.
504 },
505 &quot;prefixList&quot;: { # Describes prefixes of objects to be transformed. # Specifies objects matching a prefix set.
506 &quot;includedObjectPrefixes&quot;: [ # Optional. Specify one or more object prefixes. For example: * To match one object, use a single prefix, `prefix1`. * To match multiple objects, use comma-separated prefixes, `prefix1, prefix2`. * To match all objects, use an empty prefix, `&#x27;&#x27;`
507 &quot;A String&quot;,
508 ],
509 },
510 },
511 ],
512 },
513 &quot;completeTime&quot;: &quot;A String&quot;, # Output only. The time that the job was completed.
514 &quot;counters&quot;: { # Describes details about the progress of the job. # Output only. Information about the progress of the job.
515 &quot;failedObjectCount&quot;: &quot;A String&quot;, # Output only. The number of objects that failed due to user errors or service errors.
516 &quot;objectCustomContextsCreated&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts created. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
517 &quot;objectCustomContextsDeleted&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts deleted. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
518 &quot;objectCustomContextsUpdated&quot;: &quot;A String&quot;, # Output only. Number of object custom contexts updated. This counter tracks custom contexts where the key already existed, but the payload was modified. This field is only populated for jobs with the UpdateObjectCustomContext transformation.
519 &quot;succeededObjectCount&quot;: &quot;A String&quot;, # Output only. Number of objects completed.
520 &quot;totalBytesFound&quot;: &quot;A String&quot;, # Output only. Number of bytes found from source. This field is only populated for jobs with a prefix list object configuration.
521 &quot;totalBytesTransformed&quot;: &quot;A String&quot;, # Output only. The total number of bytes affected by the transformation. For example, this counts bytes deleted for `DeleteObject` operations and bytes rewritten for `RewriteObject` operations.
522 &quot;totalObjectCount&quot;: &quot;A String&quot;, # Output only. Number of objects listed.
523 },
524 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the job was created.
525 &quot;deleteObject&quot;: { # Describes options to delete an object. # Delete objects.
526 &quot;permanentObjectDeletionEnabled&quot;: True or False, # Required. Controls deletion behavior when versioning is enabled for the object&#x27;s bucket. If true, both live and noncurrent objects will be permanently deleted. Otherwise live objects in versioned buckets will become noncurrent and objects that were already noncurrent will be skipped. This setting doesn&#x27;t have any impact on the Soft Delete feature. All objects deleted by this service can be be restored for the duration of the Soft Delete retention duration if enabled. If enabled and the manifest doesn&#x27;t specify an object&#x27;s generation, a `GetObjectMetadata` call is made to determine the live object generation.
527 },
528 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-provided description for the job. Maximum length: 1024 bytes when unicode-encoded.
529 &quot;dryRun&quot;: True or False, # Optional. If true, the job runs in dry run mode, returning the total object count and, if the object configuration is a prefix list, the bytes found from source. No transformations are performed.
530 &quot;errorSummaries&quot;: [ # Output only. Summarizes errors encountered with sample error log entries.
531 { # A summary of errors by error code, plus a count and sample error log entries.
532 &quot;errorCode&quot;: &quot;A String&quot;, # Required. The canonical error code.
533 &quot;errorCount&quot;: &quot;A String&quot;, # Required. Number of errors encountered per `error_code`.
534 &quot;errorLogEntries&quot;: [ # Required. Sample error logs.
535 { # An entry describing an error that has occurred.
536 &quot;errorDetails&quot;: [ # Optional. Output only. At most 5 error log entries are recorded for a given error code for a job.
537 &quot;A String&quot;,
538 ],
539 &quot;objectUri&quot;: &quot;A String&quot;, # Required. Output only. Object URL. e.g. gs://my_bucket/object.txt
540 },
541 ],
542 },
543 ],
544 &quot;isMultiBucketJob&quot;: True or False, # Output only. If true, this job operates on multiple buckets. Multi-bucket jobs are subject to different quota limits than single-bucket jobs.
545 &quot;loggingConfig&quot;: { # Specifies the Cloud Logging behavior. # Optional. Logging configuration.
546 &quot;logActionStates&quot;: [ # Required. States in which Action are logged.If empty, no logs are generated.
547 &quot;A String&quot;,
548 ],
549 &quot;logActions&quot;: [ # Required. Specifies the actions to be logged.
550 &quot;A String&quot;,
551 ],
552 },
553 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name of the job. Format: `projects/{project_id}/locations/global/jobs/{job_id}`. For example: `projects/123456/locations/global/jobs/job01`. `job_id` is unique in a given project.
554 &quot;projectSource&quot;: { # Describes the project source where the objects satisfying the filters will be transformed. # Specifies a project source and filters to identify objects to be transformed.
555 &quot;bucketFilters&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # Optional. Filters expressed in Common Expression Language (CEL) to apply to buckets to identify buckets with objects to be transformed.
556 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
557 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
558 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
559 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
560 },
561 &quot;dryRunJobId&quot;: &quot;A String&quot;, # Optional. The unique identifier of a dry run job to use as the baseline for the current job. Specifying this ID ensures the job is executed against the same set of objects validated during the dry run. The value corresponds to the {job_id} segment of the resource name: `projects/{project_id}/locations/{location}/jobs/{job_id}`.
562 &quot;insightsDatasetConfig&quot;: &quot;A String&quot;, # Required. The resource identifier of the Storage Insights dataset configuration. Storage batch operations uses the latest snapshot from this dataset as the source to list and filter target objects. Format: `projects/{project_id}/locations/{location}/datasetConfigs/{dataset_config}`.
563 &quot;objectFilters&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # Optional. Filters expressed in Common Expression Language (CEL) to apply to objects to identify objects to be transformed.
564 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
565 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
566 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
567 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
568 },
569 &quot;project&quot;: &quot;A String&quot;, # Required. Project name of the objects to be transformed. e.g. projects/my-project or projects/123456.
570 &quot;snapshotTime&quot;: &quot;A String&quot;, # Output only. The snapshot time used by the job to read the Storage Insights dataset for bucket and object discovery. This field is populated by the service and reflects the exact timestamp of the dataset snapshot used.
571 &quot;targetLocations&quot;: { # Describes the Cloud Storage locations to include in a ProjectSource job. # Optional. Specifies the Cloud Storage locations to include in the job. If provided, only buckets and objects within these locations will be discovered from the Storage Insights dataset as configured in the `insights_dataset_config`. If omitted, the job will discover buckets and objects from all locations configured in the `insights_dataset_config`.
572 &quot;locations&quot;: [ # Required. REQUIRED. A list of Cloud Storage locations (e.g., `us-central1`) to include in the job. If `snapshot_time` is omitted, the job automatically defaults to the most recent snapshot timestamp that is successfully populated in BOTH the `object_attributes_view` and `bucket_attributes_view` across ALL specified locations. For details on Storage Insights dataset snapshots and views, see: https://docs.cloud.google.com/storage/docs/insights/dataset-tables-and-schemas#schema
573 &quot;A String&quot;,
574 ],
575 &quot;snapshotTime&quot;: &quot;A String&quot;, # Optional. OPTIONAL. The exact Storage Insights snapshot timestamp to use for the job compatible with the RFC 3339 format (e.g., `2024-01-02T03:04:05Z`). If specified, this exact snapshot must exist in BOTH the `object_attributes_view` and `bucket_attributes_view` for every location listed in `locations`. If the snapshot is missing from either view in any of the locations, the job fails.
576 },
577 },
578 &quot;putMetadata&quot;: { # Describes options for object metadata update. # Updates object metadata. Allows updating fixed-key and custom metadata. For example, `Cache-Control`, `Content-Disposition`, `Content-Encoding`, `Content-Language`, `Content-Type`, `Custom-Time`, and `Retention configuration`.
579 &quot;cacheControl&quot;: &quot;A String&quot;, # Optional. Updates the objects `Cache-Control` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. Additionally, the value for `Custom-Time` can&#x27;t decrease. For details, see [Cache-Control](https://cloud.google.com/storage/docs/metadata#caching_data).
580 &quot;contentDisposition&quot;: &quot;A String&quot;, # Optional. Updates objects `Content-Disposition` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Disposition](https://cloud.google.com/storage/docs/metadata#content-disposition).
581 &quot;contentEncoding&quot;: &quot;A String&quot;, # Optional. Updates the objects `Content-Encoding` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Encoding](https://cloud.google.com/storage/docs/metadata#content-encoding).
582 &quot;contentLanguage&quot;: &quot;A String&quot;, # Optional. Updates the objects `Content-Language` fixed metadata. Metadata values must use ISO 639-1 language codes. The maximum length for metadata values is 100 characters. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Language](https://cloud.google.com/storage/docs/metadata#content-language).
583 &quot;contentType&quot;: &quot;A String&quot;, # Optional. Updates objects `Content-Type` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see [Content-Type](https://cloud.google.com/storage/docs/metadata#content-type).
584 &quot;customMetadata&quot;: { # Optional. Updates the object&#x27;s custom metadata. This operation adds or sets individual custom metadata key-value pairs. Keys specified with empty values have their values cleared. Existing custom metadata keys not included in the request remain unchanged. For details, see [Custom metadata](https://cloud.google.com/storage/docs/metadata#custom-metadata).
585 &quot;a_key&quot;: &quot;A String&quot;,
586 },
587 &quot;customTime&quot;: &quot;A String&quot;, # Optional. Updates the objects `Custom-Time` fixed metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. The time must be specified in RFC 3339 format, for example `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS&#x27;Z&#x27;` or `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS.SS&#x27;Z&#x27;`. For details, see [Custom-Time](https://cloud.google.com/storage/docs/metadata#custom-time).
588 &quot;objectRetention&quot;: { # Describes options for object retention update. # Optional. Updates an object&#x27;s retention configuration. To clear an object&#x27;s retention, both `retentionMode` and `retainUntilTime` must be left unset (omitted). Setting `retentionMode` to `RETENTION_MODE_UNSPECIFIED` is treated as a no-op. Unlike an unset field, it doesn&#x27;t modify or clear the retention settings. An object with `LOCKED` retention mode can&#x27;t have its retention cleared or its `retainUntilTime` reduced. For more information, see [Object retention](https://cloud.google.com/storage/docs/batch-operations/create-manage-batch-operation-jobs#retain-until-time).
589 &quot;retainUntilTime&quot;: &quot;A String&quot;, # Required. The object&#x27;s retention expiration time, during which, the object is protected from being deleted or overwritten. The time must be specified in RFC 3339 format, for example `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS&#x27;Z&#x27;` or `YYYY-MM-DD&#x27;T&#x27;HH:MM:SS.SS&#x27;Z&#x27;`. To clear an object&#x27;s retention, both `retentionMode` and `retainUntilTime` must be left unset (omitted). Setting `retentionMode` to `RETENTION_MODE_UNSPECIFIED` is treated as a no-op. Unlike an unset field, it doesn&#x27;t modify or clear the retention settings.
590 &quot;retentionMode&quot;: &quot;A String&quot;, # Required. The retention mode.
591 },
592 },
593 &quot;putObjectHold&quot;: { # Describes options to update object hold. # Changes object hold status.
594 &quot;eventBasedHold&quot;: &quot;A String&quot;, # Required. Updates object event based holds state. When object event based hold is set, object can&#x27;t be deleted or replaced. Resets object&#x27;s time in the bucket for the purposes of the retention period.
595 &quot;temporaryHold&quot;: &quot;A String&quot;, # Required. Updates object temporary holds state. When object temporary hold is set, object can&#x27;t be deleted or replaced.
596 },
597 &quot;rewriteObject&quot;: { # Describes options for object rewrite. # Rewrite the object and updates metadata like KMS key.
598 &quot;kmsKey&quot;: &quot;A String&quot;, # Optional. Resource name of the Cloud KMS key that is used to encrypt the object. The Cloud KMS key must be located in same location as the object. For details, see https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key Format: `projects/{project_id}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` For example: `projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key`. The object will be rewritten and set with the specified KMS key.
599 &quot;storageClass&quot;: &quot;A String&quot;, # Optional. Rewrites the object to the specified storage class. Setting this field will perform a full byte copy of the object if the storage class is different from the object&#x27;s current storage class. If Autoclass is enabled on the bucket, storage class changes are ignored by Cloud Storage.
600 },
601 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that the job was scheduled.
602 &quot;setObjectAcls&quot;: { # Describes options for setting object ACLs. # Updates object ACLs.
603 &quot;accessControlsUpdates&quot;: { # Represents updates to existing access-control entries on an object. # Required. Add, update, or remove grants from the object&#x27;s existing ACLs.
604 &quot;grants&quot;: [ # Optional. Grants to add or update. If a grant for same entity exists, its role is updated.
605 { # Represents an access control entry on an object.
606 &quot;entity&quot;: &quot;A String&quot;, # Required. The entity holding the permission, in one of the following forms: * `allUsers` * `allAuthenticatedUsers`
607 &quot;role&quot;: &quot;A String&quot;, # Required. The role to grant. Acceptable values are: * `READER` - gives read access to the object. * `OWNER` - gives owner access to the object.
608 },
609 ],
610 &quot;removeEntities&quot;: [ # Optional. Entities for which all grants should be removed. An entity can&#x27;t be in both `grants` and `remove_entities`.
611 &quot;A String&quot;,
612 ],
613 },
614 },
615 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
616 &quot;updateObjectCustomContext&quot;: { # Describes options to update object custom contexts. # Update object custom context.
617 &quot;clearAll&quot;: True or False, # If set, must be set to true and all existing object custom contexts are deleted.
618 &quot;customContextUpdates&quot;: { # Describes a collection of updates to apply to custom contexts identified by key. # A collection of updates to apply to specific custom contexts. Use this to add, update or delete individual contexts by key.
619 &quot;keysToClear&quot;: [ # Optional. Custom contexts to clear by key. A key can&#x27;t be present in both `updates` and `keys_to_clear`.
620 &quot;A String&quot;,
621 ],
622 &quot;updates&quot;: { # Optional. Insert or update the existing custom contexts.
623 &quot;a_key&quot;: { # Describes the payload of a user-defined object custom context.
624 &quot;value&quot;: &quot;A String&quot;, # The value of the object custom context. If set, `value` can&#x27;t be an empty string because it is a required field in custom context. If unset, `value` is ignored and no changes are made to the `value` field of the custom context payload.
625 },
626 },
627 },
628 },
629 },
630 ],
631 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token identifying a page of results.
632 &quot;unreachable&quot;: [ # Locations that could not be reached.
633 &quot;A String&quot;,
634 ],
635 }</pre>
636 </div>
637
638 <div class="method">
639 <code class="details" id="list_next">list_next()</code>
640 <pre>Retrieves the next page of results.
641
642 Args:
643 previous_request: The request for the previous page. (required)
644 previous_response: The response from the request for the previous page. (required)
645
646 Returns:
647 A request object that you can call &#x27;execute()&#x27; on to request the next
648 page. Returns None if there are no more items in the collection.
649 </pre>
650 </div>
651
652 </body></html>