airflow.providers.alibaba.cloud.hooks.oss
¶
Module Contents¶
Functions¶
|
Function decorator that unifies bucket name and key taken from the key |
Function decorator that unifies bucket name and key taken from the key |
Attributes¶
- airflow.providers.alibaba.cloud.hooks.oss.provide_bucket_name(func)[source]¶
Function decorator that unifies bucket name and key taken from the key in case no bucket name and at least a key has been passed to the function.
- airflow.providers.alibaba.cloud.hooks.oss.unify_bucket_name_and_key(func)[source]¶
Function decorator that unifies bucket name and key taken from the key in case no bucket name and at least a key has been passed to the function.
- class airflow.providers.alibaba.cloud.hooks.oss.OSSHook(region=None, oss_conn_id='oss_default', *args, **kwargs)[source]¶
Bases:
airflow.hooks.base.BaseHook
Interact with Alibaba Cloud OSS, using the oss2 library.
- get_bucket(bucket_name=None)[source]¶
Returns a oss2.Bucket object
- Parameters
bucket_name (str | None) – the name of the bucket
- Returns
the bucket object to the bucket name.
- Return type
oss2.api.Bucket
- delete_bucket(bucket_name=None)[source]¶
Delete bucket from OSS
- Parameters
bucket_name (str | None) – the name of the bucket
- create_bucket(bucket_name=None)[source]¶
Create bucket
- Parameters
bucket_name (str | None) – the name of the bucket