class OCI::Streaming::StreamAdminClient
The API for the Streaming
Service.
Attributes
Client used to make HTTP requests. @return [OCI::ApiClient]
Fully qualified endpoint URL @return [String]
The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]
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 @return [OCI::Retry::RetryConfig]
Public Class Methods
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.
@param [Config] config A Config
object. @param [String] region A region used to determine the service endpoint. This will usually
correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client
@param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
the details for the proxy can be provided in this parameter
@param [OCI::Retry::RetryConfig] retry_config
The retry configuration for this service client. This represents the default retry configuration to
apply across all operations. 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
# File lib/oci/streaming/stream_admin_client.rb, line 53 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/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
Public Instance Methods
Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. @param [String] connect_harness_id The OCID of the connect harness.
@param [OCI::Streaming::Models::ChangeConnectHarnessCompartmentDetails] change_connect_harness_compartment_details The connect harness will be moved into the compartment specified within this entity. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/change_connect_harness_compartment.rb.html) to see an example of how to use change_connect_harness_compartment
API.
# File lib/oci/streaming/stream_admin_client.rb, line 114 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.make_retrying_call(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
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.
@param [String] stream_id The OCID of the stream.
@param [OCI::Streaming::Models::ChangeStreamCompartmentDetails] change_stream_compartment_details The stream will be moved into the compartment specified within this entity. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/change_stream_compartment.rb.html) to see an example of how to use change_stream_compartment
API.
# File lib/oci/streaming/stream_admin_client.rb, line 177 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.make_retrying_call(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
Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. @param [String] stream_pool_id The OCID of the stream pool.
@param [OCI::Streaming::Models::ChangeStreamPoolCompartmentDetails] change_stream_pool_compartment_details The stream pool will be moved into the compartment specified within this entity. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/change_stream_pool_compartment.rb.html) to see an example of how to use change_stream_pool_compartment
API.
# File lib/oci/streaming/stream_admin_client.rb, line 237 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.make_retrying_call(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
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.
@param [OCI::Streaming::Models::CreateConnectHarnessDetails] create_connect_harness_details The connect harness to create. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry
tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). @return [Response] A Response
object with data of type {OCI::Streaming::Models::ConnectHarness ConnectHarness} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/create_connect_harness.rb.html) to see an example of how to use create_connect_harness
API.
# File lib/oci/streaming/stream_admin_client.rb, line 297 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.make_retrying_call(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
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 get_stream
}. In the response, the `lifecycleState` parameter of the {Stream} object tells you its current state.
@param [OCI::Streaming::Models::CreateStreamDetails] create_stream_details The stream to create. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type {OCI::Streaming::Models::Stream Stream} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/create_stream.rb.html) to see an example of how to use create_stream
API.
# File lib/oci/streaming/stream_admin_client.rb, line 359 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.make_retrying_call(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
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.
@param [OCI::Streaming::Models::CreateStreamPoolDetails] create_stream_pool_details The stream pool to create. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry
tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). @return [Response] A Response
object with data of type {OCI::Streaming::Models::StreamPool StreamPool} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/create_stream_pool.rb.html) to see an example of how to use create_stream_pool
API.
# File lib/oci/streaming/stream_admin_client.rb, line 418 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.make_retrying_call(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
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 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.
@param [String] connect_harness_id The OCID of the connect harness.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/delete_connect_harness.rb.html) to see an example of how to use delete_connect_harness
API.
# File lib/oci/streaming/stream_admin_client.rb, line 482 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.make_retrying_call(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
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 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.
@param [String] stream_id The OCID of the stream.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/delete_stream.rb.html) to see an example of how to use delete_stream
API.
# File lib/oci/streaming/stream_admin_client.rb, line 545 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.make_retrying_call(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
Deletes a stream pool. All containing streams will also be deleted. The default stream pool of a compartment cannot be deleted.
@param [String] stream_pool_id The OCID of the stream pool.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/delete_stream_pool.rb.html) to see an example of how to use delete_stream_pool
API.
# File lib/oci/streaming/stream_admin_client.rb, line 605 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.make_retrying_call(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
Gets detailed information about a connect harness. @param [String] connect_harness_id The OCID of the connect harness.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type {OCI::Streaming::Models::ConnectHarness ConnectHarness} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/get_connect_harness.rb.html) to see an example of how to use get_connect_harness
API.
# File lib/oci/streaming/stream_admin_client.rb, line 662 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.make_retrying_call(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
Gets detailed information about a stream, including the number of partitions. @param [String] stream_id The OCID of the stream.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type {OCI::Streaming::Models::Stream Stream} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/get_stream.rb.html) to see an example of how to use get_stream
API.
# File lib/oci/streaming/stream_admin_client.rb, line 719 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.make_retrying_call(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
Gets detailed information about the stream pool, such as Kafka settings. @param [String] stream_pool_id The OCID of the stream pool.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type {OCI::Streaming::Models::StreamPool StreamPool} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/get_stream_pool.rb.html) to see an example of how to use get_stream_pool
API.
# File lib/oci/streaming/stream_admin_client.rb, line 776 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.make_retrying_call(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
Lists the connectharness. @param [String] compartment_id The OCID of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :id A filter to return only resources that match the given ID exactly.
@option opts [String] :name A filter to return only resources that match the given name exactly.
@option opts [Integer] :limit The maximum number of items to return. The value must be between 1 and 50. The default is 10. (default to 5) @option opts [String] :page The page at which to start retrieving results. @option opts [String] :sort_by The field to sort by. You can provide no more than one sort order. By default, `TIMECREATED` sorts results in descending order and `NAME` sorts results in ascending order.
Allowed values are: NAME, TIMECREATED
@option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'.
Allowed values are: ASC, DESC
@option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::Streaming::Models::ConnectHarnessSummary ConnectHarnessSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/list_connect_harnesses.rb.html) to see an example of how to use list_connect_harnesses
API.
# File lib/oci/streaming/stream_admin_client.rb, line 846 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.make_retrying_call(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 the stream pools for a given compartment ID. @param [String] compartment_id The OCID of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :id A filter to return only resources that match the given ID exactly.
@option opts [String] :name A filter to return only resources that match the given name exactly.
@option opts [Integer] :limit The maximum number of items to return. The value must be between 1 and 50. The default is 10. (default to 5) @option opts [String] :page The page at which to start retrieving results. @option opts [String] :sort_by The field to sort by. You can provide no more than one sort order. By default, `TIMECREATED` sorts results in descending order and `NAME` sorts results in ascending order.
Allowed values are: NAME, TIMECREATED
@option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'.
Allowed values are: ASC, DESC
@option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::Streaming::Models::StreamPoolSummary StreamPoolSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/list_stream_pools.rb.html) to see an example of how to use list_stream_pools
API.
# File lib/oci/streaming/stream_admin_client.rb, line 935 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.make_retrying_call(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
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.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :compartment_id The OCID of the compartment. Is exclusive with the `streamPoolId` parameter. One of them is required. @option opts [String] :stream_pool_id The OCID of the stream pool. Is exclusive with the `compartmentId` parameter. One of them is required. @option opts [String] :id A filter to return only resources that match the given ID exactly.
@option opts [String] :name A filter to return only resources that match the given name exactly.
@option opts [Integer] :limit The maximum number of items to return. The value must be between 1 and 50. The default is 10. (default to 5) @option opts [String] :page The page at which to start retrieving results. @option opts [String] :sort_by The field to sort by. You can provide no more than one sort order. By default, `TIMECREATED` sorts results in descending order and `NAME` sorts results in ascending order.
Allowed values are: NAME, TIMECREATED
@option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'.
Allowed values are: ASC, DESC
@option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::Streaming::Models::StreamSummary StreamSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/list_streams.rb.html) to see an example of how to use list_streams
API.
# File lib/oci/streaming/stream_admin_client.rb, line 1029 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.make_retrying_call(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
@return [Logger] The logger for this client. May be nil.
# File lib/oci/streaming/stream_admin_client.rb, line 92 def logger @api_client.config.logger end
Set the region that will be used to determine the service endpoint. This will usually correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
# File lib/oci/streaming/stream_admin_client.rb, line 82 def region=(new_region) @region = new_region raise 'A region must be specified.' unless @region @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://streaming.{region}.oci.{secondLevelDomain}') + '/20180418' logger.info "StreamAdminClient endpoint set to '#{@endpoint} from region #{@region}'." if logger end
Updates the tags applied to the connect harness.
@param [String] connect_harness_id The OCID of the connect harness.
@param [OCI::Streaming::Models::UpdateConnectHarnessDetails] update_connect_harness_details The connect harness is updated with the tags provided. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @return [Response] A Response
object with data of type {OCI::Streaming::Models::ConnectHarness ConnectHarness} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/update_connect_harness.rb.html) to see an example of how to use update_connect_harness
API.
# File lib/oci/streaming/stream_admin_client.rb, line 1108 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.make_retrying_call(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
Updates the stream. Only specified values will be updated.
@param [String] stream_id The OCID of the stream.
@param [OCI::Streaming::Models::UpdateStreamDetails] update_stream_details The stream is updated with the values provided. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @return [Response] A Response
object with data of type {OCI::Streaming::Models::Stream Stream} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/update_stream.rb.html) to see an example of how to use update_stream
API.
# File lib/oci/streaming/stream_admin_client.rb, line 1170 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.make_retrying_call(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
Updates the specified stream pool.
@param [String] stream_pool_id The OCID of the stream pool.
@param [OCI::Streaming::Models::UpdateStreamPoolDetails] update_stream_pool_details The pool is updated with the provided fields. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @return [Response] A Response
object with data of type {OCI::Streaming::Models::StreamPool StreamPool} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/update_stream_pool.rb.html) to see an example of how to use update_stream_pool
API.
# File lib/oci/streaming/stream_admin_client.rb, line 1232 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.make_retrying_call(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
Private Instance Methods
rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines
# File lib/oci/streaming/stream_admin_client.rb, line 1277 def applicable_retry_config(opts = {}) return @retry_config unless opts.key?(:retry_config) opts[:retry_config] end