class OCI::Artifacts::ArtifactsClient

API covering the [Registry](/iaas/Content/Registry/Concepts/registryoverview.htm) services. Use this API to manage resources such as container images and repositories.

Attributes

api_client[R]

Client used to make HTTP requests. @return [OCI::ApiClient]

endpoint[R]

Fully qualified endpoint URL @return [String]

region[R]

The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]

retry_config[R]

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 @return [OCI::Retry::RetryConfig]

Public Class Methods

new(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) click to toggle source

Creates a new ArtifactsClient. 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.

@param [Config] config A Config object. @param [String] region A region used to determine the service endpoint. This will usually

correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.

@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer 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

@param [OCI::ApiClientProxySettings] proxy_settings 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

@param [OCI::Retry::RetryConfig] retry_config 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
# File lib/oci/artifacts/artifacts_client.rb, line 54
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 + '/20160918'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "ArtifactsClient endpoint set to '#{@endpoint}'." if logger
end

Public Instance Methods

change_container_repository_compartment(repository_id, change_container_repository_compartment_details, opts = {}) click to toggle source

Moves a container repository into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

@param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container repository.

Example: `ocid1.containerrepo.oc1..exampleuniqueID`

@param [OCI::Artifacts::Models::ChangeContainerRepositoryCompartmentDetails] change_container_repository_compartment_details Change container repository compartment details. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :opc_retry_token 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).

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/change_container_repository_compartment.rb.html) to see an example of how to use change_container_repository_compartment API.

# File lib/oci/artifacts/artifacts_client.rb, line 129
def change_container_repository_compartment(repository_id, change_container_repository_compartment_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#change_container_repository_compartment.' if logger

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

  path = '/container/repositories/{repositoryId}/actions/changeCompartment'.sub('{repositoryId}', repository_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_container_repository_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#change_container_repository_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_repository_compartment(repository_id, change_repository_compartment_details, opts = {}) click to toggle source

Moves a repository into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

@param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the repository.

Example: `ocid1.artifactrepository.oc1..exampleuniqueID`

@param [OCI::Artifacts::Models::ChangeRepositoryCompartmentDetails] change_repository_compartment_details Moves a repository into a different compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :opc_retry_token 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).

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/change_repository_compartment.rb.html) to see an example of how to use change_repository_compartment API.

# File lib/oci/artifacts/artifacts_client.rb, line 205
def change_repository_compartment(repository_id, change_repository_compartment_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#change_repository_compartment.' if logger

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

  path = '/repositories/{repositoryId}/actions/changeCompartment'.sub('{repositoryId}', repository_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_repository_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#change_repository_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_container_image_signature(create_container_image_signature_details, opts = {}) click to toggle source

Upload a signature to an image. @param [OCI::Artifacts::Models::CreateContainerImageSignatureDetails] create_container_image_signature_details Upload container image signature details @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :opc_retry_token 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).

@option opts [String] :if_match 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.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerImageSignature ContainerImageSignature} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/create_container_image_signature.rb.html) to see an example of how to use create_container_image_signature API.

# File lib/oci/artifacts/artifacts_client.rb, line 274
def create_container_image_signature(create_container_image_signature_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#create_container_image_signature.' if logger

  raise "Missing the required parameter 'create_container_image_signature_details' when calling create_container_image_signature." if create_container_image_signature_details.nil?

  path = '/container/imageSignatures'
  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(create_container_image_signature_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#create_container_image_signature') 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::Artifacts::Models::ContainerImageSignature'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_container_repository(create_container_repository_details, opts = {}) click to toggle source

Create a new empty container repository. Avoid entering confidential information. @param [OCI::Artifacts::Models::CreateContainerRepositoryDetails] create_container_repository_details Create container repository details. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :opc_retry_token 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).

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerRepository ContainerRepository} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/create_container_repository.rb.html) to see an example of how to use create_container_repository API.

# File lib/oci/artifacts/artifacts_client.rb, line 338
def create_container_repository(create_container_repository_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#create_container_repository.' if logger

  raise "Missing the required parameter 'create_container_repository_details' when calling create_container_repository." if create_container_repository_details.nil?

  path = '/container/repositories'
  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_container_repository_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#create_container_repository') 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::Artifacts::Models::ContainerRepository'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_repository(create_repository_details, opts = {}) click to toggle source

Creates a new repository for storing artifacts. @param [OCI::Artifacts::Models::CreateRepositoryDetails] create_repository_details Creates a new repository for storing artifacts. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :opc_retry_token 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).

@return [Response] A Response object with data of type {OCI::Artifacts::Models::Repository Repository} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/create_repository.rb.html) to see an example of how to use create_repository API.

# File lib/oci/artifacts/artifacts_client.rb, line 401
def create_repository(create_repository_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#create_repository.' if logger

  raise "Missing the required parameter 'create_repository_details' when calling create_repository." if create_repository_details.nil?

  path = '/repositories'
  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_repository_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#create_repository') 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::Artifacts::Models::Repository'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_container_image(image_id, opts = {}) click to toggle source

Delete a container image. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container image.

Example: `ocid1.containerimage.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/delete_container_image.rb.html) to see an example of how to use delete_container_image API.

# File lib/oci/artifacts/artifacts_client.rb, line 465
def delete_container_image(image_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#delete_container_image.' if logger

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

  path = '/container/images/{imageId}'.sub('{imageId}', image_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#delete_container_image') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_container_image_signature(image_signature_id, opts = {}) click to toggle source

Delete a container image signature. @param [String] image_signature_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container image signature.

Example: `ocid1.containersignature.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :if_match 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/delete_container_image_signature.rb.html) to see an example of how to use delete_container_image_signature API.

# File lib/oci/artifacts/artifacts_client.rb, line 528
def delete_container_image_signature(image_signature_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#delete_container_image_signature.' if logger

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

  path = '/container/imageSignatures/{imageSignatureId}'.sub('{imageSignatureId}', image_signature_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: 'ArtifactsClient#delete_container_image_signature') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_container_repository(repository_id, opts = {}) click to toggle source

Delete container repository. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container repository.

Example: `ocid1.containerrepo.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/delete_container_repository.rb.html) to see an example of how to use delete_container_repository API.

# File lib/oci/artifacts/artifacts_client.rb, line 591
def delete_container_repository(repository_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#delete_container_repository.' if logger

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

  path = '/container/repositories/{repositoryId}'.sub('{repositoryId}', repository_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#delete_container_repository') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_generic_artifact(artifact_id, opts = {}) click to toggle source

Deletes an artifact with a specified [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). @param [String] artifact_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the artifact.

Example: `ocid1.genericartifact.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/delete_generic_artifact.rb.html) to see an example of how to use delete_generic_artifact API.

# File lib/oci/artifacts/artifacts_client.rb, line 654
def delete_generic_artifact(artifact_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#delete_generic_artifact.' if logger

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

  path = '/generic/artifacts/{artifactId}'.sub('{artifactId}', artifact_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#delete_generic_artifact') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_generic_artifact_by_path(repository_id, artifact_path, version, opts = {}) click to toggle source

Deletes an artifact with a specified `artifactPath` and `version`. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the repository.

Example: `ocid1.artifactrepository.oc1..exampleuniqueID`

@param [String] artifact_path A user-defined path to describe the location of an artifact. You can use slashes to organize the repository, but slashes do not create a directory structure. An artifact path does not include an artifact version.

Example: `project01/my-web-app/artifact-abc`

@param [String] version A user-defined string to describe the artifact version.

Example: `1.1.2` or `1.2-beta-2`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/delete_generic_artifact_by_path.rb.html) to see an example of how to use delete_generic_artifact_by_path API.

# File lib/oci/artifacts/artifacts_client.rb, line 725
def delete_generic_artifact_by_path(repository_id, artifact_path, version, opts = {})
  logger.debug 'Calling operation ArtifactsClient#delete_generic_artifact_by_path.' if logger

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

  path = '/generic/repositories/{repositoryId}/artifactPaths/{artifactPath}/versions/{version}'.sub('{repositoryId}', repository_id.to_s).sub('{artifactPath}', artifact_path.to_s).sub('{version}', version.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#delete_generic_artifact_by_path') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_repository(repository_id, opts = {}) click to toggle source

Deletes the specified repository. This operation fails unless all associated artifacts are in a DELETED state. You must delete all associated artifacts before deleting a repository. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the repository.

Example: `ocid1.artifactrepository.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/delete_repository.rb.html) to see an example of how to use delete_repository API.

# File lib/oci/artifacts/artifacts_client.rb, line 792
def delete_repository(repository_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#delete_repository.' if logger

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

  path = '/repositories/{repositoryId}'.sub('{repositoryId}', repository_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#delete_repository') 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_container_configuration(compartment_id, opts = {}) click to toggle source

Get container configuration. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerConfiguration ContainerConfiguration} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/get_container_configuration.rb.html) to see an example of how to use get_container_configuration API.

# File lib/oci/artifacts/artifacts_client.rb, line 848
def get_container_configuration(compartment_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#get_container_configuration.' if logger

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

  path = '/container/configuration'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_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: 'ArtifactsClient#get_container_configuration') 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::Artifacts::Models::ContainerConfiguration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_container_image(image_id, opts = {}) click to toggle source

Get container image metadata. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container image.

Example: `ocid1.containerimage.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerImage ContainerImage} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/get_container_image.rb.html) to see an example of how to use get_container_image API.

# File lib/oci/artifacts/artifacts_client.rb, line 907
def get_container_image(image_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#get_container_image.' if logger

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

  path = '/container/images/{imageId}'.sub('{imageId}', image_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: 'ArtifactsClient#get_container_image') 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::Artifacts::Models::ContainerImage'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_container_image_signature(image_signature_id, opts = {}) click to toggle source

Get container image signature metadata. @param [String] image_signature_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container image signature.

Example: `ocid1.containersignature.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerImageSignature ContainerImageSignature} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/get_container_image_signature.rb.html) to see an example of how to use get_container_image_signature API.

# File lib/oci/artifacts/artifacts_client.rb, line 966
def get_container_image_signature(image_signature_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#get_container_image_signature.' if logger

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

  path = '/container/imageSignatures/{imageSignatureId}'.sub('{imageSignatureId}', image_signature_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: 'ArtifactsClient#get_container_image_signature') 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::Artifacts::Models::ContainerImageSignature'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_container_repository(repository_id, opts = {}) click to toggle source

Get container repository. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container repository.

Example: `ocid1.containerrepo.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerRepository ContainerRepository} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/get_container_repository.rb.html) to see an example of how to use get_container_repository API.

# File lib/oci/artifacts/artifacts_client.rb, line 1025
def get_container_repository(repository_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#get_container_repository.' if logger

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

  path = '/container/repositories/{repositoryId}'.sub('{repositoryId}', repository_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: 'ArtifactsClient#get_container_repository') 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::Artifacts::Models::ContainerRepository'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_generic_artifact(artifact_id, opts = {}) click to toggle source

Gets information about an artifact with a specified [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). @param [String] artifact_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the artifact.

Example: `ocid1.genericartifact.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::GenericArtifact GenericArtifact} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/get_generic_artifact.rb.html) to see an example of how to use get_generic_artifact API.

# File lib/oci/artifacts/artifacts_client.rb, line 1084
def get_generic_artifact(artifact_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#get_generic_artifact.' if logger

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

  path = '/generic/artifacts/{artifactId}'.sub('{artifactId}', artifact_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: 'ArtifactsClient#get_generic_artifact') 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::Artifacts::Models::GenericArtifact'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_generic_artifact_by_path(repository_id, artifact_path, version, opts = {}) click to toggle source

Gets information about an artifact with a specified `artifactPath` and `version`. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the repository.

Example: `ocid1.artifactrepository.oc1..exampleuniqueID`

@param [String] artifact_path A user-defined path to describe the location of an artifact. You can use slashes to organize the repository, but slashes do not create a directory structure. An artifact path does not include an artifact version.

Example: `project01/my-web-app/artifact-abc`

@param [String] version A user-defined string to describe the artifact version.

Example: `1.1.2` or `1.2-beta-2`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::GenericArtifact GenericArtifact} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/get_generic_artifact_by_path.rb.html) to see an example of how to use get_generic_artifact_by_path API.

# File lib/oci/artifacts/artifacts_client.rb, line 1151
def get_generic_artifact_by_path(repository_id, artifact_path, version, opts = {})
  logger.debug 'Calling operation ArtifactsClient#get_generic_artifact_by_path.' if logger

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

  path = '/generic/repositories/{repositoryId}/artifactPaths/{artifactPath}/versions/{version}'.sub('{repositoryId}', repository_id.to_s).sub('{artifactPath}', artifact_path.to_s).sub('{version}', version.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: 'ArtifactsClient#get_generic_artifact_by_path') 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::Artifacts::Models::GenericArtifact'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_repository(repository_id, opts = {}) click to toggle source

Gets the specified repository's information. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the repository.

Example: `ocid1.artifactrepository.oc1..exampleuniqueID`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::Repository Repository} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/get_repository.rb.html) to see an example of how to use get_repository API.

# File lib/oci/artifacts/artifacts_client.rb, line 1214
def get_repository(repository_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#get_repository.' if logger

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

  path = '/repositories/{repositoryId}'.sub('{repositoryId}', repository_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: 'ArtifactsClient#get_repository') 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::Artifacts::Models::Repository'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_container_image_signatures(compartment_id, opts = {}) click to toggle source

List container image signatures in an image. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [BOOLEAN] :compartment_id_in_subtree When set to true, the hierarchy of compartments is traversed

and all compartments and subcompartments in the tenancy are
inspected depending on the the setting of `accessLevel`.
Default is false. Can only be set to true when calling the API
on the tenancy (root compartment).

@option opts [String] :image_id A filter to return a container image summary only for the specified container image OCID.

@option opts [String] :repository_id A filter to return container images only for the specified container repository OCID.

@option opts [String] :repository_name A filter to return container images or container image signatures that match the repository name.

Example: `foo` or `foo*`

@option opts [String] :image_digest The digest of the container image.

Example: `sha256:e7d38b3517548a1c71e41bffe9c8ae6d6d29546ce46bf62159837aad072c90aa`

@option opts [String] :display_name A filter to return only resources that match the given display name exactly.

@option opts [String] :kms_key_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the kmsKeyVersionId used to sign the container image.

Example: `ocid1.keyversion.oc1..exampleuniqueID`

@option opts [String] :kms_key_version_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the kmsKeyVersionId used to sign the container image.

Example: `ocid1.keyversion.oc1..exampleuniqueID`

@option opts [String] :signing_algorithm The algorithm to be used for signing. These are the only supported signing algorithms for container images.

Allowed values are: SHA_224_RSA_PKCS_PSS, SHA_256_RSA_PKCS_PSS, SHA_384_RSA_PKCS_PSS, SHA_512_RSA_PKCS_PSS

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for

TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
sort order is case sensitive.

**Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
optionally filter by availability domain if the scope of the resource type is within a
single availability domain. If you call one of these \"List\" operations without specifying
an availability domain, the resources are grouped by availability domain, then sorted.

Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order

is case sensitive.

Allowed values are: ASC, DESC

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerImageSignatureCollection ContainerImageSignatureCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/list_container_image_signatures.rb.html) to see an example of how to use list_container_image_signatures API.

# File lib/oci/artifacts/artifacts_client.rb, line 1324
def list_container_image_signatures(compartment_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#list_container_image_signatures.' if logger

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

  if opts[:signing_algorithm] && !%w[SHA_224_RSA_PKCS_PSS SHA_256_RSA_PKCS_PSS SHA_384_RSA_PKCS_PSS SHA_512_RSA_PKCS_PSS].include?(opts[:signing_algorithm])
    raise 'Invalid value for "signing_algorithm", must be one of SHA_224_RSA_PKCS_PSS, SHA_256_RSA_PKCS_PSS, SHA_384_RSA_PKCS_PSS, SHA_512_RSA_PKCS_PSS.'
  end

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  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 = '/container/imageSignatures'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:imageId] = opts[:image_id] if opts[:image_id]
  query_params[:repositoryId] = opts[:repository_id] if opts[:repository_id]
  query_params[:repositoryName] = opts[:repository_name] if opts[:repository_name]
  query_params[:imageDigest] = opts[:image_digest] if opts[:image_digest]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:kmsKeyId] = opts[:kms_key_id] if opts[:kms_key_id]
  query_params[:kmsKeyVersionId] = opts[:kms_key_version_id] if opts[:kms_key_version_id]
  query_params[:signingAlgorithm] = opts[:signing_algorithm] if opts[:signing_algorithm]
  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: 'ArtifactsClient#list_container_image_signatures') 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::Artifacts::Models::ContainerImageSignatureCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_container_images(compartment_id, opts = {}) click to toggle source

List container images in a compartment. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [BOOLEAN] :compartment_id_in_subtree When set to true, the hierarchy of compartments is traversed

and all compartments and subcompartments in the tenancy are
inspected depending on the the setting of `accessLevel`.
Default is false. Can only be set to true when calling the API
on the tenancy (root compartment).

@option opts [String] :display_name A filter to return only resources that match the given display name exactly.

@option opts [String] :image_id A filter to return a container image summary only for the specified container image OCID.

@option opts [BOOLEAN] :is_versioned A filter to return container images based on whether there are any associated versions.

@option opts [String] :repository_id A filter to return container images only for the specified container repository OCID.

@option opts [String] :repository_name A filter to return container images or container image signatures that match the repository name.

Example: `foo` or `foo*`

@option opts [String] :version A filter to return container images that match the version.

Example: `foo` or `foo*`

@option opts [String] :lifecycle_state A filter to return only resources that match the given lifecycle state name exactly.

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for

TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
sort order is case sensitive.

**Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
optionally filter by availability domain if the scope of the resource type is within a
single availability domain. If you call one of these \"List\" operations without specifying
an availability domain, the resources are grouped by availability domain, then sorted.

Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order

is case sensitive.

Allowed values are: ASC, DESC

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerImageCollection ContainerImageCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/list_container_images.rb.html) to see an example of how to use list_container_images API.

# File lib/oci/artifacts/artifacts_client.rb, line 1453
def list_container_images(compartment_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#list_container_images.' if logger

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

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  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 = '/container/images'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:imageId] = opts[:image_id] if opts[:image_id]
  query_params[:isVersioned] = opts[:is_versioned] if !opts[:is_versioned].nil?
  query_params[:repositoryId] = opts[:repository_id] if opts[:repository_id]
  query_params[:repositoryName] = opts[:repository_name] if opts[:repository_name]
  query_params[:version] = opts[:version] if opts[:version]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  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: 'ArtifactsClient#list_container_images') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Artifacts::Models::ContainerImageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_container_repositories(compartment_id, opts = {}) click to toggle source

List container repositories in a compartment. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [BOOLEAN] :compartment_id_in_subtree When set to true, the hierarchy of compartments is traversed

and all compartments and subcompartments in the tenancy are
inspected depending on the the setting of `accessLevel`.
Default is false. Can only be set to true when calling the API
on the tenancy (root compartment).

@option opts [String] :repository_id A filter to return container images only for the specified container repository OCID.

@option opts [String] :display_name A filter to return only resources that match the given display name exactly.

@option opts [BOOLEAN] :is_public A filter to return resources that match the isPublic value.

@option opts [String] :lifecycle_state A filter to return only resources that match the given lifecycle state name exactly.

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for

TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
sort order is case sensitive.

**Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
optionally filter by availability domain if the scope of the resource type is within a
single availability domain. If you call one of these \"List\" operations without specifying
an availability domain, the resources are grouped by availability domain, then sorted.

Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order

is case sensitive.

Allowed values are: ASC, DESC

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerRepositoryCollection ContainerRepositoryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/list_container_repositories.rb.html) to see an example of how to use list_container_repositories API.

# File lib/oci/artifacts/artifacts_client.rb, line 1567
def list_container_repositories(compartment_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#list_container_repositories.' if logger

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

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  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 = '/container/repositories'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:repositoryId] = opts[:repository_id] if opts[:repository_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:isPublic] = opts[:is_public] if !opts[:is_public].nil?
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  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: 'ArtifactsClient#list_container_repositories') 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::Artifacts::Models::ContainerRepositoryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_generic_artifacts(compartment_id, repository_id, opts = {}) click to toggle source

Lists artifacts in the specified repository. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. @param [String] repository_id A filter to return the artifacts only for the specified repository OCID.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :id A filter to return the resources for the specified OCID.

@option opts [String] :display_name A filter to return only resources that match the given display name exactly.

@option opts [String] :artifact_path Filter results by a prefix for the `artifactPath` and and return artifacts that begin with the specified prefix in their path.

@option opts [String] :version Filter results by a prefix for `version` and return artifacts that that begin with the specified prefix in their version.

@option opts [String] :sha256 Filter results by a specified SHA256 digest for the artifact.

@option opts [String] :lifecycle_state A filter to return only resources that match the given lifecycle state name exactly.

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for

TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
sort order is case sensitive.

**Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
optionally filter by availability domain if the scope of the resource type is within a
single availability domain. If you call one of these \"List\" operations without specifying
an availability domain, the resources are grouped by availability domain, then sorted.

Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order

is case sensitive.

Allowed values are: ASC, DESC

@return [Response] A Response object with data of type {OCI::Artifacts::Models::GenericArtifactCollection GenericArtifactCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/list_generic_artifacts.rb.html) to see an example of how to use list_generic_artifacts API.

# File lib/oci/artifacts/artifacts_client.rb, line 1678
def list_generic_artifacts(compartment_id, repository_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#list_generic_artifacts.' if logger

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

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  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 = '/generic/artifacts'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:repositoryId] = repository_id
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:artifactPath] = opts[:artifact_path] if opts[:artifact_path]
  query_params[:version] = opts[:version] if opts[:version]
  query_params[:sha256] = opts[:sha256] if opts[:sha256]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  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: 'ArtifactsClient#list_generic_artifacts') 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::Artifacts::Models::GenericArtifactCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_repositories(compartment_id, opts = {}) click to toggle source

Lists repositories in the specified compartment. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :id A filter to return the resources for the specified OCID.

@option opts [String] :display_name A filter to return only resources that match the given display name exactly.

@option opts [BOOLEAN] :is_immutable A filter to return resources that match the isImmutable value.

@option opts [String] :lifecycle_state A filter to return only resources that match the given lifecycle state name exactly.

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for

TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
sort order is case sensitive.

**Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
optionally filter by availability domain if the scope of the resource type is within a
single availability domain. If you call one of these \"List\" operations without specifying
an availability domain, the resources are grouped by availability domain, then sorted.

Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order

is case sensitive.

Allowed values are: ASC, DESC

@return [Response] A Response object with data of type {OCI::Artifacts::Models::RepositoryCollection RepositoryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/list_repositories.rb.html) to see an example of how to use list_repositories API.

# File lib/oci/artifacts/artifacts_client.rb, line 1786
def list_repositories(compartment_id, opts = {})
  logger.debug 'Calling operation ArtifactsClient#list_repositories.' if logger

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

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  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 = '/repositories'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:isImmutable] = opts[:is_immutable] if !opts[:is_immutable].nil?
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  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: 'ArtifactsClient#list_repositories') 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::Artifacts::Models::RepositoryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
logger() click to toggle source

@return [Logger] The logger for this client. May be nil.

# File lib/oci/artifacts/artifacts_client.rb, line 93
def logger
  @api_client.config.logger
end
region=(new_region) click to toggle source

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

# File lib/oci/artifacts/artifacts_client.rb, line 83
def region=(new_region)
  @region = new_region

  raise 'A region must be specified.' unless @region

  @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://artifacts.{region}.oci.{secondLevelDomain}') + '/20160918'
  logger.info "ArtifactsClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
remove_container_version(image_id, remove_container_version_details, opts = {}) click to toggle source

Remove version from container image. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container image.

Example: `ocid1.containerimage.oc1..exampleuniqueID`

@param [OCI::Artifacts::Models::RemoveContainerVersionDetails] remove_container_version_details Remove version details. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :opc_retry_token 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).

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerImage ContainerImage} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/remove_container_version.rb.html) to see an example of how to use remove_container_version API.

# File lib/oci/artifacts/artifacts_client.rb, line 1872
def remove_container_version(image_id, remove_container_version_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#remove_container_version.' if logger

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

  path = '/container/images/{imageId}/actions/removeVersion'.sub('{imageId}', image_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(remove_container_version_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#remove_container_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,
      return_type: 'OCI::Artifacts::Models::ContainerImage'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
restore_container_image(image_id, restore_container_image_details, opts = {}) click to toggle source

Restore a container image. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container image.

Example: `ocid1.containerimage.oc1..exampleuniqueID`

@param [OCI::Artifacts::Models::RestoreContainerImageDetails] restore_container_image_details Restore container image details. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :opc_retry_token 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).

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerImage ContainerImage} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/restore_container_image.rb.html) to see an example of how to use restore_container_image API.

# File lib/oci/artifacts/artifacts_client.rb, line 1946
def restore_container_image(image_id, restore_container_image_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#restore_container_image.' if logger

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

  path = '/container/images/{imageId}/actions/restore'.sub('{imageId}', image_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(restore_container_image_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#restore_container_image') 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::Artifacts::Models::ContainerImage'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_container_configuration(compartment_id, update_container_configuration_details, opts = {}) click to toggle source

Update container configuration. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. @param [OCI::Artifacts::Models::UpdateContainerConfigurationDetails] update_container_configuration_details Update container configuration details. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerConfiguration ContainerConfiguration} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/update_container_configuration.rb.html) to see an example of how to use update_container_configuration API.

# File lib/oci/artifacts/artifacts_client.rb, line 2011
def update_container_configuration(compartment_id, update_container_configuration_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#update_container_configuration.' if logger

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

  path = '/container/configuration'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id

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

  post_body = @api_client.object_to_http_body(update_container_configuration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#update_container_configuration') 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::Artifacts::Models::ContainerConfiguration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_container_repository(repository_id, update_container_repository_details, opts = {}) click to toggle source

Modify the properties of a container repository. Avoid entering confidential information. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container repository.

Example: `ocid1.containerrepo.oc1..exampleuniqueID`

@param [OCI::Artifacts::Models::UpdateContainerRepositoryDetails] update_container_repository_details Update container repository details. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::ContainerRepository ContainerRepository} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/update_container_repository.rb.html) to see an example of how to use update_container_repository API.

# File lib/oci/artifacts/artifacts_client.rb, line 2077
def update_container_repository(repository_id, update_container_repository_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#update_container_repository.' if logger

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

  path = '/container/repositories/{repositoryId}'.sub('{repositoryId}', repository_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_container_repository_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#update_container_repository') 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::Artifacts::Models::ContainerRepository'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_generic_artifact(artifact_id, update_generic_artifact_details, opts = {}) click to toggle source

Updates the artifact with the specified [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). You can only update the tags of an artifact. @param [String] artifact_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the artifact.

Example: `ocid1.genericartifact.oc1..exampleuniqueID`

@param [OCI::Artifacts::Models::UpdateGenericArtifactDetails] update_generic_artifact_details Updates the artifact with the specified [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). You can only update the tags of an artifact. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::GenericArtifact GenericArtifact} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/update_generic_artifact.rb.html) to see an example of how to use update_generic_artifact API.

# File lib/oci/artifacts/artifacts_client.rb, line 2143
def update_generic_artifact(artifact_id, update_generic_artifact_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#update_generic_artifact.' if logger

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

  path = '/generic/artifacts/{artifactId}'.sub('{artifactId}', artifact_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_generic_artifact_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#update_generic_artifact') 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::Artifacts::Models::GenericArtifact'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_generic_artifact_by_path(repository_id, artifact_path, version, update_generic_artifact_by_path_details, opts = {}) click to toggle source

Updates an artifact with a specified `artifactPath` and `version`. You can only update the tags of an artifact. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the repository.

Example: `ocid1.artifactrepository.oc1..exampleuniqueID`

@param [String] artifact_path A user-defined path to describe the location of an artifact. You can use slashes to organize the repository, but slashes do not create a directory structure. An artifact path does not include an artifact version.

Example: `project01/my-web-app/artifact-abc`

@param [String] version A user-defined string to describe the artifact version.

Example: `1.1.2` or `1.2-beta-2`

@param [OCI::Artifacts::Models::UpdateGenericArtifactByPathDetails] update_generic_artifact_by_path_details Updates an artifact with a specified `artifactPath` and `version`. You can only update the tags of an artifact. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::GenericArtifact GenericArtifact} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/update_generic_artifact_by_path.rb.html) to see an example of how to use update_generic_artifact_by_path API.

# File lib/oci/artifacts/artifacts_client.rb, line 2217
def update_generic_artifact_by_path(repository_id, artifact_path, version, update_generic_artifact_by_path_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#update_generic_artifact_by_path.' if logger

  raise "Missing the required parameter 'repository_id' when calling update_generic_artifact_by_path." if repository_id.nil?
  raise "Missing the required parameter 'artifact_path' when calling update_generic_artifact_by_path." if artifact_path.nil?
  raise "Missing the required parameter 'version' when calling update_generic_artifact_by_path." if version.nil?
  raise "Missing the required parameter 'update_generic_artifact_by_path_details' when calling update_generic_artifact_by_path." if update_generic_artifact_by_path_details.nil?
  raise "Parameter value for 'repository_id' must not be blank" if OCI::Internal::Util.blank_string?(repository_id)
  raise "Parameter value for 'artifact_path' must not be blank" if OCI::Internal::Util.blank_string?(artifact_path)
  raise "Parameter value for 'version' must not be blank" if OCI::Internal::Util.blank_string?(version)

  path = '/generic/repositories/{repositoryId}/artifactPaths/{artifactPath}/versions/{version}'.sub('{repositoryId}', repository_id.to_s).sub('{artifactPath}', artifact_path.to_s).sub('{version}', version.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_generic_artifact_by_path_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#update_generic_artifact_by_path') 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::Artifacts::Models::GenericArtifact'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_repository(repository_id, update_repository_details, opts = {}) click to toggle source

Updates the properties of a repository. You can update the `displayName` and `description` properties. @param [String] repository_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the repository.

Example: `ocid1.artifactrepository.oc1..exampleuniqueID`

@param [OCI::Artifacts::Models::UpdateRepositoryDetails] update_repository_details Updates the properties of a repository. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::Artifacts::Models::Repository Repository} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/artifacts/update_repository.rb.html) to see an example of how to use update_repository API.

# File lib/oci/artifacts/artifacts_client.rb, line 2287
def update_repository(repository_id, update_repository_details, opts = {})
  logger.debug 'Calling operation ArtifactsClient#update_repository.' if logger

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

  path = '/repositories/{repositoryId}'.sub('{repositoryId}', repository_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_repository_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ArtifactsClient#update_repository') 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::Artifacts::Models::Repository'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

Private Instance Methods

applicable_retry_config(opts = {}) click to toggle source

rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines

# File lib/oci/artifacts/artifacts_client.rb, line 2332
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end