/// <summary> /// Returns a collection of OriginEndpoint records. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListOriginEndpoints service method.</param> /// /// <returns>The response from the ListOriginEndpoints service method, as returned by MediaPackage.</returns> /// <exception cref="Amazon.MediaPackage.Model.ForbiddenException"> /// The client is not authorized to access the requested resource. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.InternalServerErrorException"> /// An unexpected error occurred. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.NotFoundException"> /// The requested resource does not exist. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.ServiceUnavailableException"> /// An unexpected error occurred. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.TooManyRequestsException"> /// The client has exceeded their resource or throttling limits. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.UnprocessableEntityException"> /// The parameters sent in the request are not valid. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpoints">REST API Reference for ListOriginEndpoints Operation</seealso> public virtual ListOriginEndpointsResponse ListOriginEndpoints(ListOriginEndpointsRequest request) { var marshaller = ListOriginEndpointsRequestMarshaller.Instance; var unmarshaller = ListOriginEndpointsResponseUnmarshaller.Instance; return(Invoke <ListOriginEndpointsRequest, ListOriginEndpointsResponse>(request, marshaller, unmarshaller)); }
public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonMediaPackageConfig config = new AmazonMediaPackageConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonMediaPackageClient client = new AmazonMediaPackageClient(creds, config); ListOriginEndpointsResponse resp = new ListOriginEndpointsResponse(); do { ListOriginEndpointsRequest req = new ListOriginEndpointsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListOriginEndpoints(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.OriginEndpoints) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListOriginEndpoints operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListOriginEndpoints 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/mediapackage-2017-10-12/ListOriginEndpoints">REST API Reference for ListOriginEndpoints Operation</seealso> public virtual Task <ListOriginEndpointsResponse> ListOriginEndpointsAsync(ListOriginEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = ListOriginEndpointsRequestMarshaller.Instance; var unmarshaller = ListOriginEndpointsResponseUnmarshaller.Instance; return(InvokeAsync <ListOriginEndpointsRequest, ListOriginEndpointsResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Returns a collection of OriginEndpoint records. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListOriginEndpoints service method.</param> /// /// <returns>The response from the ListOriginEndpoints service method, as returned by MediaPackage.</returns> /// <exception cref="Amazon.MediaPackage.Model.ForbiddenException"> /// The client is not authorized to access the requested resource. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.InternalServerErrorException"> /// An unexpected error occurred. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.NotFoundException"> /// The requested resource does not exist. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.ServiceUnavailableException"> /// An unexpected error occurred. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.TooManyRequestsException"> /// The client has exceeded their resource or throttling limits. /// </exception> /// <exception cref="Amazon.MediaPackage.Model.UnprocessableEntityException"> /// The parameters sent in the request are not valid. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpoints">REST API Reference for ListOriginEndpoints Operation</seealso> public virtual ListOriginEndpointsResponse ListOriginEndpoints(ListOriginEndpointsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListOriginEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListOriginEndpointsResponseUnmarshaller.Instance; return(Invoke <ListOriginEndpointsResponse>(request, options)); }