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](/Content/Marketplace/Concepts/marketoverview.htm)
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.
-
#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.
-
#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.
-
#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.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 53 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.
13 14 15 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 13 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
17 18 19 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 17 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
27 28 29 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 27 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
23 24 25 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 23 def retry_config @retry_config end |
Instance Method Details
#change_publication_compartment(publication_id, change_publication_compartment_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/change_publication_compartment.rb.html) to see an example of how to use change_publication_compartment API.
Moves the specified publication from one compartment to another.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 121 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/create_accepted_agreement.rb.html) 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.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 187 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/create_publication.rb.html) to see an example of how to use create_publication API.
Creates a publication of the specified listing type with an optional default package.
249 250 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 249 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/delete_accepted_agreement.rb.html) 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.
314 315 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 314 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/delete_publication.rb.html) 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.
375 376 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 375 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 |
#get_accepted_agreement(accepted_agreement_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/get_accepted_agreement.rb.html) to see an example of how to use get_accepted_agreement API.
Gets the details of a specific, previously accepted terms of use agreement.
432 433 434 435 436 437 438 439 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 432 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/get_agreement.rb.html) 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.
493 494 495 496 497 498 499 500 501 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 493 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/get_listing.rb.html) 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](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements) API call. The [AppCatalogListingResourceVersionAgreements](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/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](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogSubscription/CreateAppCatalogSubscription) API call.
To get the image ID to launch an instance, issue a [GetAppCatalogListingResourceVersion](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion) API call. Lastly, to launch the instance, use the image ID of the listing resource version to issue a [LaunchInstance](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/Instance/LaunchInstance) API call.
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 605 606 607 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 570 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/get_package.rb.html) 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](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements) API call. The [AppCatalogListingResourceVersionAgreements](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/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](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogSubscription/CreateAppCatalogSubscription) API call.
To get the image ID to launch an instance, issue a [GetAppCatalogListingResourceVersion](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion) API call. Lastly, to launch the instance, use the image ID of the listing resource version to issue a [LaunchInstance](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/Instance/LaunchInstance) API call.
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 678 679 680 681 682 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 643 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/get_publication.rb.html) to see an example of how to use get_publication API.
Gets the details of the specified publication.
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 702 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/get_publication_package.rb.html) to see an example of how to use get_publication_package API.
Gets the details of a specific package version within a given publication.
759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 759 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 |
#list_accepted_agreements(compartment_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_accepted_agreements.rb.html) 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.
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 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 833 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_agreements.rb.html) 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.
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 946 947 948 949 950 951 952 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 911 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_categories.rb.html) 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.
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 1012 1013 1014 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 977 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_listings.rb.html) 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](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements) API call. The [AppCatalogListingResourceVersionAgreements](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/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](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogSubscription/CreateAppCatalogSubscription) API call.
To get the image ID to launch an instance, issue a [GetAppCatalogListingResourceVersion](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion) API call. Lastly, to launch the instance, use the image ID of the listing resource version to issue a [LaunchInstance](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/Instance/LaunchInstance) API call.
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1077 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_packages.rb.html) 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](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements) API call. The [AppCatalogListingResourceVersionAgreements](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/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](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogSubscription/CreateAppCatalogSubscription) API call.
To get the image ID to launch an instance, issue a [GetAppCatalogListingResourceVersion](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion) API call. Lastly, to launch the instance, use the image ID of the listing resource version to issue a [LaunchInstance](docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/Instance/LaunchInstance) API call.
1202 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1202 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_publication_packages.rb.html) to see an example of how to use list_publication_packages API.
Lists the packages in the specified publication.
1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1286 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_publications.rb.html) to see an example of how to use list_publications API.
Lists the publications in the specified compartment.
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1370 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_publishers.rb.html) 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.
1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1452 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_report_types.rb.html) to see an example of how to use list_report_types API.
Lists available types of reports for the compartment.
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1511 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_reports.rb.html) to see an example of how to use list_reports API.
Lists reports in the compartment that match the specified report type and date.
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1572 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/list_taxes.rb.html) 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.
1634 1635 1636 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1634 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 |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
92 93 94 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 92 def logger @api_client.config.logger end |
#search_listings(search_listings_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/search_listings.rb.html) 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.
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1696 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/update_accepted_agreement.rb.html) 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.
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 1798 1799 1800 1801 1802 1803 1804 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1764 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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/marketplace/update_publication.rb.html) to see an example of how to use update_publication API.
Updates the details of an existing publication.
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 1874 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1834 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 |