@@ -371,14 +371,16 @@ def _delivery(type: str, parameters: dict) -> dict:
371
371
def amazon_s3 (aws_access_key_id : str ,
372
372
aws_secret_access_key : str ,
373
373
bucket : str ,
374
- aws_region : str ) -> dict :
374
+ aws_region : str ,
375
+ path_prefix : Optional [str ] = None ) -> dict :
375
376
"""Delivery to Amazon S3.
376
377
377
378
Parameters:
378
379
aws_access_key_id: S3 account access key.
379
380
aws_secret_access_key: S3 account secret key.
380
381
bucket: The name of the bucket that will receive the order output.
381
382
aws_region: The region where the bucket lives in AWS.
383
+ path_prefix: Path prefix for deliveries.
382
384
"""
383
385
parameters = {
384
386
'aws_access_key_id' : aws_access_key_id ,
@@ -387,13 +389,17 @@ def amazon_s3(aws_access_key_id: str,
387
389
'aws_region' : aws_region ,
388
390
}
389
391
392
+ if path_prefix :
393
+ parameters ['path_prefix' ] = path_prefix
394
+
390
395
return _delivery ('amazon_s3' , parameters )
391
396
392
397
393
398
def azure_blob_storage (account : str ,
394
399
container : str ,
395
400
sas_token : str ,
396
- storage_endpoint_suffix : Optional [str ] = None ) -> dict :
401
+ storage_endpoint_suffix : Optional [str ] = None ,
402
+ path_prefix : Optional [str ] = None ) -> dict :
397
403
"""Delivery to Azure Blob Storage.
398
404
399
405
Parameters:
@@ -403,6 +409,7 @@ def azure_blob_storage(account: str,
403
409
without a leading '?'.
404
410
storage_endpoint_suffix: Deliver order to a sovereign cloud. The
405
411
default is "core.windows.net".
412
+ path_prefix: Path prefix for deliveries.
406
413
"""
407
414
parameters = {
408
415
'account' : account ,
@@ -413,29 +420,39 @@ def azure_blob_storage(account: str,
413
420
if storage_endpoint_suffix :
414
421
parameters ['storage_endpoint_suffix' ] = storage_endpoint_suffix
415
422
423
+ if path_prefix :
424
+ parameters ['path_prefix' ] = path_prefix
425
+
416
426
return _delivery ('azure_blob_storage' , parameters )
417
427
418
428
419
- def google_cloud_storage (credentials : str , bucket : str ) -> dict :
429
+ def google_cloud_storage (credentials : str ,
430
+ bucket : str ,
431
+ path_prefix : Optional [str ] = None ) -> dict :
420
432
"""Delivery to Google Cloud Storage.
421
433
422
434
Parameters:
423
435
credentials: JSON-string of service account for bucket.
424
436
bucket: GCS bucket name.
437
+ path_prefix: Path prefix for deliveries.
425
438
"""
426
439
parameters = {
427
440
'bucket' : bucket ,
428
441
'credentials' : credentials ,
429
442
}
430
443
444
+ if path_prefix :
445
+ parameters ['path_prefix' ] = path_prefix
446
+
431
447
return _delivery ('google_cloud_storage' , parameters )
432
448
433
449
434
450
def oracle_cloud_storage (customer_access_key_id : str ,
435
451
customer_secret_key : str ,
436
452
bucket : str ,
437
453
region : str ,
438
- namespace : str ) -> dict :
454
+ namespace : str ,
455
+ path_prefix : Optional [str ] = None ) -> dict :
439
456
"""Delivery to Oracle Cloud Storage.
440
457
441
458
Parameters:
@@ -444,6 +461,7 @@ def oracle_cloud_storage(customer_access_key_id: str,
444
461
bucket: The name of the bucket that will receive the order output.
445
462
region: The region where the bucket lives in Oracle.
446
463
namespace: Object Storage namespace name.
464
+ path_prefix: Path prefix for deliveries.
447
465
"""
448
466
parameters = {
449
467
'customer_access_key_id' : customer_access_key_id ,
@@ -453,6 +471,9 @@ def oracle_cloud_storage(customer_access_key_id: str,
453
471
'namespace' : namespace
454
472
}
455
473
474
+ if path_prefix :
475
+ parameters ['path_prefix' ] = path_prefix
476
+
456
477
return _delivery ('oracle_cloud_storage' , parameters )
457
478
458
479
0 commit comments