@linode/api-v4
Version:
JavaScript wrapper around the Linode APIv4
96 lines • 3.74 kB
TypeScript
import type { Filter, Params, ResourcePage as Page, RequestOptions } from '../types';
import type { ObjectStorageBucket, ObjectStorageEndpoint, UpdateObjectStorageBucketAccessPayload, ObjectStorageBucketAccess, CreateObjectStorageBucketPayload, CreateObjectStorageBucketSSLPayload, ObjectStorageBucketSSL, DeleteObjectStorageBucketPayload, GetObjectStorageObjectListPayload, ObjectStorageObjectList } from './types';
/**
* getBucket
*
* Get one Object Storage Bucket.
*/
export declare const getBucket: (clusterId: string, bucketName: string) => Promise<ObjectStorageBucket>;
/**
* getBuckets
*
* Gets a list of a user's Object Storage Buckets.
*/
export declare const getBuckets: (params?: Params, filters?: Filter) => Promise<Page<ObjectStorageBucket>>;
/**
* getBucketsInCluster
*
* Gets a list of a user's Object Storage Buckets in the specified cluster.
*/
export declare const getBucketsInCluster: (clusterId: string, params?: Params, filters?: Filter) => Promise<Page<ObjectStorageBucket>>;
/**
* getBucketsInRegion
*
* Gets a list of a user's Object Storage Buckets in the specified region.
*/
export declare const getBucketsInRegion: (regionId: string, params?: Params, filters?: Filter) => Promise<Page<ObjectStorageBucket>>;
/**
* createBucket
*
* Creates a new Bucket on your account.
*
* @param data { object } The label and clusterId of the new Bucket.
*
*/
export declare const createBucket: (data: CreateObjectStorageBucketPayload) => Promise<ObjectStorageBucket>;
/**
* deleteBucket
*
* Removes a Bucket from your account.
*
* NOTE: Attempting to delete a non-empty bucket will result in an error.
*/
export declare const deleteBucket: ({ cluster, label, }: DeleteObjectStorageBucketPayload) => Promise<ObjectStorageBucket>;
/**
* deleteBucketWithRegion
*
* Removes a Bucket from your account with region.
*
* NOTE: Attempting to delete a non-empty bucket will result in an error.
*/
export declare const deleteBucketWithRegion: ({ region, label, }: {
region: string;
label: string;
}) => Promise<ObjectStorageBucket>;
/**
* Returns a list of Objects in a given Bucket.
*/
export declare const getObjectList: ({ clusterId, bucket: bucketName, params, }: GetObjectStorageObjectListPayload) => Promise<ObjectStorageObjectList>;
/**
* uploadSSLCert
*/
export declare const uploadSSLCert: (clusterId: string, bucketName: string, data: CreateObjectStorageBucketSSLPayload) => Promise<ObjectStorageBucketSSL>;
/**
* getSSLCert
*
* Returns { ssl: true } if there is an SSL certificate available for
* the specified bucket, { ssl: false } otherwise.
*/
export declare const getSSLCert: (clusterId: string, bucketName: string) => Promise<ObjectStorageBucketSSL>;
/**
* deleteSSLCert
*
* Removes any SSL cert associated with the specified bucket. Certs are
* removed automatically when a bucket is deleted; this endpoint is only
* for removing certs without altering the bucket.
*/
export declare const deleteSSLCert: (clusterId: string, bucketName: string) => Promise<{}>;
/**
* getBucketAccess
*
* Returns access information (ACL, CORS) for a given Bucket.
*/
export declare const getBucketAccess: (clusterId: string, bucketName: string) => Promise<ObjectStorageBucketAccess>;
/**
* updateBucketAccess
*
* Updates access information (ACL, CORS) for a given Bucket.
*/
export declare const updateBucketAccess: (clusterId: string, bucketName: string, params: UpdateObjectStorageBucketAccessPayload) => Promise<{}>;
/**
* getObjectStorageEndpoints
*
* Returns a list of Object Storage Endpoints.
*/
export declare const getObjectStorageEndpoints: ({ filter, params }: RequestOptions) => Promise<Page<ObjectStorageEndpoint>>;
//# sourceMappingURL=buckets.d.ts.map