import type { AxiosPromise, AxiosInstance } from 'axios'; import { ApsServiceRequestConfig, IApsConfiguration, SdkManager, ApiResponse } from "@aps_sdk/autodesk-sdkmanager"; import { RequestArgs, BaseApi } from '../base'; import { Access } from '../model'; import { Region } from '../model'; import { With } from '../model'; import { BatchcompleteuploadObject } from '../model/batchcompleteuploadObject'; import { BatchcompleteuploadResponse } from '../model/batchcompleteuploadResponse'; import { Batchsigneds3downloadObject } from '../model/batchsigneds3downloadObject'; import { Batchsigneds3downloadResponse } from '../model/batchsigneds3downloadResponse'; import { Batchsigneds3uploadObject } from '../model/batchsigneds3uploadObject'; import { Batchsigneds3uploadResponse } from '../model/batchsigneds3uploadResponse'; import { BucketObjects } from '../model/bucketObjects'; import { Completes3uploadBody } from '../model/completes3uploadBody'; import { CreateObjectSigned } from '../model/createObjectSigned'; import { CreateSignedResource } from '../model/createSignedResource'; import { ObjectDetails } from '../model/objectDetails'; import { ObjectFullDetails } from '../model/objectFullDetails'; import { Signeds3downloadResponse } from '../model/signeds3downloadResponse'; import { Signeds3uploadResponse } from '../model/signeds3uploadResponse'; /** * ObjectsApi - axios parameter creator * @export */ export declare const ObjectsApiAxiosParamCreator: (apsConfiguration?: IApsConfiguration) => { /** * Requests OSS to start reconstituting the set of objects that were uploaded using signed S3 upload URLs. You must call this operation only after all the objects have been uploaded. You can specify up to 25 objects in this operation. * @summary Complete Batch Upload to S3 Signed URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {BatchcompleteuploadObject} [requests] An array of objects, each of which represents an upload to complete. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCompleteUpload: (accessToken: string, bucketKey: string, requests: BatchcompleteuploadObject, options?: ApsServiceRequestConfig) => Promise; /** * Creates and returns signed URLs to download a set of objects directly from S3. These signed URLs expire in 2 minutes by default, but you can change this duration if needed. You must start download the objects before the signed URLs expire. The download itself can take longer. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. * @summary Batch Generate Signed S3 Download URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {Batchsigneds3downloadObject} requests An array of objects representing each request for a signed download URL. * @param {boolean} [publicResourceFallback] Specifies how to return the signed URLs, in case the object was uploaded in chunks, and assembling of chunks is not yet complete. - ``true`` : Return a single signed OSS URL. - ``false`` : (Default) Return multiple signed S3 URLs, where each URL points to a chunk. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchSignedS3Download: (accessToken: string, bucketKey: string, requests: Batchsigneds3downloadObject, publicResourceFallback?: boolean, minutesExpiration?: number, options?: ApsServiceRequestConfig) => Promise; /** * Creates and returns signed URLs to upload a set of objects directly to S3. These signed URLs expire in 2 minutes by default, but you can change this duration if needed. You must start uploading the objects before the signed URLs expire. The upload itself can take longer. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. If required, you can request an array of signed URLs for each object, which lets you upload the objects in chunks. Once you upload all chunks you must call the [Complete Batch Upload to S3 Signed URL](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-batchcompleteupload-POST/) operation to indicate completion. This instructs OSS to assemble the chunks and reconstitute the object on OSS. You must call this operation even if you requested a single signed URL for an object. If an upload fails after the validity period of a signed URL has elapsed, you can call this operation again to obtain fresh signed URLs. However, you must use the same ``uploadKey`` that was returned when you originally called this operation. * @summary Batch Generate Signed S3 Upload URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {boolean} [useAcceleration] ``true`` : (Default) Generates a faster S3 signed URL using Transfer Acceleration. ``false``: Generates a standard S3 signed URL. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {Batchsigneds3uploadObject} [requests] An array of objects representing each request for a signed upload URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchSignedS3Upload: (accessToken: string, bucketKey: string, useAcceleration?: boolean, minutesExpiration?: number, requests?: Batchsigneds3uploadObject, options?: ApsServiceRequestConfig) => Promise; /** * Requests OSS to assemble and reconstitute the object that was uploaded using signed S3 upload URL. You must call this operation only after all parts/chunks of the object has been uploaded. * @summary Complete Upload to S3 Signed URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} contentType Must be ``application/json``. * @param {Completes3uploadBody} body * @param {string} [xAdsMetaContentType] The Content-Type value for the uploaded object to record within OSS. * @param {string} [xAdsMetaContentDisposition] The Content-Disposition value for the uploaded object to record within OSS. * @param {string} [xAdsMetaContentEncoding] The Content-Encoding value for the uploaded object to record within OSS. * @param {string} [xAdsMetaCacheControl] The Cache-Control value for the uploaded object to record within OSS. * @param {string} [xAdsUserDefinedMetadata] Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSignedS3Upload: (accessToken: string, bucketKey: string, objectKey: string, contentType: string, body: Completes3uploadBody, xAdsMetaContentType?: string, xAdsMetaContentDisposition?: string, xAdsMetaContentEncoding?: string, xAdsMetaCacheControl?: string, xAdsUserDefinedMetadata?: string, options?: ApsServiceRequestConfig) => Promise; /** * Creates a copy of an object within the bucket. * @summary Copy Object * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} newObjName A URL-encoded human friendly name to identify the copied object. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS Api Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ copyTo: (accessToken: string, bucketKey: string, objectKey: string, newObjName: string, options?: ApsServiceRequestConfig) => Promise; /** * Generates a signed URL that can be used to download or upload an object within the specified expiration time. If the object the signed URL points to is deleted or expires before the signed URL expires, the signed URL will no longer be valid. In addition to this operation that generates OSS signed URLs, OSS provides operations to generate S3 signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. Only the application that owns the bucket containing the object can call this operation. * @summary Generate OSS Signed URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {Access} [access] * @param {boolean} [useCdn] ``true`` : Returns a Cloudfront URL to the object instead of an Autodesk URL (one that points to a location on https://developer.api.autodesk.com). Applications can interact with the Cloudfront URL exactly like with any classic public resource in OSS. They can use GET requests to download objects or PUT requests to upload objects. ``false`` : (Default) Returns an Autodesk URL (one that points to a location on https://developer.api.autodesk.com) to the object. * @param {CreateSignedResource} [createSignedResource] * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSignedResource: (accessToken: string, bucketKey: string, objectKey: string, access?: Access, useCdn?: boolean, createSignedResource?: CreateSignedResource, options?: ApsServiceRequestConfig) => Promise; /** * Deletes an object from the bucket. * @summary Delete Object * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS API Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteObject: (accessToken: string, bucketKey: string, objectKey: string, options?: ApsServiceRequestConfig) => Promise; /** * Delete an object using an OSS signed URL to access it. Only applications that own the bucket containing the object can call this operation. * @summary Delete Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSignedResource: (accessToken: string, hash: string, xAdsRegion?: Region, options?: ApsServiceRequestConfig) => Promise; /** * Returns detailed information about the specified object. * @summary Get Object Details * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The requested data is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS Api Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param {With} [_with] * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ getObjectDetails: (accessToken: string, bucketKey: string, objectKey: string, ifModifiedSince?: string, _with?: With, options?: ApsServiceRequestConfig) => Promise; /** * Returns a list objects in the specified bucket. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. * @summary List Objects * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {number} [limit] The number of items you want per page. Acceptable values = 1-100. Default = 10. * @param {string} [beginsWith] Filters the results by the value you specify. Only the objects with their ``objectKey`` beginning with the specified string are returned. * @param {string} [startAt] The ID of the last item that was returned in the previous result set. It enables the system to return subsequent items starting from the next one after the specified ID. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ getObjects: (accessToken: string, bucketKey: string, limit?: number, beginsWith?: string, startAt?: string, options?: ApsServiceRequestConfig) => Promise; /** * Downloads an object using an OSS signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains the ``hash`` URI parameter as well. * @summary Download Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {string} [range] The byte range to download, specified in the form ``bytes=<START_BYTE>-<END_BYTE>``. * @param {string} [ifNoneMatch] The last known ETag value of the object. OSS returns the requested data only if the ``If-None-Match`` header differs from the ETag value of the object on OSS, which indicates that the object on OSS is newer. If not, it returns a 304 \"Not Modified\" HTTP status. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The requested data is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [acceptEncoding] The compression format your prefer to receive the data. Possible values are: - ``gzip`` - Use the gzip format **Note:** You cannot use ``Accept-Encoding:gzip`` with a Range header containing an end byte range. OSS will not honor the End byte range if ``Accept-Encoding: gzip`` header is used. * @param {Region} [region] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {string} [responseContentDisposition] The value of the Content-Disposition header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Disposition header defaults to the value stored with OSS. * @param {string} [responseContentType] The value of the Content-Type header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Type header defaults to the value stored with OSS. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSignedResource: (accessToken: string, hash: string, range?: string, ifNoneMatch?: string, ifModifiedSince?: string, acceptEncoding?: string, region?: Region, responseContentDisposition?: string, responseContentType?: string, options?: ApsServiceRequestConfig) => Promise; /** * Gets a signed URL to download an object directly from S3, bypassing OSS servers. This signed URL expires in 2 minutes by default, but you can change this duration if needed. You must start the download before the signed URL expires. The download itself can take longer. If the download fails after the validity period of the signed URL has elapsed, you can call this operation again to obtain a fresh signed URL. Only applications that have read access to the object can call this operation. You can use range headers with the signed download URL to download the object in chunks. This ability lets you download chunks in parallel, which can result in faster downloads. If the object you want to download was uploaded in chunks and is still assembling on OSS, you will receive multiple S3 URLs instead of just one. Each URL will point to a chunk. If you prefer to receive a single URL, set the ``public-resource-fallback`` query parameter to ``true``. This setting will make OSS fallback to returning a single signed OSS URL, if assembling is still in progress. In addition to this operation that generates S3 signed URLs, OSS provides an operation to generate OSS signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. * @summary Generate Signed S3 Download URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [ifNoneMatch] The last known ETag value of the object. OSS returns the signed URL only if the ``If-None-Match`` header differs from the ETag value of the object on S3. If not, it returns a 304 \"Not Modified\" HTTP status. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The signed URL is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [xAdsAcmScopes] Optional OSS-compliant scope reference to increase bucket search performance * @param {string} [responseContentType] The value of the Content-Type header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Type header defaults to the value stored with OSS. * @param {string} [responseContentDisposition] The value of the Content-Disposition header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Disposition header defaults to the value stored with OSS. * @param {string} [responseCacheControl] The value of the Cache-Control header you want to receive when you download the object using the signed URL. If you do not specify a value, the Cache-Control header defaults to the value stored with OSS. * @param {boolean} [publicResourceFallback] Specifies how to return the signed URLs, in case the object was uploaded in chunks, and assembling of chunks is not yet complete. - ``true`` : Return a single signed OSS URL. - ``false`` : (Default) Return multiple signed S3 URLs, where each URL points to a chunk. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {boolean} [useCdn] ``true`` : Returns a URL that points to a CloudFront edge location. ``false`` : (Default) Returns a URL that points directly to the S3 object. * @param {boolean} [redirect] Generates a HTTP redirection response (Temporary Redirect 307​) using the generated URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ signedS3Download: (accessToken: string, bucketKey: string, objectKey: string, ifNoneMatch?: string, ifModifiedSince?: string, responseContentType?: string, responseContentDisposition?: string, responseCacheControl?: string, publicResourceFallback?: boolean, minutesExpiration?: number, useCdn?: boolean, options?: ApsServiceRequestConfig) => Promise; /** * Gets a signed URL to upload an object directly to S3, bypassing OSS servers. You can also request an array of signed URLs which lets you upload an object in chunks. This signed URL expires in 2 minutes by default, but you can change this duration if needed. You must start the upload before the signed URL expires. The upload itself can take longer. If the upload fails after the validity period of the signed URL has elapsed, you can call this operation again to obtain a fresh signed URL (or an array of signed URLs as the case may be). However, you must use the same ``uploadKey`` that was returned when you originally called this operation. Only applications that own the bucket can call this operation. **Note:** Once you upload all chunks you must call the [Complete Upload to S3 Signed URL](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-signeds3upload-POST/) operation to indicate completion. This instructs OSS to assemble the chunks and reconstitute the object on OSS. You must call this operation even when using a single signed URL. In addition to this operation that generates S3 signed URLs, OSS provides an operation to generate OSS signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. * @summary Generate Signed S3 Upload URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [xAdsAcmScopes] Optional OSS-compliant scope reference to increase bucket search performance * @param {number} [parts] The number of parts you intend to chunk the object for uploading. OSS will return that many signed URLs, one URL for each chunk. If you do not specify a value you\'ll get only one URL to upload the entire object. * @param {number} [firstPart] The index of the first chunk to be uploaded. * @param {string} [uploadKey] The ``uploadKey`` of a previously-initiated upload, in order to request more chunk upload URLs for the same upload. If you do not specify a value, OSS will initiate a new upload entirely. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {boolean} [useAcceleration] ``true`` : (Default) Generates a faster S3 signed URL using Transfer Acceleration. ``false``: Generates a standard S3 signed URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ signedS3Upload: (accessToken: string, bucketKey: string, objectKey: string, parts?: number, firstPart?: number, uploadKey?: string, minutesExpiration?: number, useAcceleration?: boolean, options?: ApsServiceRequestConfig) => Promise; /** * Replaces an object that already exists on OSS, using an OSS signed URL. The signed URL must fulfil the following conditions: - The signed URL is valid (it has not expired as yet). - It was generated with ``write`` or ``readwrite`` for the ``access`` parameter. * @summary Replace Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {number} contentLength The size of the data contained in the request body, in bytes. * @param {File} body The object to upload. * @param {string} [contentType] The MIME type of the object to upload; can be any type except \'multipart/form-data\'. This can be omitted, but we recommend adding it. * @param {string} [contentDisposition] The suggested file name to use when this object is downloaded as a file. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {string} [ifMatch] The current value of the ``sha1`` attribute of the object you want to replace. OSS checks the ``If-Match`` header against the ``sha1`` attribute of the object in OSS. If they match, OSS allows the object to be overwritten. Otherwise, it means that the object on OSS has been modified since you retrieved the ``sha1`` and the request fails. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ uploadSignedResource: (accessToken: string, hash: string, contentLength: number, body: File, contentType?: string, contentDisposition?: string, xAdsRegion?: Region, ifMatch?: string, options?: ApsServiceRequestConfig) => Promise; /** * Performs a resumable upload using an OSS signed URL. Use this operation to upload an object in chunks. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains the ``hash`` as a URI parameter. * @summary Upload Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {string} contentRange The byte range to upload, specified in the form ``bytes=<START_BYTE>-<END_BYTE>``. * @param {string} sessionId An ID to uniquely identify the file upload session. * @param {File} body The chunk to upload. * @param {string} [contentType] The MIME type of the object to upload; can be any type except \'multipart/form-data\'. This can be omitted, but we recommend adding it. * @param {string} [contentDisposition] The suggested file name to use when this object is downloaded as a file. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} */ uploadSignedResourcesChunk: (accessToken: string, hash: string, contentRange: string, sessionId: string, body: File, contentType?: string, contentDisposition?: string, xAdsRegion?: Region, options?: ApsServiceRequestConfig) => Promise; }; /** * ObjectsApi - functional programming interface * @export */ export declare const ObjectsApiFp: (sdkManager?: SdkManager) => { /** * Requests OSS to start reconstituting the set of objects that were uploaded using signed S3 upload URLs. You must call this operation only after all the objects have been uploaded. You can specify up to 25 objects in this operation. * @summary Complete Batch Upload to S3 Signed URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {BatchcompleteuploadObject} [requests] An array of objects, each of which represents an upload to complete. * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCompleteUpload(accessToken: string, bucketKey: string, requests?: BatchcompleteuploadObject, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Creates and returns signed URLs to download a set of objects directly from S3. These signed URLs expire in 2 minutes by default, but you can change this duration if needed. You must start download the objects before the signed URLs expire. The download itself can take longer. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. * @summary Batch Generate Signed S3 Download URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {Batchsigneds3downloadObject} requests An array of objects representing each request for a signed download URL. * @param {boolean} [publicResourceFallback] Specifies how to return the signed URLs, in case the object was uploaded in chunks, and assembling of chunks is not yet complete. - ``true`` : Return a single signed OSS URL. - ``false`` : (Default) Return multiple signed S3 URLs, where each URL points to a chunk. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchSignedS3Download(accessToken: string, bucketKey: string, requests: Batchsigneds3downloadObject, publicResourceFallback?: boolean, minutesExpiration?: number, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Creates and returns signed URLs to upload a set of objects directly to S3. These signed URLs expire in 2 minutes by default, but you can change this duration if needed. You must start uploading the objects before the signed URLs expire. The upload itself can take longer. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. If required, you can request an array of signed URLs for each object, which lets you upload the objects in chunks. Once you upload all chunks you must call the [Complete Batch Upload to S3 Signed URL](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-batchcompleteupload-POST/) operation to indicate completion. This instructs OSS to assemble the chunks and reconstitute the object on OSS. You must call this operation even if you requested a single signed URL for an object. If an upload fails after the validity period of a signed URL has elapsed, you can call this operation again to obtain fresh signed URLs. However, you must use the same ``uploadKey`` that was returned when you originally called this operation. * @summary Batch Generate Signed S3 Upload URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {boolean} [useAcceleration] ``true`` : (Default) Generates a faster S3 signed URL using Transfer Acceleration. ``false``: Generates a standard S3 signed URL. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {Batchsigneds3uploadObject} [requests] An array of objects representing each request for a signed upload URL. * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchSignedS3Upload(accessToken: string, bucketKey: string, useAcceleration?: boolean, minutesExpiration?: number, requests?: Batchsigneds3uploadObject, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Requests OSS to assemble and reconstitute the object that was uploaded using signed S3 upload URL. You must call this operation only after all parts/chunks of the object has been uploaded. * @summary Complete Upload to S3 Signed URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} contentType Must be ``application/json``. * @param {Completes3uploadBody} body * @param {string} [xAdsMetaContentType] The Content-Type value for the uploaded object to record within OSS. * @param {string} [xAdsMetaContentDisposition] The Content-Disposition value for the uploaded object to record within OSS. * @param {string} [xAdsMetaContentEncoding] The Content-Encoding value for the uploaded object to record within OSS. * @param {string} [xAdsMetaCacheControl] The Cache-Control value for the uploaded object to record within OSS. * @param {string} [xAdsUserDefinedMetadata] Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSignedS3Upload(accessToken: string, bucketKey: string, objectKey: string, contentType: string, body: Completes3uploadBody, xAdsMetaContentType?: string, xAdsMetaContentDisposition?: string, xAdsMetaContentEncoding?: string, xAdsMetaCacheControl?: string, xAdsUserDefinedMetadata?: string, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Creates a copy of an object within the bucket. * @summary Copy Object * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} newObjName A URL-encoded human friendly name to identify the copied object. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS Api Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param {*} [options] Override http request option. * @throws {RequiredError} */ copyTo(accessToken: string, bucketKey: string, objectKey: string, newObjName: string, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Generates a signed URL that can be used to download or upload an object within the specified expiration time. If the object the signed URL points to is deleted or expires before the signed URL expires, the signed URL will no longer be valid. In addition to this operation that generates OSS signed URLs, OSS provides operations to generate S3 signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. Only the application that owns the bucket containing the object can call this operation. * @summary Generate OSS Signed URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {Access} [access] * @param {boolean} [useCdn] ``true`` : Returns a Cloudfront URL to the object instead of an Autodesk URL (one that points to a location on https://developer.api.autodesk.com). Applications can interact with the Cloudfront URL exactly like with any classic public resource in OSS. They can use GET requests to download objects or PUT requests to upload objects. ``false`` : (Default) Returns an Autodesk URL (one that points to a location on https://developer.api.autodesk.com) to the object. * @param {CreateSignedResource} [createSignedResource] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSignedResource(accessToken: string, bucketKey: string, objectKey: string, access?: Access, useCdn?: boolean, createSignedResource?: CreateSignedResource, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes an object from the bucket. * @summary Delete Object * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS API Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteObject(accessToken: string, bucketKey: string, objectKey: string, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Delete an object using an OSS signed URL to access it. Only applications that own the bucket containing the object can call this operation. * @summary Delete Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSignedResource(accessToken: string, hash: string, xAdsRegion?: Region, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Returns detailed information about the specified object. * @summary Get Object Details * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The requested data is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS Api Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param {With} [_with] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getObjectDetails(accessToken: string, bucketKey: string, objectKey: string, ifModifiedSince?: string, _with?: With, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Returns a list objects in the specified bucket. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. * @summary List Objects * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {number} [limit] The number of items you want per page. Acceptable values = 1-100. Default = 10. * @param {string} [beginsWith] Filters the results by the value you specify. Only the objects with their ``objectKey`` beginning with the specified string are returned. * @param {string} [startAt] The ID of the last item that was returned in the previous result set. It enables the system to return subsequent items starting from the next one after the specified ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getObjects(accessToken: string, bucketKey: string, limit?: number, beginsWith?: string, startAt?: string, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Downloads an object using an OSS signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains the ``hash`` URI parameter as well. * @summary Download Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {string} [range] The byte range to download, specified in the form ``bytes=<START_BYTE>-<END_BYTE>``. * @param {string} [ifNoneMatch] The last known ETag value of the object. OSS returns the requested data only if the ``If-None-Match`` header differs from the ETag value of the object on OSS, which indicates that the object on OSS is newer. If not, it returns a 304 \"Not Modified\" HTTP status. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The requested data is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [acceptEncoding] The compression format your prefer to receive the data. Possible values are: - ``gzip`` - Use the gzip format **Note:** You cannot use ``Accept-Encoding:gzip`` with a Range header containing an end byte range. OSS will not honor the End byte range if ``Accept-Encoding: gzip`` header is used. * @param {Region} [region] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {string} [responseContentDisposition] The value of the Content-Disposition header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Disposition header defaults to the value stored with OSS. * @param {string} [responseContentType] The value of the Content-Type header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Type header defaults to the value stored with OSS. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSignedResource(accessToken: string, hash: string, range?: string, ifNoneMatch?: string, ifModifiedSince?: string, acceptEncoding?: string, region?: Region, responseContentDisposition?: string, responseContentType?: string, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a signed URL to download an object directly from S3, bypassing OSS servers. This signed URL expires in 2 minutes by default, but you can change this duration if needed. You must start the download before the signed URL expires. The download itself can take longer. If the download fails after the validity period of the signed URL has elapsed, you can call this operation again to obtain a fresh signed URL. Only applications that have read access to the object can call this operation. You can use range headers with the signed download URL to download the object in chunks. This ability lets you download chunks in parallel, which can result in faster downloads. If the object you want to download was uploaded in chunks and is still assembling on OSS, you will receive multiple S3 URLs instead of just one. Each URL will point to a chunk. If you prefer to receive a single URL, set the ``public-resource-fallback`` query parameter to ``true``. This setting will make OSS fallback to returning a single signed OSS URL, if assembling is still in progress. In addition to this operation that generates S3 signed URLs, OSS provides an operation to generate OSS signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. * @summary Generate Signed S3 Download URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [ifNoneMatch] The last known ETag value of the object. OSS returns the signed URL only if the ``If-None-Match`` header differs from the ETag value of the object on S3. If not, it returns a 304 \"Not Modified\" HTTP status. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The signed URL is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [xAdsAcmScopes] Optional OSS-compliant scope reference to increase bucket search performance * @param {string} [responseContentType] The value of the Content-Type header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Type header defaults to the value stored with OSS. * @param {string} [responseContentDisposition] The value of the Content-Disposition header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Disposition header defaults to the value stored with OSS. * @param {string} [responseCacheControl] The value of the Cache-Control header you want to receive when you download the object using the signed URL. If you do not specify a value, the Cache-Control header defaults to the value stored with OSS. * @param {boolean} [publicResourceFallback] Specifies how to return the signed URLs, in case the object was uploaded in chunks, and assembling of chunks is not yet complete. - ``true`` : Return a single signed OSS URL. - ``false`` : (Default) Return multiple signed S3 URLs, where each URL points to a chunk. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {boolean} [useCdn] ``true`` : Returns a URL that points to a CloudFront edge location. ``false`` : (Default) Returns a URL that points directly to the S3 object. * @param {boolean} [redirect] Generates a HTTP redirection response (Temporary Redirect 307​) using the generated URL. * @param {*} [options] Override http request option. * @throws {RequiredError} */ signedS3Download(accessToken: string, bucketKey: string, objectKey: string, ifNoneMatch?: string, ifModifiedSince?: string, responseContentType?: string, responseContentDisposition?: string, responseCacheControl?: string, publicResourceFallback?: boolean, minutesExpiration?: number, useCdn?: boolean, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a signed URL to upload an object directly to S3, bypassing OSS servers. You can also request an array of signed URLs which lets you upload an object in chunks. This signed URL expires in 2 minutes by default, but you can change this duration if needed. You must start the upload before the signed URL expires. The upload itself can take longer. If the upload fails after the validity period of the signed URL has elapsed, you can call this operation again to obtain a fresh signed URL (or an array of signed URLs as the case may be). However, you must use the same ``uploadKey`` that was returned when you originally called this operation. Only applications that own the bucket can call this operation. **Note:** Once you upload all chunks you must call the [Complete Upload to S3 Signed URL](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-signeds3upload-POST/) operation to indicate completion. This instructs OSS to assemble the chunks and reconstitute the object on OSS. You must call this operation even when using a single signed URL. In addition to this operation that generates S3 signed URLs, OSS provides an operation to generate OSS signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. * @summary Generate Signed S3 Upload URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [xAdsAcmScopes] Optional OSS-compliant scope reference to increase bucket search performance * @param {number} [parts] The number of parts you intend to chunk the object for uploading. OSS will return that many signed URLs, one URL for each chunk. If you do not specify a value you\'ll get only one URL to upload the entire object. * @param {number} [firstPart] The index of the first chunk to be uploaded. * @param {string} [uploadKey] The ``uploadKey`` of a previously-initiated upload, in order to request more chunk upload URLs for the same upload. If you do not specify a value, OSS will initiate a new upload entirely. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {boolean} [useAcceleration] ``true`` : (Default) Generates a faster S3 signed URL using Transfer Acceleration. ``false``: Generates a standard S3 signed URL. * @param {*} [options] Override http request option. * @throws {RequiredError} */ signedS3Upload(accessToken: string, bucketKey: string, objectKey: string, parts?: number, firstPart?: number, uploadKey?: string, minutesExpiration?: number, useAcceleration?: boolean, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Replaces an object that already exists on OSS, using an OSS signed URL. The signed URL must fulfil the following conditions: - The signed URL is valid (it has not expired as yet). - It was generated with ``write`` or ``readwrite`` for the ``access`` parameter. * @summary Replace Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {number} contentLength The size of the data contained in the request body, in bytes. * @param {File} body The object to upload. * @param {string} [contentType] The MIME type of the object to upload; can be any type except \'multipart/form-data\'. This can be omitted, but we recommend adding it. * @param {string} [contentDisposition] The suggested file name to use when this object is downloaded as a file. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {string} [ifMatch] The current value of the ``sha1`` attribute of the object you want to replace. OSS checks the ``If-Match`` header against the ``sha1`` attribute of the object in OSS. If they match, OSS allows the object to be overwritten. Otherwise, it means that the object on OSS has been modified since you retrieved the ``sha1`` and the request fails. * @param {*} [options] Override http request option. * @throws {RequiredError} */ uploadSignedResource(accessToken: string, hash: string, contentLength: number, body: File, contentType?: string, contentDisposition?: string, xAdsRegion?: Region, ifMatch?: string, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Performs a resumable upload using an OSS signed URL. Use this operation to upload an object in chunks. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains the ``hash`` as a URI parameter. * @summary Upload Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {string} contentRange The byte range to upload, specified in the form ``bytes=<START_BYTE>-<END_BYTE>``. * @param {string} sessionId An ID to uniquely identify the file upload session. * @param {File} body The chunk to upload. * @param {string} [contentType] The MIME type of the object to upload; can be any type except \'multipart/form-data\'. This can be omitted, but we recommend adding it. * @param {string} [contentDisposition] The suggested file name to use when this object is downloaded as a file. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {*} [options] Override http request option. * @throws {RequiredError} */ uploadSignedResourcesChunk(accessToken: string, hash: string, contentRange: string, sessionId: string, body: File, contentType?: string, contentDisposition?: string, xAdsRegion?: Region, options?: ApsServiceRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * ObjectsApi - interface * @export * @interface ObjectsApi */ export interface ObjectsApiInterface { /** * Requests OSS to start reconstituting the set of objects that were uploaded using signed S3 upload URLs. You must call this operation only after all the objects have been uploaded. You can specify up to 25 objects in this operation. * @summary Complete Batch Upload to S3 Signed URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {BatchcompleteuploadObject} [requests] An array of objects, each of which represents an upload to complete. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ batchCompleteUpload(accessToken: string, bucketKey: string, requests?: BatchcompleteuploadObject, options?: ApsServiceRequestConfig): Promise; /** * Creates and returns signed URLs to download a set of objects directly from S3. These signed URLs expire in 2 minutes by default, but you can change this duration if needed. You must start download the objects before the signed URLs expire. The download itself can take longer. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. * @summary Batch Generate Signed S3 Download URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {Batchsigneds3downloadObject} requests An array of objects representing each request for a signed download URL. * @param {boolean} [publicResourceFallback] Specifies how to return the signed URLs, in case the object was uploaded in chunks, and assembling of chunks is not yet complete. - ``true`` : Return a single signed OSS URL. - ``false`` : (Default) Return multiple signed S3 URLs, where each URL points to a chunk. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ batchSignedS3Download(accessToken: string, bucketKey: string, requests: Batchsigneds3downloadObject, publicResourceFallback?: boolean, minutesExpiration?: number, options?: ApsServiceRequestConfig): Promise; /** * Creates and returns signed URLs to upload a set of objects directly to S3. These signed URLs expire in 2 minutes by default, but you can change this duration if needed. You must start uploading the objects before the signed URLs expire. The upload itself can take longer. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. If required, you can request an array of signed URLs for each object, which lets you upload the objects in chunks. Once you upload all chunks you must call the [Complete Batch Upload to S3 Signed URL](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-batchcompleteupload-POST/) operation to indicate completion. This instructs OSS to assemble the chunks and reconstitute the object on OSS. You must call this operation even if you requested a single signed URL for an object. If an upload fails after the validity period of a signed URL has elapsed, you can call this operation again to obtain fresh signed URLs. However, you must use the same ``uploadKey`` that was returned when you originally called this operation. * @summary Batch Generate Signed S3 Upload URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {boolean} [useAcceleration] ``true`` : (Default) Generates a faster S3 signed URL using Transfer Acceleration. ``false``: Generates a standard S3 signed URL. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {Batchsigneds3uploadObject} [requests] An array of objects representing each request for a signed upload URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ batchSignedS3Upload(accessToken: string, bucketKey: string, useAcceleration?: boolean, minutesExpiration?: number, requests?: Batchsigneds3uploadObject, options?: ApsServiceRequestConfig): Promise; /** * Requests OSS to assemble and reconstitute the object that was uploaded using signed S3 upload URL. You must call this operation only after all parts/chunks of the object has been uploaded. * @summary Complete Upload to S3 Signed URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} contentType Must be ``application/json``. * @param {Completes3uploadBody} body * @param {string} [xAdsMetaContentType] The Content-Type value for the uploaded object to record within OSS. * @param {string} [xAdsMetaContentDisposition] The Content-Disposition value for the uploaded object to record within OSS. * @param {string} [xAdsMetaContentEncoding] The Content-Encoding value for the uploaded object to record within OSS. * @param {string} [xAdsMetaCacheControl] The Cache-Control value for the uploaded object to record within OSS. * @param {string} [xAdsUserDefinedMetadata] Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ completeSignedS3Upload(accessToken: string, bucketKey: string, objectKey: string, contentType: string, body: Completes3uploadBody, xAdsMetaContentType?: string, xAdsMetaContentDisposition?: string, xAdsMetaContentEncoding?: string, xAdsMetaCacheControl?: string, xAdsUserDefinedMetadata?: string, options?: ApsServiceRequestConfig): Promise; /** * Creates a copy of an object within the bucket. * @summary Copy Object * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} newObjName A URL-encoded human friendly name to identify the copied object. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS Api Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ copyTo(accessToken: string, bucketKey: string, objectKey: string, newObjName: string, options?: ApsServiceRequestConfig): Promise; /** * Generates a signed URL that can be used to download or upload an object within the specified expiration time. If the object the signed URL points to is deleted or expires before the signed URL expires, the signed URL will no longer be valid. In addition to this operation that generates OSS signed URLs, OSS provides operations to generate S3 signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. Only the application that owns the bucket containing the object can call this operation. * @summary Generate OSS Signed URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {Access} [access] * @param {boolean} [useCdn] ``true`` : Returns a Cloudfront URL to the object instead of an Autodesk URL (one that points to a location on https://developer.api.autodesk.com). Applications can interact with the Cloudfront URL exactly like with any classic public resource in OSS. They can use GET requests to download objects or PUT requests to upload objects. ``false`` : (Default) Returns an Autodesk URL (one that points to a location on https://developer.api.autodesk.com) to the object. * @param {CreateSignedResource} [createSignedResource] * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ createSignedResource(accessToken: string, bucketKey: string, objectKey: string, access?: Access, useCdn?: boolean, createSignedResource?: CreateSignedResource, options?: ApsServiceRequestConfig): Promise; /** * Deletes an object from the bucket. * @summary Delete Object * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS API Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ deleteObject(accessToken: string, bucketKey: string, objectKey: string, options?: ApsServiceRequestConfig): Promise; /** * Delete an object using an OSS signed URL to access it. Only applications that own the bucket containing the object can call this operation. * @summary Delete Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ deleteSignedResource(accessToken: string, hash: string, xAdsRegion?: Region, options?: ApsServiceRequestConfig): Promise; /** * Returns detailed information about the specified object. * @summary Get Object Details * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The requested data is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS Api Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param {With} [_with] * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ getObjectDetails(accessToken: string, bucketKey: string, objectKey: string, ifModifiedSince?: string, _with?: With, options?: ApsServiceRequestConfig): Promise; /** * Returns a list objects in the specified bucket. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. * @summary List Objects * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {number} [limit] The number of items you want per page. Acceptable values = 1-100. Default = 10. * @param {string} [beginsWith] Filters the results by the value you specify. Only the objects with their ``objectKey`` beginning with the specified string are returned. * @param {string} [startAt] The ID of the last item that was returned in the previous result set. It enables the system to return subsequent items starting from the next one after the specified ID. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ getObjects(accessToken: string, bucketKey: string, limit?: number, beginsWith?: string, startAt?: string, options?: ApsServiceRequestConfig): Promise; /** * Downloads an object using an OSS signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains the ``hash`` URI parameter as well. * @summary Download Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {string} [range] The byte range to download, specified in the form ``bytes=<START_BYTE>-<END_BYTE>``. * @param {string} [ifNoneMatch] The last known ETag value of the object. OSS returns the requested data only if the ``If-None-Match`` header differs from the ETag value of the object on OSS, which indicates that the object on OSS is newer. If not, it returns a 304 \"Not Modified\" HTTP status. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The requested data is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [acceptEncoding] The compression format your prefer to receive the data. Possible values are: - ``gzip`` - Use the gzip format **Note:** You cannot use ``Accept-Encoding:gzip`` with a Range header containing an end byte range. OSS will not honor the End byte range if ``Accept-Encoding: gzip`` header is used. * @param {Region} [region] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {string} [responseContentDisposition] The value of the Content-Disposition header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Disposition header defaults to the value stored with OSS. * @param {string} [responseContentType] The value of the Content-Type header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Type header defaults to the value stored with OSS. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ getSignedResource(accessToken: string, hash: string, range?: string, ifNoneMatch?: string, ifModifiedSince?: string, acceptEncoding?: string, region?: Region, responseContentDisposition?: string, responseContentType?: string, options?: ApsServiceRequestConfig): Promise; /** * Gets a signed URL to download an object directly from S3, bypassing OSS servers. This signed URL expires in 2 minutes by default, but you can change this duration if needed. You must start the download before the signed URL expires. The download itself can take longer. If the download fails after the validity period of the signed URL has elapsed, you can call this operation again to obtain a fresh signed URL. Only applications that have read access to the object can call this operation. You can use range headers with the signed download URL to download the object in chunks. This ability lets you download chunks in parallel, which can result in faster downloads. If the object you want to download was uploaded in chunks and is still assembling on OSS, you will receive multiple S3 URLs instead of just one. Each URL will point to a chunk. If you prefer to receive a single URL, set the ``public-resource-fallback`` query parameter to ``true``. This setting will make OSS fallback to returning a single signed OSS URL, if assembling is still in progress. In addition to this operation that generates S3 signed URLs, OSS provides an operation to generate OSS signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. * @summary Generate Signed S3 Download URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [ifNoneMatch] The last known ETag value of the object. OSS returns the signed URL only if the ``If-None-Match`` header differs from the ETag value of the object on S3. If not, it returns a 304 \"Not Modified\" HTTP status. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The signed URL is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [xAdsAcmScopes] Optional OSS-compliant scope reference to increase bucket search performance * @param {string} [responseContentType] The value of the Content-Type header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Type header defaults to the value stored with OSS. * @param {string} [responseContentDisposition] The value of the Content-Disposition header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Disposition header defaults to the value stored with OSS. * @param {string} [responseCacheControl] The value of the Cache-Control header you want to receive when you download the object using the signed URL. If you do not specify a value, the Cache-Control header defaults to the value stored with OSS. * @param {boolean} [publicResourceFallback] Specifies how to return the signed URLs, in case the object was uploaded in chunks, and assembling of chunks is not yet complete. - ``true`` : Return a single signed OSS URL. - ``false`` : (Default) Return multiple signed S3 URLs, where each URL points to a chunk. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {boolean} [useCdn] ``true`` : Returns a URL that points to a CloudFront edge location. ``false`` : (Default) Returns a URL that points directly to the S3 object. * @param {boolean} [redirect] Generates a HTTP redirection response (Temporary Redirect 307​) using the generated URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ signedS3Download(accessToken: string, bucketKey: string, objectKey: string, ifNoneMatch?: string, ifModifiedSince?: string, responseContentType?: string, responseContentDisposition?: string, responseCacheControl?: string, publicResourceFallback?: boolean, minutesExpiration?: number, useCdn?: boolean, options?: ApsServiceRequestConfig): Promise; /** * Gets a signed URL to upload an object directly to S3, bypassing OSS servers. You can also request an array of signed URLs which lets you upload an object in chunks. This signed URL expires in 2 minutes by default, but you can change this duration if needed. You must start the upload before the signed URL expires. The upload itself can take longer. If the upload fails after the validity period of the signed URL has elapsed, you can call this operation again to obtain a fresh signed URL (or an array of signed URLs as the case may be). However, you must use the same ``uploadKey`` that was returned when you originally called this operation. Only applications that own the bucket can call this operation. **Note:** Once you upload all chunks you must call the [Complete Upload to S3 Signed URL](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-signeds3upload-POST/) operation to indicate completion. This instructs OSS to assemble the chunks and reconstitute the object on OSS. You must call this operation even when using a single signed URL. In addition to this operation that generates S3 signed URLs, OSS provides an operation to generate OSS signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. * @summary Generate Signed S3 Upload URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [xAdsAcmScopes] Optional OSS-compliant scope reference to increase bucket search performance * @param {number} [parts] The number of parts you intend to chunk the object for uploading. OSS will return that many signed URLs, one URL for each chunk. If you do not specify a value you\'ll get only one URL to upload the entire object. * @param {number} [firstPart] The index of the first chunk to be uploaded. * @param {string} [uploadKey] The ``uploadKey`` of a previously-initiated upload, in order to request more chunk upload URLs for the same upload. If you do not specify a value, OSS will initiate a new upload entirely. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {boolean} [useAcceleration] ``true`` : (Default) Generates a faster S3 signed URL using Transfer Acceleration. ``false``: Generates a standard S3 signed URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ signedS3Upload(accessToken: string, bucketKey: string, objectKey: string, parts?: number, firstPart?: number, uploadKey?: string, minutesExpiration?: number, useAcceleration?: boolean, options?: ApsServiceRequestConfig): Promise; /** * Replaces an object that already exists on OSS, using an OSS signed URL. The signed URL must fulfil the following conditions: - The signed URL is valid (it has not expired as yet). - It was generated with ``write`` or ``readwrite`` for the ``access`` parameter. * @summary Replace Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {number} contentLength The size of the data contained in the request body, in bytes. * @param {File} body The object to upload. * @param {string} [contentType] The MIME type of the object to upload; can be any type except \'multipart/form-data\'. This can be omitted, but we recommend adding it. * @param {string} [contentDisposition] The suggested file name to use when this object is downloaded as a file. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {string} [ifMatch] The current value of the ``sha1`` attribute of the object you want to replace. OSS checks the ``If-Match`` header against the ``sha1`` attribute of the object in OSS. If they match, OSS allows the object to be overwritten. Otherwise, it means that the object on OSS has been modified since you retrieved the ``sha1`` and the request fails. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ uploadSignedResource(accessToken: string, hash: string, contentLength: number, body: File, contentType?: string, contentDisposition?: string, xAdsRegion?: Region, ifMatch?: string, options?: ApsServiceRequestConfig): Promise; /** * Performs a resumable upload using an OSS signed URL. Use this operation to upload an object in chunks. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains the ``hash`` as a URI parameter. * @summary Upload Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {string} contentRange The byte range to upload, specified in the form ``bytes=<START_BYTE>-<END_BYTE>``. * @param {string} sessionId An ID to uniquely identify the file upload session. * @param {File} body The chunk to upload. * @param {string} [contentType] The MIME type of the object to upload; can be any type except \'multipart/form-data\'. This can be omitted, but we recommend adding it. * @param {string} [contentDisposition] The suggested file name to use when this object is downloaded as a file. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApiInterface */ uploadSignedResourcesChunk(accessToken: string, hash: string, contentRange: string, sessionId: string, body: File, contentType?: string, contentDisposition?: string, xAdsRegion?: Region, options?: ApsServiceRequestConfig): Promise; } /** * ObjectsApi - object-oriented interface * @export * @class ObjectsApi * @extends {BaseApi} */ export declare class ObjectsApi extends BaseApi implements ObjectsApiInterface { private logger; /** * Requests OSS to start reconstituting the set of objects that were uploaded using signed S3 upload URLs. You must call this operation only after all the objects have been uploaded. You can specify up to 25 objects in this operation. * @summary Complete Batch Upload to S3 Signed URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {BatchcompleteuploadObject} [requests] An array of objects, each of which represents an upload to complete. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ batchCompleteUpload(accessToken: string, bucketKey: string, requests?: BatchcompleteuploadObject, options?: ApsServiceRequestConfig): Promise; /** * Creates and returns signed URLs to download a set of objects directly from S3. These signed URLs expire in 2 minutes by default, but you can change this duration if needed. You must start download the objects before the signed URLs expire. The download itself can take longer. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. * @summary Batch Generate Signed S3 Download URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {Batchsigneds3downloadObject} requests An array of objects representing each request for a signed download URL. * @param {boolean} [publicResourceFallback] Specifies how to return the signed URLs, in case the object was uploaded in chunks, and assembling of chunks is not yet complete. - ``true`` : Return a single signed OSS URL. - ``false`` : (Default) Return multiple signed S3 URLs, where each URL points to a chunk. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ batchSignedS3Download(accessToken: string, bucketKey: string, requests: Batchsigneds3downloadObject, publicResourceFallback?: boolean, minutesExpiration?: number, options?: ApsServiceRequestConfig): Promise; /** * Creates and returns signed URLs to upload a set of objects directly to S3. These signed URLs expire in 2 minutes by default, but you can change this duration if needed. You must start uploading the objects before the signed URLs expire. The upload itself can take longer. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. If required, you can request an array of signed URLs for each object, which lets you upload the objects in chunks. Once you upload all chunks you must call the [Complete Batch Upload to S3 Signed URL](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-batchcompleteupload-POST/) operation to indicate completion. This instructs OSS to assemble the chunks and reconstitute the object on OSS. You must call this operation even if you requested a single signed URL for an object. If an upload fails after the validity period of a signed URL has elapsed, you can call this operation again to obtain fresh signed URLs. However, you must use the same ``uploadKey`` that was returned when you originally called this operation. * @summary Batch Generate Signed S3 Upload URLs * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {boolean} [useAcceleration] ``true`` : (Default) Generates a faster S3 signed URL using Transfer Acceleration. ``false``: Generates a standard S3 signed URL. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {Batchsigneds3uploadObject} [requests] An array of objects representing each request for a signed upload URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ batchSignedS3Upload(accessToken: string, bucketKey: string, useAcceleration?: boolean, minutesExpiration?: number, requests?: Batchsigneds3uploadObject, options?: ApsServiceRequestConfig): Promise; /** * Requests OSS to assemble and reconstitute the object that was uploaded using signed S3 upload URL. You must call this operation only after all parts/chunks of the object has been uploaded. * @summary Complete Upload to S3 Signed URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} contentType Must be ``application/json``. * @param {Completes3uploadBody} body * @param {string} [xAdsMetaContentType] The Content-Type value for the uploaded object to record within OSS. * @param {string} [xAdsMetaContentDisposition] The Content-Disposition value for the uploaded object to record within OSS. * @param {string} [xAdsMetaContentEncoding] The Content-Encoding value for the uploaded object to record within OSS. * @param {string} [xAdsMetaCacheControl] The Cache-Control value for the uploaded object to record within OSS. * @param {string} [xAdsUserDefinedMetadata] Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ completeSignedS3Upload(accessToken: string, bucketKey: string, objectKey: string, contentType: string, body: Completes3uploadBody, xAdsMetaContentType?: string, xAdsMetaContentDisposition?: string, xAdsMetaContentEncoding?: string, xAdsMetaCacheControl?: string, xAdsUserDefinedMetadata?: string, options?: ApsServiceRequestConfig): Promise; /** * Creates a copy of an object within the bucket. * @summary Copy Object * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} newObjName A URL-encoded human friendly name to identify the copied object. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS Api Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ copyTo(accessToken: string, bucketKey: string, objectKey: string, newObjName: string, options?: ApsServiceRequestConfig): Promise; /** * Generates a signed URL that can be used to download or upload an object within the specified expiration time. If the object the signed URL points to is deleted or expires before the signed URL expires, the signed URL will no longer be valid. In addition to this operation that generates OSS signed URLs, OSS provides operations to generate S3 signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. Only the application that owns the bucket containing the object can call this operation. * @summary Generate OSS Signed URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {Access} [access] * @param {boolean} [useCdn] ``true`` : Returns a Cloudfront URL to the object instead of an Autodesk URL (one that points to a location on https://developer.api.autodesk.com). Applications can interact with the Cloudfront URL exactly like with any classic public resource in OSS. They can use GET requests to download objects or PUT requests to upload objects. ``false`` : (Default) Returns an Autodesk URL (one that points to a location on https://developer.api.autodesk.com) to the object. * @param {CreateSignedResource} [createSignedResource] * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ createSignedResource(accessToken: string, bucketKey: string, objectKey: string, access?: Access, useCdn?: boolean, createSignedResource?: CreateSignedResource, options?: ApsServiceRequestConfig): Promise; /** * Deletes an object from the bucket. * @summary Delete Object * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS API Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ deleteObject(accessToken: string, bucketKey: string, objectKey: string, options?: ApsServiceRequestConfig): Promise; /** * Delete an object using an OSS signed URL to access it. Only applications that own the bucket containing the object can call this operation. * @summary Delete Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ deleteSignedResource(accessToken: string, hash: string, xAdsRegion?: Region, options?: ApsServiceRequestConfig): Promise; /** * Returns detailed information about the specified object. * @summary Get Object Details * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The requested data is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [xAdsAcmNamespace] This header is used to let the OSS Api Proxy know if ACM is used to authorize access to the given object. If this authorization is used by your service, then you must provide the name of the namespace you want to validate access control policies against. * @param {string} [xAdsAcmCheckGroups] Informs the OSS Api Proxy know if your service requires ACM authorization to also validate against Oxygen groups. If so, you must pass this header with a value of ``true``. Otherwise, the assumption is that checking authorization against Oxygen groups is not required. * @param {string} [xAdsAcmGroups] Use this header to pass the Oxygen groups you want the OSS Api Proxy to use for group validation for the given user in the OAuth2 token. * @param {With} [_with] * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ getObjectDetails(accessToken: string, bucketKey: string, objectKey: string, ifModifiedSince?: string, _with?: With, options?: ApsServiceRequestConfig): Promise; /** * Returns a list objects in the specified bucket. Only the application that owns the bucket can call this operation. All other applications that call this operation will receive a \"403 Forbidden\" error. * @summary List Objects * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {number} [limit] The number of items you want per page. Acceptable values = 1-100. Default = 10. * @param {string} [beginsWith] Filters the results by the value you specify. Only the objects with their ``objectKey`` beginning with the specified string are returned. * @param {string} [startAt] The ID of the last item that was returned in the previous result set. It enables the system to return subsequent items starting from the next one after the specified ID. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ getObjects(accessToken: string, bucketKey: string, limit?: number, beginsWith?: string, startAt?: string, options?: ApsServiceRequestConfig): Promise; /** * Downloads an object using an OSS signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains the ``hash`` URI parameter as well. * @summary Download Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {string} [range] The byte range to download, specified in the form ``bytes=<START_BYTE>-<END_BYTE>``. * @param {string} [ifNoneMatch] The last known ETag value of the object. OSS returns the requested data only if the ``If-None-Match`` header differs from the ETag value of the object on OSS, which indicates that the object on OSS is newer. If not, it returns a 304 \"Not Modified\" HTTP status. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The requested data is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [acceptEncoding] The compression format your prefer to receive the data. Possible values are: - ``gzip`` - Use the gzip format **Note:** You cannot use ``Accept-Encoding:gzip`` with a Range header containing an end byte range. OSS will not honor the End byte range if ``Accept-Encoding: gzip`` header is used. * @param {Region} [region] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {string} [responseContentDisposition] The value of the Content-Disposition header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Disposition header defaults to the value stored with OSS. * @param {string} [responseContentType] The value of the Content-Type header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Type header defaults to the value stored with OSS. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ getSignedResource(accessToken: string, hash: string, range?: string, ifNoneMatch?: string, ifModifiedSince?: string, acceptEncoding?: string, region?: Region, responseContentDisposition?: string, responseContentType?: string, options?: ApsServiceRequestConfig): Promise; /** * Gets a signed URL to download an object directly from S3, bypassing OSS servers. This signed URL expires in 2 minutes by default, but you can change this duration if needed. You must start the download before the signed URL expires. The download itself can take longer. If the download fails after the validity period of the signed URL has elapsed, you can call this operation again to obtain a fresh signed URL. Only applications that have read access to the object can call this operation. You can use range headers with the signed download URL to download the object in chunks. This ability lets you download chunks in parallel, which can result in faster downloads. If the object you want to download was uploaded in chunks and is still assembling on OSS, you will receive multiple S3 URLs instead of just one. Each URL will point to a chunk. If you prefer to receive a single URL, set the ``public-resource-fallback`` query parameter to ``true``. This setting will make OSS fallback to returning a single signed OSS URL, if assembling is still in progress. In addition to this operation that generates S3 signed URLs, OSS provides an operation to generate OSS signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. * @summary Generate Signed S3 Download URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [ifNoneMatch] The last known ETag value of the object. OSS returns the signed URL only if the ``If-None-Match`` header differs from the ETag value of the object on S3. If not, it returns a 304 \"Not Modified\" HTTP status. * @param {string} [ifModifiedSince] A timestamp in the HTTP date format (Mon, DD Month YYYY HH:MM:SS GMT). The signed URL is returned only if the object has been modified since the specified timestamp. If not, a 304 (Not Modified) HTTP status is returned. * @param {string} [xAdsAcmScopes] Optional OSS-compliant scope reference to increase bucket search performance * @param {string} [responseContentType] The value of the Content-Type header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Type header defaults to the value stored with OSS. * @param {string} [responseContentDisposition] The value of the Content-Disposition header you want to receive when you download the object using the signed URL. If you do not specify a value, the Content-Disposition header defaults to the value stored with OSS. * @param {string} [responseCacheControl] The value of the Cache-Control header you want to receive when you download the object using the signed URL. If you do not specify a value, the Cache-Control header defaults to the value stored with OSS. * @param {boolean} [publicResourceFallback] Specifies how to return the signed URLs, in case the object was uploaded in chunks, and assembling of chunks is not yet complete. - ``true`` : Return a single signed OSS URL. - ``false`` : (Default) Return multiple signed S3 URLs, where each URL points to a chunk. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {boolean} [useCdn] ``true`` : Returns a URL that points to a CloudFront edge location. ``false`` : (Default) Returns a URL that points directly to the S3 object. * @param {boolean} [redirect] Generates a HTTP redirection response (Temporary Redirect 307​) using the generated URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ signedS3Download(accessToken: string, bucketKey: string, objectKey: string, ifNoneMatch?: string, ifModifiedSince?: string, responseContentType?: string, responseContentDisposition?: string, responseCacheControl?: string, publicResourceFallback?: boolean, minutesExpiration?: number, useCdn?: boolean, options?: ApsServiceRequestConfig): Promise; /** * Gets a signed URL to upload an object directly to S3, bypassing OSS servers. You can also request an array of signed URLs which lets you upload an object in chunks. This signed URL expires in 2 minutes by default, but you can change this duration if needed. You must start the upload before the signed URL expires. The upload itself can take longer. If the upload fails after the validity period of the signed URL has elapsed, you can call this operation again to obtain a fresh signed URL (or an array of signed URLs as the case may be). However, you must use the same ``uploadKey`` that was returned when you originally called this operation. Only applications that own the bucket can call this operation. **Note:** Once you upload all chunks you must call the [Complete Upload to S3 Signed URL](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-signeds3upload-POST/) operation to indicate completion. This instructs OSS to assemble the chunks and reconstitute the object on OSS. You must call this operation even when using a single signed URL. In addition to this operation that generates S3 signed URLs, OSS provides an operation to generate OSS signed URLs. S3 signed URLs allow direct upload/download from S3 but are restricted to bucket owners. OSS signed URLs also allow upload/download and can be configured for access by other applications, making them suitable for sharing objects across applications. * @summary Generate Signed S3 Upload URL * @param {string} bucketKey The bucket key of the bucket that contains the objects you are operating on. * @param {string} objectKey The URL-encoded human friendly name of the object. * @param {string} [xAdsAcmScopes] Optional OSS-compliant scope reference to increase bucket search performance * @param {number} [parts] The number of parts you intend to chunk the object for uploading. OSS will return that many signed URLs, one URL for each chunk. If you do not specify a value you\'ll get only one URL to upload the entire object. * @param {number} [firstPart] The index of the first chunk to be uploaded. * @param {string} [uploadKey] The ``uploadKey`` of a previously-initiated upload, in order to request more chunk upload URLs for the same upload. If you do not specify a value, OSS will initiate a new upload entirely. * @param {number} [minutesExpiration] The time window (in minutes) the signed URL will remain usable. Acceptable values = 1-60 minutes. Default = 2 minutes. **Tip:** Use the smallest possible time window to minimize exposure of the signed URL. * @param {boolean} [useAcceleration] ``true`` : (Default) Generates a faster S3 signed URL using Transfer Acceleration. ``false``: Generates a standard S3 signed URL. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ signedS3Upload(accessToken: string, bucketKey: string, objectKey: string, parts?: number, firstPart?: number, uploadKey?: string, minutesExpiration?: number, useAcceleration?: boolean, options?: ApsServiceRequestConfig): Promise; /** * Replaces an object that already exists on OSS, using an OSS signed URL. The signed URL must fulfil the following conditions: - The signed URL is valid (it has not expired as yet). - It was generated with ``write`` or ``readwrite`` for the ``access`` parameter. * @summary Replace Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {number} contentLength The size of the data contained in the request body, in bytes. * @param {File} body The object to upload. * @param {string} [contentType] The MIME type of the object to upload; can be any type except \'multipart/form-data\'. This can be omitted, but we recommend adding it. * @param {string} [contentDisposition] The suggested file name to use when this object is downloaded as a file. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param {string} [ifMatch] The current value of the ``sha1`` attribute of the object you want to replace. OSS checks the ``If-Match`` header against the ``sha1`` attribute of the object in OSS. If they match, OSS allows the object to be overwritten. Otherwise, it means that the object on OSS has been modified since you retrieved the ``sha1`` and the request fails. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ uploadSignedResource(accessToken: string, hash: string, contentLength: number, body: File, contentType?: string, contentDisposition?: string, xAdsRegion?: Region, ifMatch?: string, options?: ApsServiceRequestConfig): Promise; /** * Performs a resumable upload using an OSS signed URL. Use this operation to upload an object in chunks. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains the ``hash`` as a URI parameter. * @summary Upload Object Using Signed URL * @param {string} hash The ID component of the signed URL. **Note:** The signed URL returned by [Generate OSS Signed URL](/en/docs/data/v2/reference/http/signedresources-:id-GET/) contains ``hash`` as a URI parameter. * @param {string} contentRange The byte range to upload, specified in the form ``bytes=<START_BYTE>-<END_BYTE>``. * @param {string} sessionId An ID to uniquely identify the file upload session. * @param {File} body The chunk to upload. * @param {string} [contentType] The MIME type of the object to upload; can be any type except \'multipart/form-data\'. This can be omitted, but we recommend adding it. * @param {string} [contentDisposition] The suggested file name to use when this object is downloaded as a file. * @param {Region} [xAdsRegion] Specifies where the bucket containing the object stored. Possible values are: - ``US`` - (Default) Data center for the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. - ``APAC`` - (Beta) Data center for Australia. **Note:** Beta features are subject to change. Please do not use in production environments. * @param accessToken bearer access token * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsApi */ uploadSignedResourcesChunk(accessToken: string, hash: string, contentRange: string, sessionId: string, body: File, contentType?: string, contentDisposition?: string, xAdsRegion?: Region, options?: ApsServiceRequestConfig): Promise; }