Class ObjectStorageAsyncClient

  • All Implemented Interfaces:
    ObjectStorageAsync, AutoCloseable

    @Generated(value="OracleSDKGenerator",
               comments="API Version: 20160918")
    public class ObjectStorageAsyncClient
    extends BaseAsyncClient
    implements ObjectStorageAsync
    Async client implementation for ObjectStorage service.
    There are two ways to use async client: 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an InputStream, like getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, because the stream will be closed right after the AsyncHandler is invoked.
    2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
    Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler is used, it is still safe to use the Future to determine whether or not the request was completed via Future.isDone/isCancelled.
    Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java
    • Field Detail

      • SERVICE

        public static final Service SERVICE
        Service instance for ObjectStorage.
      • clientCommonLibraryVersion

        public final String clientCommonLibraryVersion
        Compatible SDK version, provided by the codegen.
      • minimumClientCommonLibraryVersionFromClient

        public final Optional<String> minimumClientCommonLibraryVersionFromClient
        Minimum compatible SDK version, maybe provided by the codegen.
    • Method Detail

      • setRegion

        public void setRegion​(Region region)
        Description copied from interface: ObjectStorageAsync
        Sets the region to call (ex, Region.US_PHOENIX_1).

        Note, this will call setEndpoint after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised.

        Specified by:
        setRegion in interface ObjectStorageAsync
        Parameters:
        region - The region of the service.
      • copyObject

        public Future<CopyObjectResponse> copyObject​(CopyObjectRequest request,
                                                     AsyncHandler<CopyObjectRequest,​CopyObjectResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Creates a request to copy an object within a region or to another region.

        See [Object Names](https://docs.oracle.com/iaas/Content/Object/Tasks/managingobjects.htm#namerequirements) for object naming requirements.

        Specified by:
        copyObject in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • createBucket

        public Future<CreateBucketResponse> createBucket​(CreateBucketRequest request,
                                                         AsyncHandler<CreateBucketRequest,​CreateBucketResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Creates a bucket in the given namespace with a bucket name and optional user-defined metadata.

        Avoid entering confidential information in bucket names.

        Specified by:
        createBucket in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • createMultipartUpload

        public Future<CreateMultipartUploadResponse> createMultipartUpload​(CreateMultipartUploadRequest request,
                                                                           AsyncHandler<CreateMultipartUploadRequest,​CreateMultipartUploadResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Starts a new multipart upload to a specific object in the given bucket in the given namespace.

        See [Object Names](https://docs.oracle.com/iaas/Content/Object/Tasks/managingobjects.htm#namerequirements) for object naming requirements.

        Specified by:
        createMultipartUpload in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • createRetentionRule

        public Future<CreateRetentionRuleResponse> createRetentionRule​(CreateRetentionRuleRequest request,
                                                                       AsyncHandler<CreateRetentionRuleRequest,​CreateRetentionRuleResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Creates a new retention rule in the specified bucket.

        The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.

        Specified by:
        createRetentionRule in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • deleteBucket

        public Future<DeleteBucketResponse> deleteBucket​(DeleteBucketRequest request,
                                                         AsyncHandler<DeleteBucketRequest,​DeleteBucketResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Deletes a bucket if the bucket is already empty.

        If the bucket is not empty, use 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.

        Specified by:
        deleteBucket in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • deleteObject

        public Future<DeleteObjectResponse> deleteObject​(DeleteObjectRequest request,
                                                         AsyncHandler<DeleteObjectRequest,​DeleteObjectResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Deletes an object.
        Specified by:
        deleteObject in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getBucket

        public Future<GetBucketResponse> getBucket​(GetBucketRequest request,
                                                   AsyncHandler<GetBucketRequest,​GetBucketResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Gets the current representation of the given bucket in the given Object Storage namespace.
        Specified by:
        getBucket in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getNamespace

        public Future<GetNamespaceResponse> getNamespace​(GetNamespaceRequest request,
                                                         AsyncHandler<GetNamespaceRequest,​GetNamespaceResponse> handler)
        Description copied from interface: ObjectStorageAsync
        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.

        Specified by:
        getNamespace in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getNamespaceMetadata

        public Future<GetNamespaceMetadataResponse> getNamespaceMetadata​(GetNamespaceMetadataRequest request,
                                                                         AsyncHandler<GetNamespaceMetadataRequest,​GetNamespaceMetadataResponse> handler)
        Description copied from interface: ObjectStorageAsync
        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.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).

        Specified by:
        getNamespaceMetadata in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getObject

        public Future<GetObjectResponse> getObject​(GetObjectRequest request,
                                                   AsyncHandler<GetObjectRequest,​GetObjectResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Gets the metadata and body of an object.
        Specified by:
        getObject in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getWorkRequest

        public Future<GetWorkRequestResponse> getWorkRequest​(GetWorkRequestRequest request,
                                                             AsyncHandler<GetWorkRequestRequest,​GetWorkRequestResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Gets the status of the work request for the given ID.
        Specified by:
        getWorkRequest in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • headBucket

        public Future<HeadBucketResponse> headBucket​(HeadBucketRequest request,
                                                     AsyncHandler<HeadBucketRequest,​HeadBucketResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Efficiently checks to see if a bucket exists and gets the current entity tag (ETag) for the bucket.
        Specified by:
        headBucket in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • headObject

        public Future<HeadObjectResponse> headObject​(HeadObjectRequest request,
                                                     AsyncHandler<HeadObjectRequest,​HeadObjectResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Gets the user-defined metadata and entity tag (ETag) for an object.
        Specified by:
        headObject in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listBuckets

        public Future<ListBucketsResponse> listBuckets​(ListBucketsRequest request,
                                                       AsyncHandler<ListBucketsRequest,​ListBucketsResponse> handler)
        Description copied from interface: ObjectStorageAsync
        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.

        ListBuckets returns a BucketSummary containing at most 1000 buckets. To paginate through more buckets, use the returned `opc-next-page` value with the `page` request parameter.

        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.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).

        Specified by:
        listBuckets in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listObjectVersions

        public Future<ListObjectVersionsResponse> listObjectVersions​(ListObjectVersionsRequest request,
                                                                     AsyncHandler<ListObjectVersionsRequest,​ListObjectVersionsResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Lists the object versions in a bucket.

        ListObjectVersions returns an ObjectVersionCollection containing at most 1000 object versions. To paginate through more object versions, use the returned `opc-next-page` value with the `page` request parameter.

        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.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).

        Specified by:
        listObjectVersions in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listObjects

        public Future<ListObjectsResponse> listObjects​(ListObjectsRequest request,
                                                       AsyncHandler<ListObjectsRequest,​ListObjectsResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Lists the objects in a bucket.

        By default, ListObjects returns object names only. See the fields parameter for other fields that you can optionally include in ListObjects response.

        ListObjects returns at most 1000 objects. To paginate through more objects, use the returned 'nextStartWith' value with the 'start' parameter. To filter which objects ListObjects returns, use the 'start' and 'end' parameters.

        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.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).

        Specified by:
        listObjects in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listPrivateEndpoints

        public Future<ListPrivateEndpointsResponse> listPrivateEndpoints​(ListPrivateEndpointsRequest request,
                                                                         AsyncHandler<ListPrivateEndpointsRequest,​ListPrivateEndpointsResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Gets a list of all PrivateEndpointSummary in a compartment associated with a namespace.

        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.

        Specified by:
        listPrivateEndpoints in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listRetentionRules

        public Future<ListRetentionRulesResponse> listRetentionRules​(ListRetentionRulesRequest request,
                                                                     AsyncHandler<ListRetentionRulesRequest,​ListRetentionRulesResponse> handler)
        Description copied from interface: ObjectStorageAsync
        List the retention rules for a bucket.

        The retention rules are sorted based on creation time, with the most recently created retention rule returned first.

        Specified by:
        listRetentionRules in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • makeBucketWritable

        public Future<MakeBucketWritableResponse> makeBucketWritable​(MakeBucketWritableRequest request,
                                                                     AsyncHandler<MakeBucketWritableRequest,​MakeBucketWritableResponse> handler)
        Description copied from interface: ObjectStorageAsync
        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.

        Specified by:
        makeBucketWritable in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • putObject

        public Future<PutObjectResponse> putObject​(PutObjectRequest request,
                                                   AsyncHandler<PutObjectRequest,​PutObjectResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Creates a new object or overwrites an existing object with the same name.

        The maximum object size allowed by PutObject is 50 GiB.

        See [Object Names](https://docs.oracle.com/iaas/Content/Object/Tasks/managingobjects.htm#namerequirements) for object naming requirements.

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

        Specified by:
        putObject in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • reencryptBucket

        public Future<ReencryptBucketResponse> reencryptBucket​(ReencryptBucketRequest request,
                                                               AsyncHandler<ReencryptBucketRequest,​ReencryptBucketResponse> handler)
        Description copied from interface: ObjectStorageAsync
        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.

        Specified by:
        reencryptBucket in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • reencryptObject

        public Future<ReencryptObjectResponse> reencryptObject​(ReencryptObjectRequest request,
                                                               AsyncHandler<ReencryptObjectRequest,​ReencryptObjectResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Re-encrypts the data encryption keys that encrypt the object and its chunks.

        By default, when you create a bucket, the Object Storage service manages the master encryption key used to encrypt each object’s data encryption keys. The encryption mechanism that you specify for the bucket applies to the objects it contains.

        You can alternatively employ one of these encryption strategies for an object:

        - You can assign a key that you created and control through the Oracle Cloud Infrastructure Vault service.

        - You can encrypt an object using your own encryption key. The key you supply is known as a customer-provided encryption key (SSE-C).

        Specified by:
        reencryptObject in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • renameObject

        public Future<RenameObjectResponse> renameObject​(RenameObjectRequest request,
                                                         AsyncHandler<RenameObjectRequest,​RenameObjectResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Rename an object in the given Object Storage namespace.

        See [Object Names](https://docs.oracle.com/iaas/Content/Object/Tasks/managingobjects.htm#namerequirements) for object naming requirements.

        Specified by:
        renameObject in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • restoreObjects

        public Future<RestoreObjectsResponse> restoreObjects​(RestoreObjectsRequest request,
                                                             AsyncHandler<RestoreObjectsRequest,​RestoreObjectsResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Restores the object specified by the objectName parameter.

        By default object will be restored for 24 hours. Duration can be configured using the hours parameter.

        Specified by:
        restoreObjects in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • updateBucket

        public Future<UpdateBucketResponse> updateBucket​(UpdateBucketRequest request,
                                                         AsyncHandler<UpdateBucketRequest,​UpdateBucketResponse> handler)
        Description copied from interface: ObjectStorageAsync
        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.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

        Specified by:
        updateBucket in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • updateNamespaceMetadata

        public Future<UpdateNamespaceMetadataResponse> updateNamespaceMetadata​(UpdateNamespaceMetadataRequest request,
                                                                               AsyncHandler<UpdateNamespaceMetadataRequest,​UpdateNamespaceMetadataResponse> handler)
        Description copied from interface: ObjectStorageAsync
        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.

        Specified by:
        updateNamespaceMetadata in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • updatePrivateEndpoint

        public Future<UpdatePrivateEndpointResponse> updatePrivateEndpoint​(UpdatePrivateEndpointRequest request,
                                                                           AsyncHandler<UpdatePrivateEndpointRequest,​UpdatePrivateEndpointResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Performs a partial or full update of a user-defined data associated with the Private Endpoint.

        Use UpdatePrivateEndpoint to move a Private Endpoint from one compartment to another within the same tenancy. Supply the compartmentID of the compartment that you want to move the Private Endpoint to. Or use it to update the name, subnetId, endpointFqdn or privateEndpointIp or accessTargets of the Private Endpoint. For more information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

        This API follows replace semantics (rather than merge semantics). That means if the body provides values for parameters and the resource has exisiting ones, this operation will replace those existing values.

        Specified by:
        updatePrivateEndpoint in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • uploadPart

        public Future<UploadPartResponse> uploadPart​(UploadPartRequest request,
                                                     AsyncHandler<UploadPartRequest,​UploadPartResponse> handler)
        Description copied from interface: ObjectStorageAsync
        Uploads a single part of a multipart upload.
        Specified by:
        uploadPart in interface ObjectStorageAsync
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • enableDualStackEndpoints

        public void enableDualStackEndpoints​(boolean enableDualStackEndpoints)
        This method should be used to enable or disable the use of dual-stack endpoints.

        The default value is false i.e. dual-stack endpoints are disabled by default.

        Parameters:
        enableDualStackEndpoints - This flag can be set to true or false to enable or disable the use of dual-stack endpoints respectively
      • getOptionsMap

        public Map<String,​Boolean> getOptionsMap()
        Return an immutable snapshot representing the current options set for this client.
        Returns:
        immutable snapshot representing the current options set for this client
      • getResolvedEndpoint

        public String getResolvedEndpoint​(Map<String,​Object> requiredParametersMap)
        Returns the endpoint after filling in the current options, as determined by BaseClient.getOptionsMap(), and then filling in the required parameters in requiredParametersMap into the placeholders in the endpoint.
        Parameters:
        requiredParametersMap - the map from required parameter name to their values
        Returns:
        resolved endpoint, with all options and placeholders filled in
      • useRealmSpecificEndpointTemplate

        public void useRealmSpecificEndpointTemplate​(boolean useOfRealmSpecificEndpointTemplateEnabled)
        This method should be used to enable or disable the use of realm-specific endpoint template.

        The default value is null. To enable the use of endpoint template defined for the realm in use, set the flag to true To disable the use of endpoint template defined for the realm in use, set the flag to false

        Parameters:
        useOfRealmSpecificEndpointTemplateEnabled - This flag can be set to true or false to enable or disable the use of realm-specific endpoint template respectively
      • setEndpoint

        public final void setEndpoint​(String endpoint)
      • getEndpoint

        public final String getEndpoint()
        Get the endpoint of the client.

        Note that the endpoint may be parameterized and contain placeholders and options. The region subdomain and realm domain will have been properly replaced already if the endpoint was selected using a Region.

        Examples of endpoints this may return:

        • Unparameterized endpoints
                       https://identity.us-phoenix-1.oci.oraclecloud.com
                       https://identity.us-ashburn-1.oci.oraclecloud.com
                       https://test-namespace.objectstorage.us-ashburn-1.oci.customer-oci.com
                   
        • Parameterized endpoints with placeholders
                       https://{namespaceName+Dot}objectstorage.us-phoenix-1.oci.customer-oci.com
                       https://{namespaceName+Dot}objectstorage.us-ashburn-1.oci.customer-oci.com
                   
        • Parameterized endpoints with options
                       https://{dualStack?ds.:}identity.us-phoenix-1.oci.oraclecloud.com
                       https://{dualStack?ds.:}identity.us-ashburn-1.oci.oraclecloud.com
                   
        • Parameterized endpoints with placeholders and options
                       https://{namespaceName+Dot}{dualStack?ds.:}objectstorage.us-phoenix-1.oci.customer-oci.com
                       https://{namespaceName+Dot}{dualStack?ds.:}objectstorage.us-ashburn-1.oci.customer-oci.com
                   

        To get the actual endpoint for a parameterized request, you can use BaseClient.getResolvedEndpoint(Map) or ParameterizedEndpointUtil.getEndpointWithPopulatedServiceParameters(String, Map, Map).

        Returns:
        the endpoint being used by the client
      • refreshClient

        public final void refreshClient()
        Rebuild the backing HttpClient.

        This will call ClientConfigurators again, and can be used to e.g. refresh the SSL certificate.

      • getClientCommonLibraryVersion

        public String getClientCommonLibraryVersion()
      • getMinimumClientCommonLibraryVersionFromClient

        public Optional<String> getMinimumClientCommonLibraryVersionFromClient()