UNPKG

14.2 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7import {Readable} from 'stream';
8interface Blob {}
9declare class MediaStoreData extends Service {
10 /**
11 * Constructs a service object. This object has one method for each API operation.
12 */
13 constructor(options?: MediaStoreData.Types.ClientConfiguration)
14 config: Config & MediaStoreData.Types.ClientConfiguration;
15 /**
16 * Deletes an object at the specified path.
17 */
18 deleteObject(params: MediaStoreData.Types.DeleteObjectRequest, callback?: (err: AWSError, data: MediaStoreData.Types.DeleteObjectResponse) => void): Request<MediaStoreData.Types.DeleteObjectResponse, AWSError>;
19 /**
20 * Deletes an object at the specified path.
21 */
22 deleteObject(callback?: (err: AWSError, data: MediaStoreData.Types.DeleteObjectResponse) => void): Request<MediaStoreData.Types.DeleteObjectResponse, AWSError>;
23 /**
24 * Gets the headers for an object at the specified path.
25 */
26 describeObject(params: MediaStoreData.Types.DescribeObjectRequest, callback?: (err: AWSError, data: MediaStoreData.Types.DescribeObjectResponse) => void): Request<MediaStoreData.Types.DescribeObjectResponse, AWSError>;
27 /**
28 * Gets the headers for an object at the specified path.
29 */
30 describeObject(callback?: (err: AWSError, data: MediaStoreData.Types.DescribeObjectResponse) => void): Request<MediaStoreData.Types.DescribeObjectResponse, AWSError>;
31 /**
32 * Downloads the object at the specified path. If the object’s upload availability is set to streaming, AWS Elemental MediaStore downloads the object even if it’s still uploading the object.
33 */
34 getObject(params: MediaStoreData.Types.GetObjectRequest, callback?: (err: AWSError, data: MediaStoreData.Types.GetObjectResponse) => void): Request<MediaStoreData.Types.GetObjectResponse, AWSError>;
35 /**
36 * Downloads the object at the specified path. If the object’s upload availability is set to streaming, AWS Elemental MediaStore downloads the object even if it’s still uploading the object.
37 */
38 getObject(callback?: (err: AWSError, data: MediaStoreData.Types.GetObjectResponse) => void): Request<MediaStoreData.Types.GetObjectResponse, AWSError>;
39 /**
40 * Provides a list of metadata entries about folders and objects in the specified folder.
41 */
42 listItems(params: MediaStoreData.Types.ListItemsRequest, callback?: (err: AWSError, data: MediaStoreData.Types.ListItemsResponse) => void): Request<MediaStoreData.Types.ListItemsResponse, AWSError>;
43 /**
44 * Provides a list of metadata entries about folders and objects in the specified folder.
45 */
46 listItems(callback?: (err: AWSError, data: MediaStoreData.Types.ListItemsResponse) => void): Request<MediaStoreData.Types.ListItemsResponse, AWSError>;
47 /**
48 * Uploads an object to the specified path. Object sizes are limited to 25 MB for standard upload availability and 10 MB for streaming upload availability.
49 */
50 putObject(params: MediaStoreData.Types.PutObjectRequest, callback?: (err: AWSError, data: MediaStoreData.Types.PutObjectResponse) => void): Request<MediaStoreData.Types.PutObjectResponse, AWSError>;
51 /**
52 * Uploads an object to the specified path. Object sizes are limited to 25 MB for standard upload availability and 10 MB for streaming upload availability.
53 */
54 putObject(callback?: (err: AWSError, data: MediaStoreData.Types.PutObjectResponse) => void): Request<MediaStoreData.Types.PutObjectResponse, AWSError>;
55}
56declare namespace MediaStoreData {
57 export type ContentRangePattern = string;
58 export type ContentType = string;
59 export interface DeleteObjectRequest {
60 /**
61 * The path (including the file name) where the object is stored in the container. Format: &lt;folder name&gt;/&lt;folder name&gt;/&lt;file name&gt;
62 */
63 Path: PathNaming;
64 }
65 export interface DeleteObjectResponse {
66 }
67 export interface DescribeObjectRequest {
68 /**
69 * The path (including the file name) where the object is stored in the container. Format: &lt;folder name&gt;/&lt;folder name&gt;/&lt;file name&gt;
70 */
71 Path: PathNaming;
72 }
73 export interface DescribeObjectResponse {
74 /**
75 * The ETag that represents a unique instance of the object.
76 */
77 ETag?: ETag;
78 /**
79 * The content type of the object.
80 */
81 ContentType?: ContentType;
82 /**
83 * The length of the object in bytes.
84 */
85 ContentLength?: NonNegativeLong;
86 /**
87 * An optional CacheControl header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. Headers with a custom user-defined value are also accepted.
88 */
89 CacheControl?: StringPrimitive;
90 /**
91 * The date and time that the object was last modified.
92 */
93 LastModified?: TimeStamp;
94 }
95 export type ETag = string;
96 export interface GetObjectRequest {
97 /**
98 * The path (including the file name) where the object is stored in the container. Format: &lt;folder name&gt;/&lt;folder name&gt;/&lt;file name&gt; For example, to upload the file mlaw.avi to the folder path premium\canada in the container movies, enter the path premium/canada/mlaw.avi. Do not include the container name in this path. If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing premium/usa subfolder. If you specify premium/canada, the service creates a canada subfolder in the premium folder. You then have two subfolders, usa and canada, in the premium folder. There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore. For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.
99 */
100 Path: PathNaming;
101 /**
102 * The range bytes of an object to retrieve. For more information about the Range header, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. AWS Elemental MediaStore ignores this header for partially uploaded objects that have streaming upload availability.
103 */
104 Range?: RangePattern;
105 }
106 export interface GetObjectResponse {
107 /**
108 * The bytes of the object.
109 */
110 Body?: PayloadBlob;
111 /**
112 * An optional CacheControl header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. Headers with a custom user-defined value are also accepted.
113 */
114 CacheControl?: StringPrimitive;
115 /**
116 * The range of bytes to retrieve.
117 */
118 ContentRange?: ContentRangePattern;
119 /**
120 * The length of the object in bytes.
121 */
122 ContentLength?: NonNegativeLong;
123 /**
124 * The content type of the object.
125 */
126 ContentType?: ContentType;
127 /**
128 * The ETag that represents a unique instance of the object.
129 */
130 ETag?: ETag;
131 /**
132 * The date and time that the object was last modified.
133 */
134 LastModified?: TimeStamp;
135 /**
136 * The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other status codes indicate the type of error that occurred.
137 */
138 StatusCode: statusCode;
139 }
140 export interface Item {
141 /**
142 * The name of the item.
143 */
144 Name?: ItemName;
145 /**
146 * The item type (folder or object).
147 */
148 Type?: ItemType;
149 /**
150 * The ETag that represents a unique instance of the item.
151 */
152 ETag?: ETag;
153 /**
154 * The date and time that the item was last modified.
155 */
156 LastModified?: TimeStamp;
157 /**
158 * The content type of the item.
159 */
160 ContentType?: ContentType;
161 /**
162 * The length of the item in bytes.
163 */
164 ContentLength?: NonNegativeLong;
165 }
166 export type ItemList = Item[];
167 export type ItemName = string;
168 export type ItemType = "OBJECT"|"FOLDER"|string;
169 export interface ListItemsRequest {
170 /**
171 * The path in the container from which to retrieve items. Format: &lt;folder name&gt;/&lt;folder name&gt;/&lt;file name&gt;
172 */
173 Path?: ListPathNaming;
174 /**
175 * The maximum number of results to return per API request. For example, you submit a ListItems request with MaxResults set at 500. Although 2,000 items match your request, the service returns no more than the first 500 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 1,000 results per page.
176 */
177 MaxResults?: ListLimit;
178 /**
179 * The token that identifies which batch of results that you want to see. For example, you submit a ListItems request with MaxResults set at 500. The service returns the first batch of results (up to 500) and a NextToken value. To see the next batch of results, you can submit the ListItems request a second time and specify the NextToken value. Tokens expire after 15 minutes.
180 */
181 NextToken?: PaginationToken;
182 }
183 export interface ListItemsResponse {
184 /**
185 * The metadata entries for the folders and objects at the requested path.
186 */
187 Items?: ItemList;
188 /**
189 * The token that can be used in a request to view the next set of results. For example, you submit a ListItems request that matches 2,000 items with MaxResults set at 500. The service returns the first batch of results (up to 500) and a NextToken value that can be used to fetch the next batch of results.
190 */
191 NextToken?: PaginationToken;
192 }
193 export type ListLimit = number;
194 export type ListPathNaming = string;
195 export type NonNegativeLong = number;
196 export type PaginationToken = string;
197 export type PathNaming = string;
198 export type PayloadBlob = Buffer|Uint8Array|Blob|string|Readable;
199 export interface PutObjectRequest {
200 /**
201 * The bytes to be stored.
202 */
203 Body: PayloadBlob;
204 /**
205 * The path (including the file name) where the object is stored in the container. Format: &lt;folder name&gt;/&lt;folder name&gt;/&lt;file name&gt; For example, to upload the file mlaw.avi to the folder path premium\canada in the container movies, enter the path premium/canada/mlaw.avi. Do not include the container name in this path. If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing premium/usa subfolder. If you specify premium/canada, the service creates a canada subfolder in the premium folder. You then have two subfolders, usa and canada, in the premium folder. There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore. For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.
206 */
207 Path: PathNaming;
208 /**
209 * The content type of the object.
210 */
211 ContentType?: ContentType;
212 /**
213 * An optional CacheControl header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. Headers with a custom user-defined value are also accepted.
214 */
215 CacheControl?: StringPrimitive;
216 /**
217 * Indicates the storage class of a Put request. Defaults to high-performance temporal storage class, and objects are persisted into durable storage shortly after being received.
218 */
219 StorageClass?: StorageClass;
220 /**
221 * Indicates the availability of an object while it is still uploading. If the value is set to streaming, the object is available for downloading after some initial buffering but before the object is uploaded completely. If the value is set to standard, the object is available for downloading only when it is uploaded completely. The default value for this header is standard. To use this header, you must also set the HTTP Transfer-Encoding header to chunked.
222 */
223 UploadAvailability?: UploadAvailability;
224 }
225 export interface PutObjectResponse {
226 /**
227 * The SHA256 digest of the object that is persisted.
228 */
229 ContentSHA256?: SHA256Hash;
230 /**
231 * Unique identifier of the object in the container.
232 */
233 ETag?: ETag;
234 /**
235 * The storage class where the object was persisted. The class should be “Temporal”.
236 */
237 StorageClass?: StorageClass;
238 }
239 export type RangePattern = string;
240 export type SHA256Hash = string;
241 export type StorageClass = "TEMPORAL"|string;
242 export type StringPrimitive = string;
243 export type TimeStamp = Date;
244 export type UploadAvailability = "STANDARD"|"STREAMING"|string;
245 export type statusCode = number;
246 /**
247 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
248 */
249 export type apiVersion = "2017-09-01"|"latest"|string;
250 export interface ClientApiVersions {
251 /**
252 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
253 */
254 apiVersion?: apiVersion;
255 }
256 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
257 /**
258 * Contains interfaces for use with the MediaStoreData client.
259 */
260 export import Types = MediaStoreData;
261}
262export = MediaStoreData;