internal ListDashboardsResponse ListDashboards(ListDashboardsRequest request) { var marshaller = new ListDashboardsRequestMarshaller(); var unmarshaller = ListDashboardsResponseUnmarshaller.Instance; return(Invoke <ListDashboardsRequest, ListDashboardsResponse>(request, marshaller, unmarshaller)); }
public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonCloudWatchConfig config = new AmazonCloudWatchConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonCloudWatchClient client = new AmazonCloudWatchClient(creds, config); ListDashboardsResponse resp = new ListDashboardsResponse(); do { ListDashboardsRequest req = new ListDashboardsRequest { NextToken = resp.NextToken }; resp = client.ListDashboards(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.DashboardEntries) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListDashboards operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDashboards 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/monitoring-2010-08-01/ListDashboards">REST API Reference for ListDashboards Operation</seealso> public Task <ListDashboardsResponse> ListDashboardsAsync(ListDashboardsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListDashboardsRequestMarshaller(); var unmarshaller = ListDashboardsResponseUnmarshaller.Instance; return(InvokeAsync <ListDashboardsRequest, ListDashboardsResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListDashboards operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDashboards 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/monitoring-2010-08-01/ListDashboards">REST API Reference for ListDashboards Operation</seealso> public virtual Task <ListDashboardsResponse> ListDashboardsAsync(ListDashboardsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListDashboardsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListDashboardsResponseUnmarshaller.Instance; return(InvokeAsync <ListDashboardsResponse>(request, options, cancellationToken)); }
internal virtual ListDashboardsResponse ListDashboards(ListDashboardsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListDashboardsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListDashboardsResponseUnmarshaller.Instance; return(Invoke <ListDashboardsResponse>(request, options)); }
protected override void ProcessRecord() { base.ProcessRecord(); ListDashboardsRequest request; try { request = new ListDashboardsRequest { DashboardGroupId = DashboardGroupId, LifecycleState = LifecycleState, DisplayName = DisplayName, Id = Id, Limit = Limit, Page = Page, SortOrder = SortOrder, SortBy = SortBy, OpcRequestId = OpcRequestId, OpcCrossRegion = OpcCrossRegion }; IEnumerable <ListDashboardsResponse> responses = GetRequestDelegate().Invoke(request); foreach (var item in responses) { response = item; WriteOutput(response, response.DashboardCollection, 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); } }