Class: OCI::Streaming::StreamAdminClient
- Inherits:
-
Object
- Object
- OCI::Streaming::StreamAdminClient
- Defined in:
- lib/oci/streaming/stream_admin_client.rb
Overview
Use the Streaming API to produce and consume messages, create streams and stream pools, and manage related items. For more information, see Streaming.
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_connect_harness_compartment(connect_harness_id, change_connect_harness_compartment_details, opts = {}) ⇒ Response
Moves a resource into a different compartment.
-
#change_stream_compartment(stream_id, change_stream_compartment_details, opts = {}) ⇒ Response
Moves a resource into a different compartment.
-
#change_stream_pool_compartment(stream_pool_id, change_stream_pool_compartment_details, opts = {}) ⇒ Response
Moves a resource into a different compartment.
-
#create_connect_harness(create_connect_harness_details, opts = {}) ⇒ Response
Starts the provisioning of a new connect harness.
-
#create_stream(create_stream_details, opts = {}) ⇒ Response
Starts the provisioning of a new stream.
-
#create_stream_pool(create_stream_pool_details, opts = {}) ⇒ Response
Starts the provisioning of a new stream pool.
-
#delete_connect_harness(connect_harness_id, opts = {}) ⇒ Response
Deletes a connect harness and its content.
-
#delete_stream(stream_id, opts = {}) ⇒ Response
Deletes a stream and its content.
-
#delete_stream_pool(stream_pool_id, opts = {}) ⇒ Response
Deletes a stream pool.
-
#get_connect_harness(connect_harness_id, opts = {}) ⇒ Response
Gets detailed information about a connect harness.
-
#get_stream(stream_id, opts = {}) ⇒ Response
Gets detailed information about a stream, including the number of partitions.
-
#get_stream_pool(stream_pool_id, opts = {}) ⇒ Response
Gets detailed information about the stream pool, such as Kafka settings.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ StreamAdminClient
constructor
Creates a new StreamAdminClient.
-
#list_connect_harnesses(compartment_id, opts = {}) ⇒ Response
Lists the connectharness.
-
#list_stream_pools(compartment_id, opts = {}) ⇒ Response
List the stream pools for a given compartment ID.
-
#list_streams(opts = {}) ⇒ Response
Lists the streams in the given compartment id.
-
#logger ⇒ Logger
The logger for this client.
-
#update_connect_harness(connect_harness_id, update_connect_harness_details, opts = {}) ⇒ Response
Updates the tags applied to the connect harness.
-
#update_stream(stream_id, update_stream_details, opts = {}) ⇒ Response
Updates the stream.
-
#update_stream_pool(stream_pool_id, update_stream_pool_details, opts = {}) ⇒ Response
Updates the specified stream pool.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ StreamAdminClient
Creates a new StreamAdminClient. 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/streaming/stream_admin_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 + '/20180418' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "StreamAdminClient 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/streaming/stream_admin_client.rb', line 15 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
19 20 21 |
# File 'lib/oci/streaming/stream_admin_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/streaming/stream_admin_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/streaming/stream_admin_client.rb', line 25 def retry_config @retry_config end |
Instance Method Details
#change_connect_harness_compartment(connect_harness_id, change_connect_harness_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_connect_harness_compartment API.
Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource.
116 117 118 119 120 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 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 116 def change_connect_harness_compartment(connect_harness_id, change_connect_harness_compartment_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#change_connect_harness_compartment.' if logger raise "Missing the required parameter 'connect_harness_id' when calling change_connect_harness_compartment." if connect_harness_id.nil? raise "Missing the required parameter 'change_connect_harness_compartment_details' when calling change_connect_harness_compartment." if change_connect_harness_compartment_details.nil? raise "Parameter value for 'connect_harness_id' must not be blank" if OCI::Internal::Util.blank_string?(connect_harness_id) path = '/connectharnesses/{connectHarnessId}/actions/changeCompartment'.sub('{connectHarnessId}', connect_harness_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(change_connect_harness_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#change_connect_harness_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_stream_compartment(stream_id, change_stream_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_stream_compartment API.
Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. The stream will also be moved into the default stream pool in the destination compartment.
179 180 181 182 183 184 185 186 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 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 179 def change_stream_compartment(stream_id, change_stream_compartment_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#change_stream_compartment.' if logger raise "Missing the required parameter 'stream_id' when calling change_stream_compartment." if stream_id.nil? raise "Missing the required parameter 'change_stream_compartment_details' when calling change_stream_compartment." if change_stream_compartment_details.nil? raise "Parameter value for 'stream_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_id) path = '/streams/{streamId}/actions/changeCompartment'.sub('{streamId}', stream_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(change_stream_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#change_stream_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_stream_pool_compartment(stream_pool_id, change_stream_pool_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_stream_pool_compartment API.
Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource.
239 240 241 242 243 244 245 246 247 248 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 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 239 def change_stream_pool_compartment(stream_pool_id, change_stream_pool_compartment_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#change_stream_pool_compartment.' if logger raise "Missing the required parameter 'stream_pool_id' when calling change_stream_pool_compartment." if stream_pool_id.nil? raise "Missing the required parameter 'change_stream_pool_compartment_details' when calling change_stream_pool_compartment." if change_stream_pool_compartment_details.nil? raise "Parameter value for 'stream_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_pool_id) path = '/streampools/{streamPoolId}/actions/changeCompartment'.sub('{streamPoolId}', stream_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(change_stream_pool_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#change_stream_pool_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_connect_harness(create_connect_harness_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_connect_harness API.
Starts the provisioning of a new connect harness. To track the progress of the provisioning, you can periodically call ConnectHarness object tells you its current state.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 299 def create_connect_harness(create_connect_harness_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#create_connect_harness.' if logger raise "Missing the required parameter 'create_connect_harness_details' when calling create_connect_harness." if create_connect_harness_details.nil? path = '/connectharnesses' 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_connect_harness_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#create_connect_harness') 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::Streaming::Models::ConnectHarness' ) end # rubocop:enable Metrics/BlockLength end |
#create_stream(create_stream_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_stream API.
Starts the provisioning of a new stream. The stream will be created in the given compartment id or stream pool id, depending on which parameter is specified. Compartment id and stream pool id cannot be specified at the same time. To track the progress of the provisioning, you can periodically call get_stream. In the response, the lifecycleState
parameter of the Stream object tells you its current state.
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 361 def create_stream(create_stream_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#create_stream.' if logger raise "Missing the required parameter 'create_stream_details' when calling create_stream." if create_stream_details.nil? path = '/streams' 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 = @api_client.object_to_http_body(create_stream_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#create_stream') 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::Streaming::Models::Stream' ) end # rubocop:enable Metrics/BlockLength end |
#create_stream_pool(create_stream_pool_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_stream_pool API.
Starts the provisioning of a new stream pool. To track the progress of the provisioning, you can periodically call GetStreamPool. In the response, the lifecycleState
parameter of the object tells you its current state.
420 421 422 423 424 425 426 427 428 429 430 431 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 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 420 def create_stream_pool(create_stream_pool_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#create_stream_pool.' if logger raise "Missing the required parameter 'create_stream_pool_details' when calling create_stream_pool." if create_stream_pool_details.nil? path = '/streampools' 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_stream_pool_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#create_stream_pool') 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::Streaming::Models::StreamPool' ) end # rubocop:enable Metrics/BlockLength end |
#delete_connect_harness(connect_harness_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_connect_harness API.
Deletes a connect harness and its content. Connect harness contents are deleted immediately. The service retains records of the connect harness itself for 90 days after deletion. The lifecycleState
parameter of the ConnectHarness
object changes to DELETING
and the connect harness becomes inaccessible for read or write operations. To verify that a connect harness has been deleted, make a get_connect_harness request. If the call returns the connect harness's lifecycle state as DELETED
, then the connect harness has been deleted. If the call returns a "404 Not Found" error, that means all records of the connect harness have been deleted.
484 485 486 487 488 489 490 491 492 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 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 484 def delete_connect_harness(connect_harness_id, opts = {}) logger.debug 'Calling operation StreamAdminClient#delete_connect_harness.' if logger raise "Missing the required parameter 'connect_harness_id' when calling delete_connect_harness." if connect_harness_id.nil? raise "Parameter value for 'connect_harness_id' must not be blank" if OCI::Internal::Util.blank_string?(connect_harness_id) path = '/connectharnesses/{connectHarnessId}'.sub('{connectHarnessId}', connect_harness_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#delete_connect_harness') 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_stream(stream_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_stream API.
Deletes a stream and its content. Stream contents are deleted immediately. The service retains records of the stream itself for 90 days after deletion. The lifecycleState
parameter of the Stream
object changes to DELETING
and the stream becomes inaccessible for read or write operations. To verify that a stream has been deleted, make a get_stream request. If the call returns the stream's lifecycle state as DELETED
, then the stream has been deleted. If the call returns a "404 Not Found" error, that means all records of the stream have been deleted.
547 548 549 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 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 547 def delete_stream(stream_id, opts = {}) logger.debug 'Calling operation StreamAdminClient#delete_stream.' if logger raise "Missing the required parameter 'stream_id' when calling delete_stream." if stream_id.nil? raise "Parameter value for 'stream_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_id) path = '/streams/{streamId}'.sub('{streamId}', stream_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#delete_stream') 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_stream_pool(stream_pool_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_stream_pool API.
Deletes a stream pool. All containing streams will also be deleted. The default stream pool of a compartment cannot be deleted.
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 607 def delete_stream_pool(stream_pool_id, opts = {}) logger.debug 'Calling operation StreamAdminClient#delete_stream_pool.' if logger raise "Missing the required parameter 'stream_pool_id' when calling delete_stream_pool." if stream_pool_id.nil? raise "Parameter value for 'stream_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_pool_id) path = '/streampools/{streamPoolId}'.sub('{streamPoolId}', stream_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#delete_stream_pool') 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_connect_harness(connect_harness_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_connect_harness API.
Gets detailed information about a connect harness.
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 664 def get_connect_harness(connect_harness_id, opts = {}) logger.debug 'Calling operation StreamAdminClient#get_connect_harness.' if logger raise "Missing the required parameter 'connect_harness_id' when calling get_connect_harness." if connect_harness_id.nil? raise "Parameter value for 'connect_harness_id' must not be blank" if OCI::Internal::Util.blank_string?(connect_harness_id) path = '/connectharnesses/{connectHarnessId}'.sub('{connectHarnessId}', connect_harness_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: 'StreamAdminClient#get_connect_harness') 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::Streaming::Models::ConnectHarness' ) end # rubocop:enable Metrics/BlockLength end |
#get_stream(stream_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_stream API.
Gets detailed information about a stream, including the number of partitions.
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 721 def get_stream(stream_id, opts = {}) logger.debug 'Calling operation StreamAdminClient#get_stream.' if logger raise "Missing the required parameter 'stream_id' when calling get_stream." if stream_id.nil? raise "Parameter value for 'stream_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_id) path = '/streams/{streamId}'.sub('{streamId}', stream_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: 'StreamAdminClient#get_stream') 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::Streaming::Models::Stream' ) end # rubocop:enable Metrics/BlockLength end |
#get_stream_pool(stream_pool_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_stream_pool API.
Gets detailed information about the stream pool, such as Kafka settings.
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/streaming/stream_admin_client.rb', line 778 def get_stream_pool(stream_pool_id, opts = {}) logger.debug 'Calling operation StreamAdminClient#get_stream_pool.' if logger raise "Missing the required parameter 'stream_pool_id' when calling get_stream_pool." if stream_pool_id.nil? raise "Parameter value for 'stream_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_pool_id) path = '/streampools/{streamPoolId}'.sub('{streamPoolId}', stream_pool_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: 'StreamAdminClient#get_stream_pool') 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::Streaming::Models::StreamPool' ) end # rubocop:enable Metrics/BlockLength end |
#list_connect_harnesses(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_connect_harnesses API.
Lists the connectharness.
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 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 848 def list_connect_harnesses(compartment_id, opts = {}) logger.debug 'Calling operation StreamAdminClient#list_connect_harnesses.' if logger raise "Missing the required parameter 'compartment_id' when calling list_connect_harnesses." if compartment_id.nil? if opts[:sort_by] && !%w[NAME TIMECREATED].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of NAME, TIMECREATED.' 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[:lifecycle_state] && !OCI::Streaming::Models::ConnectHarnessSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Streaming::Models::ConnectHarnessSummary::LIFECYCLE_STATE_ENUM.' end path = '/connectharnesses' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:id] = opts[:id] if opts[:id] query_params[:name] = opts[:name] if opts[:name] 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[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] # 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: 'StreamAdminClient#list_connect_harnesses') 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::Streaming::Models::ConnectHarnessSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_stream_pools(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_stream_pools API.
List the stream pools for a given compartment ID.
937 938 939 940 941 942 943 944 945 946 947 948 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 986 987 988 989 990 991 992 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 937 def list_stream_pools(compartment_id, opts = {}) logger.debug 'Calling operation StreamAdminClient#list_stream_pools.' if logger raise "Missing the required parameter 'compartment_id' when calling list_stream_pools." if compartment_id.nil? if opts[:sort_by] && !%w[NAME TIMECREATED].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of NAME, TIMECREATED.' 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[:lifecycle_state] && !OCI::Streaming::Models::StreamPoolSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Streaming::Models::StreamPoolSummary::LIFECYCLE_STATE_ENUM.' end path = '/streampools' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:id] = opts[:id] if opts[:id] query_params[:name] = opts[:name] if opts[:name] 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[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] # 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: 'StreamAdminClient#list_stream_pools') 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::Streaming::Models::StreamPoolSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_streams(opts = {}) ⇒ Response
Click here to see an example of how to use list_streams API.
Lists the streams in the given compartment id. If the compartment id is specified, it will list streams in the compartment, regardless of their stream pool. If the stream pool id is specified, the action will be scoped to that stream pool. The compartment id and stream pool id cannot be specified at the same time.
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 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 1031 def list_streams(opts = {}) logger.debug 'Calling operation StreamAdminClient#list_streams.' if logger if opts[:sort_by] && !%w[NAME TIMECREATED].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of NAME, TIMECREATED.' 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[:lifecycle_state] && !OCI::Streaming::Models::Stream::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Streaming::Models::Stream::LIFECYCLE_STATE_ENUM.' end path = '/streams' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:streamPoolId] = opts[:stream_pool_id] if opts[:stream_pool_id] query_params[:id] = opts[:id] if opts[:id] query_params[:name] = opts[:name] if opts[:name] 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[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] # 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: 'StreamAdminClient#list_streams') 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::Streaming::Models::StreamSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
94 95 96 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 94 def logger @api_client.config.logger end |
#update_connect_harness(connect_harness_id, update_connect_harness_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_connect_harness API.
Updates the tags applied to the connect harness.
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 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 1110 def update_connect_harness(connect_harness_id, update_connect_harness_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#update_connect_harness.' if logger raise "Missing the required parameter 'connect_harness_id' when calling update_connect_harness." if connect_harness_id.nil? raise "Missing the required parameter 'update_connect_harness_details' when calling update_connect_harness." if update_connect_harness_details.nil? raise "Parameter value for 'connect_harness_id' must not be blank" if OCI::Internal::Util.blank_string?(connect_harness_id) path = '/connectharnesses/{connectHarnessId}'.sub('{connectHarnessId}', connect_harness_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_connect_harness_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#update_connect_harness') 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::Streaming::Models::ConnectHarness' ) end # rubocop:enable Metrics/BlockLength end |
#update_stream(stream_id, update_stream_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_stream API.
Updates the stream. Only specified values will be updated.
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 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 1172 def update_stream(stream_id, update_stream_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#update_stream.' if logger raise "Missing the required parameter 'stream_id' when calling update_stream." if stream_id.nil? raise "Missing the required parameter 'update_stream_details' when calling update_stream." if update_stream_details.nil? raise "Parameter value for 'stream_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_id) path = '/streams/{streamId}'.sub('{streamId}', stream_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_stream_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#update_stream') 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::Streaming::Models::Stream' ) end # rubocop:enable Metrics/BlockLength end |
#update_stream_pool(stream_pool_id, update_stream_pool_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_stream_pool API.
Updates the specified stream pool.
1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 |
# File 'lib/oci/streaming/stream_admin_client.rb', line 1234 def update_stream_pool(stream_pool_id, update_stream_pool_details, opts = {}) logger.debug 'Calling operation StreamAdminClient#update_stream_pool.' if logger raise "Missing the required parameter 'stream_pool_id' when calling update_stream_pool." if stream_pool_id.nil? raise "Missing the required parameter 'update_stream_pool_details' when calling update_stream_pool." if update_stream_pool_details.nil? raise "Parameter value for 'stream_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_pool_id) path = '/streampools/{streamPoolId}'.sub('{streamPoolId}', stream_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_stream_pool_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'StreamAdminClient#update_stream_pool') 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::Streaming::Models::StreamPool' ) end # rubocop:enable Metrics/BlockLength end |