Method: OCI::Ons::NotificationDataPlaneClient#list_subscriptions
- Defined in:
- lib/oci/ons/notification_data_plane_client.rb
#list_subscriptions(compartment_id, opts = {}) ⇒ Response
Note:
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/ons/list_subscriptions.rb.html) to see an example of how to use list_subscriptions API.
Lists the subscriptions in the specified compartment or topic.
Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 |
# File 'lib/oci/ons/notification_data_plane_client.rb', line 550 def list_subscriptions(compartment_id, opts = {}) logger.debug 'Calling operation NotificationDataPlaneClient#list_subscriptions.' if logger raise "Missing the required parameter 'compartment_id' when calling list_subscriptions." if compartment_id.nil? path = '/subscriptions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:topicId] = opts[:topic_id] if opts[:topic_id] 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 = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#list_subscriptions') 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::Ons::Models::SubscriptionSummary>' ) end # rubocop:enable Metrics/BlockLength end |