Buckets
BucketsService ¶
Service for managing UiPath storage buckets.
Buckets are cloud storage containers that can be used to store and manage files used by automation processes.
download ¶
download(
*,
name=None,
key=None,
blob_file_path,
destination_path,
folder_key=None,
folder_path=None,
)
Download a file from a bucket.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
Optional[str]
|
The key of the bucket. |
None
|
name
|
Optional[str]
|
The name of the bucket. |
None
|
blob_file_path
|
str
|
The path to the file in the bucket. |
required |
destination_path
|
str
|
The local path where the file will be saved. |
required |
folder_key
|
Optional[str]
|
The key of the folder where the bucket resides. |
None
|
folder_path
|
Optional[str]
|
The path of the folder where the bucket resides. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If neither key nor name is provided. |
Exception
|
If the bucket with the specified key is not found. |
retrieve ¶
Retrieve bucket information by its name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
Optional[str]
|
The name of the bucket to retrieve. |
None
|
key
|
Optional[str]
|
The key of the bucket. |
None
|
folder_key
|
Optional[str]
|
The key of the folder where the bucket resides. |
None
|
folder_path
|
Optional[str]
|
The path of the folder where the bucket resides. |
None
|
Returns:
Name | Type | Description |
---|---|---|
Response |
Bucket
|
The bucket details. |
Raises:
Type | Description |
---|---|
ValueError
|
If neither bucket key nor bucket name is provided. |
Exception
|
If the bucket with the specified name is not found. |
retrieve_async
async
¶
Asynchronously retrieve bucket information by its name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
Optional[str]
|
The name of the bucket to retrieve. |
None
|
key
|
Optional[str]
|
The key of the bucket. |
None
|
folder_key
|
Optional[str]
|
The key of the folder where the bucket resides. |
None
|
folder_path
|
Optional[str]
|
The path of the folder where the bucket resides. |
None
|
Returns:
Name | Type | Description |
---|---|---|
Response |
Bucket
|
The bucket details. |
Raises:
Type | Description |
---|---|
ValueError
|
If neither bucket key nor bucket name is provided. |
Exception
|
If the bucket with the specified name is not found. |
upload ¶
upload(
*,
key=None,
name=None,
blob_file_path,
content_type,
source_path,
folder_key=None,
folder_path=None,
)
Upload a file to a bucket.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
Optional[str]
|
The key of the bucket. |
None
|
name
|
Optional[str]
|
The name of the bucket. |
None
|
blob_file_path
|
str
|
The path where the file will be stored in the bucket. |
required |
content_type
|
str
|
The MIME type of the file. |
required |
source_path
|
str
|
The local path of the file to upload. |
required |
folder_key
|
Optional[str]
|
The key of the folder where the bucket resides. |
None
|
folder_path
|
Optional[str]
|
The path of the folder where the bucket resides. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If neither key nor name is provided. |
Exception
|
If the bucket with the specified key or name is not found. |
upload_async
async
¶
upload_async(
*,
key=None,
name=None,
blob_file_path,
content_type,
source_path,
folder_key=None,
folder_path=None,
)
Upload a file to a bucket asynchronously.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
Optional[str]
|
The key of the bucket. |
None
|
name
|
Optional[str]
|
The name of the bucket. |
None
|
blob_file_path
|
str
|
The path where the file will be stored in the bucket. |
required |
content_type
|
str
|
The MIME type of the file. |
required |
source_path
|
str
|
The local path of the file to upload. |
required |
folder_key
|
Optional[str]
|
The key of the folder where the bucket resides. |
None
|
folder_path
|
Optional[str]
|
The path of the folder where the bucket resides. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If neither key nor name is provided. |
Exception
|
If the bucket with the specified key or name is not found. |
upload_from_memory ¶
upload_from_memory(
*,
key=None,
name=None,
blob_file_path,
content_type,
content,
folder_key=None,
folder_path=None,
)
Upload content from memory to a bucket.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
Optional[str]
|
The key of the bucket. |
None
|
name
|
Optional[str]
|
The name of the bucket. |
None
|
blob_file_path
|
str
|
The path where the content will be stored in the bucket. |
required |
content_type
|
str
|
The MIME type of the content. |
required |
content
|
Union[str, bytes]
|
The content to upload (string or bytes). |
required |
folder_key
|
Optional[str]
|
The key of the folder where the bucket resides. |
None
|
folder_path
|
Optional[str]
|
The path of the folder where the bucket resides. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If neither key nor name is provided. |
Exception
|
If the bucket with the specified key or name is not found. |
upload_from_memory_async
async
¶
upload_from_memory_async(
*,
key=None,
name=None,
blob_file_path,
content_type,
content,
folder_key=None,
folder_path=None,
)
Asynchronously upload content from memory to a bucket.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
Optional[str]
|
The key of the bucket. |
None
|
name
|
Optional[str]
|
The name of the bucket. |
None
|
blob_file_path
|
str
|
The path where the content will be stored in the bucket. |
required |
content_type
|
str
|
The MIME type of the content. |
required |
content
|
Union[str, bytes]
|
The content to upload (string or bytes). |
required |
folder_key
|
Optional[str]
|
The key of the folder where the bucket resides. |
None
|
folder_path
|
Optional[str]
|
The path of the folder where the bucket resides. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If neither key nor name is provided. |
Exception
|
If the bucket with the specified key or name is not found. |