class OCI::Analytics::AnalyticsClient

Analytics API.

Attributes

api_client[R]

Client used to make HTTP requests. @return [OCI::ApiClient]

endpoint[R]

Fully qualified endpoint URL @return [String]

region[R]

The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]

retry_config[R]

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

new(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) click to toggle source

Creates a new AnalyticsClient. 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/analytics/analytics_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 + '/20190331'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "AnalyticsClient endpoint set to '#{@endpoint}'." if logger
end

Public Instance Methods

change_analytics_instance_compartment(analytics_instance_id, change_compartment_details, opts = {}) click to toggle source

Change the compartment of an Analytics instance. The operation is long-running and creates a new WorkRequest.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [OCI::Analytics::Models::ChangeCompartmentDetails] change_compartment_details Input payload to move the resource to a different 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] :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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/change_analytics_instance_compartment.rb.html) to see an example of how to use change_analytics_instance_compartment API.

# File lib/oci/analytics/analytics_client.rb, line 126
def change_analytics_instance_compartment(analytics_instance_id, change_compartment_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#change_analytics_instance_compartment.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling change_analytics_instance_compartment." if analytics_instance_id.nil?
  raise "Missing the required parameter 'change_compartment_details' when calling change_analytics_instance_compartment." if change_compartment_details.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/actions/changeCompartment'.sub('{analyticsInstanceId}', analytics_instance_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]
  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(change_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#change_analytics_instance_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_analytics_instance_network_endpoint(analytics_instance_id, change_analytics_instance_network_endpoint_details, opts = {}) click to toggle source

Change an Analytics instance network endpoint. The operation is long-running and creates a new WorkRequest.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [OCI::Analytics::Models::ChangeAnalyticsInstanceNetworkEndpointDetails] change_analytics_instance_network_endpoint_details Input payload for changing an Analytics instance network endpoint.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/change_analytics_instance_network_endpoint.rb.html) to see an example of how to use change_analytics_instance_network_endpoint API.

# File lib/oci/analytics/analytics_client.rb, line 200
def change_analytics_instance_network_endpoint(analytics_instance_id, change_analytics_instance_network_endpoint_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#change_analytics_instance_network_endpoint.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling change_analytics_instance_network_endpoint." if analytics_instance_id.nil?
  raise "Missing the required parameter 'change_analytics_instance_network_endpoint_details' when calling change_analytics_instance_network_endpoint." if change_analytics_instance_network_endpoint_details.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/actions/changeNetworkEndpoint'.sub('{analyticsInstanceId}', analytics_instance_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]
  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(change_analytics_instance_network_endpoint_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#change_analytics_instance_network_endpoint') 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_analytics_instance(create_analytics_instance_details, opts = {}) click to toggle source

Create a new AnalyticsInstance in the specified compartment. The operation is long-running and creates a new WorkRequest.

@param [OCI::Analytics::Models::CreateAnalyticsInstanceDetails] create_analytics_instance_details Analytics Instance details.

@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 Unique 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::Analytics::Models::AnalyticsInstance AnalyticsInstance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/create_analytics_instance.rb.html) to see an example of how to use create_analytics_instance API.

# File lib/oci/analytics/analytics_client.rb, line 268
def create_analytics_instance(create_analytics_instance_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#create_analytics_instance.' if logger

  raise "Missing the required parameter 'create_analytics_instance_details' when calling create_analytics_instance." if create_analytics_instance_details.nil?

  path = '/analyticsInstances'
  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_analytics_instance_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#create_analytics_instance') 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::Analytics::Models::AnalyticsInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_private_access_channel(analytics_instance_id, create_private_access_channel_details, opts = {}) click to toggle source

Create an Private access Channel for the Analytics instance. The operation is long-running and creates a new WorkRequest.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [OCI::Analytics::Models::CreatePrivateAccessChannelDetails] create_private_access_channel_details Input payload for creating a private access channel for an Analytics instance.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/create_private_access_channel.rb.html) to see an example of how to use create_private_access_channel API.

# File lib/oci/analytics/analytics_client.rb, line 336
def create_private_access_channel(analytics_instance_id, create_private_access_channel_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#create_private_access_channel.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling create_private_access_channel." if analytics_instance_id.nil?
  raise "Missing the required parameter 'create_private_access_channel_details' when calling create_private_access_channel." if create_private_access_channel_details.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/privateAccessChannels'.sub('{analyticsInstanceId}', analytics_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_private_access_channel_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#create_private_access_channel') 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_vanity_url(analytics_instance_id, create_vanity_url_details, opts = {}) click to toggle source

Allows specifying a custom host name to be used to access the analytics instance. This requires prior setup of DNS entry and certificate for this host.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [OCI::Analytics::Models::CreateVanityUrlDetails] create_vanity_url_details Vanity url details.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/create_vanity_url.rb.html) to see an example of how to use create_vanity_url API.

# File lib/oci/analytics/analytics_client.rb, line 405
def create_vanity_url(analytics_instance_id, create_vanity_url_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#create_vanity_url.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling create_vanity_url." if analytics_instance_id.nil?
  raise "Missing the required parameter 'create_vanity_url_details' when calling create_vanity_url." if create_vanity_url_details.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/vanityUrls'.sub('{analyticsInstanceId}', analytics_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_vanity_url_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#create_vanity_url') 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
delete_analytics_instance(analytics_instance_id, opts = {}) click to toggle source

Terminates the specified Analytics instance. The operation is long-running and creates a new WorkRequest.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/delete_analytics_instance.rb.html) to see an example of how to use delete_analytics_instance API.

# File lib/oci/analytics/analytics_client.rb, line 476
def delete_analytics_instance(analytics_instance_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#delete_analytics_instance.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling delete_analytics_instance." if analytics_instance_id.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}'.sub('{analyticsInstanceId}', analytics_instance_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]
  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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#delete_analytics_instance') 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_private_access_channel(private_access_channel_key, analytics_instance_id, opts = {}) click to toggle source

Delete an Analytics instance's Private access channel with the given unique identifier key.

@param [String] private_access_channel_key The unique identifier key of the Private Access Channel.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/delete_private_access_channel.rb.html) to see an example of how to use delete_private_access_channel API.

# File lib/oci/analytics/analytics_client.rb, line 548
def delete_private_access_channel(private_access_channel_key, analytics_instance_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#delete_private_access_channel.' if logger

  raise "Missing the required parameter 'private_access_channel_key' when calling delete_private_access_channel." if private_access_channel_key.nil?
  raise "Missing the required parameter 'analytics_instance_id' when calling delete_private_access_channel." if analytics_instance_id.nil?
  raise "Parameter value for 'private_access_channel_key' must not be blank" if OCI::Internal::Util.blank_string?(private_access_channel_key)
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/privateAccessChannels/{privateAccessChannelKey}'.sub('{privateAccessChannelKey}', private_access_channel_key.to_s).sub('{analyticsInstanceId}', analytics_instance_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]
  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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#delete_private_access_channel') 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_vanity_url(analytics_instance_id, vanity_url_key, opts = {}) click to toggle source

Allows deleting a previously created vanity url.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [String] vanity_url_key Specify unique identifier key of a vanity url to update or delete.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/delete_vanity_url.rb.html) to see an example of how to use delete_vanity_url API.

# File lib/oci/analytics/analytics_client.rb, line 622
def delete_vanity_url(analytics_instance_id, vanity_url_key, opts = {})
  logger.debug 'Calling operation AnalyticsClient#delete_vanity_url.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling delete_vanity_url." if analytics_instance_id.nil?
  raise "Missing the required parameter 'vanity_url_key' when calling delete_vanity_url." if vanity_url_key.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)
  raise "Parameter value for 'vanity_url_key' must not be blank" if OCI::Internal::Util.blank_string?(vanity_url_key)

  path = '/analyticsInstances/{analyticsInstanceId}/vanityUrls/{vanityUrlKey}'.sub('{analyticsInstanceId}', analytics_instance_id.to_s).sub('{vanityUrlKey}', vanity_url_key.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]
  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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#delete_vanity_url') 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_work_request(work_request_id, opts = {}) click to toggle source

Cancel a work request that has not started yet.

@param [String] work_request_id The OCID of the work request.

@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 Unique 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/analytics/delete_work_request.rb.html) to see an example of how to use delete_work_request API.

# File lib/oci/analytics/analytics_client.rb, line 688
def delete_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#delete_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling delete_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#delete_work_request') 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_analytics_instance(analytics_instance_id, opts = {}) click to toggle source

Info for a specific Analytics instance.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@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 Unique 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::Analytics::Models::AnalyticsInstance AnalyticsInstance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/get_analytics_instance.rb.html) to see an example of how to use get_analytics_instance API.

# File lib/oci/analytics/analytics_client.rb, line 746
def get_analytics_instance(analytics_instance_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#get_analytics_instance.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling get_analytics_instance." if analytics_instance_id.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}'.sub('{analyticsInstanceId}', analytics_instance_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: 'AnalyticsClient#get_analytics_instance') 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::Analytics::Models::AnalyticsInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_private_access_channel(private_access_channel_key, analytics_instance_id, opts = {}) click to toggle source

Retrieve private access channel in the specified Analytics Instance.

@param [String] private_access_channel_key The unique identifier key of the Private Access Channel.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@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 Unique 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::Analytics::Models::PrivateAccessChannel PrivateAccessChannel} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/get_private_access_channel.rb.html) to see an example of how to use get_private_access_channel API.

# File lib/oci/analytics/analytics_client.rb, line 806
def get_private_access_channel(private_access_channel_key, analytics_instance_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#get_private_access_channel.' if logger

  raise "Missing the required parameter 'private_access_channel_key' when calling get_private_access_channel." if private_access_channel_key.nil?
  raise "Missing the required parameter 'analytics_instance_id' when calling get_private_access_channel." if analytics_instance_id.nil?
  raise "Parameter value for 'private_access_channel_key' must not be blank" if OCI::Internal::Util.blank_string?(private_access_channel_key)
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/privateAccessChannels/{privateAccessChannelKey}'.sub('{privateAccessChannelKey}', private_access_channel_key.to_s).sub('{analyticsInstanceId}', analytics_instance_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: 'AnalyticsClient#get_private_access_channel') 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::Analytics::Models::PrivateAccessChannel'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_work_request(work_request_id, opts = {}) click to toggle source

Get the details of a work request.

@param [String] work_request_id The OCID of the work request.

@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 Unique 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::Analytics::Models::WorkRequest WorkRequest} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/get_work_request.rb.html) to see an example of how to use get_work_request API.

# File lib/oci/analytics/analytics_client.rb, line 866
def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#get_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Analytics::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_analytics_instances(compartment_id, opts = {}) click to toggle source

List Analytics instances.

@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] :opc_request_id Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [String] :name A filter to return only resources that match the given name exactly.

@option opts [String] :capacity_type A filter to only return resources matching the capacity type enum. Values are

case-insensitive.

@option opts [String] :feature_set A filter to only return resources matching the feature set. Values are

case-insensitive.

@option opts [String] :lifecycle_state A filter to only return resources matching the lifecycle state. The state

value is case-insensitive.

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :sort_by The field to sort by (one column only). Default sort order is

ascending exception of `timeCreated` column (descending).

@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`).

@return [Response] A Response object with data of type Array<{OCI::Analytics::Models::AnalyticsInstanceSummary AnalyticsInstanceSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/list_analytics_instances.rb.html) to see an example of how to use list_analytics_instances API.

# File lib/oci/analytics/analytics_client.rb, line 950
def list_analytics_instances(compartment_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#list_analytics_instances.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_analytics_instances." if compartment_id.nil?

  if opts[:capacity_type] && !OCI::Analytics::Models::CAPACITY_TYPE_ENUM.include?(opts[:capacity_type])
    raise 'Invalid value for "capacity_type", must be one of the values in OCI::Analytics::Models::CAPACITY_TYPE_ENUM.'
  end

  if opts[:feature_set] && !OCI::Analytics::Models::FEATURE_SET_ENUM.include?(opts[:feature_set])
    raise 'Invalid value for "feature_set", must be one of the values in OCI::Analytics::Models::FEATURE_SET_ENUM.'
  end

  if opts[:lifecycle_state] && !OCI::Analytics::Models::ANALYTICS_INSTANCE_LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Analytics::Models::ANALYTICS_INSTANCE_LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_by] && !OCI::Analytics::Models::SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::Analytics::Models::SORT_BY_ENUM.'
  end

  if opts[:sort_order] && !OCI::Analytics::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Analytics::Models::SORT_ORDER_ENUM.'
  end

  path = '/analyticsInstances'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:capacityType] = opts[:capacity_type] if opts[:capacity_type]
  query_params[:featureSet] = opts[:feature_set] if opts[:feature_set]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  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]

  # 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: 'AnalyticsClient#list_analytics_instances') 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::Analytics::Models::AnalyticsInstanceSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_request_errors(work_request_id, opts = {}) click to toggle source

Get the errors of a work request.

@param [String] work_request_id The OCID of the work request.

@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 Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@return [Response] A Response object with data of type Array<{OCI::Analytics::Models::WorkRequestError WorkRequestError}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.

# File lib/oci/analytics/analytics_client.rb, line 1046
def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Analytics::Models::WorkRequestError>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_request_logs(work_request_id, opts = {}) click to toggle source

Get the logs of a work request.

@param [String] work_request_id The OCID of the work request.

@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 Unique identifier for the request.

If you need to contact Oracle about a particular request, please provide the request ID.

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@return [Response] A Response object with data of type Array<{OCI::Analytics::Models::WorkRequestLog WorkRequestLog}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.

# File lib/oci/analytics/analytics_client.rb, line 1116
def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Analytics::Models::WorkRequestLog>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_requests(compartment_id, opts = {}) click to toggle source

List all work requests in a compartment.

@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] :resource_id The OCID of the resource associated with a work request.

@option opts [String] :resource_type Type of the resource associated with a work request.

@option opts [Array<String>] :status One or more work request status values to filter on.

Allowed values are: ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED

@option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated

\"List\" call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Example: `50`

@option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous "List"

call. For important details about how pagination works, see
[List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :sort_by The field used for sorting work request results.

@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`).

@option opts [String] :opc_request_id Unique 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::Analytics::Models::WorkRequestSummary WorkRequestSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/list_work_requests.rb.html) to see an example of how to use list_work_requests API.

# File lib/oci/analytics/analytics_client.rb, line 1197
def list_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#list_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?

  if opts[:resource_type] && !OCI::Analytics::Models::WORK_REQUEST_RESOURCE_TYPE_ENUM.include?(opts[:resource_type])
    raise 'Invalid value for "resource_type", must be one of the values in OCI::Analytics::Models::WORK_REQUEST_RESOURCE_TYPE_ENUM.'
  end


  status_allowable_values = %w[ACCEPTED IN_PROGRESS FAILED SUCCEEDED CANCELING CANCELED]
  if opts[:status] && !opts[:status].empty?
    opts[:status].each do |val_to_check|
      unless status_allowable_values.include?(val_to_check)
        raise 'Invalid value for "status", must be one of ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED.'
      end
    end
  end

  if opts[:sort_by] && !OCI::Analytics::Models::WORK_REQUEST_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::Analytics::Models::WORK_REQUEST_SORT_BY_ENUM.'
  end

  if opts[:sort_order] && !OCI::Analytics::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Analytics::Models::SORT_ORDER_ENUM.'
  end

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:status] = OCI::ApiClient.build_collection_params(opts[:status], :multi) if opts[:status] && !opts[:status].empty?
  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]

  # 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: 'AnalyticsClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Analytics::Models::WorkRequestSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
logger() click to toggle source

@return [Logger] The logger for this client. May be nil.

# File lib/oci/analytics/analytics_client.rb, line 92
def logger
  @api_client.config.logger
end
region=(new_region) click to toggle source

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/analytics/analytics_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://analytics.{region}.ocp.{secondLevelDomain}') + '/20190331'
  logger.info "AnalyticsClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
scale_analytics_instance(analytics_instance_id, scale_analytics_instance_details, opts = {}) click to toggle source

Scale an Analytics instance up or down. The operation is long-running and creates a new WorkRequest.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [OCI::Analytics::Models::ScaleAnalyticsInstanceDetails] scale_analytics_instance_details Input payload for scaling an Analytics instance up or down.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/scale_analytics_instance.rb.html) to see an example of how to use scale_analytics_instance API.

# File lib/oci/analytics/analytics_client.rb, line 1297
def scale_analytics_instance(analytics_instance_id, scale_analytics_instance_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#scale_analytics_instance.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling scale_analytics_instance." if analytics_instance_id.nil?
  raise "Missing the required parameter 'scale_analytics_instance_details' when calling scale_analytics_instance." if scale_analytics_instance_details.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/actions/scale'.sub('{analyticsInstanceId}', analytics_instance_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]
  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(scale_analytics_instance_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#scale_analytics_instance') 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
start_analytics_instance(analytics_instance_id, opts = {}) click to toggle source

Starts the specified Analytics instance. The operation is long-running and creates a new WorkRequest.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/start_analytics_instance.rb.html) to see an example of how to use start_analytics_instance API.

# File lib/oci/analytics/analytics_client.rb, line 1369
def start_analytics_instance(analytics_instance_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#start_analytics_instance.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling start_analytics_instance." if analytics_instance_id.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/actions/start'.sub('{analyticsInstanceId}', analytics_instance_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]
  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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#start_analytics_instance') 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
stop_analytics_instance(analytics_instance_id, opts = {}) click to toggle source

Stop the specified Analytics instance. The operation is long-running and creates a new WorkRequest.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/stop_analytics_instance.rb.html) to see an example of how to use stop_analytics_instance API.

# File lib/oci/analytics/analytics_client.rb, line 1440
def stop_analytics_instance(analytics_instance_id, opts = {})
  logger.debug 'Calling operation AnalyticsClient#stop_analytics_instance.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling stop_analytics_instance." if analytics_instance_id.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/actions/stop'.sub('{analyticsInstanceId}', analytics_instance_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]
  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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#stop_analytics_instance') 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
update_analytics_instance(analytics_instance_id, update_analytics_instance_details, opts = {}) click to toggle source

Updates certain fields of an Analytics instance. Fields that are not provided in the request will not be updated.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [OCI::Analytics::Models::UpdateAnalyticsInstanceDetails] update_analytics_instance_details The Analytics Instance fields to update. Fields that are not provided

will not be updated.

@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 Unique 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::Analytics::Models::AnalyticsInstance AnalyticsInstance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/update_analytics_instance.rb.html) to see an example of how to use update_analytics_instance API.

# File lib/oci/analytics/analytics_client.rb, line 1508
def update_analytics_instance(analytics_instance_id, update_analytics_instance_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#update_analytics_instance.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling update_analytics_instance." if analytics_instance_id.nil?
  raise "Missing the required parameter 'update_analytics_instance_details' when calling update_analytics_instance." if update_analytics_instance_details.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}'.sub('{analyticsInstanceId}', analytics_instance_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(update_analytics_instance_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#update_analytics_instance') 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::Analytics::Models::AnalyticsInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_private_access_channel(private_access_channel_key, analytics_instance_id, update_private_access_channel_details, opts = {}) click to toggle source

Update the Private Access Channel with the given unique identifier key in the specified Analytics Instance.

@param [String] private_access_channel_key The unique identifier key of the Private Access Channel.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [OCI::Analytics::Models::UpdatePrivateAccessChannelDetails] update_private_access_channel_details Update the Private Access Channel with the given unique identifier key in the specified Analytics Instance.

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/update_private_access_channel.rb.html) to see an example of how to use update_private_access_channel API.

# File lib/oci/analytics/analytics_client.rb, line 1582
def update_private_access_channel(private_access_channel_key, analytics_instance_id, update_private_access_channel_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#update_private_access_channel.' if logger

  raise "Missing the required parameter 'private_access_channel_key' when calling update_private_access_channel." if private_access_channel_key.nil?
  raise "Missing the required parameter 'analytics_instance_id' when calling update_private_access_channel." if analytics_instance_id.nil?
  raise "Missing the required parameter 'update_private_access_channel_details' when calling update_private_access_channel." if update_private_access_channel_details.nil?
  raise "Parameter value for 'private_access_channel_key' must not be blank" if OCI::Internal::Util.blank_string?(private_access_channel_key)
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)

  path = '/analyticsInstances/{analyticsInstanceId}/privateAccessChannels/{privateAccessChannelKey}'.sub('{privateAccessChannelKey}', private_access_channel_key.to_s).sub('{analyticsInstanceId}', analytics_instance_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]
  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(update_private_access_channel_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#update_private_access_channel') 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
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_vanity_url(analytics_instance_id, vanity_url_key, update_vanity_url_details, opts = {}) click to toggle source

Allows uploading a new certificate for a vanity url, which will have to be done when the current certificate is expiring.

@param [String] analytics_instance_id The OCID of the AnalyticsInstance.

@param [String] vanity_url_key Specify unique identifier key of a vanity url to update or delete.

@param [OCI::Analytics::Models::UpdateVanityUrlDetails] update_vanity_url_details Vanity url details to update (certificate).

@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 Unique 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 nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/analytics/update_vanity_url.rb.html) to see an example of how to use update_vanity_url API.

# File lib/oci/analytics/analytics_client.rb, line 1659
def update_vanity_url(analytics_instance_id, vanity_url_key, update_vanity_url_details, opts = {})
  logger.debug 'Calling operation AnalyticsClient#update_vanity_url.' if logger

  raise "Missing the required parameter 'analytics_instance_id' when calling update_vanity_url." if analytics_instance_id.nil?
  raise "Missing the required parameter 'vanity_url_key' when calling update_vanity_url." if vanity_url_key.nil?
  raise "Missing the required parameter 'update_vanity_url_details' when calling update_vanity_url." if update_vanity_url_details.nil?
  raise "Parameter value for 'analytics_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(analytics_instance_id)
  raise "Parameter value for 'vanity_url_key' must not be blank" if OCI::Internal::Util.blank_string?(vanity_url_key)

  path = '/analyticsInstances/{analyticsInstanceId}/vanityUrls/{vanityUrlKey}'.sub('{analyticsInstanceId}', analytics_instance_id.to_s).sub('{vanityUrlKey}', vanity_url_key.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]
  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(update_vanity_url_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnalyticsClient#update_vanity_url') 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
    )
  end
  # rubocop:enable Metrics/BlockLength
end

Private Instance Methods

applicable_retry_config(opts = {}) click to toggle source

rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines

# File lib/oci/analytics/analytics_client.rb, line 1707
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end