Class: OCI::Artifacts::ArtifactsClient
- Inherits:
-
Object
- Object
- OCI::Artifacts::ArtifactsClient
- Defined in:
- lib/oci/artifacts/artifacts_client.rb
Overview
API covering the Artifacts and Registry services. Use this API to manage resources such as generic artifacts and container images.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#change_container_repository_compartment(repository_id, change_container_repository_compartment_details, opts = {}) ⇒ Response
Moves a container repository into a different compartment within the same tenancy.
-
#change_repository_compartment(repository_id, change_repository_compartment_details, opts = {}) ⇒ Response
Moves a repository into a different compartment within the same tenancy.
-
#create_container_image_signature(create_container_image_signature_details, opts = {}) ⇒ Response
Upload a signature to an image.
-
#create_container_repository(create_container_repository_details, opts = {}) ⇒ Response
Create a new empty container repository.
-
#create_repository(create_repository_details, opts = {}) ⇒ Response
Creates a new repository for storing artifacts.
-
#delete_container_image(image_id, opts = {}) ⇒ Response
Delete a container image.
-
#delete_container_image_signature(image_signature_id, opts = {}) ⇒ Response
Delete a container image signature.
-
#delete_container_repository(repository_id, opts = {}) ⇒ Response
Delete container repository.
-
#delete_generic_artifact(artifact_id, opts = {}) ⇒ Response
Deletes an artifact with a specified OCID.
-
#delete_generic_artifact_by_path(repository_id, artifact_path, version, opts = {}) ⇒ Response
Deletes an artifact with a specified
artifactPath
andversion
. -
#delete_repository(repository_id, opts = {}) ⇒ Response
Deletes the specified repository.
-
#get_container_configuration(compartment_id, opts = {}) ⇒ Response
Get container configuration.
-
#get_container_image(image_id, opts = {}) ⇒ Response
Get container image metadata.
-
#get_container_image_signature(image_signature_id, opts = {}) ⇒ Response
Get container image signature metadata.
-
#get_container_repository(repository_id, opts = {}) ⇒ Response
Get container repository.
-
#get_generic_artifact(artifact_id, opts = {}) ⇒ Response
Gets information about an artifact with a specified OCID.
-
#get_generic_artifact_by_path(repository_id, artifact_path, version, opts = {}) ⇒ Response
Gets information about an artifact with a specified
artifactPath
andversion
. -
#get_repository(repository_id, opts = {}) ⇒ Response
Gets the specified repository's information.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ArtifactsClient
constructor
Creates a new ArtifactsClient.
-
#list_container_image_signatures(compartment_id, opts = {}) ⇒ Response
List container image signatures in an image.
-
#list_container_images(compartment_id, opts = {}) ⇒ Response
List container images in a compartment.
-
#list_container_repositories(compartment_id, opts = {}) ⇒ Response
List container repositories in a compartment.
-
#list_generic_artifacts(compartment_id, repository_id, opts = {}) ⇒ Response
Lists artifacts in the specified repository.
-
#list_repositories(compartment_id, opts = {}) ⇒ Response
Lists repositories in the specified compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#remove_container_version(image_id, remove_container_version_details, opts = {}) ⇒ Response
Remove version from container image.
-
#restore_container_image(image_id, restore_container_image_details, opts = {}) ⇒ Response
Restore a container image.
-
#update_container_configuration(compartment_id, update_container_configuration_details, opts = {}) ⇒ Response
Update container configuration.
-
#update_container_image(image_id, update_container_image_details, opts = {}) ⇒ Response
Modify the properties of a container image.
-
#update_container_image_signature(image_signature_id, update_container_image_signature_details, opts = {}) ⇒ Response
Modify the properties of a container image signature.
-
#update_container_repository(repository_id, update_container_repository_details, opts = {}) ⇒ Response
Modify the properties of a container repository.
-
#update_generic_artifact(artifact_id, update_generic_artifact_details, opts = {}) ⇒ Response
Updates the artifact with the specified OCID.
-
#update_generic_artifact_by_path(repository_id, artifact_path, version, update_generic_artifact_by_path_details, opts = {}) ⇒ Response
Updates an artifact with a specified
artifactPath
andversion
. -
#update_repository(repository_id, update_repository_details, opts = {}) ⇒ Response
Updates the properties of a repository.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ArtifactsClient
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.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 56 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 |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
16 17 18 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 16 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
20 21 22 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 20 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
30 31 32 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 30 def region @region end |
#retry_config ⇒ OCI::Retry::RetryConfig (readonly)
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil
, which means that an operation will not perform any retries
26 27 28 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 26 def retry_config @retry_config end |
Instance Method Details
#change_container_repository_compartment(repository_id, change_container_repository_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_container_repository_compartment API.
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.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 131 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.(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 = {}) ⇒ Response
Click here to see an example of how to use change_repository_compartment API.
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.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 207 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.(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 = {}) ⇒ Response
Click here to see an example of how to use create_container_image_signature API.
Upload a signature to an image.
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 276 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.(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 = {}) ⇒ Response
Click here to see an example of how to use create_container_repository API.
Create a new empty container repository. Avoid entering confidential information.
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 340 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.(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 = {}) ⇒ Response
Click here to see an example of how to use create_repository API.
Creates a new repository for storing artifacts.
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 403 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.(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 = {}) ⇒ Response
Click here to see an example of how to use delete_container_image API.
Delete a container image.
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 467 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.(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 = {}) ⇒ Response
Click here to see an example of how to use delete_container_image_signature API.
Delete a container image signature.
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 530 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.(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 = {}) ⇒ Response
Click here to see an example of how to use delete_container_repository API.
Delete container repository.
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 593 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.(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 = {}) ⇒ Response
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 656 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.(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 = {}) ⇒ Response
Click here to see an example of how to use delete_generic_artifact_by_path API.
Deletes an artifact with a specified artifactPath
and version
.
727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 727 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.(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 = {}) ⇒ Response
Click here to see an example of how to use delete_repository API.
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.
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 794 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.(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 = {}) ⇒ Response
Click here to see an example of how to use get_container_configuration API.
Get container configuration.
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 850 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.(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 = {}) ⇒ Response
Click here to see an example of how to use get_container_image API.
Get container image metadata.
909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 909 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.(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 = {}) ⇒ Response
Click here to see an example of how to use get_container_image_signature API.
Get container image signature metadata.
968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 968 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.(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 = {}) ⇒ Response
Click here to see an example of how to use get_container_repository API.
Get container repository.
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1027 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.(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 = {}) ⇒ Response
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1086 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.(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 = {}) ⇒ Response
Click here to see an example of how to use get_generic_artifact_by_path API.
Gets information about an artifact with a specified artifactPath
and version
.
1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1153 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.(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 = {}) ⇒ Response
Click here to see an example of how to use get_repository API.
Gets the specified repository's information.
1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1216 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.(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 = {}) ⇒ Response
Click here to see an example of how to use list_container_image_signatures API.
List container image signatures in an image.
1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1326 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.(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 = {}) ⇒ Response
Click here to see an example of how to use list_container_images API.
List container images in a compartment.
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1455 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.(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 = {}) ⇒ Response
Click here to see an example of how to use list_container_repositories API.
List container repositories in a compartment.
1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1569 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.(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 = {}) ⇒ Response
Click here to see an example of how to use list_generic_artifacts API.
Lists artifacts in the specified repository.
1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1680 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.(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 = {}) ⇒ Response
Click here to see an example of how to use list_repositories API.
Lists repositories in the specified compartment.
1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1788 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.(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 ⇒ Logger
Returns The logger for this client. May be nil.
95 96 97 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 95 def logger @api_client.config.logger end |
#remove_container_version(image_id, remove_container_version_details, opts = {}) ⇒ Response
Click here to see an example of how to use remove_container_version API.
Remove version from container image.
1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1874 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.(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 = {}) ⇒ Response
Click here to see an example of how to use restore_container_image API.
Restore a container image.
1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 1948 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.(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 = {}) ⇒ Response
Click here to see an example of how to use update_container_configuration API.
Update container configuration.
2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 2013 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.(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_image(image_id, update_container_image_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_container_image API.
Modify the properties of a container image. Avoid entering confidential information.
2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 2079 def update_container_image(image_id, update_container_image_details, opts = {}) logger.debug 'Calling operation ArtifactsClient#update_container_image.' if logger raise "Missing the required parameter 'image_id' when calling update_container_image." if image_id.nil? raise "Missing the required parameter 'update_container_image_details' when calling update_container_image." if update_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}'.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 = @api_client.object_to_http_body(update_container_image_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ArtifactsClient#update_container_image') 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::ContainerImage' ) end # rubocop:enable Metrics/BlockLength end |
#update_container_image_signature(image_signature_id, update_container_image_signature_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_container_image_signature API.
Modify the properties of a container image signature. Avoid entering confidential information.
2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 2145 def update_container_image_signature(image_signature_id, update_container_image_signature_details, opts = {}) logger.debug 'Calling operation ArtifactsClient#update_container_image_signature.' if logger raise "Missing the required parameter 'image_signature_id' when calling update_container_image_signature." if image_signature_id.nil? raise "Missing the required parameter 'update_container_image_signature_details' when calling update_container_image_signature." if update_container_image_signature_details.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 = @api_client.object_to_http_body(update_container_image_signature_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ArtifactsClient#update_container_image_signature') 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::ContainerImageSignature' ) end # rubocop:enable Metrics/BlockLength end |
#update_container_repository(repository_id, update_container_repository_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_container_repository API.
Modify the properties of a container repository. Avoid entering confidential information.
2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 2211 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.(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 = {}) ⇒ Response
2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 2277 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.(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 = {}) ⇒ Response
Click here to see an example of how to use update_generic_artifact_by_path API.
Updates an artifact with a specified artifactPath
and version
. You can only update the tags of an artifact.
2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 2351 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.(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 = {}) ⇒ Response
Click here to see an example of how to use update_repository API.
Updates the properties of a repository. You can update the displayName
and description
properties.
2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 |
# File 'lib/oci/artifacts/artifacts_client.rb', line 2421 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.(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 |