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
Returns a new instance of RemoteIdentityGroups.
3356 3357 3358 3359 3360 3361 3362 3363 |
# File 'lib/svc.rb', line 3356 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.
3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 |
# File 'lib/svc.rb', line 3366 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.
3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 |
# File 'lib/svc.rb', line 3400 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 |