Method: SDM::AccountPermissions#list
- Defined in:
- lib/svc.rb
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of Permission records matching a given set of criteria.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/svc.rb', line 522 def list( filter, *args, deadline: nil ) req = V1::AccountPermissionListRequest.new() req. = V1::ListRequestMetadata.new() page_size_option = @parent.["PageSize"] if page_size_option.is_a? Integer req..limit = page_size_option end if not @parent.snapshot_time.nil? req..snapshot_at = @parent.snapshot_time end req.filter = Plumbing::quote_filter_args(filter, *args) resp = Enumerator::Generator.new { |g| tries = 0 loop do begin plumbing_response = @stub.list(req, metadata: @parent.("AccountPermissions.List", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end tries = 0 plumbing_response..each do |plumbing_item| g.yield Plumbing::(plumbing_item) end break if plumbing_response..next_cursor == "" req..cursor = plumbing_response..next_cursor end } resp end |