このコンテンツはまだ日本語訳がありません。
ObjectStorage
Initialize ObjectStorage with S3-compatible credentials
Constructors
new ObjectStorage()
def initialize(endpoint_url:, aws_access_key_id:, aws_secret_access_key:, aws_session_token:, bucket_name:, region:)Initialize ObjectStorage with S3-compatible credentials
Parameters:
endpoint_urlString - The endpoint URL for the object storage serviceaws_access_key_idString - The access key ID for the object storage serviceaws_secret_access_keyString - The secret access key for the object storage serviceaws_session_tokenString - The session token for the object storage servicebucket_nameString - The name of the bucket to use (defaults to “daytona-volume-builds”)regionString - AWS region (defaults to us-east-1)
Returns:
ObjectStorage- a new instance of ObjectStorage
Methods
bucket_name()
def bucket_name()Returns:
String- The name of the S3 bucket used for object storage
s3_client()
def s3_client()Returns:
Aws:S3:Client- The S3 client
upload()
def upload(path, organization_id, archive_base_path)Uploads a file to the object storage service
Parameters:
pathString - The path to the file to uploadorganization_idString - The organization ID to usearchive_base_pathString, nil - The base path to use for the archive
Returns:
String- The hash of the uploaded file
Raises:
Errno:ENOENT- If the path does not exist