UNPKG

25.8 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';
7interface Blob {}
8declare class MediaStore extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: MediaStore.Types.ClientConfiguration)
13 config: Config & MediaStore.Types.ClientConfiguration;
14 /**
15 * Creates a storage container to hold objects. A container is similar to a bucket in the Amazon S3 service.
16 */
17 createContainer(params: MediaStore.Types.CreateContainerInput, callback?: (err: AWSError, data: MediaStore.Types.CreateContainerOutput) => void): Request<MediaStore.Types.CreateContainerOutput, AWSError>;
18 /**
19 * Creates a storage container to hold objects. A container is similar to a bucket in the Amazon S3 service.
20 */
21 createContainer(callback?: (err: AWSError, data: MediaStore.Types.CreateContainerOutput) => void): Request<MediaStore.Types.CreateContainerOutput, AWSError>;
22 /**
23 * Deletes the specified container. Before you make a DeleteContainer request, delete any objects in the container or in any folders in the container. You can delete only empty containers.
24 */
25 deleteContainer(params: MediaStore.Types.DeleteContainerInput, callback?: (err: AWSError, data: MediaStore.Types.DeleteContainerOutput) => void): Request<MediaStore.Types.DeleteContainerOutput, AWSError>;
26 /**
27 * Deletes the specified container. Before you make a DeleteContainer request, delete any objects in the container or in any folders in the container. You can delete only empty containers.
28 */
29 deleteContainer(callback?: (err: AWSError, data: MediaStore.Types.DeleteContainerOutput) => void): Request<MediaStore.Types.DeleteContainerOutput, AWSError>;
30 /**
31 * Deletes the access policy that is associated with the specified container.
32 */
33 deleteContainerPolicy(params: MediaStore.Types.DeleteContainerPolicyInput, callback?: (err: AWSError, data: MediaStore.Types.DeleteContainerPolicyOutput) => void): Request<MediaStore.Types.DeleteContainerPolicyOutput, AWSError>;
34 /**
35 * Deletes the access policy that is associated with the specified container.
36 */
37 deleteContainerPolicy(callback?: (err: AWSError, data: MediaStore.Types.DeleteContainerPolicyOutput) => void): Request<MediaStore.Types.DeleteContainerPolicyOutput, AWSError>;
38 /**
39 * Deletes the cross-origin resource sharing (CORS) configuration information that is set for the container. To use this operation, you must have permission to perform the MediaStore:DeleteCorsPolicy action. The container owner has this permission by default and can grant this permission to others.
40 */
41 deleteCorsPolicy(params: MediaStore.Types.DeleteCorsPolicyInput, callback?: (err: AWSError, data: MediaStore.Types.DeleteCorsPolicyOutput) => void): Request<MediaStore.Types.DeleteCorsPolicyOutput, AWSError>;
42 /**
43 * Deletes the cross-origin resource sharing (CORS) configuration information that is set for the container. To use this operation, you must have permission to perform the MediaStore:DeleteCorsPolicy action. The container owner has this permission by default and can grant this permission to others.
44 */
45 deleteCorsPolicy(callback?: (err: AWSError, data: MediaStore.Types.DeleteCorsPolicyOutput) => void): Request<MediaStore.Types.DeleteCorsPolicyOutput, AWSError>;
46 /**
47 * Removes an object lifecycle policy from a container. It takes up to 20 minutes for the change to take effect.
48 */
49 deleteLifecyclePolicy(params: MediaStore.Types.DeleteLifecyclePolicyInput, callback?: (err: AWSError, data: MediaStore.Types.DeleteLifecyclePolicyOutput) => void): Request<MediaStore.Types.DeleteLifecyclePolicyOutput, AWSError>;
50 /**
51 * Removes an object lifecycle policy from a container. It takes up to 20 minutes for the change to take effect.
52 */
53 deleteLifecyclePolicy(callback?: (err: AWSError, data: MediaStore.Types.DeleteLifecyclePolicyOutput) => void): Request<MediaStore.Types.DeleteLifecyclePolicyOutput, AWSError>;
54 /**
55 * Retrieves the properties of the requested container. This request is commonly used to retrieve the endpoint of a container. An endpoint is a value assigned by the service when a new container is created. A container's endpoint does not change after it has been assigned. The DescribeContainer request returns a single Container object based on ContainerName. To return all Container objects that are associated with a specified AWS account, use ListContainers.
56 */
57 describeContainer(params: MediaStore.Types.DescribeContainerInput, callback?: (err: AWSError, data: MediaStore.Types.DescribeContainerOutput) => void): Request<MediaStore.Types.DescribeContainerOutput, AWSError>;
58 /**
59 * Retrieves the properties of the requested container. This request is commonly used to retrieve the endpoint of a container. An endpoint is a value assigned by the service when a new container is created. A container's endpoint does not change after it has been assigned. The DescribeContainer request returns a single Container object based on ContainerName. To return all Container objects that are associated with a specified AWS account, use ListContainers.
60 */
61 describeContainer(callback?: (err: AWSError, data: MediaStore.Types.DescribeContainerOutput) => void): Request<MediaStore.Types.DescribeContainerOutput, AWSError>;
62 /**
63 * Retrieves the access policy for the specified container. For information about the data that is included in an access policy, see the AWS Identity and Access Management User Guide.
64 */
65 getContainerPolicy(params: MediaStore.Types.GetContainerPolicyInput, callback?: (err: AWSError, data: MediaStore.Types.GetContainerPolicyOutput) => void): Request<MediaStore.Types.GetContainerPolicyOutput, AWSError>;
66 /**
67 * Retrieves the access policy for the specified container. For information about the data that is included in an access policy, see the AWS Identity and Access Management User Guide.
68 */
69 getContainerPolicy(callback?: (err: AWSError, data: MediaStore.Types.GetContainerPolicyOutput) => void): Request<MediaStore.Types.GetContainerPolicyOutput, AWSError>;
70 /**
71 * Returns the cross-origin resource sharing (CORS) configuration information that is set for the container. To use this operation, you must have permission to perform the MediaStore:GetCorsPolicy action. By default, the container owner has this permission and can grant it to others.
72 */
73 getCorsPolicy(params: MediaStore.Types.GetCorsPolicyInput, callback?: (err: AWSError, data: MediaStore.Types.GetCorsPolicyOutput) => void): Request<MediaStore.Types.GetCorsPolicyOutput, AWSError>;
74 /**
75 * Returns the cross-origin resource sharing (CORS) configuration information that is set for the container. To use this operation, you must have permission to perform the MediaStore:GetCorsPolicy action. By default, the container owner has this permission and can grant it to others.
76 */
77 getCorsPolicy(callback?: (err: AWSError, data: MediaStore.Types.GetCorsPolicyOutput) => void): Request<MediaStore.Types.GetCorsPolicyOutput, AWSError>;
78 /**
79 * Retrieves the object lifecycle policy that is assigned to a container.
80 */
81 getLifecyclePolicy(params: MediaStore.Types.GetLifecyclePolicyInput, callback?: (err: AWSError, data: MediaStore.Types.GetLifecyclePolicyOutput) => void): Request<MediaStore.Types.GetLifecyclePolicyOutput, AWSError>;
82 /**
83 * Retrieves the object lifecycle policy that is assigned to a container.
84 */
85 getLifecyclePolicy(callback?: (err: AWSError, data: MediaStore.Types.GetLifecyclePolicyOutput) => void): Request<MediaStore.Types.GetLifecyclePolicyOutput, AWSError>;
86 /**
87 * Lists the properties of all containers in AWS Elemental MediaStore. You can query to receive all the containers in one response. Or you can include the MaxResults parameter to receive a limited number of containers in each response. In this case, the response includes a token. To get the next set of containers, send the command again, this time with the NextToken parameter (with the returned token as its value). The next set of responses appears, with a token if there are still more containers to receive. See also DescribeContainer, which gets the properties of one container.
88 */
89 listContainers(params: MediaStore.Types.ListContainersInput, callback?: (err: AWSError, data: MediaStore.Types.ListContainersOutput) => void): Request<MediaStore.Types.ListContainersOutput, AWSError>;
90 /**
91 * Lists the properties of all containers in AWS Elemental MediaStore. You can query to receive all the containers in one response. Or you can include the MaxResults parameter to receive a limited number of containers in each response. In this case, the response includes a token. To get the next set of containers, send the command again, this time with the NextToken parameter (with the returned token as its value). The next set of responses appears, with a token if there are still more containers to receive. See also DescribeContainer, which gets the properties of one container.
92 */
93 listContainers(callback?: (err: AWSError, data: MediaStore.Types.ListContainersOutput) => void): Request<MediaStore.Types.ListContainersOutput, AWSError>;
94 /**
95 * Creates an access policy for the specified container to restrict the users and clients that can access it. For information about the data that is included in an access policy, see the AWS Identity and Access Management User Guide. For this release of the REST API, you can create only one policy for a container. If you enter PutContainerPolicy twice, the second command modifies the existing policy.
96 */
97 putContainerPolicy(params: MediaStore.Types.PutContainerPolicyInput, callback?: (err: AWSError, data: MediaStore.Types.PutContainerPolicyOutput) => void): Request<MediaStore.Types.PutContainerPolicyOutput, AWSError>;
98 /**
99 * Creates an access policy for the specified container to restrict the users and clients that can access it. For information about the data that is included in an access policy, see the AWS Identity and Access Management User Guide. For this release of the REST API, you can create only one policy for a container. If you enter PutContainerPolicy twice, the second command modifies the existing policy.
100 */
101 putContainerPolicy(callback?: (err: AWSError, data: MediaStore.Types.PutContainerPolicyOutput) => void): Request<MediaStore.Types.PutContainerPolicyOutput, AWSError>;
102 /**
103 * Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your AWS Elemental MediaStore container at my.example.container.com by using the browser's XMLHttpRequest capability. To enable CORS on a container, you attach a CORS policy to the container. In the CORS policy, you configure rules that identify origins and the HTTP methods that can be executed on your container. The policy can contain up to 398,000 characters. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed. To learn more about CORS, see Cross-Origin Resource Sharing (CORS) in AWS Elemental MediaStore.
104 */
105 putCorsPolicy(params: MediaStore.Types.PutCorsPolicyInput, callback?: (err: AWSError, data: MediaStore.Types.PutCorsPolicyOutput) => void): Request<MediaStore.Types.PutCorsPolicyOutput, AWSError>;
106 /**
107 * Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your AWS Elemental MediaStore container at my.example.container.com by using the browser's XMLHttpRequest capability. To enable CORS on a container, you attach a CORS policy to the container. In the CORS policy, you configure rules that identify origins and the HTTP methods that can be executed on your container. The policy can contain up to 398,000 characters. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed. To learn more about CORS, see Cross-Origin Resource Sharing (CORS) in AWS Elemental MediaStore.
108 */
109 putCorsPolicy(callback?: (err: AWSError, data: MediaStore.Types.PutCorsPolicyOutput) => void): Request<MediaStore.Types.PutCorsPolicyOutput, AWSError>;
110 /**
111 * Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect. For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy.
112 */
113 putLifecyclePolicy(params: MediaStore.Types.PutLifecyclePolicyInput, callback?: (err: AWSError, data: MediaStore.Types.PutLifecyclePolicyOutput) => void): Request<MediaStore.Types.PutLifecyclePolicyOutput, AWSError>;
114 /**
115 * Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect. For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy.
116 */
117 putLifecyclePolicy(callback?: (err: AWSError, data: MediaStore.Types.PutLifecyclePolicyOutput) => void): Request<MediaStore.Types.PutLifecyclePolicyOutput, AWSError>;
118 /**
119 * Starts access logging on the specified container. When you enable access logging on a container, MediaStore delivers access logs for objects stored in that container to Amazon CloudWatch Logs.
120 */
121 startAccessLogging(params: MediaStore.Types.StartAccessLoggingInput, callback?: (err: AWSError, data: MediaStore.Types.StartAccessLoggingOutput) => void): Request<MediaStore.Types.StartAccessLoggingOutput, AWSError>;
122 /**
123 * Starts access logging on the specified container. When you enable access logging on a container, MediaStore delivers access logs for objects stored in that container to Amazon CloudWatch Logs.
124 */
125 startAccessLogging(callback?: (err: AWSError, data: MediaStore.Types.StartAccessLoggingOutput) => void): Request<MediaStore.Types.StartAccessLoggingOutput, AWSError>;
126 /**
127 * Stops access logging on the specified container. When you stop access logging on a container, MediaStore stops sending access logs to Amazon CloudWatch Logs. These access logs are not saved and are not retrievable.
128 */
129 stopAccessLogging(params: MediaStore.Types.StopAccessLoggingInput, callback?: (err: AWSError, data: MediaStore.Types.StopAccessLoggingOutput) => void): Request<MediaStore.Types.StopAccessLoggingOutput, AWSError>;
130 /**
131 * Stops access logging on the specified container. When you stop access logging on a container, MediaStore stops sending access logs to Amazon CloudWatch Logs. These access logs are not saved and are not retrievable.
132 */
133 stopAccessLogging(callback?: (err: AWSError, data: MediaStore.Types.StopAccessLoggingOutput) => void): Request<MediaStore.Types.StopAccessLoggingOutput, AWSError>;
134}
135declare namespace MediaStore {
136 export type AllowedHeaders = Header[];
137 export type AllowedMethods = MethodName[];
138 export type AllowedOrigins = Origin[];
139 export interface Container {
140 /**
141 * The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.
142 */
143 Endpoint?: Endpoint;
144 /**
145 * Unix timestamp.
146 */
147 CreationTime?: TimeStamp;
148 /**
149 * The Amazon Resource Name (ARN) of the container. The ARN has the following format: arn:aws:&lt;region&gt;:&lt;account that owns this container&gt;:container/&lt;name of container&gt; For example: arn:aws:mediastore:us-west-2:111122223333:container/movies
150 */
151 ARN?: ContainerARN;
152 /**
153 * The name of the container.
154 */
155 Name?: ContainerName;
156 /**
157 * The status of container creation or deletion. The status is one of the following: CREATING, ACTIVE, or DELETING. While the service is creating the container, the status is CREATING. When the endpoint is available, the status changes to ACTIVE.
158 */
159 Status?: ContainerStatus;
160 /**
161 * The state of access logging on the container. This value is false by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value to true, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.
162 */
163 AccessLoggingEnabled?: ContainerAccessLoggingEnabled;
164 }
165 export type ContainerARN = string;
166 export type ContainerAccessLoggingEnabled = boolean;
167 export type ContainerList = Container[];
168 export type ContainerListLimit = number;
169 export type ContainerName = string;
170 export type ContainerPolicy = string;
171 export type ContainerStatus = "ACTIVE"|"CREATING"|"DELETING"|string;
172 export type CorsPolicy = CorsRule[];
173 export interface CorsRule {
174 /**
175 * One or more response headers that you want users to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object). Each CORS rule must have at least one AllowedOrigins element. The string value can include only one wildcard character (*), for example, http://*.example.com. Additionally, you can specify only one wildcard character to allow cross-origin access for all origins.
176 */
177 AllowedOrigins: AllowedOrigins;
178 /**
179 * Identifies an HTTP method that the origin that is specified in the rule is allowed to execute. Each CORS rule must contain at least one AllowedMethods and one AllowedOrigins element.
180 */
181 AllowedMethods?: AllowedMethods;
182 /**
183 * Specifies which headers are allowed in a preflight OPTIONS request through the Access-Control-Request-Headers header. Each header name that is specified in Access-Control-Request-Headers must have a corresponding entry in the rule. Only the headers that were requested are sent back. This element can contain only one wildcard character (*).
184 */
185 AllowedHeaders: AllowedHeaders;
186 /**
187 * The time in seconds that your browser caches the preflight response for the specified resource. A CORS rule can have only one MaxAgeSeconds element.
188 */
189 MaxAgeSeconds?: MaxAgeSeconds;
190 /**
191 * One or more headers in the response that you want users to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object). This element is optional for each rule.
192 */
193 ExposeHeaders?: ExposeHeaders;
194 }
195 export interface CreateContainerInput {
196 /**
197 * The name for the container. The name must be from 1 to 255 characters. Container names must be unique to your AWS account within a specific region. As an example, you could create a container named movies in every region, as long as you don’t have an existing container with that name.
198 */
199 ContainerName: ContainerName;
200 }
201 export interface CreateContainerOutput {
202 /**
203 * ContainerARN: The Amazon Resource Name (ARN) of the newly created container. The ARN has the following format: arn:aws:&lt;region&gt;:&lt;account that owns this container&gt;:container/&lt;name of container&gt;. For example: arn:aws:mediastore:us-west-2:111122223333:container/movies ContainerName: The container name as specified in the request. CreationTime: Unix time stamp. Status: The status of container creation or deletion. The status is one of the following: CREATING, ACTIVE, or DELETING. While the service is creating the container, the status is CREATING. When an endpoint is available, the status changes to ACTIVE. The return value does not include the container's endpoint. To make downstream requests, you must obtain this value by using DescribeContainer or ListContainers.
204 */
205 Container: Container;
206 }
207 export interface DeleteContainerInput {
208 /**
209 * The name of the container to delete.
210 */
211 ContainerName: ContainerName;
212 }
213 export interface DeleteContainerOutput {
214 }
215 export interface DeleteContainerPolicyInput {
216 /**
217 * The name of the container that holds the policy.
218 */
219 ContainerName: ContainerName;
220 }
221 export interface DeleteContainerPolicyOutput {
222 }
223 export interface DeleteCorsPolicyInput {
224 /**
225 * The name of the container to remove the policy from.
226 */
227 ContainerName: ContainerName;
228 }
229 export interface DeleteCorsPolicyOutput {
230 }
231 export interface DeleteLifecyclePolicyInput {
232 /**
233 * The name of the container that holds the object lifecycle policy.
234 */
235 ContainerName: ContainerName;
236 }
237 export interface DeleteLifecyclePolicyOutput {
238 }
239 export interface DescribeContainerInput {
240 /**
241 * The name of the container to query.
242 */
243 ContainerName?: ContainerName;
244 }
245 export interface DescribeContainerOutput {
246 /**
247 * The name of the queried container.
248 */
249 Container?: Container;
250 }
251 export type Endpoint = string;
252 export type ExposeHeaders = Header[];
253 export interface GetContainerPolicyInput {
254 /**
255 * The name of the container.
256 */
257 ContainerName: ContainerName;
258 }
259 export interface GetContainerPolicyOutput {
260 /**
261 * The contents of the access policy.
262 */
263 Policy: ContainerPolicy;
264 }
265 export interface GetCorsPolicyInput {
266 /**
267 * The name of the container that the policy is assigned to.
268 */
269 ContainerName: ContainerName;
270 }
271 export interface GetCorsPolicyOutput {
272 /**
273 * The CORS policy assigned to the container.
274 */
275 CorsPolicy: CorsPolicy;
276 }
277 export interface GetLifecyclePolicyInput {
278 /**
279 * The name of the container that the object lifecycle policy is assigned to.
280 */
281 ContainerName: ContainerName;
282 }
283 export interface GetLifecyclePolicyOutput {
284 /**
285 * The object lifecycle policy that is assigned to the container.
286 */
287 LifecyclePolicy: LifecyclePolicy;
288 }
289 export type Header = string;
290 export type LifecyclePolicy = string;
291 export interface ListContainersInput {
292 /**
293 * Only if you used MaxResults in the first command, enter the token (which was included in the previous response) to obtain the next set of containers. This token is included in a response only if there actually are more containers to list.
294 */
295 NextToken?: PaginationToken;
296 /**
297 * Enter the maximum number of containers in the response. Use from 1 to 255 characters.
298 */
299 MaxResults?: ContainerListLimit;
300 }
301 export interface ListContainersOutput {
302 /**
303 * The names of the containers.
304 */
305 Containers: ContainerList;
306 /**
307 * NextToken is the token to use in the next call to ListContainers. This token is returned only if you included the MaxResults tag in the original command, and only if there are still containers to return.
308 */
309 NextToken?: PaginationToken;
310 }
311 export type MaxAgeSeconds = number;
312 export type MethodName = "PUT"|"GET"|"DELETE"|"HEAD"|string;
313 export type Origin = string;
314 export type PaginationToken = string;
315 export interface PutContainerPolicyInput {
316 /**
317 * The name of the container.
318 */
319 ContainerName: ContainerName;
320 /**
321 * The contents of the policy, which includes the following: One Version tag One Statement tag that contains the standard tags for the policy.
322 */
323 Policy: ContainerPolicy;
324 }
325 export interface PutContainerPolicyOutput {
326 }
327 export interface PutCorsPolicyInput {
328 /**
329 * The name of the container that you want to assign the CORS policy to.
330 */
331 ContainerName: ContainerName;
332 /**
333 * The CORS policy to apply to the container.
334 */
335 CorsPolicy: CorsPolicy;
336 }
337 export interface PutCorsPolicyOutput {
338 }
339 export interface PutLifecyclePolicyInput {
340 /**
341 * The name of the container that you want to assign the object lifecycle policy to.
342 */
343 ContainerName: ContainerName;
344 /**
345 * The object lifecycle policy to apply to the container.
346 */
347 LifecyclePolicy: LifecyclePolicy;
348 }
349 export interface PutLifecyclePolicyOutput {
350 }
351 export interface StartAccessLoggingInput {
352 /**
353 * The name of the container that you want to start access logging on.
354 */
355 ContainerName: ContainerName;
356 }
357 export interface StartAccessLoggingOutput {
358 }
359 export interface StopAccessLoggingInput {
360 /**
361 * The name of the container that you want to stop access logging on.
362 */
363 ContainerName: ContainerName;
364 }
365 export interface StopAccessLoggingOutput {
366 }
367 export type TimeStamp = Date;
368 /**
369 * 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.
370 */
371 export type apiVersion = "2017-09-01"|"latest"|string;
372 export interface ClientApiVersions {
373 /**
374 * 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.
375 */
376 apiVersion?: apiVersion;
377 }
378 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
379 /**
380 * Contains interfaces for use with the MediaStore client.
381 */
382 export import Types = MediaStore;
383}
384export = MediaStore;