UNPKG

24.5 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 KinesisVideo extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: KinesisVideo.Types.ClientConfiguration)
13 config: Config & KinesisVideo.Types.ClientConfiguration;
14 /**
15 * Creates a new Kinesis video stream. When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version. CreateStream is an asynchronous operation. For information about how the service works, see How it Works. You must have permissions for the KinesisVideo:CreateStream action.
16 */
17 createStream(params: KinesisVideo.Types.CreateStreamInput, callback?: (err: AWSError, data: KinesisVideo.Types.CreateStreamOutput) => void): Request<KinesisVideo.Types.CreateStreamOutput, AWSError>;
18 /**
19 * Creates a new Kinesis video stream. When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version. CreateStream is an asynchronous operation. For information about how the service works, see How it Works. You must have permissions for the KinesisVideo:CreateStream action.
20 */
21 createStream(callback?: (err: AWSError, data: KinesisVideo.Types.CreateStreamOutput) => void): Request<KinesisVideo.Types.CreateStreamOutput, AWSError>;
22 /**
23 * Deletes a Kinesis video stream and the data contained in the stream. This method marks the stream for deletion, and makes the data in the stream inaccessible immediately. To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API. This operation requires permission for the KinesisVideo:DeleteStream action.
24 */
25 deleteStream(params: KinesisVideo.Types.DeleteStreamInput, callback?: (err: AWSError, data: KinesisVideo.Types.DeleteStreamOutput) => void): Request<KinesisVideo.Types.DeleteStreamOutput, AWSError>;
26 /**
27 * Deletes a Kinesis video stream and the data contained in the stream. This method marks the stream for deletion, and makes the data in the stream inaccessible immediately. To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API. This operation requires permission for the KinesisVideo:DeleteStream action.
28 */
29 deleteStream(callback?: (err: AWSError, data: KinesisVideo.Types.DeleteStreamOutput) => void): Request<KinesisVideo.Types.DeleteStreamOutput, AWSError>;
30 /**
31 * Returns the most current information about the specified stream. You must specify either the StreamName or the StreamARN.
32 */
33 describeStream(params: KinesisVideo.Types.DescribeStreamInput, callback?: (err: AWSError, data: KinesisVideo.Types.DescribeStreamOutput) => void): Request<KinesisVideo.Types.DescribeStreamOutput, AWSError>;
34 /**
35 * Returns the most current information about the specified stream. You must specify either the StreamName or the StreamARN.
36 */
37 describeStream(callback?: (err: AWSError, data: KinesisVideo.Types.DescribeStreamOutput) => void): Request<KinesisVideo.Types.DescribeStreamOutput, AWSError>;
38 /**
39 * Gets an endpoint for a specified stream for either reading or writing. Use this endpoint in your application to read from the specified stream (using the GetMedia or GetMediaForFragmentList operations) or write to it (using the PutMedia operation). The returned endpoint does not have the API name appended. The client needs to add the API name to the returned endpoint. In the request, specify the stream either by StreamName or StreamARN.
40 */
41 getDataEndpoint(params: KinesisVideo.Types.GetDataEndpointInput, callback?: (err: AWSError, data: KinesisVideo.Types.GetDataEndpointOutput) => void): Request<KinesisVideo.Types.GetDataEndpointOutput, AWSError>;
42 /**
43 * Gets an endpoint for a specified stream for either reading or writing. Use this endpoint in your application to read from the specified stream (using the GetMedia or GetMediaForFragmentList operations) or write to it (using the PutMedia operation). The returned endpoint does not have the API name appended. The client needs to add the API name to the returned endpoint. In the request, specify the stream either by StreamName or StreamARN.
44 */
45 getDataEndpoint(callback?: (err: AWSError, data: KinesisVideo.Types.GetDataEndpointOutput) => void): Request<KinesisVideo.Types.GetDataEndpointOutput, AWSError>;
46 /**
47 * Returns an array of StreamInfo objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a StreamNameCondition.
48 */
49 listStreams(params: KinesisVideo.Types.ListStreamsInput, callback?: (err: AWSError, data: KinesisVideo.Types.ListStreamsOutput) => void): Request<KinesisVideo.Types.ListStreamsOutput, AWSError>;
50 /**
51 * Returns an array of StreamInfo objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a StreamNameCondition.
52 */
53 listStreams(callback?: (err: AWSError, data: KinesisVideo.Types.ListStreamsOutput) => void): Request<KinesisVideo.Types.ListStreamsOutput, AWSError>;
54 /**
55 * Returns a list of tags associated with the specified stream. In the request, you must specify either the StreamName or the StreamARN.
56 */
57 listTagsForStream(params: KinesisVideo.Types.ListTagsForStreamInput, callback?: (err: AWSError, data: KinesisVideo.Types.ListTagsForStreamOutput) => void): Request<KinesisVideo.Types.ListTagsForStreamOutput, AWSError>;
58 /**
59 * Returns a list of tags associated with the specified stream. In the request, you must specify either the StreamName or the StreamARN.
60 */
61 listTagsForStream(callback?: (err: AWSError, data: KinesisVideo.Types.ListTagsForStreamOutput) => void): Request<KinesisVideo.Types.ListTagsForStreamOutput, AWSError>;
62 /**
63 * Adds one or more tags to a stream. A tag is a key-value pair (the value is optional) that you can define and assign to AWS resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide. You must provide either the StreamName or the StreamARN. This operation requires permission for the KinesisVideo:TagStream action. Kinesis video streams support up to 50 tags.
64 */
65 tagStream(params: KinesisVideo.Types.TagStreamInput, callback?: (err: AWSError, data: KinesisVideo.Types.TagStreamOutput) => void): Request<KinesisVideo.Types.TagStreamOutput, AWSError>;
66 /**
67 * Adds one or more tags to a stream. A tag is a key-value pair (the value is optional) that you can define and assign to AWS resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide. You must provide either the StreamName or the StreamARN. This operation requires permission for the KinesisVideo:TagStream action. Kinesis video streams support up to 50 tags.
68 */
69 tagStream(callback?: (err: AWSError, data: KinesisVideo.Types.TagStreamOutput) => void): Request<KinesisVideo.Types.TagStreamOutput, AWSError>;
70 /**
71 * Removes one or more tags from a stream. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored. In the request, you must provide the StreamName or StreamARN.
72 */
73 untagStream(params: KinesisVideo.Types.UntagStreamInput, callback?: (err: AWSError, data: KinesisVideo.Types.UntagStreamOutput) => void): Request<KinesisVideo.Types.UntagStreamOutput, AWSError>;
74 /**
75 * Removes one or more tags from a stream. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored. In the request, you must provide the StreamName or StreamARN.
76 */
77 untagStream(callback?: (err: AWSError, data: KinesisVideo.Types.UntagStreamOutput) => void): Request<KinesisVideo.Types.UntagStreamOutput, AWSError>;
78 /**
79 * Increases or decreases the stream's data retention period by the value that you specify. To indicate whether you want to increase or decrease the data retention period, specify the Operation parameter in the request body. In the request, you must specify either the StreamName or the StreamARN. The retention period that you specify replaces the current value. This operation requires permission for the KinesisVideo:UpdateDataRetention action. Changing the data retention period affects the data in the stream as follows: If the data retention period is increased, existing data is retained for the new retention period. For example, if the data retention period is increased from one hour to seven hours, all existing data is retained for seven hours. If the data retention period is decreased, existing data is retained for the new retention period. For example, if the data retention period is decreased from seven hours to one hour, all existing data is retained for one hour, and any data older than one hour is deleted immediately.
80 */
81 updateDataRetention(params: KinesisVideo.Types.UpdateDataRetentionInput, callback?: (err: AWSError, data: KinesisVideo.Types.UpdateDataRetentionOutput) => void): Request<KinesisVideo.Types.UpdateDataRetentionOutput, AWSError>;
82 /**
83 * Increases or decreases the stream's data retention period by the value that you specify. To indicate whether you want to increase or decrease the data retention period, specify the Operation parameter in the request body. In the request, you must specify either the StreamName or the StreamARN. The retention period that you specify replaces the current value. This operation requires permission for the KinesisVideo:UpdateDataRetention action. Changing the data retention period affects the data in the stream as follows: If the data retention period is increased, existing data is retained for the new retention period. For example, if the data retention period is increased from one hour to seven hours, all existing data is retained for seven hours. If the data retention period is decreased, existing data is retained for the new retention period. For example, if the data retention period is decreased from seven hours to one hour, all existing data is retained for one hour, and any data older than one hour is deleted immediately.
84 */
85 updateDataRetention(callback?: (err: AWSError, data: KinesisVideo.Types.UpdateDataRetentionOutput) => void): Request<KinesisVideo.Types.UpdateDataRetentionOutput, AWSError>;
86 /**
87 * Updates stream metadata, such as the device name and media type. You must provide the stream name or the Amazon Resource Name (ARN) of the stream. To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API. UpdateStream is an asynchronous operation, and takes time to complete.
88 */
89 updateStream(params: KinesisVideo.Types.UpdateStreamInput, callback?: (err: AWSError, data: KinesisVideo.Types.UpdateStreamOutput) => void): Request<KinesisVideo.Types.UpdateStreamOutput, AWSError>;
90 /**
91 * Updates stream metadata, such as the device name and media type. You must provide the stream name or the Amazon Resource Name (ARN) of the stream. To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API. UpdateStream is an asynchronous operation, and takes time to complete.
92 */
93 updateStream(callback?: (err: AWSError, data: KinesisVideo.Types.UpdateStreamOutput) => void): Request<KinesisVideo.Types.UpdateStreamOutput, AWSError>;
94}
95declare namespace KinesisVideo {
96 export type APIName = "PUT_MEDIA"|"GET_MEDIA"|"LIST_FRAGMENTS"|"GET_MEDIA_FOR_FRAGMENT_LIST"|"GET_HLS_STREAMING_SESSION_URL"|"GET_DASH_STREAMING_SESSION_URL"|string;
97 export type ComparisonOperator = "BEGINS_WITH"|string;
98 export interface CreateStreamInput {
99 /**
100 * The name of the device that is writing to the stream. In the current implementation, Kinesis Video Streams does not use this name.
101 */
102 DeviceName?: DeviceName;
103 /**
104 * A name for the stream that you are creating. The stream name is an identifier for the stream, and must be unique for each account and region.
105 */
106 StreamName: StreamName;
107 /**
108 * The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see Media Types. If you choose to specify the MediaType, see Naming Requirements for guidelines. This parameter is optional; the default value is null (or empty in JSON).
109 */
110 MediaType?: MediaType;
111 /**
112 * The ID of the AWS Key Management Service (AWS KMS) key that you want Kinesis Video Streams to use to encrypt stream data. If no key ID is specified, the default, Kinesis Video-managed key (aws/kinesisvideo) is used. For more information, see DescribeKey.
113 */
114 KmsKeyId?: KmsKeyId;
115 /**
116 * The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is 0, indicating that the stream does not persist data. When the DataRetentionInHours value is 0, consumers can still consume the fragments that remain in the service host buffer, which has a retention time limit of 5 minutes and a retention memory limit of 200 MB. Fragments are removed from the buffer when either limit is reached.
117 */
118 DataRetentionInHours?: DataRetentionInHours;
119 /**
120 * A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).
121 */
122 Tags?: ResourceTags;
123 }
124 export interface CreateStreamOutput {
125 /**
126 * The Amazon Resource Name (ARN) of the stream.
127 */
128 StreamARN?: ResourceARN;
129 }
130 export type DataEndpoint = string;
131 export type DataRetentionChangeInHours = number;
132 export type DataRetentionInHours = number;
133 export interface DeleteStreamInput {
134 /**
135 * The Amazon Resource Name (ARN) of the stream that you want to delete.
136 */
137 StreamARN: ResourceARN;
138 /**
139 * Optional: The version of the stream that you want to delete. Specify the version as a safeguard to ensure that your are deleting the correct stream. To get the stream version, use the DescribeStream API. If not specified, only the CreationTime is checked before deleting the stream.
140 */
141 CurrentVersion?: Version;
142 }
143 export interface DeleteStreamOutput {
144 }
145 export interface DescribeStreamInput {
146 /**
147 * The name of the stream.
148 */
149 StreamName?: StreamName;
150 /**
151 * The Amazon Resource Name (ARN) of the stream.
152 */
153 StreamARN?: ResourceARN;
154 }
155 export interface DescribeStreamOutput {
156 /**
157 * An object that describes the stream.
158 */
159 StreamInfo?: StreamInfo;
160 }
161 export type DeviceName = string;
162 export interface GetDataEndpointInput {
163 /**
164 * The name of the stream that you want to get the endpoint for. You must specify either this parameter or a StreamARN in the request.
165 */
166 StreamName?: StreamName;
167 /**
168 * The Amazon Resource Name (ARN) of the stream that you want to get the endpoint for. You must specify either this parameter or a StreamName in the request.
169 */
170 StreamARN?: ResourceARN;
171 /**
172 * The name of the API action for which to get an endpoint.
173 */
174 APIName: APIName;
175 }
176 export interface GetDataEndpointOutput {
177 /**
178 * The endpoint value. To read data from the stream or to write data to it, specify this endpoint in your application.
179 */
180 DataEndpoint?: DataEndpoint;
181 }
182 export type KmsKeyId = string;
183 export interface ListStreamsInput {
184 /**
185 * The maximum number of streams to return in the response. The default is 10,000.
186 */
187 MaxResults?: ListStreamsInputLimit;
188 /**
189 * If you specify this parameter, when the result of a ListStreams operation is truncated, the call returns the NextToken in the response. To get another batch of streams, provide this token in your next request.
190 */
191 NextToken?: NextToken;
192 /**
193 * Optional: Returns only streams that satisfy a specific condition. Currently, you can specify only the prefix of a stream name as a condition.
194 */
195 StreamNameCondition?: StreamNameCondition;
196 }
197 export type ListStreamsInputLimit = number;
198 export interface ListStreamsOutput {
199 /**
200 * An array of StreamInfo objects.
201 */
202 StreamInfoList?: StreamInfoList;
203 /**
204 * If the response is truncated, the call returns this element with a token. To get the next batch of streams, use this token in your next request.
205 */
206 NextToken?: NextToken;
207 }
208 export interface ListTagsForStreamInput {
209 /**
210 * If you specify this parameter and the result of a ListTagsForStream call is truncated, the response includes a token that you can use in the next request to fetch the next batch of tags.
211 */
212 NextToken?: NextToken;
213 /**
214 * The Amazon Resource Name (ARN) of the stream that you want to list tags for.
215 */
216 StreamARN?: ResourceARN;
217 /**
218 * The name of the stream that you want to list tags for.
219 */
220 StreamName?: StreamName;
221 }
222 export interface ListTagsForStreamOutput {
223 /**
224 * If you specify this parameter and the result of a ListTags call is truncated, the response includes a token that you can use in the next request to fetch the next set of tags.
225 */
226 NextToken?: NextToken;
227 /**
228 * A map of tag keys and values associated with the specified stream.
229 */
230 Tags?: ResourceTags;
231 }
232 export type MediaType = string;
233 export type NextToken = string;
234 export type ResourceARN = string;
235 export type ResourceTags = {[key: string]: TagValue};
236 export type Status = "CREATING"|"ACTIVE"|"UPDATING"|"DELETING"|string;
237 export interface StreamInfo {
238 /**
239 * The name of the device that is associated with the stream.
240 */
241 DeviceName?: DeviceName;
242 /**
243 * The name of the stream.
244 */
245 StreamName?: StreamName;
246 /**
247 * The Amazon Resource Name (ARN) of the stream.
248 */
249 StreamARN?: ResourceARN;
250 /**
251 * The MediaType of the stream.
252 */
253 MediaType?: MediaType;
254 /**
255 * The ID of the AWS Key Management Service (AWS KMS) key that Kinesis Video Streams uses to encrypt data on the stream.
256 */
257 KmsKeyId?: KmsKeyId;
258 /**
259 * The version of the stream.
260 */
261 Version?: Version;
262 /**
263 * The status of the stream.
264 */
265 Status?: Status;
266 /**
267 * A time stamp that indicates when the stream was created.
268 */
269 CreationTime?: Timestamp;
270 /**
271 * How long the stream retains data, in hours.
272 */
273 DataRetentionInHours?: DataRetentionInHours;
274 }
275 export type StreamInfoList = StreamInfo[];
276 export type StreamName = string;
277 export interface StreamNameCondition {
278 /**
279 * A comparison operator. Currently, you can specify only the BEGINS_WITH operator, which finds streams whose names start with a given prefix.
280 */
281 ComparisonOperator?: ComparisonOperator;
282 /**
283 * A value to compare.
284 */
285 ComparisonValue?: StreamName;
286 }
287 export type TagKey = string;
288 export type TagKeyList = TagKey[];
289 export interface TagStreamInput {
290 /**
291 * The Amazon Resource Name (ARN) of the resource that you want to add the tag or tags to.
292 */
293 StreamARN?: ResourceARN;
294 /**
295 * The name of the stream that you want to add the tag or tags to.
296 */
297 StreamName?: StreamName;
298 /**
299 * A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).
300 */
301 Tags: ResourceTags;
302 }
303 export interface TagStreamOutput {
304 }
305 export type TagValue = string;
306 export type Timestamp = Date;
307 export interface UntagStreamInput {
308 /**
309 * The Amazon Resource Name (ARN) of the stream that you want to remove tags from.
310 */
311 StreamARN?: ResourceARN;
312 /**
313 * The name of the stream that you want to remove tags from.
314 */
315 StreamName?: StreamName;
316 /**
317 * A list of the keys of the tags that you want to remove.
318 */
319 TagKeyList: TagKeyList;
320 }
321 export interface UntagStreamOutput {
322 }
323 export interface UpdateDataRetentionInput {
324 /**
325 * The name of the stream whose retention period you want to change.
326 */
327 StreamName?: StreamName;
328 /**
329 * The Amazon Resource Name (ARN) of the stream whose retention period you want to change.
330 */
331 StreamARN?: ResourceARN;
332 /**
333 * The version of the stream whose retention period you want to change. To get the version, call either the DescribeStream or the ListStreams API.
334 */
335 CurrentVersion: Version;
336 /**
337 * Indicates whether you want to increase or decrease the retention period.
338 */
339 Operation: UpdateDataRetentionOperation;
340 /**
341 * The retention period, in hours. The value you specify replaces the current value. The maximum value for this parameter is 87600 (ten years).
342 */
343 DataRetentionChangeInHours: DataRetentionChangeInHours;
344 }
345 export type UpdateDataRetentionOperation = "INCREASE_DATA_RETENTION"|"DECREASE_DATA_RETENTION"|string;
346 export interface UpdateDataRetentionOutput {
347 }
348 export interface UpdateStreamInput {
349 /**
350 * The name of the stream whose metadata you want to update. The stream name is an identifier for the stream, and must be unique for each account and region.
351 */
352 StreamName?: StreamName;
353 /**
354 * The ARN of the stream whose metadata you want to update.
355 */
356 StreamARN?: ResourceARN;
357 /**
358 * The version of the stream whose metadata you want to update.
359 */
360 CurrentVersion: Version;
361 /**
362 * The name of the device that is writing to the stream. In the current implementation, Kinesis Video Streams does not use this name.
363 */
364 DeviceName?: DeviceName;
365 /**
366 * The stream's media type. Use MediaType to specify the type of content that the stream contains to the consumers of the stream. For more information about media types, see Media Types. If you choose to specify the MediaType, see Naming Requirements. To play video on the console, you must specify the correct video type. For example, if the video in the stream is H.264, specify video/h264 as the MediaType.
367 */
368 MediaType?: MediaType;
369 }
370 export interface UpdateStreamOutput {
371 }
372 export type Version = string;
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 export type apiVersion = "2017-09-30"|"latest"|string;
377 export interface ClientApiVersions {
378 /**
379 * 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.
380 */
381 apiVersion?: apiVersion;
382 }
383 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
384 /**
385 * Contains interfaces for use with the KinesisVideo client.
386 */
387 export import Types = KinesisVideo;
388}
389export = KinesisVideo;