strongdm 15.39.0 → 15.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -636,6 +636,59 @@ module SDM
636
636
  end
637
637
  end
638
638
 
639
+ class AWSConnector
640
+ # AccountIds is the list of AWS Accounts to scan
641
+ attr_accessor :account_ids
642
+ # Description of the Connector.
643
+ attr_accessor :description
644
+ # ExcludeTags filters out discovered resources that have the tag and value.
645
+ # We do allow duplicate tag names for ExcludeTags to support multiple excluded values for the tag.
646
+ attr_accessor :exclude_tags
647
+ # Unique identifier of the Connector.
648
+ attr_accessor :id
649
+ # IncludeTags only discovers cloud resources that have one of the included tags.
650
+ # We do not allow duplicate tag names for IncludeTags
651
+ attr_accessor :include_tags
652
+ # Unique human-readable name of the Connector.
653
+ attr_accessor :name
654
+ # RoleName is the Role we're assuming into for an account
655
+ attr_accessor :role_name
656
+ # ScanPeriod identifies which remote system this Connector discovers
657
+ attr_accessor :scan_period
658
+ # Services is a list of services this connector should scan.
659
+ attr_accessor :services
660
+
661
+ def initialize(
662
+ account_ids: nil,
663
+ description: nil,
664
+ exclude_tags: nil,
665
+ id: nil,
666
+ include_tags: nil,
667
+ name: nil,
668
+ role_name: nil,
669
+ scan_period: nil,
670
+ services: nil
671
+ )
672
+ @account_ids = account_ids == nil ? [] : account_ids
673
+ @description = description == nil ? "" : description
674
+ @exclude_tags = exclude_tags == nil ? [] : exclude_tags
675
+ @id = id == nil ? "" : id
676
+ @include_tags = include_tags == nil ? [] : include_tags
677
+ @name = name == nil ? "" : name
678
+ @role_name = role_name == nil ? "" : role_name
679
+ @scan_period = scan_period == nil ? "" : scan_period
680
+ @services = services == nil ? [] : services
681
+ end
682
+
683
+ def to_json(options = {})
684
+ hash = {}
685
+ self.instance_variables.each do |var|
686
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
687
+ end
688
+ hash.to_json
689
+ end
690
+ end
691
+
639
692
  class AWSConsole
640
693
  # The bind interface is the IP address to which the port override of a resource is bound (for example, 127.0.0.1). It is automatically generated if not provided and may also be set to one of the ResourceIPAllocationMode constants to select between VNM, loopback, or default allocation.
641
694
  attr_accessor :bind_interface
@@ -4180,6 +4233,63 @@ module SDM
4180
4233
  end
4181
4234
  end
4182
4235
 
4236
+ class AzureConnector
4237
+ # ClientId is the ID of the Application / Service Account we're acting as
4238
+ attr_accessor :client_id
4239
+ # Description of the Connector.
4240
+ attr_accessor :description
4241
+ # ExcludeTags filters out discovered resources that have the tag and value.
4242
+ # We do allow duplicate tag names for ExcludeTags to support multiple excluded values for the tag.
4243
+ attr_accessor :exclude_tags
4244
+ # Unique identifier of the Connector.
4245
+ attr_accessor :id
4246
+ # IncludeTags only discovers cloud resources that have one of the included tags.
4247
+ # We do not allow duplicate tag names for IncludeTags
4248
+ attr_accessor :include_tags
4249
+ # Unique human-readable name of the Connector.
4250
+ attr_accessor :name
4251
+ # ScanPeriod identifies which remote system this Connector discovers
4252
+ attr_accessor :scan_period
4253
+ # Services is a list of services this connector should scan.
4254
+ attr_accessor :services
4255
+ # SubscriptionIds are the targets of discovery.
4256
+ attr_accessor :subscription_ids
4257
+ # TenantId is the Azure Tenant we're discovering in
4258
+ attr_accessor :tenant_id
4259
+
4260
+ def initialize(
4261
+ client_id: nil,
4262
+ description: nil,
4263
+ exclude_tags: nil,
4264
+ id: nil,
4265
+ include_tags: nil,
4266
+ name: nil,
4267
+ scan_period: nil,
4268
+ services: nil,
4269
+ subscription_ids: nil,
4270
+ tenant_id: nil
4271
+ )
4272
+ @client_id = client_id == nil ? "" : client_id
4273
+ @description = description == nil ? "" : description
4274
+ @exclude_tags = exclude_tags == nil ? [] : exclude_tags
4275
+ @id = id == nil ? "" : id
4276
+ @include_tags = include_tags == nil ? [] : include_tags
4277
+ @name = name == nil ? "" : name
4278
+ @scan_period = scan_period == nil ? "" : scan_period
4279
+ @services = services == nil ? [] : services
4280
+ @subscription_ids = subscription_ids == nil ? [] : subscription_ids
4281
+ @tenant_id = tenant_id == nil ? "" : tenant_id
4282
+ end
4283
+
4284
+ def to_json(options = {})
4285
+ hash = {}
4286
+ self.instance_variables.each do |var|
4287
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
4288
+ end
4289
+ hash.to_json
4290
+ end
4291
+ end
4292
+
4183
4293
  class AzureMysql
4184
4294
  # The bind interface is the IP address to which the port override of a resource is bound (for example, 127.0.0.1). It is automatically generated if not provided and may also be set to one of the ResourceIPAllocationMode constants to select between VNM, loopback, or default allocation.
4185
4295
  attr_accessor :bind_interface
@@ -5147,6 +5257,228 @@ module SDM
5147
5257
  end
5148
5258
  end
5149
5259
 
5260
+ # ConnectorCreateRequest specifies a connector to create.
5261
+ class ConnectorCreateRequest
5262
+ # Parameters to define the new Connector.
5263
+ attr_accessor :connector
5264
+
5265
+ def initialize(
5266
+ connector: nil
5267
+ )
5268
+ @connector = connector == nil ? nil : connector
5269
+ end
5270
+
5271
+ def to_json(options = {})
5272
+ hash = {}
5273
+ self.instance_variables.each do |var|
5274
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5275
+ end
5276
+ hash.to_json
5277
+ end
5278
+ end
5279
+
5280
+ # ConnectorCreateResponse reports the result of a create.
5281
+ class ConnectorCreateResponse
5282
+ # The created Connector.
5283
+ attr_accessor :connector
5284
+ # Rate limit information.
5285
+ attr_accessor :rate_limit
5286
+
5287
+ def initialize(
5288
+ connector: nil,
5289
+ rate_limit: nil
5290
+ )
5291
+ @connector = connector == nil ? nil : connector
5292
+ @rate_limit = rate_limit == nil ? nil : rate_limit
5293
+ end
5294
+
5295
+ def to_json(options = {})
5296
+ hash = {}
5297
+ self.instance_variables.each do |var|
5298
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5299
+ end
5300
+ hash.to_json
5301
+ end
5302
+ end
5303
+
5304
+ # ConnectorDeleteRequest identifies a connector by ID to delete.
5305
+ class ConnectorDeleteRequest
5306
+ # The unique identifier of the connector to delete.
5307
+ attr_accessor :id
5308
+
5309
+ def initialize(
5310
+ id: nil
5311
+ )
5312
+ @id = id == nil ? "" : id
5313
+ end
5314
+
5315
+ def to_json(options = {})
5316
+ hash = {}
5317
+ self.instance_variables.each do |var|
5318
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5319
+ end
5320
+ hash.to_json
5321
+ end
5322
+ end
5323
+
5324
+ # ConnectorDeleteResponse returns information about a connector that was deleted.
5325
+ class ConnectorDeleteResponse
5326
+ # Reserved for future use.
5327
+ attr_accessor :meta
5328
+ # Rate limit information.
5329
+ attr_accessor :rate_limit
5330
+
5331
+ def initialize(
5332
+ meta: nil,
5333
+ rate_limit: nil
5334
+ )
5335
+ @meta = meta == nil ? nil : meta
5336
+ @rate_limit = rate_limit == nil ? nil : rate_limit
5337
+ end
5338
+
5339
+ def to_json(options = {})
5340
+ hash = {}
5341
+ self.instance_variables.each do |var|
5342
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5343
+ end
5344
+ hash.to_json
5345
+ end
5346
+ end
5347
+
5348
+ # ConnectorGetRequest specifies which Connector to retrieve.
5349
+ class ConnectorGetRequest
5350
+ # The unique identifier of the Connector to retrieve.
5351
+ attr_accessor :id
5352
+
5353
+ def initialize(
5354
+ id: nil
5355
+ )
5356
+ @id = id == nil ? "" : id
5357
+ end
5358
+
5359
+ def to_json(options = {})
5360
+ hash = {}
5361
+ self.instance_variables.each do |var|
5362
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5363
+ end
5364
+ hash.to_json
5365
+ end
5366
+ end
5367
+
5368
+ # ConnectorGetResponse returns a requested Connector.
5369
+ class ConnectorGetResponse
5370
+ # The requested Connector.
5371
+ attr_accessor :connector
5372
+ # Reserved for future use.
5373
+ attr_accessor :meta
5374
+ # Rate limit information.
5375
+ attr_accessor :rate_limit
5376
+
5377
+ def initialize(
5378
+ connector: nil,
5379
+ meta: nil,
5380
+ rate_limit: nil
5381
+ )
5382
+ @connector = connector == nil ? nil : connector
5383
+ @meta = meta == nil ? nil : meta
5384
+ @rate_limit = rate_limit == nil ? nil : rate_limit
5385
+ end
5386
+
5387
+ def to_json(options = {})
5388
+ hash = {}
5389
+ self.instance_variables.each do |var|
5390
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5391
+ end
5392
+ hash.to_json
5393
+ end
5394
+ end
5395
+
5396
+ # ConnectorListRequest specifies criteria for retrieving a list of connectors.
5397
+ class ConnectorListRequest
5398
+ # A human-readable filter query string.
5399
+ attr_accessor :filter
5400
+
5401
+ def initialize(
5402
+ filter: nil
5403
+ )
5404
+ @filter = filter == nil ? "" : filter
5405
+ end
5406
+
5407
+ def to_json(options = {})
5408
+ hash = {}
5409
+ self.instance_variables.each do |var|
5410
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5411
+ end
5412
+ hash.to_json
5413
+ end
5414
+ end
5415
+
5416
+ # ConnectorListResponse returns a list of connectors that meet the criteria of a
5417
+ # ConnectorListRequest.
5418
+ class ConnectorListResponse
5419
+ # Rate limit information.
5420
+ attr_accessor :rate_limit
5421
+
5422
+ def initialize(
5423
+ rate_limit: nil
5424
+ )
5425
+ @rate_limit = rate_limit == nil ? nil : rate_limit
5426
+ end
5427
+
5428
+ def to_json(options = {})
5429
+ hash = {}
5430
+ self.instance_variables.each do |var|
5431
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5432
+ end
5433
+ hash.to_json
5434
+ end
5435
+ end
5436
+
5437
+ # ConnectorUpdateRequest updates a connector.
5438
+ class ConnectorUpdateRequest
5439
+ # Parameters to overwrite the specified connector.
5440
+ attr_accessor :connector
5441
+
5442
+ def initialize(
5443
+ connector: nil
5444
+ )
5445
+ @connector = connector == nil ? nil : connector
5446
+ end
5447
+
5448
+ def to_json(options = {})
5449
+ hash = {}
5450
+ self.instance_variables.each do |var|
5451
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5452
+ end
5453
+ hash.to_json
5454
+ end
5455
+ end
5456
+
5457
+ # ConnectorUpdateResponse returns the fields of a connector after it has been updated by
5458
+ # a connectorUpdateRequest.
5459
+ class ConnectorUpdateResponse
5460
+ # The updated connector.
5461
+ attr_accessor :connector
5462
+ # Rate limit information.
5463
+ attr_accessor :rate_limit
5464
+
5465
+ def initialize(
5466
+ connector: nil,
5467
+ rate_limit: nil
5468
+ )
5469
+ @connector = connector == nil ? nil : connector
5470
+ @rate_limit = rate_limit == nil ? nil : rate_limit
5471
+ end
5472
+
5473
+ def to_json(options = {})
5474
+ hash = {}
5475
+ self.instance_variables.each do |var|
5476
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5477
+ end
5478
+ hash.to_json
5479
+ end
5480
+ end
5481
+
5150
5482
  # ControlPanelGetRDPCAPublicKeyResponse represents a request for an
5151
5483
  # organization's RDP Certificate Authority public key.
5152
5484
  class ControlPanelGetRDPCAPublicKeyResponse
@@ -6629,6 +6961,67 @@ module SDM
6629
6961
  end
6630
6962
  end
6631
6963
 
6964
+ class GCPConnector
6965
+ # Description of the Connector.
6966
+ attr_accessor :description
6967
+ # ExcludeTags filters out discovered resources that have the tag and value.
6968
+ # We do allow duplicate tag names for ExcludeTags to support multiple excluded values for the tag.
6969
+ attr_accessor :exclude_tags
6970
+ # Unique identifier of the Connector.
6971
+ attr_accessor :id
6972
+ # IncludeTags only discovers cloud resources that have one of the included tags.
6973
+ # We do not allow duplicate tag names for IncludeTags
6974
+ attr_accessor :include_tags
6975
+ # Unique human-readable name of the Connector.
6976
+ attr_accessor :name
6977
+ # PoolId is the GCP Workload Pool Identifier used to authenticate our JWT
6978
+ attr_accessor :pool_id
6979
+ # ProjectIds is the list of GCP Projects the connector will scan
6980
+ attr_accessor :project_ids
6981
+ # ProjectNumber is the GCP Project the Workload Pool is defined in
6982
+ attr_accessor :project_number
6983
+ # ProviderId is the GCP Workload Provider Identifier used to authenticate our JWT
6984
+ attr_accessor :provider_id
6985
+ # ScanPeriod identifies which remote system this Connector discovers
6986
+ attr_accessor :scan_period
6987
+ # Services is a list of services this connector should scan.
6988
+ attr_accessor :services
6989
+
6990
+ def initialize(
6991
+ description: nil,
6992
+ exclude_tags: nil,
6993
+ id: nil,
6994
+ include_tags: nil,
6995
+ name: nil,
6996
+ pool_id: nil,
6997
+ project_ids: nil,
6998
+ project_number: nil,
6999
+ provider_id: nil,
7000
+ scan_period: nil,
7001
+ services: nil
7002
+ )
7003
+ @description = description == nil ? "" : description
7004
+ @exclude_tags = exclude_tags == nil ? [] : exclude_tags
7005
+ @id = id == nil ? "" : id
7006
+ @include_tags = include_tags == nil ? [] : include_tags
7007
+ @name = name == nil ? "" : name
7008
+ @pool_id = pool_id == nil ? "" : pool_id
7009
+ @project_ids = project_ids == nil ? [] : project_ids
7010
+ @project_number = project_number == nil ? "" : project_number
7011
+ @provider_id = provider_id == nil ? "" : provider_id
7012
+ @scan_period = scan_period == nil ? "" : scan_period
7013
+ @services = services == nil ? [] : services
7014
+ end
7015
+
7016
+ def to_json(options = {})
7017
+ hash = {}
7018
+ self.instance_variables.each do |var|
7019
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
7020
+ end
7021
+ hash.to_json
7022
+ end
7023
+ end
7024
+
6632
7025
  class GCPConsole
6633
7026
  # The bind interface is the IP address to which the port override of a resource is bound (for example, 127.0.0.1). It is automatically generated if not provided and may also be set to one of the ResourceIPAllocationMode constants to select between VNM, loopback, or default allocation.
6634
7027
  attr_accessor :bind_interface
data/lib/strongdm.rb CHANGED
@@ -30,7 +30,7 @@ module SDM #:nodoc:
30
30
  DEFAULT_RETRY_FACTOR = 1.6
31
31
  DEFAULT_RETRY_JITTER = 0.2
32
32
  API_VERSION = "2025-04-14"
33
- USER_AGENT = "strongdm-sdk-ruby/15.39.0"
33
+ USER_AGENT = "strongdm-sdk-ruby/15.40.0"
34
34
  private_constant :DEFAULT_BASE_RETRY_DELAY, :DEFAULT_MAX_RETRY_DELAY, :DEFAULT_RETRY_FACTOR, :DEFAULT_RETRY_JITTER, :API_VERSION, :USER_AGENT
35
35
 
36
36
  # Creates a new strongDM API client.
@@ -79,6 +79,7 @@ module SDM #:nodoc:
79
79
  @approval_workflows = ApprovalWorkflows.new(@channel, self)
80
80
  @approval_workflows_history = ApprovalWorkflowsHistory.new(@channel, self)
81
81
  @control_panel = ControlPanel.new(@channel, self)
82
+ @discovery_connectors = DiscoveryConnectors.new(@channel, self)
82
83
  @roles = Roles.new(@channel, self)
83
84
  @groups = Groups.new(@channel, self)
84
85
  @groups_history = GroupsHistory.new(@channel, self)
@@ -329,6 +330,11 @@ module SDM #:nodoc:
329
330
  #
330
331
  # See {ControlPanel}.
331
332
  attr_reader :control_panel
333
+ # A Discovery Connector is a configuration object for performing Resource
334
+ # Scans in remote systems such as AWS, GCP, Azure, and other systems.
335
+ #
336
+ # See {DiscoveryConnectors}.
337
+ attr_reader :discovery_connectors
332
338
  # A Role has a list of access rules which determine which Resources the members
333
339
  # of the Role have access to. An Account can be a member of multiple Roles via
334
340
  # AccountAttachments.
@@ -550,6 +556,7 @@ module SDM #:nodoc:
550
556
  @approval_workflows = ApprovalWorkflows.new(@channel, self)
551
557
  @approval_workflows_history = ApprovalWorkflowsHistory.new(@channel, self)
552
558
  @control_panel = ControlPanel.new(@channel, self)
559
+ @discovery_connectors = DiscoveryConnectors.new(@channel, self)
553
560
  @roles = Roles.new(@channel, self)
554
561
  @groups = Groups.new(@channel, self)
555
562
  @groups_history = GroupsHistory.new(@channel, self)
@@ -608,6 +615,7 @@ module SDM #:nodoc:
608
615
  @approval_workflow_approvers = SnapshotApprovalWorkflowApprovers.new(client.approval_workflow_approvers)
609
616
  @approval_workflow_steps = SnapshotApprovalWorkflowSteps.new(client.approval_workflow_steps)
610
617
  @approval_workflows = SnapshotApprovalWorkflows.new(client.approval_workflows)
618
+ @discovery_connectors = SnapshotDiscoveryConnectors.new(client.discovery_connectors)
611
619
  @roles = SnapshotRoles.new(client.roles)
612
620
  @groups = SnapshotGroups.new(client.groups)
613
621
  @groups_roles = SnapshotGroupsRoles.new(client.groups_roles)
@@ -672,6 +680,11 @@ module SDM #:nodoc:
672
680
  #
673
681
  # See {SnapshotApprovalWorkflows}.
674
682
  attr_reader :approval_workflows
683
+ # A Discovery Connector is a configuration object for performing Resource
684
+ # Scans in remote systems such as AWS, GCP, Azure, and other systems.
685
+ #
686
+ # See {SnapshotDiscoveryConnectors}.
687
+ attr_reader :discovery_connectors
675
688
  # A Role has a list of access rules which determine which Resources the members
676
689
  # of the Role have access to. An Account can be a member of multiple Roles via
677
690
  # AccountAttachments.
data/lib/svc.rb CHANGED
@@ -2344,6 +2344,220 @@ module SDM #:nodoc:
2344
2344
  end
2345
2345
  end
2346
2346
 
2347
+ # A Discovery Connector is a configuration object for performing Resource
2348
+ # Scans in remote systems such as AWS, GCP, Azure, and other systems.
2349
+ #
2350
+ # See:
2351
+ # {AWSConnector}
2352
+ # {AzureConnector}
2353
+ # {GCPConnector}
2354
+ class DiscoveryConnectors
2355
+ extend Gem::Deprecate
2356
+
2357
+ def initialize(channel, parent)
2358
+ begin
2359
+ @stub = V1::DiscoveryConnectors::Stub.new(nil, nil, channel_override: channel)
2360
+ rescue => exception
2361
+ raise Plumbing::convert_error_to_porcelain(exception)
2362
+ end
2363
+ @parent = parent
2364
+ end
2365
+
2366
+ # Create adds a new Connector.
2367
+ def create(
2368
+ connector,
2369
+ deadline: nil
2370
+ )
2371
+ req = V1::ConnectorCreateRequest.new()
2372
+
2373
+ req.connector = Plumbing::convert_connector_to_plumbing(connector)
2374
+ tries = 0
2375
+ plumbing_response = nil
2376
+ loop do
2377
+ begin
2378
+ plumbing_response = @stub.create(req, metadata: @parent.get_metadata("DiscoveryConnectors.Create", req), deadline: deadline)
2379
+ rescue => exception
2380
+ if (@parent.shouldRetry(tries, exception, deadline))
2381
+ tries + +sleep(@parent.exponentialBackoff(tries, deadline))
2382
+ next
2383
+ end
2384
+ raise Plumbing::convert_error_to_porcelain(exception)
2385
+ end
2386
+ break
2387
+ end
2388
+
2389
+ resp = ConnectorCreateResponse.new()
2390
+ resp.connector = Plumbing::convert_connector_to_porcelain(plumbing_response.connector)
2391
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
2392
+ resp
2393
+ end
2394
+
2395
+ # Get reads one Connector by ID
2396
+ def get(
2397
+ id,
2398
+ deadline: nil
2399
+ )
2400
+ req = V1::ConnectorGetRequest.new()
2401
+ if not @parent.snapshot_time.nil?
2402
+ req.meta = V1::GetRequestMetadata.new()
2403
+ req.meta.snapshot_at = @parent.snapshot_time
2404
+ end
2405
+
2406
+ req.id = (id)
2407
+ tries = 0
2408
+ plumbing_response = nil
2409
+ loop do
2410
+ begin
2411
+ plumbing_response = @stub.get(req, metadata: @parent.get_metadata("DiscoveryConnectors.Get", req), deadline: deadline)
2412
+ rescue => exception
2413
+ if (@parent.shouldRetry(tries, exception, deadline))
2414
+ tries + +sleep(@parent.exponentialBackoff(tries, deadline))
2415
+ next
2416
+ end
2417
+ raise Plumbing::convert_error_to_porcelain(exception)
2418
+ end
2419
+ break
2420
+ end
2421
+
2422
+ resp = ConnectorGetResponse.new()
2423
+ resp.connector = Plumbing::convert_connector_to_porcelain(plumbing_response.connector)
2424
+ resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
2425
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
2426
+ resp
2427
+ end
2428
+
2429
+ # Update replaces all the fields of a Connector by ID.
2430
+ def update(
2431
+ connector,
2432
+ deadline: nil
2433
+ )
2434
+ req = V1::ConnectorUpdateRequest.new()
2435
+
2436
+ req.connector = Plumbing::convert_connector_to_plumbing(connector)
2437
+ tries = 0
2438
+ plumbing_response = nil
2439
+ loop do
2440
+ begin
2441
+ plumbing_response = @stub.update(req, metadata: @parent.get_metadata("DiscoveryConnectors.Update", req), deadline: deadline)
2442
+ rescue => exception
2443
+ if (@parent.shouldRetry(tries, exception, deadline))
2444
+ tries + +sleep(@parent.exponentialBackoff(tries, deadline))
2445
+ next
2446
+ end
2447
+ raise Plumbing::convert_error_to_porcelain(exception)
2448
+ end
2449
+ break
2450
+ end
2451
+
2452
+ resp = ConnectorUpdateResponse.new()
2453
+ resp.connector = Plumbing::convert_connector_to_porcelain(plumbing_response.connector)
2454
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
2455
+ resp
2456
+ end
2457
+
2458
+ # Delete removes a Connector by ID.
2459
+ def delete(
2460
+ id,
2461
+ deadline: nil
2462
+ )
2463
+ req = V1::ConnectorDeleteRequest.new()
2464
+
2465
+ req.id = (id)
2466
+ tries = 0
2467
+ plumbing_response = nil
2468
+ loop do
2469
+ begin
2470
+ plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("DiscoveryConnectors.Delete", req), deadline: deadline)
2471
+ rescue => exception
2472
+ if (@parent.shouldRetry(tries, exception, deadline))
2473
+ tries + +sleep(@parent.exponentialBackoff(tries, deadline))
2474
+ next
2475
+ end
2476
+ raise Plumbing::convert_error_to_porcelain(exception)
2477
+ end
2478
+ break
2479
+ end
2480
+
2481
+ resp = ConnectorDeleteResponse.new()
2482
+ resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
2483
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
2484
+ resp
2485
+ end
2486
+
2487
+ # List gets a list of Connectors matching a given set of criteria.
2488
+ def list(
2489
+ filter,
2490
+ *args,
2491
+ deadline: nil
2492
+ )
2493
+ req = V1::ConnectorListRequest.new()
2494
+ req.meta = V1::ListRequestMetadata.new()
2495
+ if not @parent.page_limit.nil?
2496
+ req.meta.limit = @parent.page_limit
2497
+ end
2498
+ if not @parent.snapshot_time.nil?
2499
+ req.meta.snapshot_at = @parent.snapshot_time
2500
+ end
2501
+
2502
+ req.filter = Plumbing::quote_filter_args(filter, *args)
2503
+ resp = Enumerator::Generator.new { |g|
2504
+ tries = 0
2505
+ loop do
2506
+ begin
2507
+ plumbing_response = @stub.list(req, metadata: @parent.get_metadata("DiscoveryConnectors.List", req), deadline: deadline)
2508
+ rescue => exception
2509
+ if (@parent.shouldRetry(tries, exception, deadline))
2510
+ tries + +sleep(@parent.exponentialBackoff(tries, deadline))
2511
+ next
2512
+ end
2513
+ raise Plumbing::convert_error_to_porcelain(exception)
2514
+ end
2515
+ tries = 0
2516
+ plumbing_response.connectors.each do |plumbing_item|
2517
+ g.yield Plumbing::convert_connector_to_porcelain(plumbing_item)
2518
+ end
2519
+ break if plumbing_response.meta.next_cursor == ""
2520
+ req.meta.cursor = plumbing_response.meta.next_cursor
2521
+ end
2522
+ }
2523
+ resp
2524
+ end
2525
+ end
2526
+
2527
+ # SnapshotDiscoveryConnectors exposes the read only methods of the DiscoveryConnectors
2528
+ # service for historical queries.
2529
+ class SnapshotDiscoveryConnectors
2530
+ extend Gem::Deprecate
2531
+
2532
+ def initialize(discovery_connectors)
2533
+ @discovery_connectors = discovery_connectors
2534
+ end
2535
+
2536
+ # Get reads one Connector by ID
2537
+ def get(
2538
+ id,
2539
+ deadline: nil
2540
+ )
2541
+ return @discovery_connectors.get(
2542
+ id,
2543
+ deadline: deadline,
2544
+ )
2545
+ end
2546
+
2547
+ # List gets a list of Connectors matching a given set of criteria.
2548
+ def list(
2549
+ filter,
2550
+ *args,
2551
+ deadline: nil
2552
+ )
2553
+ return @discovery_connectors.list(
2554
+ filter,
2555
+ *args,
2556
+ deadline: deadline,
2557
+ )
2558
+ end
2559
+ end
2560
+
2347
2561
  # A Role has a list of access rules which determine which Resources the members
2348
2562
  # of the Role have access to. An Account can be a member of multiple Roles via
2349
2563
  # AccountAttachments.
data/lib/version CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "15.39.0"
16
+ VERSION = "15.40.0"
17
17
  end
data/lib/version.rb CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "15.39.0"
16
+ VERSION = "15.40.0"
17
17
  end