Class UploadsApi
- java.lang.Object
-
- software.amazon.spapi.api.uploads.v2020_11_01.UploadsApi
-
public class UploadsApi extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UploadsApi.Builder
-
Field Summary
Fields Modifier and Type Field Description io.github.bucket4j.Bucket
createUploadDestinationForResourceBucket
-
Constructor Summary
Constructors Constructor Description UploadsApi(ApiClient apiClient, java.lang.Boolean disableRateLimiting)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateUploadDestinationResponse
createUploadDestinationForResource(java.util.List<java.lang.String> marketplaceIds, java.lang.String contentMD5, java.lang.String resource, java.lang.String contentType)
Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file.okhttp3.Call
createUploadDestinationForResourceAsync(java.util.List<java.lang.String> marketplaceIds, java.lang.String contentMD5, java.lang.String resource, java.lang.String contentType, ApiCallback<CreateUploadDestinationResponse> callback)
(asynchronously) Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file.ApiResponse<CreateUploadDestinationResponse>
createUploadDestinationForResourceWithHttpInfo(java.util.List<java.lang.String> marketplaceIds, java.lang.String contentMD5, java.lang.String resource, java.lang.String contentType)
Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file.
-
-
-
Constructor Detail
-
UploadsApi
public UploadsApi(ApiClient apiClient, java.lang.Boolean disableRateLimiting)
-
-
Method Detail
-
createUploadDestinationForResource
public CreateUploadDestinationResponse createUploadDestinationForResource(java.util.List<java.lang.String> marketplaceIds, java.lang.String contentMD5, java.lang.String resource, java.lang.String contentType) throws ApiException, LWAException
Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).- Parameters:
marketplaceIds
- The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)contentMD5
- An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. (required)resource
- The upload destination for your resource. For example, if you create an upload destination for the `createLegalDisclosure` operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you create an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`. (required)contentType
- The content type of the file you upload. (optional)- Returns:
- CreateUploadDestinationResponse
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyLWAException
- If calls to fetch LWA access token fails
-
createUploadDestinationForResourceWithHttpInfo
public ApiResponse<CreateUploadDestinationResponse> createUploadDestinationForResourceWithHttpInfo(java.util.List<java.lang.String> marketplaceIds, java.lang.String contentMD5, java.lang.String resource, java.lang.String contentType) throws ApiException, LWAException
Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).- Parameters:
marketplaceIds
- The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)contentMD5
- An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. (required)resource
- The upload destination for your resource. For example, if you create an upload destination for the `createLegalDisclosure` operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you create an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`. (required)contentType
- The content type of the file you upload. (optional)- Returns:
- ApiResponse<CreateUploadDestinationResponse>
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyLWAException
- If calls to fetch LWA access token fails
-
createUploadDestinationForResourceAsync
public okhttp3.Call createUploadDestinationForResourceAsync(java.util.List<java.lang.String> marketplaceIds, java.lang.String contentMD5, java.lang.String resource, java.lang.String contentType, ApiCallback<CreateUploadDestinationResponse> callback) throws ApiException, LWAException
(asynchronously) Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).- Parameters:
marketplaceIds
- The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)contentMD5
- An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. (required)resource
- The upload destination for your resource. For example, if you create an upload destination for the `createLegalDisclosure` operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you create an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`. (required)contentType
- The content type of the file you upload. (optional)callback
- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException
- If fail to process the API call, e.g. serializing the request body objectLWAException
- If calls to fetch LWA access token fails
-
-