Class: OCI::CloudBridge::OcbAgentSvcClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/cloud_bridge/ocb_agent_svc_client.rb

Overview

API for Oracle Cloud Bridge service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ OcbAgentSvcClient

Creates a new OcbAgentSvcClient. Notes: If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 55

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20220509'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "OcbAgentSvcClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


29
30
31
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 29

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



25
26
27
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#add_agent_dependency(environment_id, add_agent_dependency_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_agent_dependency API.

Add a dependency to the environment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 124

def add_agent_dependency(environment_id, add_agent_dependency_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#add_agent_dependency.' if logger

  raise "Missing the required parameter 'environment_id' when calling add_agent_dependency." if environment_id.nil?
  raise "Missing the required parameter 'add_agent_dependency_details' when calling add_agent_dependency." if add_agent_dependency_details.nil?
  raise "Parameter value for 'environment_id' must not be blank" if OCI::Internal::Util.blank_string?(environment_id)

  path = '/environments/{environmentId}/actions/addAgentDependency'.sub('{environmentId}', environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(add_agent_dependency_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#add_agent_dependency') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Environment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_agent_compartment(agent_id, change_agent_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_agent_compartment API.

Moves an Agent resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 195

def change_agent_compartment(agent_id, change_agent_compartment_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#change_agent_compartment.' if logger

  raise "Missing the required parameter 'agent_id' when calling change_agent_compartment." if agent_id.nil?
  raise "Missing the required parameter 'change_agent_compartment_details' when calling change_agent_compartment." if change_agent_compartment_details.nil?
  raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id)

  path = '/agents/{agentId}/actions/changeCompartment'.sub('{agentId}', agent_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_agent_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#change_agent_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_agent_dependency_compartment(agent_dependency_id, change_agent_dependency_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_agent_dependency_compartment API.

Moves a AgentDependency resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 265

def change_agent_dependency_compartment(agent_dependency_id, change_agent_dependency_compartment_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#change_agent_dependency_compartment.' if logger

  raise "Missing the required parameter 'agent_dependency_id' when calling change_agent_dependency_compartment." if agent_dependency_id.nil?
  raise "Missing the required parameter 'change_agent_dependency_compartment_details' when calling change_agent_dependency_compartment." if change_agent_dependency_compartment_details.nil?
  raise "Parameter value for 'agent_dependency_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_dependency_id)

  path = '/agentDependencies/{agentDependencyId}/actions/changeCompartment'.sub('{agentDependencyId}', agent_dependency_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_agent_dependency_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#change_agent_dependency_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_environment_compartment(environment_id, change_environment_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_environment_compartment API.

Moves a source environment resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 335

def change_environment_compartment(environment_id, change_environment_compartment_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#change_environment_compartment.' if logger

  raise "Missing the required parameter 'environment_id' when calling change_environment_compartment." if environment_id.nil?
  raise "Missing the required parameter 'change_environment_compartment_details' when calling change_environment_compartment." if change_environment_compartment_details.nil?
  raise "Parameter value for 'environment_id' must not be blank" if OCI::Internal::Util.blank_string?(environment_id)

  path = '/environments/{environmentId}/actions/changeCompartment'.sub('{environmentId}', environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_environment_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#change_environment_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_agent(create_agent_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_agent API.

Creates an Agent.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 399

def create_agent(create_agent_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#create_agent.' if logger

  raise "Missing the required parameter 'create_agent_details' when calling create_agent." if create_agent_details.nil?

  path = '/agents'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_agent_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#create_agent') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Agent'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_agent_dependency(create_agent_dependency_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_agent_dependency API.

Creates an AgentDependency.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 461

def create_agent_dependency(create_agent_dependency_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#create_agent_dependency.' if logger

  raise "Missing the required parameter 'create_agent_dependency_details' when calling create_agent_dependency." if create_agent_dependency_details.nil?

  path = '/agentDependencies'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_agent_dependency_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#create_agent_dependency') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::AgentDependency'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_environment(create_environment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_environment API.

Creates a source environment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 523

def create_environment(create_environment_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#create_environment.' if logger

  raise "Missing the required parameter 'create_environment_details' when calling create_environment." if create_environment_details.nil?

  path = '/environments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_environment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#create_environment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Environment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_agent(agent_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_agent API.

Deletes an Agent resource identified by an identifier.

Parameters:

  • agent_id (String)

    Unique Agent identifier path parameter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 590

def delete_agent(agent_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#delete_agent.' if logger

  raise "Missing the required parameter 'agent_id' when calling delete_agent." if agent_id.nil?
  raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id)

  path = '/agents/{agentId}'.sub('{agentId}', agent_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#delete_agent') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_agent_dependency(agent_dependency_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_agent_dependency API.

Deletes the AgentDependency resource based on an identifier.

Parameters:

  • agent_dependency_id (String)

    A unique AgentDependency identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 652

def delete_agent_dependency(agent_dependency_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#delete_agent_dependency.' if logger

  raise "Missing the required parameter 'agent_dependency_id' when calling delete_agent_dependency." if agent_dependency_id.nil?
  raise "Parameter value for 'agent_dependency_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_dependency_id)

  path = '/agentDependencies/{agentDependencyId}'.sub('{agentDependencyId}', agent_dependency_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#delete_agent_dependency') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_environment(environment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_environment API.

Deletes a the source environment resource identified by an identifier.

Parameters:

  • environment_id (String)

    Unique environment identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 712

def delete_environment(environment_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#delete_environment.' if logger

  raise "Missing the required parameter 'environment_id' when calling delete_environment." if environment_id.nil?
  raise "Parameter value for 'environment_id' must not be blank" if OCI::Internal::Util.blank_string?(environment_id)

  path = '/environments/{environmentId}'.sub('{environmentId}', environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#delete_environment') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_agent(agent_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_agent API.

Gets an Agent by identifier.

Parameters:

  • agent_id (String)

    Unique Agent identifier path parameter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 766

def get_agent(agent_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#get_agent.' if logger

  raise "Missing the required parameter 'agent_id' when calling get_agent." if agent_id.nil?
  raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id)

  path = '/agents/{agentId}'.sub('{agentId}', agent_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#get_agent') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Agent'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_agent_dependency(agent_dependency_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_agent_dependency API.

Gets an AgentDependency by identifier.

Parameters:

  • agent_dependency_id (String)

    A unique AgentDependency identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 820

def get_agent_dependency(agent_dependency_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#get_agent_dependency.' if logger

  raise "Missing the required parameter 'agent_dependency_id' when calling get_agent_dependency." if agent_dependency_id.nil?
  raise "Parameter value for 'agent_dependency_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_dependency_id)

  path = '/agentDependencies/{agentDependencyId}'.sub('{agentDependencyId}', agent_dependency_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#get_agent_dependency') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::AgentDependency'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_environment(environment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_environment API.

Gets a source environment by identifier.

Parameters:

  • environment_id (String)

    Unique environment identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 874

def get_environment(environment_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#get_environment.' if logger

  raise "Missing the required parameter 'environment_id' when calling get_environment." if environment_id.nil?
  raise "Parameter value for 'environment_id' must not be blank" if OCI::Internal::Util.blank_string?(environment_id)

  path = '/environments/{environmentId}'.sub('{environmentId}', environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#get_environment') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Environment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_plugin(agent_id, plugin_name, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_plugin API.

Gets a plugin by identifier.

Parameters:

  • agent_id (String)

    Unique Agent identifier path parameter.

  • plugin_name (String)

    Unique plugin identifier path parameter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 929

def get_plugin(agent_id, plugin_name, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#get_plugin.' if logger

  raise "Missing the required parameter 'agent_id' when calling get_plugin." if agent_id.nil?
  raise "Missing the required parameter 'plugin_name' when calling get_plugin." if plugin_name.nil?
  raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id)
  raise "Parameter value for 'plugin_name' must not be blank" if OCI::Internal::Util.blank_string?(plugin_name)

  path = '/agents/{agentId}/plugins/{pluginName}'.sub('{agentId}', agent_id.to_s).sub('{pluginName}', plugin_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#get_plugin') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Plugin'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_agent_dependencies(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_agent_dependencies API.

Returns a list of AgentDependencies such as AgentDependencyCollection.

Allowed values are: timeCreated, timeUpdated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :agent_id (String)

    A filter to return only resources that match the given Agent ID.

  • :environment_id (String)

    A filter to return only resources that match the given environment ID.

  • :lifecycle_state (String)

    A filter to return only resources their lifecycleState matches the given lifecycleState.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 996

def list_agent_dependencies(compartment_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#list_agent_dependencies.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_agent_dependencies." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::CloudBridge::Models::AgentDependency::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::CloudBridge::Models::AgentDependency::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::CloudBridge::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudBridge::Models::SORT_ORDERS_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated timeUpdated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, timeUpdated, displayName.'
  end

  path = '/agentDependencies'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:agentId] = opts[:agent_id] if opts[:agent_id]
  query_params[:environmentId] = opts[:environment_id] if opts[:environment_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#list_agent_dependencies') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::AgentDependencyCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_agents(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_agents API.

Returns a list of Agents.

Allowed values are: timeCreated, timeUpdated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :environment_id (String)

    A filter to return only resources that match the given environment ID.

  • :lifecycle_state (String)

    A filter to return only resources their lifecycleState matches the given lifecycleState.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :agent_id (String)

    A filter to return only resources that match the given Agent ID.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 1081

def list_agents(compartment_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#list_agents.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_agents." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::CloudBridge::Models::Agent::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::CloudBridge::Models::Agent::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::CloudBridge::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudBridge::Models::SORT_ORDERS_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated timeUpdated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, timeUpdated, displayName.'
  end

  path = '/agents'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:environmentId] = opts[:environment_id] if opts[:environment_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:agentId] = opts[:agent_id] if opts[:agent_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#list_agents') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::AgentCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_appliance_images(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_appliance_images API.

Returns a list of Appliance Images.

Allowed values are: timeCreated, timeUpdated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

Returns:



1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 1163

def list_appliance_images(compartment_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#list_appliance_images.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_appliance_images." if compartment_id.nil?

  if opts[:sort_order] && !OCI::CloudBridge::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudBridge::Models::SORT_ORDERS_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated timeUpdated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, timeUpdated, displayName.'
  end

  path = '/applianceImages'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#list_appliance_images') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::ApplianceImageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_environments(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_environments API.

Returns a list of source environments.

Allowed values are: timeCreated, timeUpdated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :lifecycle_state (String)

    A filter to return only resources where their lifecycleState matches the given lifecycleState.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :environment_id (String)

    A filter to return only resources that match the given environment ID.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 1240

def list_environments(compartment_id, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#list_environments.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_environments." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::CloudBridge::Models::Environment::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::CloudBridge::Models::Environment::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::CloudBridge::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudBridge::Models::SORT_ORDERS_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated timeUpdated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, timeUpdated, displayName.'
  end

  path = '/environments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:environmentId] = opts[:environment_id] if opts[:environment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#list_environments') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::EnvironmentCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 94

def logger
  @api_client.config.logger
end

#remove_agent_dependency(environment_id, remove_agent_dependency_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use remove_agent_dependency API.

Adds a dependency to the source environment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 1326

def remove_agent_dependency(environment_id, remove_agent_dependency_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#remove_agent_dependency.' if logger

  raise "Missing the required parameter 'environment_id' when calling remove_agent_dependency." if environment_id.nil?
  raise "Missing the required parameter 'remove_agent_dependency_details' when calling remove_agent_dependency." if remove_agent_dependency_details.nil?
  raise "Parameter value for 'environment_id' must not be blank" if OCI::Internal::Util.blank_string?(environment_id)

  path = '/environments/{environmentId}/actions/removeAgentDependency'.sub('{environmentId}', environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(remove_agent_dependency_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#remove_agent_dependency') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Environment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_agent(agent_id, update_agent_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_agent API.

Updates the Agent.

Parameters:

  • agent_id (String)

    Unique Agent identifier path parameter.

  • update_agent_details (OCI::CloudBridge::Models::UpdateAgentDetails)

    The information to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

Returns:



1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 1397

def update_agent(agent_id, update_agent_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#update_agent.' if logger

  raise "Missing the required parameter 'agent_id' when calling update_agent." if agent_id.nil?
  raise "Missing the required parameter 'update_agent_details' when calling update_agent." if update_agent_details.nil?
  raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id)

  path = '/agents/{agentId}'.sub('{agentId}', agent_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(update_agent_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#update_agent') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Agent'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_agent_dependency(agent_dependency_id, update_agent_dependency_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_agent_dependency API.

Updates the AgentDependency.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 1468

def update_agent_dependency(agent_dependency_id, update_agent_dependency_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#update_agent_dependency.' if logger

  raise "Missing the required parameter 'agent_dependency_id' when calling update_agent_dependency." if agent_dependency_id.nil?
  raise "Missing the required parameter 'update_agent_dependency_details' when calling update_agent_dependency." if update_agent_dependency_details.nil?
  raise "Parameter value for 'agent_dependency_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_dependency_id)

  path = '/agentDependencies/{agentDependencyId}'.sub('{agentDependencyId}', agent_dependency_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(update_agent_dependency_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#update_agent_dependency') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_environment(environment_id, update_environment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_environment API.

Updates the source environment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours, but can be invalidated before 24 hours due to conflicting operations. For example, if a resource has been deleted and purged from the system, a retry of the original creation request might be rejected.

Returns:



1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 1538

def update_environment(environment_id, update_environment_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#update_environment.' if logger

  raise "Missing the required parameter 'environment_id' when calling update_environment." if environment_id.nil?
  raise "Missing the required parameter 'update_environment_details' when calling update_environment." if update_environment_details.nil?
  raise "Parameter value for 'environment_id' must not be blank" if OCI::Internal::Util.blank_string?(environment_id)

  path = '/environments/{environmentId}'.sub('{environmentId}', environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(update_environment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#update_environment') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Environment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_plugin(agent_id, plugin_name, update_plugin_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_plugin API.

Updates the plugin.

Parameters:

  • agent_id (String)

    Unique Agent identifier path parameter.

  • plugin_name (String)

    Unique plugin identifier path parameter.

  • update_plugin_details (OCI::CloudBridge::Models::UpdatePluginDetails)

    The information to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
# File 'lib/oci/cloud_bridge/ocb_agent_svc_client.rb', line 1604

def update_plugin(agent_id, plugin_name, update_plugin_details, opts = {})
  logger.debug 'Calling operation OcbAgentSvcClient#update_plugin.' if logger

  raise "Missing the required parameter 'agent_id' when calling update_plugin." if agent_id.nil?
  raise "Missing the required parameter 'plugin_name' when calling update_plugin." if plugin_name.nil?
  raise "Missing the required parameter 'update_plugin_details' when calling update_plugin." if update_plugin_details.nil?
  raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id)
  raise "Parameter value for 'plugin_name' must not be blank" if OCI::Internal::Util.blank_string?(plugin_name)

  path = '/agents/{agentId}/plugins/{pluginName}'.sub('{agentId}', agent_id.to_s).sub('{pluginName}', plugin_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_plugin_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OcbAgentSvcClient#update_plugin') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudBridge::Models::Plugin'
    )
  end
  # rubocop:enable Metrics/BlockLength
end