S3
- class jelastic.api.s3.S3(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
 Bases:
ClientAbstract>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.s3
Ref: https://docs.jelastic.com/api/private/#!/api/s3
- property Account: _Account
 Service provides an interface for managing S3 stuff
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.s3.Account
Ref: https://docs.jelastic.com/api/private/#!/api/s3.Account
- class jelastic.api.s3._Account(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
 Bases:
S3Service provides an interface for managing S3 stuff
Ref: https://docs.jelastic.com/api/private/#!/api/s3.Account
- Create(host_group: str, name: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Creates a new S3 account.
- Parameters:
 host_group – unique name of the target host group.
name – a name of the account to be created.
owner_uid – unique identifier of the S3 account owner.
- Delete(host_group: str, name: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Deletes an S3 account.
- Parameters:
 host_group – unique name of the target host group.
name – a name of the account to be deleted.
owner_uid – unique identifier of the S3 account owner.
- GenerateKey(host_group: str, name: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Generates a new key for an S3 account.
- Parameters:
 host_group – unique name of the target host group.
name – a name of the account to be updated.
owner_uid – unique identifier of the S3 account owner.
- GetKeys(owner_uid: int | None = None, ruk: str | None = None)[source]
 Returns the list of accounts together with keys for each available S3 cluster.
- Parameters:
 owner_uid – unique identifier of the S3 account owner.
- RegenerateKeys(host_group: str, acc_key: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Regenerates the target key pair by access key.
- Parameters:
 host_group – unique name of the target host group.
acc_key – access key that should be regenerated.
owner_uid – unique identifier of the S3 account owner.
- RevokeKey(host_group: str, acc_key: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Revokes the target key to the S3 account for the current user.
- Parameters:
 host_group – unique name of the target host group.
acc_key – access key that should be revoked.
owner_uid – unique identifier of the S3 account owner.
- class jelastic.api.s3._Bucket(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
 Bases:
S3Service provides an interface for managing S3 stuff
Ref: https://docs.jelastic.com/api/private/#!/api/s3.Bucket
- CopyObject(src_bucket_name: str, src_key: str, dest_bucket_name: str, dest_key: str, host_group: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Copies an object from one bucket to another.
- Parameters:
 src_bucket_name – name of the source bucket.
src_key – unique identifier of the source object key.
dest_bucket_name – name of the target bucket.
dest_key – unique identifier of the target object key.
host_group – unique identifier of the target host group.
owner_uid – unique identifier of the bucket owner.
- Create(bucket_name: str, host_group: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Creates a new bucket in the storage.
- Parameters:
 bucket_name – name of the bucket to be created.
host_group – unique identifier of the target host group.
owner_uid – unique identifier of the bucket owner.
- Delete(bucket_name: str, host_group: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Deletes a bucket from the storage.
- Parameters:
 bucket_name – name of the bucket to be deleted.
host_group – unique identifier of the target host group.
owner_uid – unique identifier of the bucket owner.
- DeleteObject(bucket_name: str, key: str, host_group: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Removes an object from the bucket.
- Parameters:
 bucket_name – name of the bucket.
key – unique identifier of the object key.
host_group – unique identifier of the target host group.
owner_uid – unique identifier of the bucket owner.
- DeletePolicy(bucket_name: str, host_group: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Removes bucket policy.
- Parameters:
 bucket_name – name of the bucket.
host_group – unique identifier of the target host group.
owner_uid – unique identifier of the bucket owner.
- GetPolicy(bucket_name: str, host_group: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Returns a list of bucket policies.
- Parameters:
 bucket_name – name of the bucket.
host_group – unique identifier of the target host group.
owner_uid – unique identifier of the bucket owner.
- GetPresignedURL(bucket_name: str, key: str, host_group: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Returns a link to the bucket.
- Parameters:
 bucket_name – name of the bucket.
key – unique identifier of the object key.
host_group – unique identifier of the target host group.
owner_uid – unique identifier of the bucket owner.
- List(owner_uid: int | None = None, ruk: str | None = None)[source]
 Returns a list of buckets in the storage.
- Parameters:
 owner_uid – unique identifier of the bucket owner.
- ListObjects(bucket_name: str, host_group: str, prefix: str | None = None, continuation_token: str | None = None, delimiter: str = ',', max_keys: int = 100, owner_uid: int | None = None, ruk: str | None = None)[source]
 Returns a list of objects in a bucket.
- Parameters:
 bucket_name – name of the bucket.
host_group – unique identifier of the target host group.
prefix – filters response to objects that start with the provided string.
continuation_token – custom token to indicate that the list continues on the same bucket.
delimiter – custom string to divide separate object records.
max_keys – the maximum number of objects returned in the response.
owner_uid – unique identifier of the bucket owner.
- SetPolicy(bucket_name: str, host_group: str, policy: str, owner_uid: int | None = None, ruk: str | None = None)[source]
 Replaces existing bucket policies with the provided value.
- Parameters:
 bucket_name – name of the bucket.
host_group – unique identifier of the target host group.
policy – S3 policies to specify permissions for each resource to allow or deny actions requested by user or role.
owner_uid – unique identifier of the bucket owner.