public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ManagedGrafana.Model.ListPermissionsRequest(); if (cmdletContext.GroupId != null) { request.GroupId = cmdletContext.GroupId; } if (cmdletContext.MaxResult != null) { request.MaxResults = cmdletContext.MaxResult.Value; } if (cmdletContext.NextToken != null) { request.NextToken = cmdletContext.NextToken; } if (cmdletContext.UserId != null) { request.UserId = cmdletContext.UserId; } if (cmdletContext.UserType != null) { request.UserType = cmdletContext.UserType; } if (cmdletContext.WorkspaceId != null) { request.WorkspaceId = cmdletContext.WorkspaceId; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
internal ListPermissionsPaginator(IAmazonManagedGrafana client, ListPermissionsRequest request) { this._client = client; this._request = request; }
private Amazon.ManagedGrafana.Model.ListPermissionsResponse CallAWSServiceOperation(IAmazonManagedGrafana client, Amazon.ManagedGrafana.Model.ListPermissionsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Managed Grafana", "ListPermissions"); try { #if DESKTOP return(client.ListPermissions(request)); #elif CORECLR return(client.ListPermissionsAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
/// <summary> /// Paginator for ListPermissions operation ///</summary> public IListPermissionsPaginator ListPermissions(ListPermissionsRequest request) { return(new ListPermissionsPaginator(this.client, request)); }