/
azure.storage.blob.BlobLeaseClient.yml
447 lines (335 loc) · 15.3 KB
/
azure.storage.blob.BlobLeaseClient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
### YamlMime:PythonClass
uid: azure.storage.blob.BlobLeaseClient
name: BlobLeaseClient
fullName: azure.storage.blob.BlobLeaseClient
module: azure.storage.blob
inheritances:
- builtins.object
summary: 'Creates a new BlobLeaseClient.
This client provides lease operations on a BlobClient or ContainerClient.'
constructor:
syntax: 'BlobLeaseClient(client: BlobClient | ContainerClient, lease_id: str | None
= None)'
parameters:
- name: client
description: The client of the blob or container to lease.
isRequired: true
types:
- <xref:azure.storage.blob.BlobClient>
- <xref:azure.storage.blob.ContainerClient>
- name: lease_id
description: 'A string representing the lease ID of an existing lease. This value
does not
need to be specified in order to acquire a new lease, or break one.'
defaultValue: None
types:
- <xref:str>
variables:
- description: 'The ID of the lease currently being maintained. This will be *None*
if no
lease has yet been acquired.'
name: id
types:
- <xref:str>
- description: 'The ETag of the lease currently being maintained. This will be *None*
if no
lease has yet been acquired or modified.'
name: etag
types:
- <xref:str>
- description: 'The last modified timestamp of the lease currently being maintained.
This will be *None* if no lease has yet been acquired or modified.'
name: last_modified
types:
- <xref:datetime.datetime>
methods:
- uid: azure.storage.blob.BlobLeaseClient.acquire
name: acquire
summary: 'Requests a new lease.
If the container does not have an active lease, the Blob service creates a
lease on the container and returns a new lease ID.'
signature: 'acquire(lease_duration: int = -1, **kwargs: Any) -> None'
parameters:
- name: lease_duration
description: 'Specifies the duration of the lease, in seconds, or negative one
(-1) for a lease that never expires. A non-infinite lease can be
between 15 and 60 seconds. A lease duration cannot be changed
using renew or change. Default is -1 (infinite lease).'
isRequired: true
types:
- <xref:int>
keywordOnlyParameters:
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: etag
description: 'An ETag value, or the wildcard character (*). Used to check if the
resource has changed,
and act according to the condition specified by the *match_condition* parameter.'
types:
- <xref:str>
- name: match_condition
description: The match condition to use upon the etag.
types:
- <xref:azure.core.MatchConditions>
- name: if_tags_match_condition
description: 'Specify a SQL where clause on blob tags to operate only on blob
with a matching value.
eg. `"\"tagname\"=''my tag''"`
*New in version 12.4.0.*'
types:
- <xref:str>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
types:
- <xref:None>
- uid: azure.storage.blob.BlobLeaseClient.break_lease
name: break_lease
summary: 'Break the lease, if the container or blob has an active lease.
Once a lease is broken, it cannot be renewed. Any authorized request can break
the lease;
the request is not required to specify a matching lease ID. When a lease
is broken, the lease break period is allowed to elapse, during which time
no lease operation except break and release can be performed on the container
or blob.
When a lease is successfully broken, the response indicates the interval
in seconds until a new lease can be acquired.'
signature: 'break_lease(lease_break_period: int | None = None, **kwargs: Any) ->
int'
parameters:
- name: lease_break_period
description: 'This is the proposed duration of seconds that the lease
should continue before it is broken, between 0 and 60 seconds. This
break period is only used if it is shorter than the time remaining
on the lease. If longer, the time remaining on the lease is used.
A new lease will not be available before the break period has
expired, but the lease may be held for longer than the break
period. If this header does not appear with a break
operation, a fixed-duration lease breaks after the remaining lease
period elapses, and an infinite lease breaks immediately.'
isRequired: true
types:
- <xref:int>
keywordOnlyParameters:
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: if_tags_match_condition
description: 'Specify a SQL where clause on blob tags to operate only on blob
with a matching value.
eg. `"\"tagname\"=''my tag''"`
*New in version 12.4.0.*'
types:
- <xref:str>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: Approximate time remaining in the lease period, in seconds.
types:
- <xref:int>
- uid: azure.storage.blob.BlobLeaseClient.change
name: change
summary: Change the lease ID of an active lease.
signature: 'change(proposed_lease_id: str, **kwargs: Any) -> None'
parameters:
- name: proposed_lease_id
description: 'Proposed lease ID, in a GUID string format. The Blob service returns
400
(Invalid request) if the proposed lease ID is not in the correct format.'
isRequired: true
types:
- <xref:str>
keywordOnlyParameters:
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: etag
description: 'An ETag value, or the wildcard character (*). Used to check if the
resource has changed,
and act according to the condition specified by the *match_condition* parameter.'
types:
- <xref:str>
- name: match_condition
description: The match condition to use upon the etag.
types:
- <xref:azure.core.MatchConditions>
- name: if_tags_match_condition
description: 'Specify a SQL where clause on blob tags to operate only on blob
with a matching value.
eg. `"\"tagname\"=''my tag''"`
*New in version 12.4.0.*'
types:
- <xref:str>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: None
- uid: azure.storage.blob.BlobLeaseClient.release
name: release
summary: 'Release the lease.
The lease may be released if the client lease id specified matches
that associated with the container or blob. Releasing the lease allows another
client
to immediately acquire the lease for the container or blob as soon as the release
is complete.'
signature: 'release(**kwargs: Any) -> None'
keywordOnlyParameters:
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: etag
description: 'An ETag value, or the wildcard character (*). Used to check if the
resource has changed,
and act according to the condition specified by the *match_condition* parameter.'
types:
- <xref:str>
- name: match_condition
description: The match condition to use upon the etag.
types:
- <xref:azure.core.MatchConditions>
- name: if_tags_match_condition
description: 'Specify a SQL where clause on blob tags to operate only on blob
with a matching value.
eg. `"\"tagname\"=''my tag''"`
*New in version 12.4.0.*'
types:
- <xref:str>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: None
- uid: azure.storage.blob.BlobLeaseClient.renew
name: renew
summary: 'Renews the lease.
The lease can be renewed if the lease ID specified in the
lease client matches that associated with the container or blob. Note that
the lease may be renewed even if it has expired as long as the container
or blob has not been leased again since the expiration of that lease. When you
renew a lease, the lease duration clock resets.'
signature: 'renew(**kwargs: Any) -> None'
keywordOnlyParameters:
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: etag
description: 'An ETag value, or the wildcard character (*). Used to check if the
resource has changed,
and act according to the condition specified by the *match_condition* parameter.'
types:
- <xref:str>
- name: match_condition
description: The match condition to use upon the etag.
types:
- <xref:azure.core.MatchConditions>
- name: if_tags_match_condition
description: 'Specify a SQL where clause on blob tags to operate only on blob
with a matching value.
eg. `"\"tagname\"=''my tag''"`
*New in version 12.4.0.*'
types:
- <xref:str>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: None