Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObjectStorageClient

Hierarchy

  • ObjectStorageClient

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Protected _defaultHeaders

_defaultHeaders: any

Protected _endpoint

_endpoint: string = ""

Protected _httpClient

_httpClient: HttpClient

Protected _waiters

Static Protected serviceEndpointTemplate

serviceEndpointTemplate: string = "https://objectstorage.{region}.{secondLevelDomain}"

Accessors

endpoint

  • set endpoint(endpoint: string): void

region

  • set region(region: Region): void
  • Sets the region to call (ex, Region.US_PHOENIX_1). Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.

    Parameters

    • region: Region

      The region of the service.

    Returns void

regionId

  • set regionId(regionId: string): void
  • Sets the regionId to call (ex, 'us-phoenix-1').

    Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}. If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1 and then call {@link #endpoint(String) endpoint}.

    Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}. If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1 and then call {@link #endpoint(String) endpoint}.

    Parameters

    • regionId: string

      The public region ID.

    Returns void

Methods

abortMultipartUpload

cancelWorkRequest

commitMultipartUpload

copyObject

createBucket

createMultipartUpload

createPreauthenticatedRequest

createReplicationPolicy

createRetentionRule

createWaiters

deleteBucket

  • Deletes a bucket if the bucket is already empty. If the bucket is not empty, use {@link #deleteObject(DeleteObjectRequest) deleteObject} first. In addition, you cannot delete a bucket that has a multipart upload in progress or a pre-authenticated request associated with that bucket.

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<DeleteBucketResponse>

    DeleteBucketResponse

deleteObject

deleteObjectLifecyclePolicy

deletePreauthenticatedRequest

deleteReplicationPolicy

deleteRetentionRule

getBucket

getNamespace

  • Each Oracle Cloud Infrastructure tenant is assigned one unique and uneditable Object Storage namespace. The namespace is a system-generated string assigned during account creation. For some older tenancies, the namespace string may be the tenancy name in all lower-case letters. You cannot edit a namespace.

    GetNamespace returns the name of the Object Storage namespace for the user making the request. If an optional compartmentId query parameter is provided, GetNamespace returns the namespace name of the corresponding tenancy, provided the user has access to it.

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<GetNamespaceResponse>

    GetNamespaceResponse

getNamespaceMetadata

  • Gets the metadata for the Object Storage namespace, which contains defaultS3CompartmentId and defaultSwiftCompartmentId.

    Any user with the OBJECTSTORAGE_NAMESPACE_READ permission will be able to see the current metadata. If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<GetNamespaceMetadataResponse>

    GetNamespaceMetadataResponse

getObject

getObjectLifecyclePolicy

getPreauthenticatedRequest

getReplicationPolicy

getRetentionRule

getWaiters

getWorkRequest

headBucket

headObject

listAllBuckets

  • Creates a new async iterator which will iterate over the models.BucketSummary objects contained in responses from the listBuckets operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<BucketSummary>

listAllBucketsResponses

listAllMultipartUploadParts

listAllMultipartUploadPartsResponses

listAllMultipartUploads

  • Creates a new async iterator which will iterate over the models.MultipartUpload objects contained in responses from the listMultipartUploads operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<MultipartUpload>

listAllMultipartUploadsResponses

listAllObjects

  • Creates a new async iterator which will iterate over the models.ObjectSummary objects contained in responses from the listObjects operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<ObjectSummary>

listAllObjectsResponses

listAllPreauthenticatedRequests

listAllPreauthenticatedRequestsResponses

listAllReplicationPolicies

listAllReplicationPoliciesResponses

listAllReplicationSources

listAllReplicationSourcesResponses

listAllWorkRequestErrors

  • Creates a new async iterator which will iterate over the models.WorkRequestError objects contained in responses from the listWorkRequestErrors operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<WorkRequestError>

listAllWorkRequestErrorsResponses

listAllWorkRequestLogs

  • Creates a new async iterator which will iterate over the models.WorkRequestLogEntry objects contained in responses from the listWorkRequestLogs operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<WorkRequestLogEntry>

listAllWorkRequestLogsResponses

listAllWorkRequests

  • Creates a new async iterator which will iterate over the models.WorkRequestSummary objects contained in responses from the listWorkRequests operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<WorkRequestSummary>

listAllWorkRequestsResponses

listBuckets

  • Gets a list of all BucketSummary items in a compartment. A BucketSummary contains only summary fields for the bucket and does not contain fields like the user-defined metadata.

    To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<ListBucketsResponse>

    ListBucketsResponse

listMultipartUploadParts

listMultipartUploads

listObjectVersions

  • Lists the object versions in a bucket.

    To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<ListObjectVersionsResponse>

    ListObjectVersionsResponse

listObjects

  • Lists the objects in a bucket.

    To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<ListObjectsResponse>

    ListObjectsResponse

listPreauthenticatedRequests

listReplicationPolicies

listReplicationSources

listRetentionRules

listWorkRequestErrors

listWorkRequestLogs

listWorkRequests

makeBucketWritable

  • Stops replication to the destination bucket and removes the replication policy. When the replication policy was created, this destination bucket became read-only except for new and changed objects replicated automatically from the source bucket. MakeBucketWritable removes the replication policy. This bucket is no longer the target for replication and is now writable, allowing users to make changes to bucket contents.

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<MakeBucketWritableResponse>

    MakeBucketWritableResponse

putObject

  • Creates a new object or overwrites an existing object with the same name. The maximum object size allowed by PutObject is 50 GiB.

    See [Special Instructions for Object Storage PUT](https://docs.cloud.oracle.com/Content/API/Concepts/signingrequests.htm#ObjectStoragePut) for request signature requirements.

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<PutObjectResponse>

    PutObjectResponse

putObjectLifecyclePolicy

reencryptBucket

  • Re-encrypts the unique data encryption key that encrypts each object written to the bucket by using the most recent version of the master encryption key assigned to the bucket. (All data encryption keys are encrypted by a master encryption key. Master encryption keys are assigned to buckets and managed by Oracle by default, but you can assign a key that you created and control through the Oracle Cloud Infrastructure Key Management service.) The kmsKeyId property of the bucket determines which master encryption key is assigned to the bucket. If you assigned a different Key Management master encryption key to the bucket, you can call this API to re-encrypt all data encryption keys with the newly assigned key. Similarly, you might want to re-encrypt all data encryption keys if the assigned key has been rotated to a new key version since objects were last added to the bucket. If you call this API and there is no kmsKeyId associated with the bucket, the call will fail.

    Calling this API starts a work request task to re-encrypt the data encryption key of all objects in the bucket. Only objects created before the time of the API call will be re-encrypted. The call can take a long time, depending on how many objects are in the bucket and how big they are. This API returns a work request ID that you can use to retrieve the status of the work request task. All the versions of objects will be re-encrypted whether versioning is enabled or suspended at the bucket.

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<ReencryptBucketResponse>

    ReencryptBucketResponse

renameObject

restoreObjects

updateBucket

  • Performs a partial or full update of a bucket's user-defined metadata.

    Use UpdateBucket to move a bucket from one compartment to another within the same tenancy. Supply the compartmentID of the compartment that you want to move the bucket to. For more information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<UpdateBucketResponse>

    UpdateBucketResponse

updateNamespaceMetadata

  • By default, buckets created using the Amazon S3 Compatibility API or the Swift API are created in the root compartment of the Oracle Cloud Infrastructure tenancy.

    You can change the default Swift/Amazon S3 compartmentId designation to a different compartmentId. All subsequent bucket creations will use the new default compartment, but no previously created buckets will be modified. A user must have OBJECTSTORAGE_NAMESPACE_UPDATE permission to make changes to the default compartments for Amazon S3 and Swift.

    throws

    OciError when an error occurs

    Parameters

    Returns Promise<UpdateNamespaceMetadataResponse>

    UpdateNamespaceMetadataResponse

updateRetentionRule

uploadPart