Class: OCI::Marketplace::MarketplaceClient
- Inherits:
-
Object
- Object
- OCI::Marketplace::MarketplaceClient
- Defined in:
- lib/oci/marketplace/marketplace_client.rb
Overview
Use the Marketplace API to manage applications in Oracle Cloud Infrastructure Marketplace. For more information, see Overview of Marketplace
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_publication_compartment(publication_id, change_publication_compartment_details, opts = {}) ⇒ Response
Moves the specified publication from one compartment to another.
-
#create_accepted_agreement(create_accepted_agreement_details, opts = {}) ⇒ Response
Accepts a terms of use agreement for a specific package version of a listing.
-
#create_publication(create_publication_details, opts = {}) ⇒ Response
Creates a publication of the specified listing type with an optional default package.
-
#delete_accepted_agreement(accepted_agreement_id, opts = {}) ⇒ Response
Removes a previously accepted terms of use agreement from the list of agreements that Marketplace checks before initiating a deployment.
-
#delete_publication(publication_id, opts = {}) ⇒ Response
Deletes a publication, which also removes the associated listing from anywhere it was published, such as Marketplace or Compute.
-
#export_listing(listing_id, package_version, export_package_details, opts = {}) ⇒ Response
Exports container images or helm chart from marketplace to customer's registry.
-
#get_accepted_agreement(accepted_agreement_id, opts = {}) ⇒ Response
Gets the details of a specific, previously accepted terms of use agreement.
-
#get_agreement(listing_id, package_version, agreement_id, opts = {}) ⇒ Response
Returns a terms of use agreement for a package with a time-based signature that can be used to accept the agreement.
-
#get_listing(listing_id, opts = {}) ⇒ Response
Gets detailed information about a listing, including the listing's name, version, description, and resources.
-
#get_package(listing_id, package_version, opts = {}) ⇒ Response
Get the details of the specified version of a package, including information needed to launch the package.
-
#get_publication(publication_id, opts = {}) ⇒ Response
Gets the details of the specified publication.
-
#get_publication_package(publication_id, package_version, opts = {}) ⇒ Response
Gets the details of a specific package version within a given publication.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the details of the specified work request.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ MarketplaceClient
constructor
Creates a new MarketplaceClient.
-
#list_accepted_agreements(compartment_id, opts = {}) ⇒ Response
Lists the terms of use agreements that have been accepted in the specified compartment.
-
#list_agreements(listing_id, package_version, opts = {}) ⇒ Response
Returns the terms of use agreements that must be accepted before you can deploy the specified version of a package.
-
#list_categories(opts = {}) ⇒ Response
Gets the list of all the categories for listings published to Oracle Cloud Infrastructure Marketplace.
-
#list_listings(opts = {}) ⇒ Response
Gets a list of listings from Oracle Cloud Infrastructure Marketplace by searching keywords and filtering according to listing attributes.
-
#list_packages(listing_id, opts = {}) ⇒ Response
Gets the list of packages for a listing.
-
#list_publication_packages(publication_id, opts = {}) ⇒ Response
Lists the packages in the specified publication.
-
#list_publications(compartment_id, listing_type, opts = {}) ⇒ Response
Lists the publications in the specified compartment.
-
#list_publishers(opts = {}) ⇒ Response
Gets the list of all the publishers of listings available in Oracle Cloud Infrastructure Marketplace.
-
#list_report_types(compartment_id, opts = {}) ⇒ Response
Lists available types of reports for the compartment.
-
#list_reports(report_type, date, compartment_id, opts = {}) ⇒ Response
Lists reports in the compartment that match the specified report type and date.
-
#list_taxes(listing_id, opts = {}) ⇒ Response
Returns list of all tax implications that current tenant may be liable to once they launch the listing.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
List all errors for a work request Allowed values are: timeCreated.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
List all logs for a work request Allowed values are: timeCreated.
-
#list_work_requests(compartment_id, opts = {}) ⇒ Response
List all work requests in a compartment Allowed values are: timeAccepted.
-
#logger ⇒ Logger
The logger for this client.
-
#search_listings(search_listings_details, opts = {}) ⇒ Response
Queries all Marketplace Applications to find listings that match the specified criteria.
-
#update_accepted_agreement(accepted_agreement_id, update_accepted_agreement_details, opts = {}) ⇒ Response
Updates the display name or tags associated with a listing's previously accepted terms of use agreement.
-
#update_publication(publication_id, update_publication_details, opts = {}) ⇒ Response
Updates the details of an existing publication.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ MarketplaceClient
Creates a new MarketplaceClient. 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.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 55 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20181001' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "MarketplaceClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
15 16 17 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 15 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
19 20 21 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 19 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
29 30 31 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 29 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
25 26 27 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 25 def retry_config @retry_config end |
Instance Method Details
#change_publication_compartment(publication_id, change_publication_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_publication_compartment API.
Moves the specified publication from one compartment to another.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 123 def change_publication_compartment(publication_id, change_publication_compartment_details, opts = {}) logger.debug 'Calling operation MarketplaceClient#change_publication_compartment.' if logger raise "Missing the required parameter 'publication_id' when calling change_publication_compartment." if publication_id.nil? raise "Missing the required parameter 'change_publication_compartment_details' when calling change_publication_compartment." if change_publication_compartment_details.nil? raise "Parameter value for 'publication_id' must not be blank" if OCI::Internal::Util.blank_string?(publication_id) path = '/publications/{publicationId}/actions/changeCompartment'.sub('{publicationId}', publication_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-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] 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(change_publication_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#change_publication_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_accepted_agreement(create_accepted_agreement_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_accepted_agreement API.
Accepts a terms of use agreement for a specific package version of a listing. You must accept all terms of use for a package before you can deploy the package.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 189 def create_accepted_agreement(create_accepted_agreement_details, opts = {}) logger.debug 'Calling operation MarketplaceClient#create_accepted_agreement.' if logger raise "Missing the required parameter 'create_accepted_agreement_details' when calling create_accepted_agreement." if create_accepted_agreement_details.nil? path = '/acceptedAgreements' 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_accepted_agreement_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#create_accepted_agreement') 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::Marketplace::Models::AcceptedAgreement' ) end # rubocop:enable Metrics/BlockLength end |
#create_publication(create_publication_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_publication API.
Creates a publication of the specified listing type with an optional default package.
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 251 def create_publication(create_publication_details, opts = {}) logger.debug 'Calling operation MarketplaceClient#create_publication.' if logger raise "Missing the required parameter 'create_publication_details' when calling create_publication." if create_publication_details.nil? path = '/publications' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_publication_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#create_publication') 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::Marketplace::Models::Publication' ) end # rubocop:enable Metrics/BlockLength end |
#delete_accepted_agreement(accepted_agreement_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_accepted_agreement API.
Removes a previously accepted terms of use agreement from the list of agreements that Marketplace checks before initiating a deployment. Listings in Marketplace that require acceptance of the specified terms of use can no longer be deployed, but existing deployments aren't affected.
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 316 def delete_accepted_agreement(accepted_agreement_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#delete_accepted_agreement.' if logger raise "Missing the required parameter 'accepted_agreement_id' when calling delete_accepted_agreement." if accepted_agreement_id.nil? raise "Parameter value for 'accepted_agreement_id' must not be blank" if OCI::Internal::Util.blank_string?(accepted_agreement_id) path = '/acceptedAgreements/{acceptedAgreementId}'.sub('{acceptedAgreementId}', accepted_agreement_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:signature] = opts[:signature] if opts[:signature] # 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: 'MarketplaceClient#delete_accepted_agreement') 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_publication(publication_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_publication API.
Deletes a publication, which also removes the associated listing from anywhere it was published, such as Marketplace or Compute.
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 377 def delete_publication(publication_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#delete_publication.' if logger raise "Missing the required parameter 'publication_id' when calling delete_publication." if publication_id.nil? raise "Parameter value for 'publication_id' must not be blank" if OCI::Internal::Util.blank_string?(publication_id) path = '/publications/{publicationId}'.sub('{publicationId}', publication_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: 'MarketplaceClient#delete_publication') 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 |
#export_listing(listing_id, package_version, export_package_details, opts = {}) ⇒ Response
Click here to see an example of how to use export_listing API.
Exports container images or helm chart from marketplace to customer's registry.
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 440 def export_listing(listing_id, package_version, export_package_details, opts = {}) logger.debug 'Calling operation MarketplaceClient#export_listing.' if logger raise "Missing the required parameter 'listing_id' when calling export_listing." if listing_id.nil? raise "Missing the required parameter 'package_version' when calling export_listing." if package_version.nil? raise "Missing the required parameter 'export_package_details' when calling export_listing." if export_package_details.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) raise "Parameter value for 'package_version' must not be blank" if OCI::Internal::Util.blank_string?(package_version) path = '/listings/{listingId}/packages/{packageVersion}/actions/export'.sub('{listingId}', listing_id.to_s).sub('{packageVersion}', package_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-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(export_package_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#export_listing') 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::Marketplace::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#get_accepted_agreement(accepted_agreement_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_accepted_agreement API.
Gets the details of a specific, previously accepted terms of use agreement.
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 502 def get_accepted_agreement(accepted_agreement_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#get_accepted_agreement.' if logger raise "Missing the required parameter 'accepted_agreement_id' when calling get_accepted_agreement." if accepted_agreement_id.nil? raise "Parameter value for 'accepted_agreement_id' must not be blank" if OCI::Internal::Util.blank_string?(accepted_agreement_id) path = '/acceptedAgreements/{acceptedAgreementId}'.sub('{acceptedAgreementId}', accepted_agreement_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: 'MarketplaceClient#get_accepted_agreement') 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::Marketplace::Models::AcceptedAgreement' ) end # rubocop:enable Metrics/BlockLength end |
#get_agreement(listing_id, package_version, agreement_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_agreement API.
Returns a terms of use agreement for a package with a time-based signature that can be used to accept the agreement.
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 563 def get_agreement(listing_id, package_version, agreement_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#get_agreement.' if logger raise "Missing the required parameter 'listing_id' when calling get_agreement." if listing_id.nil? raise "Missing the required parameter 'package_version' when calling get_agreement." if package_version.nil? raise "Missing the required parameter 'agreement_id' when calling get_agreement." if agreement_id.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) raise "Parameter value for 'package_version' must not be blank" if OCI::Internal::Util.blank_string?(package_version) raise "Parameter value for 'agreement_id' must not be blank" if OCI::Internal::Util.blank_string?(agreement_id) path = '/listings/{listingId}/packages/{packageVersion}/agreements/{agreementId}'.sub('{listingId}', listing_id.to_s).sub('{packageVersion}', package_version.to_s).sub('{agreementId}', agreement_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#get_agreement') 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::Marketplace::Models::Agreement' ) end # rubocop:enable Metrics/BlockLength end |
#get_listing(listing_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_listing API.
Gets detailed information about a listing, including the listing's name, version, description, and resources.
If you plan to launch an instance from an image listing, you must first subscribe to the listing. When you launch the instance, you also need to provide the image ID of the listing resource version that you want.
Subscribing to the listing requires you to first get a signature from the terms of use agreement for the listing resource version. To get the signature, issue a GetAppCatalogListingAgreements API call. The AppCatalogListingResourceVersionAgreements object, including its signature, is returned in the response. With the signature for the terms of use agreement for the desired listing resource version, create a subscription by issuing a CreateAppCatalogSubscription API call.
To get the image ID to launch an instance, issue a GetAppCatalogListingResourceVersion API call. Lastly, to launch the instance, use the image ID of the listing resource version to issue a LaunchInstance API call.
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 640 def get_listing(listing_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#get_listing.' if logger raise "Missing the required parameter 'listing_id' when calling get_listing." if listing_id.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) path = '/listings/{listingId}'.sub('{listingId}', listing_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#get_listing') 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::Marketplace::Models::Listing' ) end # rubocop:enable Metrics/BlockLength end |
#get_package(listing_id, package_version, opts = {}) ⇒ Response
Click here to see an example of how to use get_package API.
Get the details of the specified version of a package, including information needed to launch the package.
If you plan to launch an instance from an image listing, you must first subscribe to the listing. When you launch the instance, you also need to provide the image ID of the listing resource version that you want.
Subscribing to the listing requires you to first get a signature from the terms of use agreement for the listing resource version. To get the signature, issue a GetAppCatalogListingAgreements API call. The AppCatalogListingResourceVersionAgreements object, including its signature, is returned in the response. With the signature for the terms of use agreement for the desired listing resource version, create a subscription by issuing a CreateAppCatalogSubscription API call.
To get the image ID to launch an instance, issue a GetAppCatalogListingResourceVersion API call. Lastly, to launch the instance, use the image ID of the listing resource version to issue a LaunchInstance API call.
713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 713 def get_package(listing_id, package_version, opts = {}) logger.debug 'Calling operation MarketplaceClient#get_package.' if logger raise "Missing the required parameter 'listing_id' when calling get_package." if listing_id.nil? raise "Missing the required parameter 'package_version' when calling get_package." if package_version.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) raise "Parameter value for 'package_version' must not be blank" if OCI::Internal::Util.blank_string?(package_version) path = '/listings/{listingId}/packages/{packageVersion}'.sub('{listingId}', listing_id.to_s).sub('{packageVersion}', package_version.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#get_package') 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::Marketplace::Models::ListingPackage' ) end # rubocop:enable Metrics/BlockLength end |
#get_publication(publication_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_publication API.
Gets the details of the specified publication.
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 772 def get_publication(publication_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#get_publication.' if logger raise "Missing the required parameter 'publication_id' when calling get_publication." if publication_id.nil? raise "Parameter value for 'publication_id' must not be blank" if OCI::Internal::Util.blank_string?(publication_id) path = '/publications/{publicationId}'.sub('{publicationId}', publication_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: 'MarketplaceClient#get_publication') 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::Marketplace::Models::Publication' ) end # rubocop:enable Metrics/BlockLength end |
#get_publication_package(publication_id, package_version, opts = {}) ⇒ Response
Click here to see an example of how to use get_publication_package API.
Gets the details of a specific package version within a given publication.
829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 829 def get_publication_package(publication_id, package_version, opts = {}) logger.debug 'Calling operation MarketplaceClient#get_publication_package.' if logger raise "Missing the required parameter 'publication_id' when calling get_publication_package." if publication_id.nil? raise "Missing the required parameter 'package_version' when calling get_publication_package." if package_version.nil? raise "Parameter value for 'publication_id' must not be blank" if OCI::Internal::Util.blank_string?(publication_id) raise "Parameter value for 'package_version' must not be blank" if OCI::Internal::Util.blank_string?(package_version) path = '/publications/{publicationId}/packages/{packageVersion}'.sub('{publicationId}', publication_id.to_s).sub('{packageVersion}', package_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: 'MarketplaceClient#get_publication_package') 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::Marketplace::Models::PublicationPackage' ) end # rubocop:enable Metrics/BlockLength end |
#get_work_request(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_work_request API.
Gets the details of the specified work request
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 887 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#get_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_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: 'MarketplaceClient#get_work_request') 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::Marketplace::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#list_accepted_agreements(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_accepted_agreements API.
Lists the terms of use agreements that have been accepted in the specified compartment. You can filter results by specifying query parameters.
959 960 961 962 963 964 965 966 967 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 1005 1006 1007 1008 1009 1010 1011 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 959 def list_accepted_agreements(compartment_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_accepted_agreements.' if logger raise "Missing the required parameter 'compartment_id' when calling list_accepted_agreements." if compartment_id.nil? if opts[:sort_by] && !%w[TIMEACCEPTED].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMEACCEPTED.' 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 = '/acceptedAgreements' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:listingId] = opts[:listing_id] if opts[:listing_id] query_params[:packageVersion] = opts[:package_version] if opts[:package_version] query_params[:acceptedAgreementId] = opts[:accepted_agreement_id] if opts[:accepted_agreement_id] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#list_accepted_agreements') 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: 'Array<OCI::Marketplace::Models::AcceptedAgreementSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_agreements(listing_id, package_version, opts = {}) ⇒ Response
Click here to see an example of how to use list_agreements API.
Returns the terms of use agreements that must be accepted before you can deploy the specified version of a package.
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 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1037 def list_agreements(listing_id, package_version, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_agreements.' if logger raise "Missing the required parameter 'listing_id' when calling list_agreements." if listing_id.nil? raise "Missing the required parameter 'package_version' when calling list_agreements." if package_version.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) raise "Parameter value for 'package_version' must not be blank" if OCI::Internal::Util.blank_string?(package_version) path = '/listings/{listingId}/packages/{packageVersion}/agreements'.sub('{listingId}', listing_id.to_s).sub('{packageVersion}', package_version.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#list_agreements') 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: 'Array<OCI::Marketplace::Models::AgreementSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_categories(opts = {}) ⇒ Response
Click here to see an example of how to use list_categories API.
Gets the list of all the categories for listings published to Oracle Cloud Infrastructure Marketplace. Categories apply to the software product provided by the listing.
1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1103 def list_categories(opts = {}) logger.debug 'Calling operation MarketplaceClient#list_categories.' if logger path = '/categories' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#list_categories') 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: 'Array<OCI::Marketplace::Models::CategorySummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_listings(opts = {}) ⇒ Response
Click here to see an example of how to use list_listings API.
Gets a list of listings from Oracle Cloud Infrastructure Marketplace by searching keywords and filtering according to listing attributes.
If you plan to launch an instance from an image listing, you must first subscribe to the listing. When you launch the instance, you also need to provide the image ID of the listing resource version that you want.
Subscribing to the listing requires you to first get a signature from the terms of use agreement for the listing resource version. To get the signature, issue a GetAppCatalogListingAgreements API call. The AppCatalogListingResourceVersionAgreements object, including its signature, is returned in the response. With the signature for the terms of use agreement for the desired listing resource version, create a subscription by issuing a CreateAppCatalogSubscription API call.
To get the image ID to launch an instance, issue a GetAppCatalogListingResourceVersion API call. Lastly, to launch the instance, use the image ID of the listing resource version to issue a LaunchInstance API call.
1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 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 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1203 def list_listings(opts = {}) logger.debug 'Calling operation MarketplaceClient#list_listings.' if logger if opts[:sort_by] && !%w[TIMERELEASED].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMERELEASED.' 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 pricing_allowable_values = %w[FREE BYOL PAYGO] if opts[:pricing] && !opts[:pricing].empty? opts[:pricing].each do |val_to_check| unless pricing_allowable_values.include?(val_to_check) raise 'Invalid value for "pricing", must be one of FREE, BYOL, PAYGO.' end end end listing_types_allowable_values = %w[COMMUNITY PARTNER PRIVATE] if opts[:listing_types] && !opts[:listing_types].empty? opts[:listing_types].each do |val_to_check| unless listing_types_allowable_values.include?(val_to_check) raise 'Invalid value for "listing_types", must be one of COMMUNITY, PARTNER, PRIVATE.' end end end path = '/listings' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty? query_params[:listingId] = opts[:listing_id] if opts[:listing_id] query_params[:imageId] = opts[:image_id] if opts[:image_id] query_params[:publisherId] = opts[:publisher_id] if opts[:publisher_id] query_params[:packageType] = opts[:package_type] if opts[:package_type] 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] query_params[:category] = OCI::ApiClient.build_collection_params(opts[:category], :multi) if opts[:category] && !opts[:category].empty? query_params[:pricing] = OCI::ApiClient.build_collection_params(opts[:pricing], :multi) if opts[:pricing] && !opts[:pricing].empty? query_params[:isFeatured] = opts[:is_featured] if !opts[:is_featured].nil? query_params[:listingTypes] = OCI::ApiClient.build_collection_params(opts[:listing_types], :multi) if opts[:listing_types] && !opts[:listing_types].empty? query_params[:operatingSystems] = OCI::ApiClient.build_collection_params(opts[:operating_systems], :multi) if opts[:operating_systems] && !opts[:operating_systems].empty? query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#list_listings') 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: 'Array<OCI::Marketplace::Models::ListingSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_packages(listing_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_packages API.
Gets the list of packages for a listing.
If you plan to launch an instance from an image listing, you must first subscribe to the listing. When you launch the instance, you also need to provide the image ID of the listing resource version that you want.
Subscribing to the listing requires you to first get a signature from the terms of use agreement for the listing resource version. To get the signature, issue a GetAppCatalogListingAgreements API call. The AppCatalogListingResourceVersionAgreements object, including its signature, is returned in the response. With the signature for the terms of use agreement for the desired listing resource version, create a subscription by issuing a CreateAppCatalogSubscription API call.
To get the image ID to launch an instance, issue a GetAppCatalogListingResourceVersion API call. Lastly, to launch the instance, use the image ID of the listing resource version to issue a LaunchInstance API call.
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1328 def list_packages(listing_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_packages.' if logger raise "Missing the required parameter 'listing_id' when calling list_packages." if listing_id.nil? if opts[:sort_by] && !%w[TIMERELEASED].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMERELEASED.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) path = '/listings/{listingId}/packages'.sub('{listingId}', listing_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:packageVersion] = opts[:package_version] if opts[:package_version] query_params[:packageType] = opts[:package_type] if opts[:package_type] 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] query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#list_packages') 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: 'Array<OCI::Marketplace::Models::ListingPackageSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_publication_packages(publication_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_publication_packages API.
Lists the packages in the specified publication.
1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1412 def list_publication_packages(publication_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_publication_packages.' if logger raise "Missing the required parameter 'publication_id' when calling list_publication_packages." if publication_id.nil? if opts[:sort_by] && !%w[TIMERELEASED].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMERELEASED.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end raise "Parameter value for 'publication_id' must not be blank" if OCI::Internal::Util.blank_string?(publication_id) path = '/publications/{publicationId}/packages'.sub('{publicationId}', publication_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:packageVersion] = opts[:package_version] if opts[:package_version] query_params[:packageType] = opts[:package_type] if opts[:package_type] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#list_publication_packages') 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: 'Array<OCI::Marketplace::Models::PublicationPackageSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_publications(compartment_id, listing_type, opts = {}) ⇒ Response
Click here to see an example of how to use list_publications API.
Lists the publications in the specified compartment.
1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1496 def list_publications(compartment_id, listing_type, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_publications.' if logger raise "Missing the required parameter 'compartment_id' when calling list_publications." if compartment_id.nil? raise "Missing the required parameter 'listing_type' when calling list_publications." if listing_type.nil? unless OCI::Marketplace::Models::LISTING_TYPE_ENUM.include?(listing_type) raise 'Invalid value for "listing_type", must be one of the values in OCI::Marketplace::Models::LISTING_TYPE_ENUM.' end if opts[:sort_by] && !%w[TIMERELEASED].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMERELEASED.' 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 = '/publications' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:listingType] = listing_type query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty? query_params[:publicationId] = opts[:publication_id] if opts[:publication_id] query_params[:operatingSystems] = OCI::ApiClient.build_collection_params(opts[:operating_systems], :multi) if opts[:operating_systems] && !opts[:operating_systems].empty? query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#list_publications') 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: 'Array<OCI::Marketplace::Models::PublicationSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_publishers(opts = {}) ⇒ Response
Click here to see an example of how to use list_publishers API.
Gets the list of all the publishers of listings available in Oracle Cloud Infrastructure Marketplace.
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1578 def list_publishers(opts = {}) logger.debug 'Calling operation MarketplaceClient#list_publishers.' if logger path = '/publishers' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:publisherId] = opts[:publisher_id] if opts[:publisher_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#list_publishers') 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: 'Array<OCI::Marketplace::Models::PublisherSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_report_types(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_report_types API.
Lists available types of reports for the compartment.
1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1637 def list_report_types(compartment_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_report_types.' if logger raise "Missing the required parameter 'compartment_id' when calling list_report_types." if compartment_id.nil? path = '/reportTypes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#list_report_types') 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::Marketplace::Models::ReportTypeCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_reports(report_type, date, compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_reports API.
Lists reports in the compartment that match the specified report type and date.
1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1698 def list_reports(report_type, date, compartment_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_reports.' if logger raise "Missing the required parameter 'report_type' when calling list_reports." if report_type.nil? raise "Missing the required parameter 'date' when calling list_reports." if date.nil? raise "Missing the required parameter 'compartment_id' when calling list_reports." if compartment_id.nil? path = '/reports' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:reportType] = report_type query_params[:date] = date query_params[:compartmentId] = compartment_id query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#list_reports') 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::Marketplace::Models::ReportCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_taxes(listing_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_taxes API.
Returns list of all tax implications that current tenant may be liable to once they launch the listing.
1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1760 def list_taxes(listing_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_taxes.' if logger raise "Missing the required parameter 'listing_id' when calling list_taxes." if listing_id.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) path = '/listings/{listingId}/taxes'.sub('{listingId}', listing_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'MarketplaceClient#list_taxes') 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: 'Array<OCI::Marketplace::Models::TaxSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_request_errors API.
List all errors for a work request Allowed values are: timeCreated
1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1825 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_work_request_errors.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil? if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated.' end raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#list_work_request_errors') 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::Marketplace::Models::WorkRequestErrorCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_request_logs API.
List all logs for a work request Allowed values are: timeCreated
1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1901 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_work_request_logs.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil? if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated.' end raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#list_work_request_logs') 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::Marketplace::Models::WorkRequestLogEntryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_requests API.
List all work requests in a compartment Allowed values are: timeAccepted
1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1979 def list_work_requests(compartment_id, opts = {}) logger.debug 'Calling operation MarketplaceClient#list_work_requests.' if logger raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil? if opts[:status] && !OCI::Marketplace::Models::OPERATION_STATUS_ENUM.include?(opts[:status]) raise 'Invalid value for "status", must be one of the values in OCI::Marketplace::Models::OPERATION_STATUS_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeAccepted.' end path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id] query_params[:status] = opts[:status] if opts[:status] query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#list_work_requests') 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::Marketplace::Models::WorkRequestCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
94 95 96 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 94 def logger @api_client.config.logger end |
#search_listings(search_listings_details, opts = {}) ⇒ Response
Click here to see an example of how to use search_listings API.
Queries all Marketplace Applications to find listings that match the specified criteria. To search for a listing, you can use a free text or structured search.
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 2058 def search_listings(search_listings_details, opts = {}) logger.debug 'Calling operation MarketplaceClient#search_listings.' if logger raise "Missing the required parameter 'search_listings_details' when calling search_listings." if search_listings_details.nil? path = '/searchListings' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] # 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 = @api_client.object_to_http_body(search_listings_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#search_listings') 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: 'Array<OCI::Marketplace::Models::ListingSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#update_accepted_agreement(accepted_agreement_id, update_accepted_agreement_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_accepted_agreement API.
Updates the display name or tags associated with a listing's previously accepted terms of use agreement.
2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 2126 def update_accepted_agreement(accepted_agreement_id, update_accepted_agreement_details, opts = {}) logger.debug 'Calling operation MarketplaceClient#update_accepted_agreement.' if logger raise "Missing the required parameter 'accepted_agreement_id' when calling update_accepted_agreement." if accepted_agreement_id.nil? raise "Missing the required parameter 'update_accepted_agreement_details' when calling update_accepted_agreement." if update_accepted_agreement_details.nil? raise "Parameter value for 'accepted_agreement_id' must not be blank" if OCI::Internal::Util.blank_string?(accepted_agreement_id) path = '/acceptedAgreements/{acceptedAgreementId}'.sub('{acceptedAgreementId}', accepted_agreement_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[:'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(update_accepted_agreement_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#update_accepted_agreement') 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::Marketplace::Models::AcceptedAgreement' ) end # rubocop:enable Metrics/BlockLength end |
#update_publication(publication_id, update_publication_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_publication API.
Updates the details of an existing publication.
2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 2196 def update_publication(publication_id, update_publication_details, opts = {}) logger.debug 'Calling operation MarketplaceClient#update_publication.' if logger raise "Missing the required parameter 'publication_id' when calling update_publication." if publication_id.nil? raise "Missing the required parameter 'update_publication_details' when calling update_publication." if update_publication_details.nil? raise "Parameter value for 'publication_id' must not be blank" if OCI::Internal::Util.blank_string?(publication_id) path = '/publications/{publicationId}'.sub('{publicationId}', publication_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[:'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(update_publication_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#update_publication') 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::Marketplace::Models::Publication' ) end # rubocop:enable Metrics/BlockLength end |