public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonTranscribeServiceConfig config = new AmazonTranscribeServiceConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonTranscribeServiceClient client = new AmazonTranscribeServiceClient(creds, config); ListTranscriptionJobsResponse resp = new ListTranscriptionJobsResponse(); do { ListTranscriptionJobsRequest req = new ListTranscriptionJobsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListTranscriptionJobs(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.TranscriptionJobSummaries) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Lists transcription jobs with the specified status. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTranscriptionJobs service method.</param> /// /// <returns>The response from the ListTranscriptionJobs service method, as returned by TranscribeService.</returns> /// <exception cref="Amazon.TranscribeService.Model.BadRequestException"> /// There is a problem with one of the input fields. Check the S3 bucket name, make sure /// that the job name is not a duplicate, and confirm that you are using the correct file /// format. Then resend your request. /// </exception> /// <exception cref="Amazon.TranscribeService.Model.InternalFailureException"> /// There was an internal error. Check the error message and try your request again. /// </exception> /// <exception cref="Amazon.TranscribeService.Model.LimitExceededException"> /// Either you have sent too many requests or your input file is longer than 2 hours. /// Wait before you resend your request, or use a smaller file and resend the request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs">REST API Reference for ListTranscriptionJobs Operation</seealso> public virtual ListTranscriptionJobsResponse ListTranscriptionJobs(ListTranscriptionJobsRequest request) { var marshaller = new ListTranscriptionJobsRequestMarshaller(); var unmarshaller = ListTranscriptionJobsResponseUnmarshaller.Instance; return(Invoke <ListTranscriptionJobsRequest, ListTranscriptionJobsResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the ListTranscriptionJobs operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListTranscriptionJobs operation on AmazonTranscribeServiceClient.</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 EndListTranscriptionJobs /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs">REST API Reference for ListTranscriptionJobs Operation</seealso> public virtual IAsyncResult BeginListTranscriptionJobs(ListTranscriptionJobsRequest request, AsyncCallback callback, object state) { var marshaller = ListTranscriptionJobsRequestMarshaller.Instance; var unmarshaller = ListTranscriptionJobsResponseUnmarshaller.Instance; return(BeginInvoke <ListTranscriptionJobsRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Lists transcription jobs with the specified status. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTranscriptionJobs service method.</param> /// /// <returns>The response from the ListTranscriptionJobs service method, as returned by TranscribeService.</returns> /// <exception cref="Amazon.TranscribeService.Model.BadRequestException"> /// Your request didn't pass one or more validation tests. For example, if the transcription /// you're trying to delete doesn't exist or if it is in a non-terminal state (for example, /// it's "in progress"). See the exception <code>Message</code> field for more information. /// </exception> /// <exception cref="Amazon.TranscribeService.Model.InternalFailureException"> /// There was an internal error. Check the error message and try your request again. /// </exception> /// <exception cref="Amazon.TranscribeService.Model.LimitExceededException"> /// Either you have sent too many requests or your input file is too long. Wait before /// you resend your request, or use a smaller file and resend the request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs">REST API Reference for ListTranscriptionJobs Operation</seealso> public virtual ListTranscriptionJobsResponse ListTranscriptionJobs(ListTranscriptionJobsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListTranscriptionJobsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTranscriptionJobsResponseUnmarshaller.Instance; return(Invoke <ListTranscriptionJobsResponse>(request, options)); }
/// <summary> /// Initiates the asynchronous execution of the ListTranscriptionJobs operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListTranscriptionJobs operation on AmazonTranscribeServiceClient.</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 EndListTranscriptionJobs /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs">REST API Reference for ListTranscriptionJobs Operation</seealso> public virtual IAsyncResult BeginListTranscriptionJobs(ListTranscriptionJobsRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = ListTranscriptionJobsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTranscriptionJobsResponseUnmarshaller.Instance; return(BeginInvoke(request, options, callback, state)); }
public async Task <State> GetStatusForTranscribeAsync(State state, ILambdaContext context) { var request = new ListTranscriptionJobsRequest { JobNameContains = state.TranscriptionJobName }; context.Logger.LogLine($"Getting transcription job status: {state.TranscriptionJobName}"); var response = await this._transcribeClient.ListTranscriptionJobsAsync(request); if (response.TranscriptionJobSummaries.Count == 1) { state.TranscriptionJobStatus = response.TranscriptionJobSummaries[0].TranscriptionJobStatus; } context.Logger.LogLine($"... {state.TranscriptionJobStatus}"); return(state); }
protected override void ProcessRecord() { base.ProcessRecord(); ListTranscriptionJobsRequest request; try { request = new ListTranscriptionJobsRequest { CompartmentId = CompartmentId, LifecycleState = LifecycleState, DisplayName = DisplayName, Id = Id, Limit = Limit, Page = Page, SortOrder = SortOrder, SortBy = SortBy, OpcRequestId = OpcRequestId }; IEnumerable <ListTranscriptionJobsResponse> responses = GetRequestDelegate().Invoke(request); foreach (var item in responses) { response = item; WriteOutput(response, response.TranscriptionJobCollection, true); } if (!ParameterSetName.Equals(AllPageSet) && !ParameterSetName.Equals(LimitSet) && response.OpcNextPage != null) { WriteWarning("This operation supports pagination and not all resources were returned. Re-run using the -All option to auto paginate and list all resources."); } FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }
/// <summary> /// Initiates the asynchronous execution of the ListTranscriptionJobs operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListTranscriptionJobs 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/transcribe-2017-10-26/ListTranscriptionJobs">REST API Reference for ListTranscriptionJobs Operation</seealso> public virtual Task <ListTranscriptionJobsResponse> ListTranscriptionJobsAsync(ListTranscriptionJobsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListTranscriptionJobsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTranscriptionJobsResponseUnmarshaller.Instance; return(InvokeAsync <ListTranscriptionJobsResponse>(request, options, cancellationToken)); }