Class: SDM::RemoteIdentityGroups
- Inherits:
-
Object
- Object
- SDM::RemoteIdentityGroups
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/svc.rb
Overview
A RemoteIdentityGroup is a named grouping of Remote Identities for Accounts. An Account's relationship to a RemoteIdentityGroup is defined via RemoteIdentity objects.
See RemoteIdentityGroup.
Instance Method Summary collapse
-
#get(id, deadline: nil) ⇒ Object
Get reads one RemoteIdentityGroup by ID.
-
#initialize(channel, parent) ⇒ RemoteIdentityGroups
constructor
A new instance of RemoteIdentityGroups.
-
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of RemoteIdentityGroups matching a given set of criteria.
Constructor Details
#initialize(channel, parent) ⇒ RemoteIdentityGroups
4754 4755 4756 4757 4758 4759 4760 4761 |
# File 'lib/svc.rb', line 4754 def initialize(channel, parent) begin @stub = V1::RemoteIdentityGroups::Stub.new(nil, nil, channel_override: channel) rescue => exception raise Plumbing::convert_error_to_porcelain(exception) end @parent = parent end |
Instance Method Details
#get(id, deadline: nil) ⇒ Object
Get reads one RemoteIdentityGroup by ID.
4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 |
# File 'lib/svc.rb', line 4764 def get( id, deadline: nil ) req = V1::RemoteIdentityGroupGetRequest.new() if not @parent.snapshot_time.nil? req. = V1::GetRequestMetadata.new() req..snapshot_at = @parent.snapshot_time end req.id = (id) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.get(req, metadata: @parent.("RemoteIdentityGroups.Get", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end break end resp = RemoteIdentityGroupGetResponse.new() resp. = Plumbing::(plumbing_response.) resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp.remote_identity_group = Plumbing::convert_remote_identity_group_to_porcelain(plumbing_response.remote_identity_group) resp end |
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of RemoteIdentityGroups matching a given set of criteria.
4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 |
# File 'lib/svc.rb', line 4798 def list( filter, *args, deadline: nil ) req = V1::RemoteIdentityGroupListRequest.new() req. = V1::ListRequestMetadata.new() if @parent.page_limit > 0 req..limit = @parent.page_limit 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.("RemoteIdentityGroups.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.remote_identity_groups.each do |plumbing_item| g.yield Plumbing::convert_remote_identity_group_to_porcelain(plumbing_item) end break if plumbing_response..next_cursor == "" req..cursor = plumbing_response..next_cursor end } resp end |