AWSKinesisVideo Class Reference

Inherits from AWSService : NSObject
Declared in AWSKinesisVideoService.h
AWSKinesisVideoService.m

Overview

  configuration

The service configuration used to instantiate this service client.

@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration

Discussion

Warning: Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.

Declared In

AWSKinesisVideoService.h

+ defaultKinesisVideo

Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with defaultServiceConfiguration from [AWSServiceManager defaultServiceManager]. The reference to this object is maintained by the SDK, and you do not need to retain it manually.

+ (instancetype)defaultKinesisVideo

Return Value

The default service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
    AWSServiceManager.default().defaultServiceConfiguration = configuration

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                      identityPoolId:@"YourIdentityPoolId"];
      AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
                                                                           credentialsProvider:credentialsProvider];
      [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;

      return YES;
  }

Then call the following to get the default service client:

Swift

 let KinesisVideo = AWSKinesisVideo.default()

Objective-C

 AWSKinesisVideo *KinesisVideo = [AWSKinesisVideo defaultKinesisVideo];

Declared In

AWSKinesisVideoService.h

+ registerKinesisVideoWithConfiguration:forKey:

Creates a service client with the given service configuration and registers it for the key.

+ (void)registerKinesisVideoWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key

Parameters

configuration

A service configuration object.

key

A string to identify the service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
    AWSKinesisVideo.register(with: configuration!, forKey: "USWest2KinesisVideo")

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                     identityPoolId:@"YourIdentityPoolId"];
     AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                          credentialsProvider:credentialsProvider];

     [AWSKinesisVideo registerKinesisVideoWithConfiguration:configuration forKey:@"USWest2KinesisVideo"];

     return YES;
 }

Then call the following to get the service client:

Swift

 let KinesisVideo = AWSKinesisVideo(forKey: "USWest2KinesisVideo")

Objective-C

 AWSKinesisVideo *KinesisVideo = [AWSKinesisVideo KinesisVideoForKey:@"USWest2KinesisVideo"];

Warning: After calling this method, do not modify the configuration object. It may cause unspecified behaviors.

Declared In

AWSKinesisVideoService.h

+ KinesisVideoForKey:

Retrieves the service client associated with the key. You need to call + registerKinesisVideoWithConfiguration:forKey: before invoking this method.

+ (instancetype)KinesisVideoForKey:(NSString *)key

Parameters

key

A string to identify the service client.

Return Value

An instance of the service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
    AWSKinesisVideo.register(with: configuration!, forKey: "USWest2KinesisVideo")

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                     identityPoolId:@"YourIdentityPoolId"];
     AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                          credentialsProvider:credentialsProvider];

     [AWSKinesisVideo registerKinesisVideoWithConfiguration:configuration forKey:@"USWest2KinesisVideo"];

     return YES;
 }

Then call the following to get the service client:

Swift

 let KinesisVideo = AWSKinesisVideo(forKey: "USWest2KinesisVideo")

Objective-C

 AWSKinesisVideo *KinesisVideo = [AWSKinesisVideo KinesisVideoForKey:@"USWest2KinesisVideo"];

Declared In

AWSKinesisVideoService.h

+ removeKinesisVideoForKey:

Removes the service client associated with the key and release it.

+ (void)removeKinesisVideoForKey:(NSString *)key

Parameters

key

A string to identify the service client.

Discussion

Warning: Before calling this method, make sure no method is running on this client.

Declared In

AWSKinesisVideoService.h

– createStream:

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.

- (AWSTask<AWSKinesisVideoCreateStreamOutput*> *)createStream:(AWSKinesisVideoCreateStreamInput *)request

Parameters

request

A container for the necessary parameters to execute the CreateStream service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoCreateStreamOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorAccountStreamLimitExceeded, AWSKinesisVideoErrorDeviceStreamLimitExceeded, AWSKinesisVideoErrorResourceInUse, AWSKinesisVideoErrorInvalidDevice, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorClientLimitExceeded.

Declared In

AWSKinesisVideoService.h

– createStream:completionHandler:

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.

- (void)createStream:(AWSKinesisVideoCreateStreamInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoCreateStreamOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CreateStream service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorAccountStreamLimitExceeded, AWSKinesisVideoErrorDeviceStreamLimitExceeded, AWSKinesisVideoErrorResourceInUse, AWSKinesisVideoErrorInvalidDevice, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorClientLimitExceeded.

Declared In

AWSKinesisVideoService.h

– deleteStream:

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.

- (AWSTask<AWSKinesisVideoDeleteStreamOutput*> *)deleteStream:(AWSKinesisVideoDeleteStreamInput *)request

Parameters

request

A container for the necessary parameters to execute the DeleteStream service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoDeleteStreamOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorNotAuthorized.

Declared In

AWSKinesisVideoService.h

– deleteStream:completionHandler:

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.

- (void)deleteStream:(AWSKinesisVideoDeleteStreamInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoDeleteStreamOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteStream service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorNotAuthorized.

Declared In

AWSKinesisVideoService.h

– describeStream:

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

- (AWSTask<AWSKinesisVideoDescribeStreamOutput*> *)describeStream:(AWSKinesisVideoDescribeStreamInput *)request

Parameters

request

A container for the necessary parameters to execute the DescribeStream service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoDescribeStreamOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorNotAuthorized.

Declared In

AWSKinesisVideoService.h

– describeStream:completionHandler:

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

- (void)describeStream:(AWSKinesisVideoDescribeStreamInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoDescribeStreamOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeStream service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorNotAuthorized.

Declared In

AWSKinesisVideoService.h

– getDataEndpoint:

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.

- (AWSTask<AWSKinesisVideoGetDataEndpointOutput*> *)getDataEndpoint:(AWSKinesisVideoGetDataEndpointInput *)request

Parameters

request

A container for the necessary parameters to execute the GetDataEndpoint service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoGetDataEndpointOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorNotAuthorized.

Declared In

AWSKinesisVideoService.h

– getDataEndpoint:completionHandler:

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.

- (void)getDataEndpoint:(AWSKinesisVideoGetDataEndpointInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoGetDataEndpointOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the GetDataEndpoint service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorNotAuthorized.

Declared In

AWSKinesisVideoService.h

– listStreams:

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.

- (AWSTask<AWSKinesisVideoListStreamsOutput*> *)listStreams:(AWSKinesisVideoListStreamsInput *)request

Parameters

request

A container for the necessary parameters to execute the ListStreams service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoListStreamsOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument.

Declared In

AWSKinesisVideoService.h

– listStreams:completionHandler:

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.

- (void)listStreams:(AWSKinesisVideoListStreamsInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoListStreamsOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListStreams service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument.

Declared In

AWSKinesisVideoService.h

– listTagsForStream:

Returns a list of tags associated with the specified stream.

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

- (AWSTask<AWSKinesisVideoListTagsForStreamOutput*> *)listTagsForStream:(AWSKinesisVideoListTagsForStreamInput *)request

Parameters

request

A container for the necessary parameters to execute the ListTagsForStream service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoListTagsForStreamOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorInvalidResourceFormat.

Declared In

AWSKinesisVideoService.h

– listTagsForStream:completionHandler:

Returns a list of tags associated with the specified stream.

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

- (void)listTagsForStream:(AWSKinesisVideoListTagsForStreamInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoListTagsForStreamOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListTagsForStream service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorInvalidResourceFormat.

Declared In

AWSKinesisVideoService.h

– tagStream:

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.

- (AWSTask<AWSKinesisVideoTagStreamOutput*> *)tagStream:(AWSKinesisVideoTagStreamInput *)request

Parameters

request

A container for the necessary parameters to execute the TagStream service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoTagStreamOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorInvalidResourceFormat, AWSKinesisVideoErrorTagsPerResourceExceededLimit.

Declared In

AWSKinesisVideoService.h

– tagStream:completionHandler:

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.

- (void)tagStream:(AWSKinesisVideoTagStreamInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoTagStreamOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the TagStream service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorInvalidResourceFormat, AWSKinesisVideoErrorTagsPerResourceExceededLimit.

Declared In

AWSKinesisVideoService.h

– untagStream:

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.

- (AWSTask<AWSKinesisVideoUntagStreamOutput*> *)untagStream:(AWSKinesisVideoUntagStreamInput *)request

Parameters

request

A container for the necessary parameters to execute the UntagStream service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoUntagStreamOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorInvalidResourceFormat.

Declared In

AWSKinesisVideoService.h

– untagStream:completionHandler:

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.

- (void)untagStream:(AWSKinesisVideoUntagStreamInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoUntagStreamOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the UntagStream service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorInvalidResourceFormat.

Declared In

AWSKinesisVideoService.h

– updateDataRetention:

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.

- (AWSTask<AWSKinesisVideoUpdateDataRetentionOutput*> *)updateDataRetention:(AWSKinesisVideoUpdateDataRetentionInput *)request

Parameters

request

A container for the necessary parameters to execute the UpdateDataRetention service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoUpdateDataRetentionOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorResourceInUse, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorVersionMismatch.

Declared In

AWSKinesisVideoService.h

– updateDataRetention:completionHandler:

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.

- (void)updateDataRetention:(AWSKinesisVideoUpdateDataRetentionInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoUpdateDataRetentionOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the UpdateDataRetention service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorResourceInUse, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorVersionMismatch.

Declared In

AWSKinesisVideoService.h

– updateStream:

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.

- (AWSTask<AWSKinesisVideoUpdateStreamOutput*> *)updateStream:(AWSKinesisVideoUpdateStreamInput *)request

Parameters

request

A container for the necessary parameters to execute the UpdateStream service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoUpdateStreamOutput. On failed execution, task.error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorResourceInUse, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorVersionMismatch.

Declared In

AWSKinesisVideoService.h

– updateStream:completionHandler:

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.

- (void)updateStream:(AWSKinesisVideoUpdateStreamInput *)request completionHandler:(void ( ^ _Nullable ) ( AWSKinesisVideoUpdateStreamOutput *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the UpdateStream service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoErrorDomain domain and the following error code: AWSKinesisVideoErrorClientLimitExceeded, AWSKinesisVideoErrorInvalidArgument, AWSKinesisVideoErrorResourceNotFound, AWSKinesisVideoErrorResourceInUse, AWSKinesisVideoErrorNotAuthorized, AWSKinesisVideoErrorVersionMismatch.

Declared In

AWSKinesisVideoService.h