strongdm 11.7.0 → 11.9.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.
data/lib/grpc/plumbing.rb CHANGED
@@ -67,9 +67,9 @@ require_relative "./role_resources_pb"
67
67
  require_relative "./role_resources_history_pb"
68
68
  require_relative "./roles_pb"
69
69
  require_relative "./roles_history_pb"
70
- require_relative "./secret_store_healths_pb"
71
70
  require_relative "./secret_store_types_pb"
72
71
  require_relative "./secret_stores_pb"
72
+ require_relative "./secret_store_healths_pb"
73
73
  require_relative "./secret_stores_history_pb"
74
74
  require_relative "./workflow_approvers_pb"
75
75
  require_relative "./workflow_approvers_history_pb"
@@ -775,6 +775,7 @@ module SDM
775
775
  end
776
776
  porcelain = AccessRequest.new()
777
777
  porcelain.account_id = (plumbing.account_id)
778
+ porcelain.duration = (plumbing.duration)
778
779
  porcelain.grant_id = (plumbing.grant_id)
779
780
  porcelain.id = (plumbing.id)
780
781
  porcelain.reason = (plumbing.reason)
@@ -793,6 +794,7 @@ module SDM
793
794
  end
794
795
  plumbing = V1::AccessRequest.new()
795
796
  plumbing.account_id = (porcelain.account_id)
797
+ plumbing.duration = (porcelain.duration)
796
798
  plumbing.grant_id = (porcelain.grant_id)
797
799
  plumbing.id = (porcelain.id)
798
800
  plumbing.reason = (porcelain.reason)
@@ -4144,6 +4146,124 @@ module SDM
4144
4146
  end
4145
4147
  items
4146
4148
  end
4149
+ def self.convert_couchbase_database_to_porcelain(plumbing)
4150
+ if plumbing == nil
4151
+ return nil
4152
+ end
4153
+ porcelain = CouchbaseDatabase.new()
4154
+ porcelain.bind_interface = (plumbing.bind_interface)
4155
+ porcelain.egress_filter = (plumbing.egress_filter)
4156
+ porcelain.healthy = (plumbing.healthy)
4157
+ porcelain.hostname = (plumbing.hostname)
4158
+ porcelain.id = (plumbing.id)
4159
+ porcelain.n1ql_port = (plumbing.n1ql_port)
4160
+ porcelain.name = (plumbing.name)
4161
+ porcelain.password = (plumbing.password)
4162
+ porcelain.port = (plumbing.port)
4163
+ porcelain.port_override = (plumbing.port_override)
4164
+ porcelain.secret_store_id = (plumbing.secret_store_id)
4165
+ porcelain.subdomain = (plumbing.subdomain)
4166
+ porcelain.tags = convert_tags_to_porcelain(plumbing.tags)
4167
+ porcelain.tls_required = (plumbing.tls_required)
4168
+ porcelain.username = (plumbing.username)
4169
+ porcelain
4170
+ end
4171
+
4172
+ def self.convert_couchbase_database_to_plumbing(porcelain)
4173
+ if porcelain == nil
4174
+ return nil
4175
+ end
4176
+ plumbing = V1::CouchbaseDatabase.new()
4177
+ plumbing.bind_interface = (porcelain.bind_interface)
4178
+ plumbing.egress_filter = (porcelain.egress_filter)
4179
+ plumbing.healthy = (porcelain.healthy)
4180
+ plumbing.hostname = (porcelain.hostname)
4181
+ plumbing.id = (porcelain.id)
4182
+ plumbing.n1ql_port = (porcelain.n1ql_port)
4183
+ plumbing.name = (porcelain.name)
4184
+ plumbing.password = (porcelain.password)
4185
+ plumbing.port = (porcelain.port)
4186
+ plumbing.port_override = (porcelain.port_override)
4187
+ plumbing.secret_store_id = (porcelain.secret_store_id)
4188
+ plumbing.subdomain = (porcelain.subdomain)
4189
+ plumbing.tags = convert_tags_to_plumbing(porcelain.tags)
4190
+ plumbing.tls_required = (porcelain.tls_required)
4191
+ plumbing.username = (porcelain.username)
4192
+ plumbing
4193
+ end
4194
+ def self.convert_repeated_couchbase_database_to_plumbing(porcelains)
4195
+ items = Array.new
4196
+ porcelains.each do |porcelain|
4197
+ plumbing = convert_couchbase_database_to_plumbing(porcelain)
4198
+ items.append(plumbing)
4199
+ end
4200
+ items
4201
+ end
4202
+
4203
+ def self.convert_repeated_couchbase_database_to_porcelain(plumbings)
4204
+ items = Array.new
4205
+ plumbings.each do |plumbing|
4206
+ porcelain = convert_couchbase_database_to_porcelain(plumbing)
4207
+ items.append(porcelain)
4208
+ end
4209
+ items
4210
+ end
4211
+ def self.convert_couchbase_web_ui_to_porcelain(plumbing)
4212
+ if plumbing == nil
4213
+ return nil
4214
+ end
4215
+ porcelain = CouchbaseWebUI.new()
4216
+ porcelain.bind_interface = (plumbing.bind_interface)
4217
+ porcelain.egress_filter = (plumbing.egress_filter)
4218
+ porcelain.healthy = (plumbing.healthy)
4219
+ porcelain.id = (plumbing.id)
4220
+ porcelain.name = (plumbing.name)
4221
+ porcelain.password = (plumbing.password)
4222
+ porcelain.port_override = (plumbing.port_override)
4223
+ porcelain.secret_store_id = (plumbing.secret_store_id)
4224
+ porcelain.subdomain = (plumbing.subdomain)
4225
+ porcelain.tags = convert_tags_to_porcelain(plumbing.tags)
4226
+ porcelain.url = (plumbing.url)
4227
+ porcelain.username = (plumbing.username)
4228
+ porcelain
4229
+ end
4230
+
4231
+ def self.convert_couchbase_web_ui_to_plumbing(porcelain)
4232
+ if porcelain == nil
4233
+ return nil
4234
+ end
4235
+ plumbing = V1::CouchbaseWebUI.new()
4236
+ plumbing.bind_interface = (porcelain.bind_interface)
4237
+ plumbing.egress_filter = (porcelain.egress_filter)
4238
+ plumbing.healthy = (porcelain.healthy)
4239
+ plumbing.id = (porcelain.id)
4240
+ plumbing.name = (porcelain.name)
4241
+ plumbing.password = (porcelain.password)
4242
+ plumbing.port_override = (porcelain.port_override)
4243
+ plumbing.secret_store_id = (porcelain.secret_store_id)
4244
+ plumbing.subdomain = (porcelain.subdomain)
4245
+ plumbing.tags = convert_tags_to_plumbing(porcelain.tags)
4246
+ plumbing.url = (porcelain.url)
4247
+ plumbing.username = (porcelain.username)
4248
+ plumbing
4249
+ end
4250
+ def self.convert_repeated_couchbase_web_ui_to_plumbing(porcelains)
4251
+ items = Array.new
4252
+ porcelains.each do |porcelain|
4253
+ plumbing = convert_couchbase_web_ui_to_plumbing(porcelain)
4254
+ items.append(plumbing)
4255
+ end
4256
+ items
4257
+ end
4258
+
4259
+ def self.convert_repeated_couchbase_web_ui_to_porcelain(plumbings)
4260
+ items = Array.new
4261
+ plumbings.each do |plumbing|
4262
+ porcelain = convert_couchbase_web_ui_to_porcelain(plumbing)
4263
+ items.append(porcelain)
4264
+ end
4265
+ items
4266
+ end
4147
4267
  def self.convert_create_response_metadata_to_porcelain(plumbing)
4148
4268
  if plumbing == nil
4149
4269
  return nil
@@ -5048,6 +5168,38 @@ module SDM
5048
5168
  end
5049
5169
  items
5050
5170
  end
5171
+ def self.convert_generic_response_metadata_to_porcelain(plumbing)
5172
+ if plumbing == nil
5173
+ return nil
5174
+ end
5175
+ porcelain = GenericResponseMetadata.new()
5176
+ porcelain
5177
+ end
5178
+
5179
+ def self.convert_generic_response_metadata_to_plumbing(porcelain)
5180
+ if porcelain == nil
5181
+ return nil
5182
+ end
5183
+ plumbing = V1::GenericResponseMetadata.new()
5184
+ plumbing
5185
+ end
5186
+ def self.convert_repeated_generic_response_metadata_to_plumbing(porcelains)
5187
+ items = Array.new
5188
+ porcelains.each do |porcelain|
5189
+ plumbing = convert_generic_response_metadata_to_plumbing(porcelain)
5190
+ items.append(plumbing)
5191
+ end
5192
+ items
5193
+ end
5194
+
5195
+ def self.convert_repeated_generic_response_metadata_to_porcelain(plumbings)
5196
+ items = Array.new
5197
+ plumbings.each do |plumbing|
5198
+ porcelain = convert_generic_response_metadata_to_porcelain(plumbing)
5199
+ items.append(porcelain)
5200
+ end
5201
+ items
5202
+ end
5051
5203
  def self.convert_get_response_metadata_to_porcelain(plumbing)
5052
5204
  if plumbing == nil
5053
5205
  return nil
@@ -9804,6 +9956,12 @@ module SDM
9804
9956
  if porcelain.instance_of? Cockroach
9805
9957
  plumbing.cockroach = convert_cockroach_to_plumbing(porcelain)
9806
9958
  end
9959
+ if porcelain.instance_of? CouchbaseDatabase
9960
+ plumbing.couchbase_database = convert_couchbase_database_to_plumbing(porcelain)
9961
+ end
9962
+ if porcelain.instance_of? CouchbaseWebUI
9963
+ plumbing.couchbase_web_ui = convert_couchbase_web_ui_to_plumbing(porcelain)
9964
+ end
9807
9965
  if porcelain.instance_of? DB2I
9808
9966
  plumbing.db_2_i = convert_db_2_i_to_plumbing(porcelain)
9809
9967
  end
@@ -10066,6 +10224,12 @@ module SDM
10066
10224
  if plumbing.cockroach != nil
10067
10225
  return convert_cockroach_to_porcelain(plumbing.cockroach)
10068
10226
  end
10227
+ if plumbing.couchbase_database != nil
10228
+ return convert_couchbase_database_to_porcelain(plumbing.couchbase_database)
10229
+ end
10230
+ if plumbing.couchbase_web_ui != nil
10231
+ return convert_couchbase_web_ui_to_porcelain(plumbing.couchbase_web_ui)
10232
+ end
10069
10233
  if plumbing.db_2_i != nil
10070
10234
  return convert_db_2_i_to_porcelain(plumbing.db_2_i)
10071
10235
  end
@@ -731,6 +731,8 @@ module SDM
731
731
  class AccessRequest
732
732
  # The account that initiated the request.
733
733
  attr_accessor :account_id
734
+ # Duration of the access request.
735
+ attr_accessor :duration
734
736
  # The account grant created, if it exists.
735
737
  attr_accessor :grant_id
736
738
  # The access request id.
@@ -753,6 +755,7 @@ module SDM
753
755
 
754
756
  def initialize(
755
757
  account_id: nil,
758
+ duration: nil,
756
759
  grant_id: nil,
757
760
  id: nil,
758
761
  reason: nil,
@@ -764,6 +767,7 @@ module SDM
764
767
  workflow_id: nil
765
768
  )
766
769
  @account_id = account_id == nil ? "" : account_id
770
+ @duration = duration == nil ? 0 : duration
767
771
  @grant_id = grant_id == nil ? "" : grant_id
768
772
  @id = id == nil ? "" : id
769
773
  @reason = reason == nil ? "" : reason
@@ -3914,6 +3918,144 @@ module SDM
3914
3918
  end
3915
3919
  end
3916
3920
 
3921
+ class CouchbaseDatabase
3922
+ # 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.
3923
+ attr_accessor :bind_interface
3924
+ # A filter applied to the routing logic to pin datasource to nodes.
3925
+ attr_accessor :egress_filter
3926
+ # True if the datasource is reachable and the credentials are valid.
3927
+ attr_accessor :healthy
3928
+ # The host to dial to initiate a connection from the egress node to this resource.
3929
+ attr_accessor :hostname
3930
+ # Unique identifier of the Resource.
3931
+ attr_accessor :id
3932
+ # The port number for N1QL queries. Default HTTP is 8093. Default HTTPS is 18093.
3933
+ attr_accessor :n1ql_port
3934
+ # Unique human-readable name of the Resource.
3935
+ attr_accessor :name
3936
+ # The password to authenticate with.
3937
+ attr_accessor :password
3938
+ # The port to dial to initiate a connection from the egress node to this resource.
3939
+ attr_accessor :port
3940
+ # The local port used by clients to connect to this resource.
3941
+ attr_accessor :port_override
3942
+ # ID of the secret store containing credentials for this resource, if any.
3943
+ attr_accessor :secret_store_id
3944
+ # Subdomain is the local DNS address. (e.g. app-prod1 turns into app-prod1.your-org-name.sdm.network)
3945
+ attr_accessor :subdomain
3946
+ # Tags is a map of key, value pairs.
3947
+ attr_accessor :tags
3948
+ # If set, TLS must be used to connect to this resource.
3949
+ attr_accessor :tls_required
3950
+ # The username to authenticate with.
3951
+ attr_accessor :username
3952
+
3953
+ def initialize(
3954
+ bind_interface: nil,
3955
+ egress_filter: nil,
3956
+ healthy: nil,
3957
+ hostname: nil,
3958
+ id: nil,
3959
+ n1ql_port: nil,
3960
+ name: nil,
3961
+ password: nil,
3962
+ port: nil,
3963
+ port_override: nil,
3964
+ secret_store_id: nil,
3965
+ subdomain: nil,
3966
+ tags: nil,
3967
+ tls_required: nil,
3968
+ username: nil
3969
+ )
3970
+ @bind_interface = bind_interface == nil ? "" : bind_interface
3971
+ @egress_filter = egress_filter == nil ? "" : egress_filter
3972
+ @healthy = healthy == nil ? false : healthy
3973
+ @hostname = hostname == nil ? "" : hostname
3974
+ @id = id == nil ? "" : id
3975
+ @n1ql_port = n1ql_port == nil ? 0 : n1ql_port
3976
+ @name = name == nil ? "" : name
3977
+ @password = password == nil ? "" : password
3978
+ @port = port == nil ? 0 : port
3979
+ @port_override = port_override == nil ? 0 : port_override
3980
+ @secret_store_id = secret_store_id == nil ? "" : secret_store_id
3981
+ @subdomain = subdomain == nil ? "" : subdomain
3982
+ @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
3983
+ @tls_required = tls_required == nil ? false : tls_required
3984
+ @username = username == nil ? "" : username
3985
+ end
3986
+
3987
+ def to_json(options = {})
3988
+ hash = {}
3989
+ self.instance_variables.each do |var|
3990
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
3991
+ end
3992
+ hash.to_json
3993
+ end
3994
+ end
3995
+
3996
+ class CouchbaseWebUI
3997
+ # 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.
3998
+ attr_accessor :bind_interface
3999
+ # A filter applied to the routing logic to pin datasource to nodes.
4000
+ attr_accessor :egress_filter
4001
+ # True if the datasource is reachable and the credentials are valid.
4002
+ attr_accessor :healthy
4003
+ # Unique identifier of the Resource.
4004
+ attr_accessor :id
4005
+ # Unique human-readable name of the Resource.
4006
+ attr_accessor :name
4007
+ # The password to authenticate with.
4008
+ attr_accessor :password
4009
+ # The local port used by clients to connect to this resource.
4010
+ attr_accessor :port_override
4011
+ # ID of the secret store containing credentials for this resource, if any.
4012
+ attr_accessor :secret_store_id
4013
+ # Subdomain is the local DNS address. (e.g. app-prod1 turns into app-prod1.your-org-name.sdm.network)
4014
+ attr_accessor :subdomain
4015
+ # Tags is a map of key, value pairs.
4016
+ attr_accessor :tags
4017
+ # The base address of your website without the path.
4018
+ attr_accessor :url
4019
+ # The username to authenticate with.
4020
+ attr_accessor :username
4021
+
4022
+ def initialize(
4023
+ bind_interface: nil,
4024
+ egress_filter: nil,
4025
+ healthy: nil,
4026
+ id: nil,
4027
+ name: nil,
4028
+ password: nil,
4029
+ port_override: nil,
4030
+ secret_store_id: nil,
4031
+ subdomain: nil,
4032
+ tags: nil,
4033
+ url: nil,
4034
+ username: nil
4035
+ )
4036
+ @bind_interface = bind_interface == nil ? "" : bind_interface
4037
+ @egress_filter = egress_filter == nil ? "" : egress_filter
4038
+ @healthy = healthy == nil ? false : healthy
4039
+ @id = id == nil ? "" : id
4040
+ @name = name == nil ? "" : name
4041
+ @password = password == nil ? "" : password
4042
+ @port_override = port_override == nil ? 0 : port_override
4043
+ @secret_store_id = secret_store_id == nil ? "" : secret_store_id
4044
+ @subdomain = subdomain == nil ? "" : subdomain
4045
+ @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
4046
+ @url = url == nil ? "" : url
4047
+ @username = username == nil ? "" : username
4048
+ end
4049
+
4050
+ def to_json(options = {})
4051
+ hash = {}
4052
+ self.instance_variables.each do |var|
4053
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
4054
+ end
4055
+ hash.to_json
4056
+ end
4057
+ end
4058
+
3917
4059
  # CreateResponseMetadata is reserved for future use.
3918
4060
  class CreateResponseMetadata
3919
4061
  def initialize()
@@ -4857,6 +4999,21 @@ module SDM
4857
4999
  end
4858
5000
  end
4859
5001
 
5002
+ # GenericResponseMetadata contains common headers for generic request
5003
+ # responses.
5004
+ class GenericResponseMetadata
5005
+ def initialize()
5006
+ end
5007
+
5008
+ def to_json(options = {})
5009
+ hash = {}
5010
+ self.instance_variables.each do |var|
5011
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
5012
+ end
5013
+ hash.to_json
5014
+ end
5015
+ end
5016
+
4860
5017
  # GetResponseMetadata is reserved for future use.
4861
5018
  class GetResponseMetadata
4862
5019
  def initialize()
data/lib/strongdm.rb CHANGED
@@ -29,7 +29,7 @@ module SDM #:nodoc:
29
29
  DEFAULT_BASE_RETRY_DELAY = 0.0030 # 30 ms
30
30
  DEFAULT_MAX_RETRY_DELAY = 300 # 300 seconds
31
31
  API_VERSION = "2024-03-28"
32
- USER_AGENT = "strongdm-sdk-ruby/11.7.0"
32
+ USER_AGENT = "strongdm-sdk-ruby/11.9.0"
33
33
  private_constant :DEFAULT_MAX_RETRIES, :DEFAULT_BASE_RETRY_DELAY, :DEFAULT_MAX_RETRY_DELAY, :API_VERSION, :USER_AGENT
34
34
 
35
35
  # Creates a new strongDM API client.
@@ -100,8 +100,8 @@ module SDM #:nodoc:
100
100
  @role_resources_history = RoleResourcesHistory.new(@channel, self)
101
101
  @roles = Roles.new(@channel, self)
102
102
  @roles_history = RolesHistory.new(@channel, self)
103
- @secret_store_healths = SecretStoreHealths.new(@channel, self)
104
103
  @secret_stores = SecretStores.new(@channel, self)
104
+ @secret_store_healths = SecretStoreHealths.new(@channel, self)
105
105
  @secret_stores_history = SecretStoresHistory.new(@channel, self)
106
106
  @workflow_approvers = WorkflowApprovers.new(@channel, self)
107
107
  @workflow_approvers_history = WorkflowApproversHistory.new(@channel, self)
@@ -402,14 +402,14 @@ module SDM #:nodoc:
402
402
  #
403
403
  # See {RolesHistory}.
404
404
  attr_reader :roles_history
405
- # SecretStoreHealths exposes health states for secret stores.
406
- #
407
- # See {SecretStoreHealths}.
408
- attr_reader :secret_store_healths
409
405
  # SecretStores are servers where resource secrets (passwords, keys) are stored.
410
406
  #
411
407
  # See {SecretStores}.
412
408
  attr_reader :secret_stores
409
+ # SecretStoreHealths exposes health states for secret stores.
410
+ #
411
+ # See {SecretStoreHealths}.
412
+ attr_reader :secret_store_healths
413
413
  # SecretStoresHistory records all changes to the state of a SecretStore.
414
414
  #
415
415
  # See {SecretStoresHistory}.
@@ -503,8 +503,8 @@ module SDM #:nodoc:
503
503
  @role_resources_history = RoleResourcesHistory.new(@channel, self)
504
504
  @roles = Roles.new(@channel, self)
505
505
  @roles_history = RolesHistory.new(@channel, self)
506
- @secret_store_healths = SecretStoreHealths.new(@channel, self)
507
506
  @secret_stores = SecretStores.new(@channel, self)
507
+ @secret_store_healths = SecretStoreHealths.new(@channel, self)
508
508
  @secret_stores_history = SecretStoresHistory.new(@channel, self)
509
509
  @workflow_approvers = WorkflowApprovers.new(@channel, self)
510
510
  @workflow_approvers_history = WorkflowApproversHistory.new(@channel, self)
data/lib/svc.rb CHANGED
@@ -4418,6 +4418,8 @@ module SDM #:nodoc:
4418
4418
  # {Citus}
4419
4419
  # {Clustrix}
4420
4420
  # {Cockroach}
4421
+ # {CouchbaseDatabase}
4422
+ # {CouchbaseWebUI}
4421
4423
  # {DB2I}
4422
4424
  # {DB2LUW}
4423
4425
  # {DocumentDBHost}
@@ -5212,91 +5214,6 @@ module SDM #:nodoc:
5212
5214
  end
5213
5215
  end
5214
5216
 
5215
- # SecretStoreHealths exposes health states for secret stores.
5216
- #
5217
- # See {SecretStoreHealth}.
5218
- class SecretStoreHealths
5219
- extend Gem::Deprecate
5220
-
5221
- def initialize(channel, parent)
5222
- begin
5223
- @stub = V1::SecretStoreHealths::Stub.new(nil, nil, channel_override: channel)
5224
- rescue => exception
5225
- raise Plumbing::convert_error_to_porcelain(exception)
5226
- end
5227
- @parent = parent
5228
- end
5229
-
5230
- # List reports the health status of node to secret store pairs.
5231
- def list(
5232
- filter,
5233
- *args,
5234
- deadline: nil
5235
- )
5236
- req = V1::SecretStoreHealthListRequest.new()
5237
- req.meta = V1::ListRequestMetadata.new()
5238
- if @parent.page_limit > 0
5239
- req.meta.limit = @parent.page_limit
5240
- end
5241
- if not @parent.snapshot_time.nil?
5242
- req.meta.snapshot_at = @parent.snapshot_time
5243
- end
5244
-
5245
- req.filter = Plumbing::quote_filter_args(filter, *args)
5246
- resp = Enumerator::Generator.new { |g|
5247
- tries = 0
5248
- loop do
5249
- begin
5250
- plumbing_response = @stub.list(req, metadata: @parent.get_metadata("SecretStoreHealths.List", req), deadline: deadline)
5251
- rescue => exception
5252
- if (@parent.shouldRetry(tries, exception))
5253
- tries + +@parent.jitterSleep(tries)
5254
- next
5255
- end
5256
- raise Plumbing::convert_error_to_porcelain(exception)
5257
- end
5258
- tries = 0
5259
- plumbing_response.secret_store_healths.each do |plumbing_item|
5260
- g.yield Plumbing::convert_secret_store_health_to_porcelain(plumbing_item)
5261
- end
5262
- break if plumbing_response.meta.next_cursor == ""
5263
- req.meta.cursor = plumbing_response.meta.next_cursor
5264
- end
5265
- }
5266
- resp
5267
- end
5268
-
5269
- # Healthcheck triggers a remote healthcheck request for a secret store. It may take minutes
5270
- # to propagate across a large network of Nodes. The call will return immediately, and the
5271
- # updated health of the Secret Store can be retrieved via List.
5272
- def healthcheck(
5273
- secret_store_id,
5274
- deadline: nil
5275
- )
5276
- req = V1::SecretStoreHealthcheckRequest.new()
5277
-
5278
- req.secret_store_id = (secret_store_id)
5279
- tries = 0
5280
- plumbing_response = nil
5281
- loop do
5282
- begin
5283
- plumbing_response = @stub.healthcheck(req, metadata: @parent.get_metadata("SecretStoreHealths.Healthcheck", req), deadline: deadline)
5284
- rescue => exception
5285
- if (@parent.shouldRetry(tries, exception))
5286
- tries + +@parent.jitterSleep(tries)
5287
- next
5288
- end
5289
- raise Plumbing::convert_error_to_porcelain(exception)
5290
- end
5291
- break
5292
- end
5293
-
5294
- resp = SecretStoreHealthcheckResponse.new()
5295
- resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
5296
- resp
5297
- end
5298
- end
5299
-
5300
5217
  # SecretStores are servers where resource secrets (passwords, keys) are stored.
5301
5218
  #
5302
5219
  # See:
@@ -5531,6 +5448,91 @@ module SDM #:nodoc:
5531
5448
  end
5532
5449
  end
5533
5450
 
5451
+ # SecretStoreHealths exposes health states for secret stores.
5452
+ #
5453
+ # See {SecretStoreHealth}.
5454
+ class SecretStoreHealths
5455
+ extend Gem::Deprecate
5456
+
5457
+ def initialize(channel, parent)
5458
+ begin
5459
+ @stub = V1::SecretStoreHealths::Stub.new(nil, nil, channel_override: channel)
5460
+ rescue => exception
5461
+ raise Plumbing::convert_error_to_porcelain(exception)
5462
+ end
5463
+ @parent = parent
5464
+ end
5465
+
5466
+ # List reports the health status of node to secret store pairs.
5467
+ def list(
5468
+ filter,
5469
+ *args,
5470
+ deadline: nil
5471
+ )
5472
+ req = V1::SecretStoreHealthListRequest.new()
5473
+ req.meta = V1::ListRequestMetadata.new()
5474
+ if @parent.page_limit > 0
5475
+ req.meta.limit = @parent.page_limit
5476
+ end
5477
+ if not @parent.snapshot_time.nil?
5478
+ req.meta.snapshot_at = @parent.snapshot_time
5479
+ end
5480
+
5481
+ req.filter = Plumbing::quote_filter_args(filter, *args)
5482
+ resp = Enumerator::Generator.new { |g|
5483
+ tries = 0
5484
+ loop do
5485
+ begin
5486
+ plumbing_response = @stub.list(req, metadata: @parent.get_metadata("SecretStoreHealths.List", req), deadline: deadline)
5487
+ rescue => exception
5488
+ if (@parent.shouldRetry(tries, exception))
5489
+ tries + +@parent.jitterSleep(tries)
5490
+ next
5491
+ end
5492
+ raise Plumbing::convert_error_to_porcelain(exception)
5493
+ end
5494
+ tries = 0
5495
+ plumbing_response.secret_store_healths.each do |plumbing_item|
5496
+ g.yield Plumbing::convert_secret_store_health_to_porcelain(plumbing_item)
5497
+ end
5498
+ break if plumbing_response.meta.next_cursor == ""
5499
+ req.meta.cursor = plumbing_response.meta.next_cursor
5500
+ end
5501
+ }
5502
+ resp
5503
+ end
5504
+
5505
+ # Healthcheck triggers a remote healthcheck request for a secret store. It may take minutes
5506
+ # to propagate across a large network of Nodes. The call will return immediately, and the
5507
+ # updated health of the Secret Store can be retrieved via List.
5508
+ def healthcheck(
5509
+ secret_store_id,
5510
+ deadline: nil
5511
+ )
5512
+ req = V1::SecretStoreHealthcheckRequest.new()
5513
+
5514
+ req.secret_store_id = (secret_store_id)
5515
+ tries = 0
5516
+ plumbing_response = nil
5517
+ loop do
5518
+ begin
5519
+ plumbing_response = @stub.healthcheck(req, metadata: @parent.get_metadata("SecretStoreHealths.Healthcheck", req), deadline: deadline)
5520
+ rescue => exception
5521
+ if (@parent.shouldRetry(tries, exception))
5522
+ tries + +@parent.jitterSleep(tries)
5523
+ next
5524
+ end
5525
+ raise Plumbing::convert_error_to_porcelain(exception)
5526
+ end
5527
+ break
5528
+ end
5529
+
5530
+ resp = SecretStoreHealthcheckResponse.new()
5531
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
5532
+ resp
5533
+ end
5534
+ end
5535
+
5534
5536
  # SecretStoresHistory records all changes to the state of a SecretStore.
5535
5537
  #
5536
5538
  # See {SecretStoreHistory}.
data/lib/version CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "11.7.0"
16
+ VERSION = "11.9.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 = "11.7.0"
16
+ VERSION = "11.9.0"
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongdm
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.7.0
4
+ version: 11.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - strongDM Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-14 00:00:00.000000000 Z
11
+ date: 2024-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -81,8 +81,8 @@ files:
81
81
  - "./.git/logs/HEAD"
82
82
  - "./.git/logs/refs/heads/master"
83
83
  - "./.git/logs/refs/remotes/origin/HEAD"
84
- - "./.git/objects/pack/pack-e0a86a945433cf990cf5762933b2305e87f836ee.idx"
85
- - "./.git/objects/pack/pack-e0a86a945433cf990cf5762933b2305e87f836ee.pack"
84
+ - "./.git/objects/pack/pack-bf56ad16d8a3be98a0a1ee057b441f0c7369d060.idx"
85
+ - "./.git/objects/pack/pack-bf56ad16d8a3be98a0a1ee057b441f0c7369d060.pack"
86
86
  - "./.git/packed-refs"
87
87
  - "./.git/refs/heads/master"
88
88
  - "./.git/refs/remotes/origin/HEAD"