Class GlobalSearch


  • public class GlobalSearch
    extends com.ibm.cloud.sdk.core.service.BaseService
    Search for resources with the global and shared resource properties repository that is integrated in the IBM Cloud platform. The search repository stores and searches cloud resources attributes, which categorize or classify resources. A resource is a physical or logical component that can be created or reserved for an application or service instance. They are owned by resource providers, such as IBM Kubernetes Service, or resource controller in IBM Cloud. Resources are uniquely identified by a Cloud Resource Name (CRN) or by an IMS ID. The properties of a resource include tags and system properties. Both properties are defined in an IBM Cloud billing account, and span across many regions. API Version: 2.0.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_SERVICE_NAME
      Default service name used when configuring the `GlobalSearch` client.
      static java.lang.String DEFAULT_SERVICE_URL
      Default service endpoint URL.
      • Fields inherited from class com.ibm.cloud.sdk.core.service.BaseService

        PROPNAME_DISABLE_SSL, PROPNAME_ENABLE_GZIP, PROPNAME_ENABLE_RETRIES, PROPNAME_MAX_RETRIES, PROPNAME_RETRY_INTERVAL, PROPNAME_URL
    • Constructor Summary

      Constructors 
      Constructor Description
      GlobalSearch​(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
      Constructs an instance of the `GlobalSearch` client.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static GlobalSearch newInstance()
      Class method which constructs an instance of the `GlobalSearch` client.
      static GlobalSearch newInstance​(java.lang.String serviceName)
      Class method which constructs an instance of the `GlobalSearch` client.
      com.ibm.cloud.sdk.core.http.ServiceCall<ScanResult> search()
      Find instances of resources (v3).
      com.ibm.cloud.sdk.core.http.ServiceCall<ScanResult> search​(SearchOptions searchOptions)
      Find instances of resources (v3).
      • Methods inherited from class com.ibm.cloud.sdk.core.service.BaseService

        configureClient, configureService, constructServiceUrl, constructServiceURL, disableRetries, enableGzipCompression, enableRetries, getAuthenticator, getClient, getDefaultHeaders, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, setClient, setDefaultHeaders, setEndPoint, setServiceUrl, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT_SERVICE_NAME

        public static final java.lang.String DEFAULT_SERVICE_NAME
        Default service name used when configuring the `GlobalSearch` client.
        See Also:
        Constant Field Values
      • DEFAULT_SERVICE_URL

        public static final java.lang.String DEFAULT_SERVICE_URL
        Default service endpoint URL.
        See Also:
        Constant Field Values
    • Constructor Detail

      • GlobalSearch

        public GlobalSearch​(java.lang.String serviceName,
                            com.ibm.cloud.sdk.core.security.Authenticator authenticator)
        Constructs an instance of the `GlobalSearch` client. The specified service name and authenticator are used to configure the client instance.
        Parameters:
        serviceName - the service name to be used when configuring the client instance
        authenticator - the Authenticator instance to be configured for this client
    • Method Detail

      • newInstance

        public static GlobalSearch newInstance()
        Class method which constructs an instance of the `GlobalSearch` client. The default service name is used to configure the client instance.
        Returns:
        an instance of the `GlobalSearch` client using external configuration
      • newInstance

        public static GlobalSearch newInstance​(java.lang.String serviceName)
        Class method which constructs an instance of the `GlobalSearch` client. The specified service name is used to configure the client instance.
        Parameters:
        serviceName - the service name to be used when configuring the client instance
        Returns:
        an instance of the `GlobalSearch` client using external configuration
      • search

        public com.ibm.cloud.sdk.core.http.ServiceCall<ScanResult> search​(SearchOptions searchOptions)
        Find instances of resources (v3). Find IAM-enabled resources or storage and network resources that run on classic infrastructure in a specific account ID. You can apply query strings if necessary. To filter results, you can insert a string by using the Lucene syntax and the query string is parsed into a series of terms and operators. A term can be a single word or a phrase, in which case the search is performed for all the words, in the same order. To filter for a specific value regardless of the property that contains it, type the search term without specifying a field. Only resources that belong to the account ID and that are accessible by the client are returned. You must use `/v3/resources/search` when you need to fetch more than `10000` resource items. On the first call, the operation returns a live cursor on the data that you must use on all the subsequent calls to get the next batch of results until you get the empty result set. By default, the fields that are returned for every resource are `crn`, `name`, `family`, `type`, and `account_id`. You can specify the subset of the fields you want in your request using the `fields` request body attribute. Set `"fields": ["*"]` to discover the set of fields which are available to request.
        Parameters:
        searchOptions - the SearchOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type ScanResult
      • search

        public com.ibm.cloud.sdk.core.http.ServiceCall<ScanResult> search()
        Find instances of resources (v3). Find IAM-enabled resources or storage and network resources that run on classic infrastructure in a specific account ID. You can apply query strings if necessary. To filter results, you can insert a string by using the Lucene syntax and the query string is parsed into a series of terms and operators. A term can be a single word or a phrase, in which case the search is performed for all the words, in the same order. To filter for a specific value regardless of the property that contains it, type the search term without specifying a field. Only resources that belong to the account ID and that are accessible by the client are returned. You must use `/v3/resources/search` when you need to fetch more than `10000` resource items. On the first call, the operation returns a live cursor on the data that you must use on all the subsequent calls to get the next batch of results until you get the empty result set. By default, the fields that are returned for every resource are `crn`, `name`, `family`, `type`, and `account_id`. You can specify the subset of the fields you want in your request using the `fields` request body attribute. Set `"fields": ["*"]` to discover the set of fields which are available to request.
        Returns:
        a ServiceCall with a result of type ScanResult