@@ -371,14 +371,16 @@ def _delivery(type: str, parameters: dict) -> dict:
371371def amazon_s3 (aws_access_key_id : str ,
372372 aws_secret_access_key : str ,
373373 bucket : str ,
374- aws_region : str ) -> dict :
374+ aws_region : str ,
375+ path_prefix : Optional [str ] = None ) -> dict :
375376 """Delivery to Amazon S3.
376377
377378 Parameters:
378379 aws_access_key_id: S3 account access key.
379380 aws_secret_access_key: S3 account secret key.
380381 bucket: The name of the bucket that will receive the order output.
381382 aws_region: The region where the bucket lives in AWS.
383+ path_prefix: Path prefix for deliveries.
382384 """
383385 parameters = {
384386 'aws_access_key_id' : aws_access_key_id ,
@@ -387,13 +389,17 @@ def amazon_s3(aws_access_key_id: str,
387389 'aws_region' : aws_region ,
388390 }
389391
392+ if path_prefix :
393+ parameters ['path_prefix' ] = path_prefix
394+
390395 return _delivery ('amazon_s3' , parameters )
391396
392397
393398def azure_blob_storage (account : str ,
394399 container : str ,
395400 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 :
397403 """Delivery to Azure Blob Storage.
398404
399405 Parameters:
@@ -403,6 +409,7 @@ def azure_blob_storage(account: str,
403409 without a leading '?'.
404410 storage_endpoint_suffix: Deliver order to a sovereign cloud. The
405411 default is "core.windows.net".
412+ path_prefix: Path prefix for deliveries.
406413 """
407414 parameters = {
408415 'account' : account ,
@@ -413,29 +420,39 @@ def azure_blob_storage(account: str,
413420 if storage_endpoint_suffix :
414421 parameters ['storage_endpoint_suffix' ] = storage_endpoint_suffix
415422
423+ if path_prefix :
424+ parameters ['path_prefix' ] = path_prefix
425+
416426 return _delivery ('azure_blob_storage' , parameters )
417427
418428
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 :
420432 """Delivery to Google Cloud Storage.
421433
422434 Parameters:
423435 credentials: JSON-string of service account for bucket.
424436 bucket: GCS bucket name.
437+ path_prefix: Path prefix for deliveries.
425438 """
426439 parameters = {
427440 'bucket' : bucket ,
428441 'credentials' : credentials ,
429442 }
430443
444+ if path_prefix :
445+ parameters ['path_prefix' ] = path_prefix
446+
431447 return _delivery ('google_cloud_storage' , parameters )
432448
433449
434450def oracle_cloud_storage (customer_access_key_id : str ,
435451 customer_secret_key : str ,
436452 bucket : str ,
437453 region : str ,
438- namespace : str ) -> dict :
454+ namespace : str ,
455+ path_prefix : Optional [str ] = None ) -> dict :
439456 """Delivery to Oracle Cloud Storage.
440457
441458 Parameters:
@@ -444,6 +461,7 @@ def oracle_cloud_storage(customer_access_key_id: str,
444461 bucket: The name of the bucket that will receive the order output.
445462 region: The region where the bucket lives in Oracle.
446463 namespace: Object Storage namespace name.
464+ path_prefix: Path prefix for deliveries.
447465 """
448466 parameters = {
449467 'customer_access_key_id' : customer_access_key_id ,
@@ -453,6 +471,9 @@ def oracle_cloud_storage(customer_access_key_id: str,
453471 'namespace' : namespace
454472 }
455473
474+ if path_prefix :
475+ parameters ['path_prefix' ] = path_prefix
476+
456477 return _delivery ('oracle_cloud_storage' , parameters )
457478
458479
0 commit comments