Class: OCI::CertificatesManagement::CertificatesManagementClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/certificates_management/certificates_management_client.rb

Overview

API for managing certificates.

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) ⇒ CertificatesManagementClient

Creates a new CertificatesManagementClient. 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/certificates_management/certificates_management_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 + '/20210224'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "CertificatesManagementClient 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/certificates_management/certificates_management_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/certificates_management/certificates_management_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/certificates_management/certificates_management_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/certificates_management/certificates_management_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#cancel_certificate_authority_deletion(certificate_authority_id, opts = {}) ⇒ Response

Note:

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

Cancels the scheduled deletion of the specified certificate authority (CA).

Parameters:

  • certificate_authority_id (String)

    The OCID of the certificate authority (CA).

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



120
121
122
123
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 120

def cancel_certificate_authority_deletion(certificate_authority_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#cancel_certificate_authority_deletion.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}/actions/cancelDeletion'.sub('{certificateAuthorityId}', certificate_authority_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#cancel_certificate_authority_deletion') 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

#cancel_certificate_authority_version_deletion(certificate_authority_id, certificate_authority_version_number, opts = {}) ⇒ Response

Note:

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

Cancels the scheduled deletion of the specified certificate authority (CA) version. Canceling a scheduled deletion restores the CA version's lifecycle state to what it was before its scheduled deletion.

Parameters:

  • certificate_authority_id (String)

    The OCID of the certificate authority (CA).

  • certificate_authority_version_number (Integer)

    The version number of the certificate authority (CA).

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



187
188
189
190
191
192
193
194
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 187

def cancel_certificate_authority_version_deletion(certificate_authority_id, certificate_authority_version_number, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#cancel_certificate_authority_version_deletion.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}/version/{certificateAuthorityVersionNumber}/actions/cancelDeletion'.sub('{certificateAuthorityId}', certificate_authority_id.to_s).sub('{certificateAuthorityVersionNumber}', certificate_authority_version_number.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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#cancel_certificate_authority_version_deletion') 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

#cancel_certificate_deletion(certificate_id, opts = {}) ⇒ Response

Note:

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

Cancels the pending deletion of the specified certificate. Canceling a scheduled deletion restores the certificate's lifecycle state to what it was before you scheduled the certificate for deletion.

Parameters:

  • certificate_id (String)

    The OCID of the certificate.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



255
256
257
258
259
260
261
262
263
264
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 255

def cancel_certificate_deletion(certificate_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#cancel_certificate_deletion.' if logger

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

  path = '/certificates/{certificateId}/actions/cancelDeletion'.sub('{certificateId}', certificate_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#cancel_certificate_deletion') 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

#cancel_certificate_version_deletion(certificate_id, certificate_version_number, opts = {}) ⇒ Response

Note:

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

Cancels the scheduled deletion of the specified certificate version.

Parameters:

  • certificate_id (String)

    The OCID of the certificate.

  • certificate_version_number (Integer)

    The version number of the certificate.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 319

def cancel_certificate_version_deletion(certificate_id, certificate_version_number, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#cancel_certificate_version_deletion.' if logger

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

  path = '/certificates/{certificateId}/version/{certificateVersionNumber}/actions/cancelDeletion'.sub('{certificateId}', certificate_id.to_s).sub('{certificateVersionNumber}', certificate_version_number.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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#cancel_certificate_version_deletion') 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_ca_bundle_compartment(ca_bundle_id, change_ca_bundle_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a CA bundle to a different compartment in the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

When provided, if-match is checked against the ETag values of the secret.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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 that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



396
397
398
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 396

def change_ca_bundle_compartment(ca_bundle_id, change_ca_bundle_compartment_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#change_ca_bundle_compartment.' if logger

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

  path = '/caBundles/{caBundleId}/actions/changeCompartment'.sub('{caBundleId}', ca_bundle_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_ca_bundle_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#change_ca_bundle_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_certificate_authority_compartment(certificate_authority_id, change_certificate_authority_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a certificate authority (CA) to a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

When provided, If-Match is checked against the ETag values of the source.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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 that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



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
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 474

def change_certificate_authority_compartment(certificate_authority_id, change_certificate_authority_compartment_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#change_certificate_authority_compartment.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}/actions/changeCompartment'.sub('{certificateAuthorityId}', certificate_authority_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_certificate_authority_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#change_certificate_authority_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_certificate_compartment(certificate_id, change_certificate_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a certificate to a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

When provided, if-match is checked against the ETag values of the secret.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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 that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 552

def change_certificate_compartment(certificate_id, change_certificate_compartment_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#change_certificate_compartment.' if logger

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

  path = '/certificates/{certificateId}/actions/changeCompartment'.sub('{certificateId}', certificate_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_certificate_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#change_certificate_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_ca_bundle(create_ca_bundle_details, opts = {}) ⇒ Response

Note:

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

Creates a new CA bundle according to the details of the request.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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 that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 619

def create_ca_bundle(create_ca_bundle_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#create_ca_bundle.' if logger

  raise "Missing the required parameter 'create_ca_bundle_details' when calling create_ca_bundle." if create_ca_bundle_details.nil?

  path = '/caBundles'
  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]
  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(create_ca_bundle_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#create_ca_bundle') 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::CertificatesManagement::Models::CaBundle'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_certificate(create_certificate_details, opts = {}) ⇒ Response

Note:

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

Creates a new certificate according to the details of the request.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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 that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 684

def create_certificate(create_certificate_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#create_certificate.' if logger

  raise "Missing the required parameter 'create_certificate_details' when calling create_certificate." if create_certificate_details.nil?

  path = '/certificates'
  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]
  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(create_certificate_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#create_certificate') 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::CertificatesManagement::Models::Certificate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_certificate_authority(create_certificate_authority_details, opts = {}) ⇒ Response

Note:

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

Creates a new certificate authority (CA) according to the details of the request.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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 that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 749

def create_certificate_authority(create_certificate_authority_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#create_certificate_authority.' if logger

  raise "Missing the required parameter 'create_certificate_authority_details' when calling create_certificate_authority." if create_certificate_authority_details.nil?

  path = '/certificateAuthorities'
  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]
  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(create_certificate_authority_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#create_certificate_authority') 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::CertificatesManagement::Models::CertificateAuthority'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_ca_bundle(ca_bundle_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified CA bundle.

Parameters:

  • ca_bundle_id (String)

    The OCID of the CA bundle.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



813
814
815
816
817
818
819
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 813

def delete_ca_bundle(ca_bundle_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#delete_ca_bundle.' if logger

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

  path = '/caBundles/{caBundleId}'.sub('{caBundleId}', ca_bundle_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#delete_ca_bundle') 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_association(association_id, opts = {}) ⇒ Response

Note:

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

Gets details about the specified association.

Parameters:

  • association_id (String)

    The OCID of an association between a certificate-related resource and another Oracle Cloud Infrastructure resource.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

Returns:



870
871
872
873
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 870

def get_association(association_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#get_association.' if logger

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

  path = '/associations/{associationId}'.sub('{associationId}', association_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: 'CertificatesManagementClient#get_association') 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::CertificatesManagement::Models::Association'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_ca_bundle(ca_bundle_id, opts = {}) ⇒ Response

Note:

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

Gets details about the specified CA bundle.

Parameters:

  • ca_bundle_id (String)

    The OCID of the CA bundle.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

Returns:



927
928
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 927

def get_ca_bundle(ca_bundle_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#get_ca_bundle.' if logger

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

  path = '/caBundles/{caBundleId}'.sub('{caBundleId}', ca_bundle_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: 'CertificatesManagementClient#get_ca_bundle') 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::CertificatesManagement::Models::CaBundle'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_certificate(certificate_id, opts = {}) ⇒ Response

Note:

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

Gets details about the specified certificate.

Parameters:

  • certificate_id (String)

    The OCID of the certificate.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

Returns:



984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 984

def get_certificate(certificate_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#get_certificate.' if logger

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

  path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_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: 'CertificatesManagementClient#get_certificate') 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::CertificatesManagement::Models::Certificate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_certificate_authority(certificate_authority_id, opts = {}) ⇒ Response

Note:

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

Gets details about the specified certificate authority (CA).

Parameters:

  • certificate_authority_id (String)

    The OCID of the certificate authority (CA).

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

Returns:



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1041

def get_certificate_authority(certificate_authority_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#get_certificate_authority.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}'.sub('{certificateAuthorityId}', certificate_authority_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: 'CertificatesManagementClient#get_certificate_authority') 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::CertificatesManagement::Models::CertificateAuthority'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_certificate_authority_version(certificate_authority_id, certificate_authority_version_number, opts = {}) ⇒ Response

Note:

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

Gets details about the specified certificate authority (CA) version.

Parameters:

  • certificate_authority_id (String)

    The OCID of the certificate authority (CA).

  • certificate_authority_version_number (Integer)

    The version number of the certificate authority (CA).

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

Returns:



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/certificates_management/certificates_management_client.rb', line 1099

def get_certificate_authority_version(certificate_authority_id, certificate_authority_version_number, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#get_certificate_authority_version.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}/version/{certificateAuthorityVersionNumber}'.sub('{certificateAuthorityId}', certificate_authority_id.to_s).sub('{certificateAuthorityVersionNumber}', certificate_authority_version_number.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: 'CertificatesManagementClient#get_certificate_authority_version') 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::CertificatesManagement::Models::CertificateAuthorityVersion'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_certificate_version(certificate_id, certificate_version_number, opts = {}) ⇒ Response

Note:

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

Gets details about the specified version of a certificate.

Parameters:

  • certificate_id (String)

    The OCID of the certificate.

  • certificate_version_number (Integer)

    The version number of the certificate.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

Returns:



1159
1160
1161
1162
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1159

def get_certificate_version(certificate_id, certificate_version_number, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#get_certificate_version.' if logger

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

  path = '/certificates/{certificateId}/version/{certificateVersionNumber}'.sub('{certificateId}', certificate_id.to_s).sub('{certificateVersionNumber}', certificate_version_number.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: 'CertificatesManagementClient#get_certificate_version') 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::CertificatesManagement::Models::CertificateVersion'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_associations(opts = {}) ⇒ Response

Note:

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

Lists all associations that match the query parameters. Optionally, you can use the parameter FilterByAssociationIdQueryParam to limit the result set to a single item that matches the specified association.

Parameters:

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :compartment_id (String)

    A filter that returns only resources that match the given compartment OCID.

  • :certificates_resource_id (String)

    A filter that returns only resources that match the given OCID of a certificate-related resource.

  • :associated_resource_id (String)

    A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.

  • :association_id (String)

    The OCID of the association. If the parameter is set to null, the service lists all associations.

  • :name (String)

    A filter that returns only resources that match the specified name.

  • :sort_by (String)

    The field to sort by. You can specify only one sort order. The default order for TIMECREATED is descending. The default order for NAME is ascending.

    Allowed values are: NAME, TIMECREATED

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

    Allowed values are: ASC, DESC

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :association_type (String)

    Type of associations to list. If the parameter is set to null, the service lists all types of associations. Allowed values are: CERTIFICATE, CERTIFICATE_AUTHORITY, CA_BUNDLE

Returns:



1238
1239
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1238

def list_associations(opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#list_associations.' if logger


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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:association_type] && !%w[CERTIFICATE CERTIFICATE_AUTHORITY CA_BUNDLE].include?(opts[:association_type])
    raise 'Invalid value for "association_type", must be one of CERTIFICATE, CERTIFICATE_AUTHORITY, CA_BUNDLE.'
  end

  path = '/associations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:certificatesResourceId] = opts[:certificates_resource_id] if opts[:certificates_resource_id]
  query_params[:associatedResourceId] = opts[:associated_resource_id] if opts[:associated_resource_id]
  query_params[:associationId] = opts[:association_id] if opts[:association_id]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:associationType] = opts[:association_type] if opts[:association_type]

  # 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: 'CertificatesManagementClient#list_associations') 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::CertificatesManagement::Models::AssociationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_ca_bundles(opts = {}) ⇒ Response

Note:

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

Lists all CA bundles that match the query parameters. Optionally, you can use the parameter FilterByCaBundleIdQueryParam to limit the result set to a single item that matches the specified CA bundle.

Parameters:

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :compartment_id (String)

    A filter that returns only resources that match the given compartment OCID.

  • :lifecycle_state (String)

    A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive. Allowed values are: CREATING, ACTIVE, UPDATING, DELETING, DELETED, FAILED

  • :name (String)

    A filter that returns only resources that match the specified name.

  • :sort_by (String)

    The field to sort by. You can specify only one sort order. The default order for TIMECREATED is descending. The default order for NAME is ascending.

    Allowed values are: NAME, TIMECREATED

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

    Allowed values are: ASC, DESC

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :ca_bundle_id (String)

    The OCID of the CA bundle.

Returns:



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
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1333

def list_ca_bundles(opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#list_ca_bundles.' if logger


  if opts[:lifecycle_state] && !%w[CREATING ACTIVE UPDATING DELETING DELETED FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, UPDATING, DELETING, DELETED, FAILED.'
  end

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/caBundles'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:caBundleId] = opts[:ca_bundle_id] if opts[:ca_bundle_id]

  # 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: 'CertificatesManagementClient#list_ca_bundles') 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::CertificatesManagement::Models::CaBundleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_certificate_authorities(opts = {}) ⇒ Response

Note:

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

Lists all certificate authorities (CAs) in the specified compartment. Optionally, you can use the parameter FilterByCertificateAuthorityIdQueryParam to limit the results to a single item that matches the specified CA.

Parameters:

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :compartment_id (String)

    A filter that returns only resources that match the given compartment OCID.

  • :lifecycle_state (String)

    A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive. Allowed values are: CREATING, ACTIVE, UPDATING, DELETING, DELETED, SCHEDULING_DELETION, PENDING_DELETION, CANCELLING_DELETION, FAILED

  • :name (String)

    A filter that returns only resources that match the specified name.

  • :issuer_certificate_authority_id (String)

    The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs.

  • :certificate_authority_id (String)

    The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs.

  • :sort_by (String)

    The field to sort by. You can specify only one sort order. The default order for EXPIRATIONDATE and 'TIMECREATED' is descending. The default order for NAME is ascending.

    Allowed values are: NAME, EXPIRATIONDATE, TIMECREATED

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

    Allowed values are: ASC, DESC

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

Returns:



1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1428

def list_certificate_authorities(opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#list_certificate_authorities.' if logger


  if opts[:lifecycle_state] && !%w[CREATING ACTIVE UPDATING DELETING DELETED SCHEDULING_DELETION PENDING_DELETION CANCELLING_DELETION FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, UPDATING, DELETING, DELETED, SCHEDULING_DELETION, PENDING_DELETION, CANCELLING_DELETION, FAILED.'
  end

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/certificateAuthorities'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:issuerCertificateAuthorityId] = opts[:issuer_certificate_authority_id] if opts[:issuer_certificate_authority_id]
  query_params[:certificateAuthorityId] = opts[:certificate_authority_id] if opts[:certificate_authority_id]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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: 'CertificatesManagementClient#list_certificate_authorities') 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::CertificatesManagement::Models::CertificateAuthorityCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_certificate_authority_versions(certificate_authority_id, opts = {}) ⇒ Response

Note:

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

Lists all versions for the specified certificate authority (CA). Optionally, you can use the parameter FilterByVersionNumberQueryParam to limit the results to a single item that matches the specified version number.

Parameters:

  • certificate_authority_id (String)

    The OCID of the certificate authority (CA).

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :version_number (Integer)

    A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied. (default to 0)

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :sort_by (String)

    The field to sort by. You can specify only one sort order. The default order for 'VERSION_NUMBER' is ascending.

    Allowed values are: VERSION_NUMBER

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

    Allowed values are: ASC, DESC

Returns:



1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
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
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1519

def list_certificate_authority_versions(certificate_authority_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#list_certificate_authority_versions.' if logger

  raise "Missing the required parameter 'certificate_authority_id' when calling list_certificate_authority_versions." if certificate_authority_id.nil?

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'certificate_authority_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_authority_id)

  path = '/certificateAuthorities/{certificateAuthorityId}/versions'.sub('{certificateAuthorityId}', certificate_authority_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:versionNumber] = opts[:version_number] if opts[:version_number]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # 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: 'CertificatesManagementClient#list_certificate_authority_versions') 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::CertificatesManagement::Models::CertificateAuthorityVersionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_certificate_versions(certificate_id, opts = {}) ⇒ Response

Note:

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

Lists all certificate versions for the specified certificate. Optionally, you can use the parameter FilterByVersionNumberQueryParam to limit the result set to a single item that matches the specified version number.

Parameters:

  • certificate_id (String)

    The OCID of the certificate.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :version_number (Integer)

    A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied. (default to 0)

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :sort_by (String)

    The field to sort by. You can specify only one sort order. The default order for 'VERSION_NUMBER' is ascending.

    Allowed values are: VERSION_NUMBER

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

    Allowed values are: ASC, DESC

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
1645
1646
1647
1648
1649
1650
1651
1652
1653
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1604

def list_certificate_versions(certificate_id, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#list_certificate_versions.' if logger

  raise "Missing the required parameter 'certificate_id' when calling list_certificate_versions." if certificate_id.nil?

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id)

  path = '/certificates/{certificateId}/versions'.sub('{certificateId}', certificate_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:versionNumber] = opts[:version_number] if opts[:version_number]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # 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: 'CertificatesManagementClient#list_certificate_versions') 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::CertificatesManagement::Models::CertificateVersionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_certificates(opts = {}) ⇒ Response

Note:

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

Lists all certificates that match the query parameters. Optionally, you can use the parameter FilterByCertificateIdQueryParam to limit the result set to a single item that matches the specified certificate.

Parameters:

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :compartment_id (String)

    A filter that returns only resources that match the given compartment OCID.

  • :lifecycle_state (String)

    A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive. Allowed values are: CREATING, ACTIVE, UPDATING, DELETING, DELETED, SCHEDULING_DELETION, PENDING_DELETION, CANCELLING_DELETION, FAILED

  • :name (String)

    A filter that returns only resources that match the specified name.

  • :sort_by (String)

    The field to sort by. You can specify only one sort order. The default order for EXPIRATIONDATE and 'TIMECREATED' is descending. The default order for NAME is ascending.

    Allowed values are: NAME, EXPIRATIONDATE, TIMECREATED

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

    Allowed values are: ASC, DESC

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :issuer_certificate_authority_id (String)

    The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs.

  • :certificate_id (String)

    The OCID of the certificate. If the parameter is set to null, the service lists all certificates.

Returns:



1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1694

def list_certificates(opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#list_certificates.' if logger


  if opts[:lifecycle_state] && !%w[CREATING ACTIVE UPDATING DELETING DELETED SCHEDULING_DELETION PENDING_DELETION CANCELLING_DELETION FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, UPDATING, DELETING, DELETED, SCHEDULING_DELETION, PENDING_DELETION, CANCELLING_DELETION, FAILED.'
  end

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/certificates'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:issuerCertificateAuthorityId] = opts[:issuer_certificate_authority_id] if opts[:issuer_certificate_authority_id]
  query_params[:certificateId] = opts[:certificate_id] if opts[:certificate_id]

  # 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: 'CertificatesManagementClient#list_certificates') 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::CertificatesManagement::Models::CertificateCollection'
    )
  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/certificates_management/certificates_management_client.rb', line 94

def logger
  @api_client.config.logger
end

#revoke_certificate_authority_version(certificate_authority_id, certificate_authority_version_number, revoke_certificate_authority_version_details, opts = {}) ⇒ Response

Note:

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

Revokes a certificate authority (CA) version.

Parameters:

  • certificate_authority_id (String)

    The OCID of the certificate authority (CA).

  • certificate_authority_version_number (Integer)

    The version number of the certificate authority (CA).

  • revoke_certificate_authority_version_details (OCI::CertificatesManagement::Models::RevokeCertificateAuthorityVersionDetails)

    The details of the request to revoke a CA version.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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 that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1786

def revoke_certificate_authority_version(certificate_authority_id, certificate_authority_version_number, revoke_certificate_authority_version_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#revoke_certificate_authority_version.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}/version/{certificateAuthorityVersionNumber}/actions/revoke'.sub('{certificateAuthorityId}', certificate_authority_id.to_s).sub('{certificateAuthorityVersionNumber}', certificate_authority_version_number.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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(revoke_certificate_authority_version_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#revoke_certificate_authority_version') 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

#revoke_certificate_version(certificate_id, certificate_version_number, revoke_certificate_version_details, opts = {}) ⇒ Response

Note:

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

Revokes the specified certificate version.

Parameters:

  • certificate_id (String)

    The OCID of the certificate.

  • certificate_version_number (Integer)

    The version number of the certificate.

  • revoke_certificate_version_details (OCI::CertificatesManagement::Models::RevokeCertificateVersionDetails)

    The details of the request to revoke a certificate version.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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 that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1864

def revoke_certificate_version(certificate_id, certificate_version_number, revoke_certificate_version_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#revoke_certificate_version.' if logger

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

  path = '/certificates/{certificateId}/version/{certificateVersionNumber}/actions/revoke'.sub('{certificateId}', certificate_id.to_s).sub('{certificateVersionNumber}', certificate_version_number.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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(revoke_certificate_version_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#revoke_certificate_version') 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

#schedule_certificate_authority_deletion(certificate_authority_id, schedule_certificate_authority_deletion_details, opts = {}) ⇒ Response

Note:

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

Schedules the deletion of the specified certificate authority (CA). This sets the lifecycle state of the CA to PENDING_DELETION and then deletes it after the specified retention period ends. If needed, you can determine the status of the deletion by using GetCertificateAuthority.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 1934

def schedule_certificate_authority_deletion(certificate_authority_id, schedule_certificate_authority_deletion_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#schedule_certificate_authority_deletion.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}/actions/scheduleDeletion'.sub('{certificateAuthorityId}', certificate_authority_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(schedule_certificate_authority_deletion_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#schedule_certificate_authority_deletion') 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

#schedule_certificate_authority_version_deletion(certificate_authority_id, certificate_authority_version_number, schedule_certificate_authority_version_deletion_details, opts = {}) ⇒ Response

Note:

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

Schedules the deletion of the specified certificate authority (CA) version. This sets the lifecycle state of the CA version to PENDING_DELETION and then deletes it after the specified retention period ends. If needed, you can determine the status of the deletion by using GetCertificateAuthorityVersion.

Parameters:

  • certificate_authority_id (String)

    The OCID of the certificate authority (CA).

  • certificate_authority_version_number (Integer)

    The version number of the certificate authority (CA).

  • schedule_certificate_authority_version_deletion_details (OCI::CertificatesManagement::Models::ScheduleCertificateAuthorityVersionDeletionDetails)

    The details of the request to delete a CA version.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 2004

def schedule_certificate_authority_version_deletion(certificate_authority_id, certificate_authority_version_number, schedule_certificate_authority_version_deletion_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#schedule_certificate_authority_version_deletion.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}/version/{certificateAuthorityVersionNumber}/actions/scheduleDeletion'.sub('{certificateAuthorityId}', certificate_authority_id.to_s).sub('{certificateAuthorityVersionNumber}', certificate_authority_version_number.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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(schedule_certificate_authority_version_deletion_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#schedule_certificate_authority_version_deletion') 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

#schedule_certificate_deletion(certificate_id, schedule_certificate_deletion_details, opts = {}) ⇒ Response

Note:

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

Schedules the deletion of the specified certificate. This sets the lifecycle state of the certificate to PENDING_DELETION and then deletes it after the specified retention period ends. You can subsequently use GetCertificate to determine the current deletion status.

Parameters:

  • certificate_id (String)

    The OCID of the certificate.

  • schedule_certificate_deletion_details (OCI::CertificatesManagement::Models::ScheduleCertificateDeletionDetails)

    The details of the request to schedule a certificate deletion. This sets the lifecycle state of the certificate to PENDING_DELETION and then deletes it after the specified retention period ends. You can subsequently use GetCertificate to determine the current deletion status.

  • 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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 2078

def schedule_certificate_deletion(certificate_id, schedule_certificate_deletion_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#schedule_certificate_deletion.' if logger

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

  path = '/certificates/{certificateId}/actions/scheduleDeletion'.sub('{certificateId}', certificate_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(schedule_certificate_deletion_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#schedule_certificate_deletion') 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

#schedule_certificate_version_deletion(certificate_id, certificate_version_number, schedule_certificate_version_deletion_details, opts = {}) ⇒ Response

Note:

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

Schedules the deletion of the specified certificate version. This sets the lifecycle state of the certificate version to PENDING_DELETION and then deletes it after the specified retention period ends. You can only delete a certificate version if the certificate version rotation state is marked as DEPRECATED.

You can subsequently use GetCertificateVersion to determine the current certificate version deletion status.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 2149

def schedule_certificate_version_deletion(certificate_id, certificate_version_number, schedule_certificate_version_deletion_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#schedule_certificate_version_deletion.' if logger

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

  path = '/certificates/{certificateId}/version/{certificateVersionNumber}/actions/scheduleDeletion'.sub('{certificateId}', certificate_id.to_s).sub('{certificateVersionNumber}', certificate_version_number.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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(schedule_certificate_version_deletion_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#schedule_certificate_version_deletion') 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

#update_ca_bundle(ca_bundle_id, update_ca_bundle_details, opts = {}) ⇒ Response

Note:

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

Updates the properties of a CA bundle.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:



2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 2216

def update_ca_bundle(ca_bundle_id, update_ca_bundle_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#update_ca_bundle.' if logger

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

  path = '/caBundles/{caBundleId}'.sub('{caBundleId}', ca_bundle_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_ca_bundle_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#update_ca_bundle') 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::CertificatesManagement::Models::CaBundle'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_certificate(certificate_id, update_certificate_details, opts = {}) ⇒ Response

Note:

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

Updates the properties of a certificate.

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:



2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 2282

def update_certificate(certificate_id, update_certificate_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#update_certificate.' if logger

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

  path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_certificate_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#update_certificate') 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::CertificatesManagement::Models::Certificate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_certificate_authority(certificate_authority_id, update_certificate_authority_details, opts = {}) ⇒ Response

Note:

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

Updates the properties of the specified certificate authority (CA).

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)

    Unique Oracle-assigned identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.

  • :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.

Returns:



2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
# File 'lib/oci/certificates_management/certificates_management_client.rb', line 2348

def update_certificate_authority(certificate_authority_id, update_certificate_authority_details, opts = {})
  logger.debug 'Calling operation CertificatesManagementClient#update_certificate_authority.' if logger

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

  path = '/certificateAuthorities/{certificateAuthorityId}'.sub('{certificateAuthorityId}', certificate_authority_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_certificate_authority_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CertificatesManagementClient#update_certificate_authority') 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::CertificatesManagement::Models::CertificateAuthority'
    )
  end
  # rubocop:enable Metrics/BlockLength
end