class OCI::ServiceCatalog::ServiceCatalogClient

Manage solutions in Oracle Cloud Infrastructure Service Catalog.

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 ServiceCatalogClient. 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/service_catalog/service_catalog_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 + '/20210527'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "ServiceCatalogClient endpoint set to '#{@endpoint}'." if logger
end

Public Instance Methods

bulk_replace_service_catalog_associations(service_catalog_id, bulk_replace_service_catalog_associations_details, opts = {}) click to toggle source

Replace all associations of a given service catalog in one bulk transaction. @param [String] service_catalog_id The unique identifier for the service catalog. @param [OCI::ServiceCatalog::Models::BulkReplaceServiceCatalogAssociationsDetails] bulk_replace_service_catalog_associations_details Details of the service catalog update operation. @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 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/servicecatalog/bulk_replace_service_catalog_associations.rb.html) to see an example of how to use bulk_replace_service_catalog_associations API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 116
def bulk_replace_service_catalog_associations(service_catalog_id, bulk_replace_service_catalog_associations_details, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#bulk_replace_service_catalog_associations.' if logger

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

  path = '/serviceCatalogs/{serviceCatalogId}/actions/bulkReplaceAssociations'.sub('{serviceCatalogId}', service_catalog_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(bulk_replace_service_catalog_associations_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#bulk_replace_service_catalog_associations') 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
change_private_application_compartment(private_application_id, change_private_application_compartment_details, opts = {}) click to toggle source

Moves the specified private application from one compartment to another. @param [String] private_application_id The unique identifier for the private application. @param [OCI::ServiceCatalog::Models::ChangePrivateApplicationCompartmentDetails] change_private_application_compartment_details The details of the request to change the compartment of a given private application. @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 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/servicecatalog/change_private_application_compartment.rb.html) to see an example of how to use change_private_application_compartment API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 178
def change_private_application_compartment(private_application_id, change_private_application_compartment_details, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#change_private_application_compartment.' if logger

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

  path = '/privateApplications/{privateApplicationId}/actions/changeCompartment'.sub('{privateApplicationId}', private_application_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(change_private_application_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#change_private_application_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_service_catalog_compartment(service_catalog_id, change_service_catalog_compartment_details, opts = {}) click to toggle source

Moves the specified service catalog from one compartment to another. @param [String] service_catalog_id The unique identifier for the service catalog. @param [OCI::ServiceCatalog::Models::ChangeServiceCatalogCompartmentDetails] change_service_catalog_compartment_details The details of the request to change the compartment of a given service catalog. @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 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/servicecatalog/change_service_catalog_compartment.rb.html) to see an example of how to use change_service_catalog_compartment API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 240
def change_service_catalog_compartment(service_catalog_id, change_service_catalog_compartment_details, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#change_service_catalog_compartment.' if logger

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

  path = '/serviceCatalogs/{serviceCatalogId}/actions/changeCompartment'.sub('{serviceCatalogId}', service_catalog_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(change_service_catalog_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#change_service_catalog_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_private_application(create_private_application_details, opts = {}) click to toggle source

Creates a private application along with a single package to be hosted. @param [OCI::ServiceCatalog::Models::CreatePrivateApplicationDetails] create_private_application_details Private application creation 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_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 might be rejected).

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

# File lib/oci/service_catalog/service_catalog_client.rb, line 302
def create_private_application(create_private_application_details, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#create_private_application.' if logger

  raise "Missing the required parameter 'create_private_application_details' when calling create_private_application." if create_private_application_details.nil?

  path = '/privateApplications'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_private_application_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#create_private_application') 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::ServiceCatalog::Models::PrivateApplication'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_service_catalog(create_service_catalog_details, opts = {}) click to toggle source

Creates a brand new service catalog in a given compartment. @param [OCI::ServiceCatalog::Models::CreateServiceCatalogDetails] create_service_catalog_details The details for creating a service catalog. @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_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 might be rejected).

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

# File lib/oci/service_catalog/service_catalog_client.rb, line 364
def create_service_catalog(create_service_catalog_details, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#create_service_catalog.' if logger

  raise "Missing the required parameter 'create_service_catalog_details' when calling create_service_catalog." if create_service_catalog_details.nil?

  path = '/serviceCatalogs'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_service_catalog_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#create_service_catalog') 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::ServiceCatalog::Models::ServiceCatalog'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_service_catalog_association(create_service_catalog_association_details, opts = {}) click to toggle source

Creates an association between service catalog and a resource. @param [OCI::ServiceCatalog::Models::CreateServiceCatalogAssociationDetails] create_service_catalog_association_details The details for creating the association between resource and service catalog. @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_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 might be rejected).

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

# File lib/oci/service_catalog/service_catalog_client.rb, line 426
def create_service_catalog_association(create_service_catalog_association_details, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#create_service_catalog_association.' if logger

  raise "Missing the required parameter 'create_service_catalog_association_details' when calling create_service_catalog_association." if create_service_catalog_association_details.nil?

  path = '/serviceCatalogAssociations'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_service_catalog_association_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#create_service_catalog_association') 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::ServiceCatalog::Models::ServiceCatalogAssociation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_private_application(private_application_id, opts = {}) click to toggle source

Deletes an existing private application. @param [String] private_application_id The unique identifier for the private application. @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 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/servicecatalog/delete_private_application.rb.html) to see an example of how to use delete_private_application API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 487
def delete_private_application(private_application_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#delete_private_application.' if logger

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

  path = '/privateApplications/{privateApplicationId}'.sub('{privateApplicationId}', private_application_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: 'ServiceCatalogClient#delete_private_application') 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_service_catalog(service_catalog_id, opts = {}) click to toggle source

Deletes the specified service catalog from the compartment. @param [String] service_catalog_id The unique identifier for the service catalog. @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 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/servicecatalog/delete_service_catalog.rb.html) to see an example of how to use delete_service_catalog API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 547
def delete_service_catalog(service_catalog_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#delete_service_catalog.' if logger

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

  path = '/serviceCatalogs/{serviceCatalogId}'.sub('{serviceCatalogId}', service_catalog_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: 'ServiceCatalogClient#delete_service_catalog') 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_service_catalog_association(service_catalog_association_id, opts = {}) click to toggle source

Removes an association between service catalog and a resource. @param [String] service_catalog_association_id The unique identifier of the service catalog association. @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 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/servicecatalog/delete_service_catalog_association.rb.html) to see an example of how to use delete_service_catalog_association API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 607
def delete_service_catalog_association(service_catalog_association_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#delete_service_catalog_association.' if logger

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

  path = '/serviceCatalogAssociations/{serviceCatalogAssociationId}'.sub('{serviceCatalogAssociationId}', service_catalog_association_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: 'ServiceCatalogClient#delete_service_catalog_association') 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_private_application(private_application_id, opts = {}) click to toggle source

Gets the details of the specified private application. @param [String] private_application_id The unique identifier for the private application. @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 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::ServiceCatalog::Models::PrivateApplication PrivateApplication} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/get_private_application.rb.html) to see an example of how to use get_private_application API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 663
def get_private_application(private_application_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#get_private_application.' if logger

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

  path = '/privateApplications/{privateApplicationId}'.sub('{privateApplicationId}', private_application_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: 'ServiceCatalogClient#get_private_application') 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::ServiceCatalog::Models::PrivateApplication'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_private_application_package(private_application_package_id, opts = {}) click to toggle source

Gets the details of a specific package within a given private application. @param [String] private_application_package_id The unique identifier for the private application package. @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 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::ServiceCatalog::Models::PrivateApplicationPackage PrivateApplicationPackage} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/get_private_application_package.rb.html) to see an example of how to use get_private_application_package API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 821
def get_private_application_package(private_application_package_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#get_private_application_package.' if logger

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

  path = '/privateApplicationPackages/{privateApplicationPackageId}'.sub('{privateApplicationPackageId}', private_application_package_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: 'ServiceCatalogClient#get_private_application_package') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ServiceCatalog::Models::PrivateApplicationPackage'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_private_application_package_action_download_config(private_application_package_id, opts = {}, &block) click to toggle source

Downloads the configuration that was used to create the private application package. @param [String] private_application_package_id The unique identifier for the private application package. @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 Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request,

please provide the request ID.

@option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given @option [Block] &block Streaming http body to the block @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/get_private_application_package_action_download_config.rb.html) to see an example of how to use get_private_application_package_action_download_config API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 879
def get_private_application_package_action_download_config(private_application_package_id, opts = {}, &block)
  logger.debug 'Calling operation ServiceCatalogClient#get_private_application_package_action_download_config.' if logger

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

  path = '/privateApplicationPackages/{privateApplicationPackageId}/actions/downloadConfig'.sub('{privateApplicationPackageId}', private_application_package_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'application/zip'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  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: 'ServiceCatalogClient#get_private_application_package_action_download_config') do
    if !block.nil?
      @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: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @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: 'Stream',
          &proc { |chunk, _response| opts[:response_target].write(chunk) }
        )
      elsif opts[:response_target].is_a?(String)
        File.open(opts[:response_target], 'wb') do |output|
          return @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: 'Stream',
            &proc { |chunk, _response| output.write(chunk) }
          )
        end
      end
    else
      @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: 'String'
      )
    end
  end
  # rubocop:enable Metrics/BlockLength
end
get_service_catalog(service_catalog_id, opts = {}) click to toggle source

Gets detailed information about the service catalog including name, compartmentId @param [String] service_catalog_id The unique identifier for the service catalog. @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 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::ServiceCatalog::Models::ServiceCatalog ServiceCatalog} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/get_service_catalog.rb.html) to see an example of how to use get_service_catalog API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 979
def get_service_catalog(service_catalog_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#get_service_catalog.' if logger

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

  path = '/serviceCatalogs/{serviceCatalogId}'.sub('{serviceCatalogId}', service_catalog_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: 'ServiceCatalogClient#get_service_catalog') 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::ServiceCatalog::Models::ServiceCatalog'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_service_catalog_association(service_catalog_association_id, opts = {}) click to toggle source

Gets detailed information about specific service catalog association. @param [String] service_catalog_association_id The unique identifier of the service catalog association. @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 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::ServiceCatalog::Models::ServiceCatalogAssociation ServiceCatalogAssociation} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/get_service_catalog_association.rb.html) to see an example of how to use get_service_catalog_association API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 1035
def get_service_catalog_association(service_catalog_association_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#get_service_catalog_association.' if logger

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

  path = '/serviceCatalogAssociations/{serviceCatalogAssociationId}'.sub('{serviceCatalogAssociationId}', service_catalog_association_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: 'ServiceCatalogClient#get_service_catalog_association') 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::ServiceCatalog::Models::ServiceCatalogAssociation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_work_request(work_request_id, opts = {}) click to toggle source

Gets the status of the work request with the given ID. @param [String] work_request_id The ID of the asynchronous 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 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::ServiceCatalog::Models::WorkRequest WorkRequest} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/get_work_request.rb.html) to see an example of how to use get_work_request API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 1091
def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#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: 'ServiceCatalogClient#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::ServiceCatalog::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_applications(opts = {}) click to toggle source

Lists all the applications in a service catalog or a tenancy. If no parameter is specified, all catalogs from all compartments in the tenancy will be scanned for any type of content.

@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 unique identifier for the compartment. @option opts [String] :service_catalog_id The unique identifier for the service catalog. @option opts [String] :entity_type The type of the application in the service catalog. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request,

please provide the request ID.

@option opts [Integer] :limit How many records to return. Specify a value greater than zero and less than or equal to 1000. The default is 30.

(default to 30)

@option opts [String] :page The value of the `opc-next-page` response header from the previous "List" call. @option opts [String] :display_name Exact match name filter. @option opts [String] :entity_id The unique identifier of the entity associated with service catalog. @option opts [Array<String>] :publisher_id Limit results to just this publisher. @option opts [Array<String>] :package_type Name of the package type. If multiple package types are provided, then any resource with

one or more matching package types will be returned.

Allowed values are: STACK

@option opts [Array<String>] :pricing Name of the pricing type. If multiple pricing types are provided, then any resource with

one or more matching pricing models will be returned.

Allowed values are: FREE, BYOL, PAYGO

@option opts [BOOLEAN] :is_featured Indicates whether to show only featured resources. If this is set to `false` or is omitted, then all resources will be returned.

(default to false)

@option opts [String] :sort_order The sort order to apply, either `ASC` or `DESC`. Default is `ASC`. (default to ASC)

Allowed values are: ASC, DESC

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

# File lib/oci/service_catalog/service_catalog_client.rb, line 1170
def list_applications(opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#list_applications.' if logger



  package_type_allowable_values = %w[STACK]
  if opts[:package_type] && !opts[:package_type].empty?
    opts[:package_type].each do |val_to_check|
      unless package_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "package_type", must be one of STACK.'
      end
    end
  end


  pricing_allowable_values = %w[FREE BYOL PAYGO]
  if opts[:pricing] && !opts[:pricing].empty?
    opts[:pricing].each do |val_to_check|
      unless pricing_allowable_values.include?(val_to_check)
        raise 'Invalid value for "pricing", must be one of FREE, BYOL, PAYGO.'
      end
    end
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/applications'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:serviceCatalogId] = opts[:service_catalog_id] if opts[:service_catalog_id]
  query_params[:entityType] = opts[:entity_type] if opts[:entity_type]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:entityId] = opts[:entity_id] if opts[:entity_id]
  query_params[:publisherId] = OCI::ApiClient.build_collection_params(opts[:publisher_id], :multi) if opts[:publisher_id] && !opts[:publisher_id].empty?
  query_params[:packageType] = OCI::ApiClient.build_collection_params(opts[:package_type], :multi) if opts[:package_type] && !opts[:package_type].empty?
  query_params[:pricing] = OCI::ApiClient.build_collection_params(opts[:pricing], :multi) if opts[:pricing] && !opts[:pricing].empty?
  query_params[:isFeatured] = opts[:is_featured] if !opts[:is_featured].nil?
  query_params[: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: 'ServiceCatalogClient#list_applications') 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::ServiceCatalog::Models::ApplicationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_private_application_packages(private_application_id, opts = {}) click to toggle source

Lists the packages in the specified private application. @param [String] private_application_id The unique identifier for the private application. @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] :private_application_package_id The unique identifier for the private application package. @option opts [Array<String>] :package_type Name of the package type. If multiple package types are provided, then any resource with

one or more matching package types will be returned.

Allowed values are: STACK

@option opts [Integer] :limit How many records to return. Specify a value greater than zero and less than or equal to 1000. The default is 30.

(default to 30)

@option opts [String] :page The value of the `opc-next-page` response header from the previous "List" call. @option opts [String] :opc_request_id 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] :sort_by The field to use to sort listed results. You can only specify one field to sort by.

`TIMECREATED` displays results in descending order by default. You can change your
preference by specifying a different sort order.
 (default to TIMECREATED)
Allowed values are: TIMECREATED, VERSION

@option opts [String] :sort_order The sort order to apply, either `ASC` or `DESC`. Default is `ASC`. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :display_name Exact match name filter. @return [Response] A Response object with data of type {OCI::ServiceCatalog::Models::PrivateApplicationPackageCollection PrivateApplicationPackageCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/list_private_application_packages.rb.html) to see an example of how to use list_private_application_packages API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 1276
def list_private_application_packages(private_application_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#list_private_application_packages.' if logger

  raise "Missing the required parameter 'private_application_id' when calling list_private_application_packages." if private_application_id.nil?


  package_type_allowable_values = %w[STACK]
  if opts[:package_type] && !opts[:package_type].empty?
    opts[:package_type].each do |val_to_check|
      unless package_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "package_type", must be one of STACK.'
      end
    end
  end

  if opts[:sort_by] && !%w[TIMECREATED VERSION].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, VERSION.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/privateApplicationPackages'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:privateApplicationId] = private_application_id
  query_params[:privateApplicationPackageId] = opts[:private_application_package_id] if opts[:private_application_package_id]
  query_params[:packageType] = OCI::ApiClient.build_collection_params(opts[:package_type], :multi) if opts[:package_type] && !opts[:package_type].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]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]

  # 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: 'ServiceCatalogClient#list_private_application_packages') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ServiceCatalog::Models::PrivateApplicationPackageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_private_applications(compartment_id, opts = {}) click to toggle source

Lists all the private applications in a given compartment. @param [String] compartment_id The unique identifier for 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] :private_application_id The unique identifier for the private application. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request,

please provide the request ID.

@option opts [Integer] :limit How many records to return. Specify a value greater than zero and less than or equal to 1000. The default is 30.

(default to 30)

@option opts [String] :page The value of the `opc-next-page` response header from the previous "List" call. @option opts [String] :sort_by The field to use to sort listed results. You can only specify one field to sort by.

Default is `TIMECREATED`.
 (default to TIMECREATED)
Allowed values are: TIMECREATED, LIFECYCLESTATE

@option opts [String] :sort_order The sort order to apply, either `ASC` or `DESC`. Default is `ASC`. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :display_name Exact match name filter. @return [Response] A Response object with data of type {OCI::ServiceCatalog::Models::PrivateApplicationCollection PrivateApplicationCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/list_private_applications.rb.html) to see an example of how to use list_private_applications API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 1368
def list_private_applications(compartment_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#list_private_applications.' if logger

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

  if opts[:sort_by] && !%w[TIMECREATED LIFECYCLESTATE].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, LIFECYCLESTATE.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/privateApplications'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:privateApplicationId] = opts[:private_application_id] if opts[:private_application_id]
  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[:displayName] = opts[:display_name] if opts[:display_name]

  # 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: 'ServiceCatalogClient#list_private_applications') 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::ServiceCatalog::Models::PrivateApplicationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_service_catalog_associations(opts = {}) click to toggle source

Lists all the resource associations for a specific service catalog. @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] :service_catalog_association_id The unique identifier for the service catalog association. @option opts [String] :service_catalog_id The unique identifier for the service catalog. @option opts [String] :entity_id The unique identifier of the entity associated with service catalog. @option opts [String] :entity_type The type of the application in the service catalog. @option opts [Integer] :limit How many records to return. Specify a value greater than zero and less than or equal to 1000. The default is 30.

(default to 30)

@option opts [String] :page The value of the `opc-next-page` response header from the previous "List" call. @option opts [String] :sort_order The sort order to apply, either `ASC` or `DESC`. Default is `ASC`. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by Default is `TIMECREATED` (default to TIMECREATED)

Allowed values are: TIMECREATED

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

# File lib/oci/service_catalog/service_catalog_client.rb, line 1448
def list_service_catalog_associations(opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#list_service_catalog_associations.' if logger


  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[TIMECREATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED.'
  end

  path = '/serviceCatalogAssociations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:serviceCatalogAssociationId] = opts[:service_catalog_association_id] if opts[:service_catalog_association_id]
  query_params[:serviceCatalogId] = opts[:service_catalog_id] if opts[:service_catalog_id]
  query_params[:entityId] = opts[:entity_id] if opts[:entity_id]
  query_params[:entityType] = opts[:entity_type] if opts[:entity_type]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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: 'ServiceCatalogClient#list_service_catalog_associations') 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::ServiceCatalog::Models::ServiceCatalogAssociationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_service_catalogs(compartment_id, opts = {}) click to toggle source

Lists all the service catalogs in the given compartment. @param [String] compartment_id The unique identifier for 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] :service_catalog_id The unique identifier for the service catalog. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request,

please provide the request ID.

@option opts [Integer] :limit How many records to return. Specify a value greater than zero and less than or equal to 1000. The default is 30.

(default to 30)

@option opts [String] :page The value of the `opc-next-page` response header from the previous "List" call. @option opts [String] :sort_by Default is `TIMECREATED` (default to TIMECREATED)

Allowed values are: TIMECREATED

@option opts [String] :sort_order The sort order to apply, either `ASC` or `DESC`. Default is `ASC`. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :display_name Exact match name filter. @return [Response] A Response object with data of type {OCI::ServiceCatalog::Models::ServiceCatalogCollection ServiceCatalogCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/list_service_catalogs.rb.html) to see an example of how to use list_service_catalogs API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 1527
def list_service_catalogs(compartment_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#list_service_catalogs.' if logger

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

  if opts[:sort_by] && !%w[TIMECREATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of 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

  path = '/serviceCatalogs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:serviceCatalogId] = opts[:service_catalog_id] if opts[:service_catalog_id]
  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[:displayName] = opts[:display_name] if opts[:display_name]

  # 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: 'ServiceCatalogClient#list_service_catalogs') 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::ServiceCatalog::Models::ServiceCatalogCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_request_errors(work_request_id, opts = {}) click to toggle source

Return a (paginated) list of errors for a given work request.

@param [String] work_request_id The ID of the asynchronous 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 Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request,

please provide the request ID.

@option opts [String] :page The value of the `opc-next-page` response header from the previous "List" call. @option opts [Integer] :limit How many records to return. Specify a value greater than zero and less than or equal to 1000. The default is 30.

(default to 30)

@option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.

 (default to timeAccepted)
Allowed values are: timeAccepted

@option opts [String] :sort_order The sort order to apply, either `ASC` or `DESC`. Default is `ASC`. (default to ASC)

Allowed values are: ASC, DESC

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

# File lib/oci/service_catalog/service_catalog_client.rb, line 1606
def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?

  if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[: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: 'ServiceCatalogClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ServiceCatalog::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_request_logs(work_request_id, opts = {}) click to toggle source

Return a (paginated) list of logs for a given work request.

@param [String] work_request_id The ID of the asynchronous 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 Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request,

please provide the request ID.

@option opts [String] :page The value of the `opc-next-page` response header from the previous "List" call. @option opts [Integer] :limit How many records to return. Specify a value greater than zero and less than or equal to 1000. The default is 30.

(default to 30)

@option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.

 (default to timeAccepted)
Allowed values are: timeAccepted

@option opts [String] :sort_order The sort order to apply, either `ASC` or `DESC`. Default is `ASC`. (default to ASC)

Allowed values are: ASC, DESC

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

# File lib/oci/service_catalog/service_catalog_client.rb, line 1683
def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?

  if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[: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: 'ServiceCatalogClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ServiceCatalog::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_requests(opts = {}) click to toggle source

Lists the work requests in a 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] :compartment_id The unique identifier for the compartment. @option opts [String] :work_request_id The ID of the asynchronous work request. @option opts [String] :status A filter to return only resources their lifecycleState matches the given OperationStatus. @option opts [String] :resource_id The ID of the resource affected by the work request @option opts [String] :opc_request_id 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] :page The value of the `opc-next-page` response header from the previous "List" call. @option opts [Integer] :limit How many records to return. Specify a value greater than zero and less than or equal to 1000. The default is 30.

(default to 30)

@option opts [String] :sort_order The sort order to apply, either `ASC` or `DESC`. Default is `ASC`. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.

 (default to timeAccepted)
Allowed values are: timeAccepted

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

# File lib/oci/service_catalog/service_catalog_client.rb, line 1763
def list_work_requests(opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#list_work_requests.' if logger


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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  end

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ServiceCatalog::Models::WorkRequestSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
logger() click to toggle source

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

# File lib/oci/service_catalog/service_catalog_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/service_catalog/service_catalog_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://service-catalog.{region}.oci.{secondLevelDomain}') + '/20210527'
  logger.info "ServiceCatalogClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
update_private_application(private_application_id, update_private_application_details, opts = {}) click to toggle source

Updates the details of an existing private application. @param [String] private_application_id The unique identifier for the private application. @param [OCI::ServiceCatalog::Models::UpdatePrivateApplicationDetails] update_private_application_details The details for updating the private application. @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 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::ServiceCatalog::Models::PrivateApplication PrivateApplication} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/update_private_application.rb.html) to see an example of how to use update_private_application API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 1842
def update_private_application(private_application_id, update_private_application_details, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#update_private_application.' if logger

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

  path = '/privateApplications/{privateApplicationId}'.sub('{privateApplicationId}', private_application_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_private_application_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#update_private_application') 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::ServiceCatalog::Models::PrivateApplication'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_service_catalog(service_catalog_id, update_service_catalog_details, opts = {}) click to toggle source

Updates the details of a previously created service catalog. @param [String] service_catalog_id The unique identifier for the service catalog. @param [OCI::ServiceCatalog::Models::UpdateServiceCatalogDetails] update_service_catalog_details Details to update for a service catalog. @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 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::ServiceCatalog::Models::ServiceCatalog ServiceCatalog} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/servicecatalog/update_service_catalog.rb.html) to see an example of how to use update_service_catalog API.

# File lib/oci/service_catalog/service_catalog_client.rb, line 1905
def update_service_catalog(service_catalog_id, update_service_catalog_details, opts = {})
  logger.debug 'Calling operation ServiceCatalogClient#update_service_catalog.' if logger

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

  path = '/serviceCatalogs/{serviceCatalogId}'.sub('{serviceCatalogId}', service_catalog_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_service_catalog_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ServiceCatalogClient#update_service_catalog') 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::ServiceCatalog::Models::ServiceCatalog'
    )
  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/service_catalog/service_catalog_client.rb, line 1950
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end