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(host, insecure, 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(host, insecure, parent) ⇒ RemoteIdentityGroups
Returns a new instance of RemoteIdentityGroups.
946 947 948 949 950 951 952 953 954 955 956 957 958 |
# File 'lib/svc.rb', line 946 def initialize(host, insecure, parent) begin if insecure @stub = V1::RemoteIdentityGroups::Stub.new(host, :this_channel_is_insecure) else cred = GRPC::Core::ChannelCredentials.new() @stub = V1::RemoteIdentityGroups::Stub.new(host, cred) end 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.
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 |
# File 'lib/svc.rb', line 961 def get( id, deadline: nil ) req = V1::RemoteIdentityGroupGetRequest.new() 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.
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 |
# File 'lib/svc.rb', line 991 def list( filter, *args, deadline: nil ) req = V1::RemoteIdentityGroupListRequest.new() req. = V1::ListRequestMetadata.new() page_size_option = @parent.["PageSize"] if page_size_option.is_a? Integer req..limit = page_size_option 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 |