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_marketplace_external_attested_metadata(create_marketplace_external_attested_metadata_details, opts = {}) ⇒ Response
Generates attested marketplace metadata.
-
#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_marketplace_metadata_public_keys(opts = {}) ⇒ Response
Get public certificates used in JWT signing, in JSON Web Key Sets format Allowed values are: keyId.
-
#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_marketplace_external_attested_metadata(create_marketplace_external_attested_metadata_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_marketplace_external_attested_metadata API.
Generates attested marketplace metadata
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 (, opts = {}) logger.debug 'Calling operation MarketplaceClient#create_marketplace_external_attested_metadata.' if logger raise "Missing the required parameter 'create_marketplace_external_attested_metadata_details' when calling create_marketplace_external_attested_metadata." if .nil? path = '/marketplaceExternalAttestedMetadata' 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() # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'MarketplaceClient#create_marketplace_external_attested_metadata') 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::MarketplaceExternalAttestedMetadata' ) 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.
313 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 313 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.
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 414 415 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 378 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.
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 469 470 471 472 473 474 475 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 439 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.
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 539 540 541 542 543 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 502 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.
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 564 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.
625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 625 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.
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 739 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 702 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.
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 809 810 811 812 813 814 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 775 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.
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 834 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.
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 924 925 926 927 928 929 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 891 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
949 950 951 952 953 954 955 956 957 958 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 949 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.
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1021 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.
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1099 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.
1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1165 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.
1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 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 1337 1338 1339 1340 1341 1342 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1265 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_marketplace_metadata_public_keys(opts = {}) ⇒ Response
Click here to see an example of how to use list_marketplace_metadata_public_keys API.
Get public certificates used in JWT signing, in JSON Web Key Sets format Allowed values are: keyId
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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1370 def (opts = {}) logger.debug 'Calling operation MarketplaceClient#list_marketplace_metadata_public_keys.' if logger 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[keyId].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of keyId.' end path = '/marketplaceMetadataPublicKeys' 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[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] 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_marketplace_metadata_public_keys') 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::MarketplaceMetadataPublicKeySummary>' ) 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.
1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1465 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.
1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1549 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.
1633 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 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1633 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.
1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1715 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.
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 1805 1806 1807 1808 1809 1810 1811 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1774 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.
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 1875 1876 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1835 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.
1897 1898 1899 1900 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1897 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
1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 1962 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
2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 2038 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
2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 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 2167 2168 2169 2170 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 2116 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.
2195 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 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 2195 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.
2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 2263 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.
2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 |
# File 'lib/oci/marketplace/marketplace_client.rb', line 2333 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 |