internal virtual ListFragmentsResponse ListFragments(ListFragmentsRequest request)
        {
            var marshaller = new ListFragmentsRequestMarshaller();
            var unmarshaller = ListFragmentsResponseUnmarshaller.Instance;

            return Invoke<ListFragmentsRequest,ListFragmentsResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Returns a list of <a>Fragment</a> objects from the specified stream and start location
        /// within the archived data.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListFragments service method.</param>
        ///
        /// <returns>The response from the ListFragments service method, as returned by KinesisVideoArchivedMedia.</returns>
        /// <exception cref="Amazon.KinesisVideoArchivedMedia.Model.ClientLimitExceededException">
        /// Kinesis Video Streams has throttled the request because you have exceeded the limit
        /// of allowed client calls. Try making the call later.
        /// </exception>
        /// <exception cref="Amazon.KinesisVideoArchivedMedia.Model.InvalidArgumentException">
        /// A specified parameter exceeds its restrictions, is not supported, or can't be used.
        /// </exception>
        /// <exception cref="Amazon.KinesisVideoArchivedMedia.Model.NotAuthorizedException">
        /// Status Code: 403, The caller is not authorized to perform an operation on the given
        /// stream, or the token has expired.
        /// </exception>
        /// <exception cref="Amazon.KinesisVideoArchivedMedia.Model.ResourceNotFoundException">
        /// <code>GetMedia</code> throws this error when Kinesis Video Streams can't find the
        /// stream that you specified.
        ///
        ///
        /// <para>
        ///  <code>GetHLSStreamingSessionURL</code> throws this error if a session with a <code>PlaybackMode</code>
        /// of <code>ON_DEMAND</code> is requested for a stream that has no fragments within the
        /// requested time range, or if a session with a <code>PlaybackMode</code> of <code>LIVE</code>
        /// is requested for a stream that has no fragments within the last 30 seconds.
        /// </para>
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments">REST API Reference for ListFragments Operation</seealso>
        public virtual ListFragmentsResponse ListFragments(ListFragmentsRequest request)
        {
            var marshaller   = ListFragmentsRequestMarshaller.Instance;
            var unmarshaller = ListFragmentsResponseUnmarshaller.Instance;

            return(Invoke <ListFragmentsRequest, ListFragmentsResponse>(request, marshaller, unmarshaller));
        }
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonKinesisVideoArchivedMediaConfig config = new AmazonKinesisVideoArchivedMediaConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonKinesisVideoArchivedMediaClient client = new AmazonKinesisVideoArchivedMediaClient(creds, config);

            ListFragmentsResponse resp = new ListFragmentsResponse();

            do
            {
                ListFragmentsRequest req = new ListFragmentsRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.ListFragments(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.Fragments)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListFragments operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListFragments operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments">REST API Reference for ListFragments Operation</seealso>
        public virtual Task <ListFragmentsResponse> ListFragmentsAsync(ListFragmentsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = ListFragmentsRequestMarshaller.Instance;
            var unmarshaller = ListFragmentsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListFragmentsRequest, ListFragmentsResponse>(request, marshaller,
                                                                             unmarshaller, cancellationToken));
        }
Example #5
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListFragments operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListFragments operation on AmazonKinesisVideoArchivedMediaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListFragments
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments">REST API Reference for ListFragments Operation</seealso>
        public virtual IAsyncResult BeginListFragments(ListFragmentsRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = ListFragmentsRequestMarshaller.Instance;
            var unmarshaller = ListFragmentsResponseUnmarshaller.Instance;

            return(BeginInvoke <ListFragmentsRequest>(request, marshaller, unmarshaller,
                                                      callback, state));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListFragments operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListFragments operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments">REST API Reference for ListFragments Operation</seealso>
        public virtual Task <ListFragmentsResponse> ListFragmentsAsync(ListFragmentsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListFragmentsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListFragmentsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListFragmentsResponse>(request, options, cancellationToken));
        }
        /// <summary>
        /// Returns a list of <a>Fragment</a> objects from the specified stream and start location
        /// within the archived data.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListFragments service method.</param>
        ///
        /// <returns>The response from the ListFragments service method, as returned by KinesisVideoArchivedMedia.</returns>
        /// <exception cref="Amazon.KinesisVideoArchivedMedia.Model.ClientLimitExceededException">
        /// Kinesis Video Streams has throttled the request because you have exceeded the limit
        /// of allowed client calls. Try making the call later.
        /// </exception>
        /// <exception cref="Amazon.KinesisVideoArchivedMedia.Model.InvalidArgumentException">
        /// A specified parameter exceeds its restrictions, is not supported, or can't be used.
        /// </exception>
        /// <exception cref="Amazon.KinesisVideoArchivedMedia.Model.NotAuthorizedException">
        /// Status Code: 403, The caller is not authorized to perform an operation on the given
        /// stream, or the token has expired.
        /// </exception>
        /// <exception cref="Amazon.KinesisVideoArchivedMedia.Model.ResourceNotFoundException">
        /// <code>GetMedia</code> throws this error when Kinesis Video Streams can't find the
        /// stream that you specified.
        ///
        ///
        /// <para>
        ///  <code>GetHLSStreamingSessionURL</code> throws this error if a session with a <code>PlaybackMode</code>
        /// of <code>ON_DEMAND</code> is requested for a stream that has no fragments within the
        /// requested time range, or if a session with a <code>PlaybackMode</code> of <code>LIVE</code>
        /// is requested for a stream that has no fragments within the last 30 seconds.
        /// </para>
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments">REST API Reference for ListFragments Operation</seealso>
        public virtual ListFragmentsResponse ListFragments(ListFragmentsRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListFragmentsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListFragmentsResponseUnmarshaller.Instance;

            return(Invoke <ListFragmentsResponse>(request, options));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListFragments operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListFragments operation on AmazonKinesisVideoArchivedMediaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListFragments
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments">REST API Reference for ListFragments Operation</seealso>
        public virtual IAsyncResult BeginListFragments(ListFragmentsRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListFragmentsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListFragmentsResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }