Class: AWS.KinesisVideo

Inherits:
AWS.Service show all
Identifier:
kinesisvideo
API Version:
2017-09-30
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Sending a Request Using KinesisVideo

var kinesisvideo = new AWS.KinesisVideo();
kinesisvideo.createStream(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the KinesisVideo object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var kinesisvideo = new AWS.KinesisVideo({apiVersion: '2017-09-30'});

You can also set the API version globally in AWS.config.apiVersions using the kinesisvideo service identifier:

AWS.config.apiVersions = {
  kinesisvideo: '2017-09-30',
  // other service API versions
};

var kinesisvideo = new AWS.KinesisVideo();

Version:

  • 2017-09-30

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.KinesisVideo(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a KinesisVideo object

var kinesisvideo = new AWS.KinesisVideo({apiVersion: '2017-09-30'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.KinesisVideo.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.KinesisVideo.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.KinesisVideo.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createStream(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createStream operation

var params = {
  StreamName: 'STRING_VALUE', /* required */
  DataRetentionInHours: 'NUMBER_VALUE',
  DeviceName: 'STRING_VALUE',
  KmsKeyId: 'STRING_VALUE',
  MediaType: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
kinesisvideo.createStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceName — (String)

      The name of the device that is writing to the stream.

      Note: In the current implementation, Kinesis Video Streams does not use this name.
    • StreamName — (String)

      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.

    • MediaType — (String)

      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).

    • KmsKeyId — (String)

      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.

    • DataRetentionInHours — (Integer)

      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.

    • Tags — (map<String>)

      A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StreamARN — (String)

        The Amazon Resource Name (ARN) of the stream.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteStream(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deleteStream operation

var params = {
  StreamARN: 'STRING_VALUE', /* required */
  CurrentVersion: 'STRING_VALUE'
};
kinesisvideo.deleteStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StreamARN — (String)

      The Amazon Resource Name (ARN) of the stream that you want to delete.

    • CurrentVersion — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStream(params = {}, callback) ⇒ AWS.Request

Returns the most current information about the specified stream. You must specify either the StreamName or the StreamARN.

Service Reference:

Examples:

Calling the describeStream operation

var params = {
  StreamARN: 'STRING_VALUE',
  StreamName: 'STRING_VALUE'
};
kinesisvideo.describeStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StreamName — (String)

      The name of the stream.

    • StreamARN — (String)

      The Amazon Resource Name (ARN) of the stream.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StreamInfo — (map)

        An object that describes the stream.

        • DeviceName — (String)

          The name of the device that is associated with the stream.

        • StreamName — (String)

          The name of the stream.

        • StreamARN — (String)

          The Amazon Resource Name (ARN) of the stream.

        • MediaType — (String)

          The MediaType of the stream.

        • KmsKeyId — (String)

          The ID of the AWS Key Management Service (AWS KMS) key that Kinesis Video Streams uses to encrypt data on the stream.

        • Version — (String)

          The version of the stream.

        • Status — (String)

          The status of the stream.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "UPDATING"
          • "DELETING"
        • CreationTime — (Date)

          A time stamp that indicates when the stream was created.

        • DataRetentionInHours — (Integer)

          How long the stream retains data, in hours.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDataEndpoint(params = {}, callback) ⇒ AWS.Request

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).

Note: 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.

Service Reference:

Examples:

Calling the getDataEndpoint operation

var params = {
  APIName: PUT_MEDIA | GET_MEDIA | LIST_FRAGMENTS | GET_MEDIA_FOR_FRAGMENT_LIST | GET_HLS_STREAMING_SESSION_URL, /* required */
  StreamARN: 'STRING_VALUE',
  StreamName: 'STRING_VALUE'
};
kinesisvideo.getDataEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StreamName — (String)

      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.

    • StreamARN — (String)

      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.

    • APIName — (String)

      The name of the API action for which to get an endpoint.

      Possible values include:
      • "PUT_MEDIA"
      • "GET_MEDIA"
      • "LIST_FRAGMENTS"
      • "GET_MEDIA_FOR_FRAGMENT_LIST"
      • "GET_HLS_STREAMING_SESSION_URL"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DataEndpoint — (String)

        The endpoint value. To read data from the stream or to write data to it, specify this endpoint in your application.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listStreams(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the listStreams operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  StreamNameCondition: {
    ComparisonOperator: BEGINS_WITH,
    ComparisonValue: 'STRING_VALUE'
  }
};
kinesisvideo.listStreams(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      The maximum number of streams to return in the response. The default is 10,000.

    • NextToken — (String)

      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.

    • StreamNameCondition — (map)

      Optional: Returns only streams that satisfy a specific condition. Currently, you can specify only the prefix of a stream name as a condition.

      • ComparisonOperator — (String)

        A comparison operator. Currently, you can specify only the BEGINS_WITH operator, which finds streams whose names start with a given prefix.

        Possible values include:
        • "BEGINS_WITH"
      • ComparisonValue — (String)

        A value to compare.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StreamInfoList — (Array<map>)

        An array of StreamInfo objects.

        • DeviceName — (String)

          The name of the device that is associated with the stream.

        • StreamName — (String)

          The name of the stream.

        • StreamARN — (String)

          The Amazon Resource Name (ARN) of the stream.

        • MediaType — (String)

          The MediaType of the stream.

        • KmsKeyId — (String)

          The ID of the AWS Key Management Service (AWS KMS) key that Kinesis Video Streams uses to encrypt data on the stream.

        • Version — (String)

          The version of the stream.

        • Status — (String)

          The status of the stream.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "UPDATING"
          • "DELETING"
        • CreationTime — (Date)

          A time stamp that indicates when the stream was created.

        • DataRetentionInHours — (Integer)

          How long the stream retains data, in hours.

      • NextToken — (String)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForStream(params = {}, callback) ⇒ AWS.Request

Returns a list of tags associated with the specified stream.

In the request, you must specify either the StreamName or the StreamARN.

Service Reference:

Examples:

Calling the listTagsForStream operation

var params = {
  NextToken: 'STRING_VALUE',
  StreamARN: 'STRING_VALUE',
  StreamName: 'STRING_VALUE'
};
kinesisvideo.listTagsForStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      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.

    • StreamARN — (String)

      The Amazon Resource Name (ARN) of the stream that you want to list tags for.

    • StreamName — (String)

      The name of the stream that you want to list tags for.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String)

        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.

      • Tags — (map<String>)

        A map of tag keys and values associated with the specified stream.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagStream(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the tagStream operation

var params = {
  Tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  },
  StreamARN: 'STRING_VALUE',
  StreamName: 'STRING_VALUE'
};
kinesisvideo.tagStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StreamARN — (String)

      The Amazon Resource Name (ARN) of the resource that you want to add the tag or tags to.

    • StreamName — (String)

      The name of the stream that you want to add the tag or tags to.

    • Tags — (map<String>)

      A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagStream(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the untagStream operation

var params = {
  TagKeyList: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  StreamARN: 'STRING_VALUE',
  StreamName: 'STRING_VALUE'
};
kinesisvideo.untagStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StreamARN — (String)

      The Amazon Resource Name (ARN) of the stream that you want to remove tags from.

    • StreamName — (String)

      The name of the stream that you want to remove tags from.

    • TagKeyList — (Array<String>)

      A list of the keys of the tags that you want to remove.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDataRetention(params = {}, callback) ⇒ AWS.Request

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.

Note: 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.

Service Reference:

Examples:

Calling the updateDataRetention operation

var params = {
  CurrentVersion: 'STRING_VALUE', /* required */
  DataRetentionChangeInHours: 'NUMBER_VALUE', /* required */
  Operation: INCREASE_DATA_RETENTION | DECREASE_DATA_RETENTION, /* required */
  StreamARN: 'STRING_VALUE',
  StreamName: 'STRING_VALUE'
};
kinesisvideo.updateDataRetention(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StreamName — (String)

      The name of the stream whose retention period you want to change.

    • StreamARN — (String)

      The Amazon Resource Name (ARN) of the stream whose retention period you want to change.

    • CurrentVersion — (String)

      The version of the stream whose retention period you want to change. To get the version, call either the DescribeStream or the ListStreams API.

    • Operation — (String)

      Indicates whether you want to increase or decrease the retention period.

      Possible values include:
      • "INCREASE_DATA_RETENTION"
      • "DECREASE_DATA_RETENTION"
    • DataRetentionChangeInHours — (Integer)

      The retention period, in hours. The value you specify replaces the current value. The maximum value for this parameter is 87600 (ten years).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateStream(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateStream operation

var params = {
  CurrentVersion: 'STRING_VALUE', /* required */
  DeviceName: 'STRING_VALUE',
  MediaType: 'STRING_VALUE',
  StreamARN: 'STRING_VALUE',
  StreamName: 'STRING_VALUE'
};
kinesisvideo.updateStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StreamName — (String)

      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.

    • StreamARN — (String)

      The ARN of the stream whose metadata you want to update.

    • CurrentVersion — (String)

      The version of the stream whose metadata you want to update.

    • DeviceName — (String)

      The name of the device that is writing to the stream.

      Note: In the current implementation, Kinesis Video Streams does not use this name.
    • MediaType — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.