Class WatsonxData


  • public class WatsonxData
    extends com.ibm.cloud.sdk.core.service.BaseService
    This is the Public API for IBM watsonx.data. API Version: SaaS-GA-1.0.0
    • Field Detail

      • DEFAULT_SERVICE_NAME

        public static final java.lang.String DEFAULT_SERVICE_NAME
        Default service name used when configuring the `WatsonxData` 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

      • WatsonxData

        public WatsonxData​(java.lang.String serviceName,
                           com.ibm.cloud.sdk.core.security.Authenticator authenticator)
        Constructs an instance of the `WatsonxData` 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 WatsonxData newInstance()
        Class method which constructs an instance of the `WatsonxData` client. The default service name is used to configure the client instance.
        Returns:
        an instance of the `WatsonxData` client using external configuration
      • newInstance

        public static WatsonxData newInstance​(java.lang.String serviceName)
        Class method which constructs an instance of the `WatsonxData` 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 `WatsonxData` client using external configuration
      • createDbConnUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> createDbConnUsers​(CreateDbConnUsersOptions createDbConnUsersOptions)
        Grant users and groups permission to the db connection. You require can_administer permission to perform this action.
        Parameters:
        createDbConnUsersOptions - the CreateDbConnUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • listDataPolicies

        public com.ibm.cloud.sdk.core.http.ServiceCall<PolicyListSchema> listDataPolicies()
        Get policies. Get list of all data policies.
        Returns:
        a ServiceCall with a result of type PolicyListSchema
      • deleteDataPolicies

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteDataPolicies​(DeleteDataPoliciesOptions deleteDataPoliciesOptions)
        Revoke data policy access management policy. You require catalog can_administer permission to perform this action.
        Parameters:
        deleteDataPoliciesOptions - the DeleteDataPoliciesOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • deleteDataPolicies

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteDataPolicies()
        Revoke data policy access management policy. You require catalog can_administer permission to perform this action.
        Returns:
        a ServiceCall with a void result
      • deleteEngineUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteEngineUsers​(DeleteEngineUsersOptions deleteEngineUsersOptions)
        Revoke permission to access engine. You require administrator role or can_administer permission to perform this action.
        Parameters:
        deleteEngineUsersOptions - the DeleteEngineUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • updateEngineUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> updateEngineUsers​(UpdateEngineUsersOptions updateEngineUsersOptions)
        Updates user and groups permission in the engine. You require administrator role or can_administer permission to perform this action.
        Parameters:
        updateEngineUsersOptions - the UpdateEngineUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • deleteDbConnUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteDbConnUsers​(DeleteDbConnUsersOptions deleteDbConnUsersOptions)
        Revoke permission to access db connection. You require can_administer permission to perform this action.
        Parameters:
        deleteDbConnUsersOptions - the DeleteDbConnUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • updateDbConnUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> updateDbConnUsers​(UpdateDbConnUsersOptions updateDbConnUsersOptions)
        Updates user and groups permission in the db connection. You require can_administer permission to perform this action.
        Parameters:
        updateDbConnUsersOptions - the UpdateDbConnUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • createCatalogUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> createCatalogUsers​(CreateCatalogUsersOptions createCatalogUsersOptions)
        Grant users and groups permission to the catalog. You require can_administer permission to perform this action.
        Parameters:
        createCatalogUsersOptions - the CreateCatalogUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • deleteCatalogUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteCatalogUsers​(DeleteCatalogUsersOptions deleteCatalogUsersOptions)
        Revoke multiple users and groups permission to access catalog. You require can_administer permission to perform this action.
        Parameters:
        deleteCatalogUsersOptions - the DeleteCatalogUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • updateCatalogUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> updateCatalogUsers​(UpdateCatalogUsersOptions updateCatalogUsersOptions)
        Updates user and groups permission in the catalog. You require can_administer permission to perform this action.
        Parameters:
        updateCatalogUsersOptions - the UpdateCatalogUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • evaluate

        public com.ibm.cloud.sdk.core.http.ServiceCall<EvaluationResultSchema> evaluate()
        Evaluate permission. Evaluate user has permission to access resource or not.
        Returns:
        a ServiceCall with a result of type EvaluationResultSchema
      • getPoliciesList

        public com.ibm.cloud.sdk.core.http.ServiceCall<PolicySchemaList> getPoliciesList​(GetPoliciesListOptions getPoliciesListOptions)
        Get policies for specific catalog in catalog_name list. Get policies list.
        Parameters:
        getPoliciesListOptions - the GetPoliciesListOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type PolicySchemaList
      • getPoliciesList

        public com.ibm.cloud.sdk.core.http.ServiceCall<PolicySchemaList> getPoliciesList()
        Get policies for specific catalog in catalog_name list. Get policies list.
        Returns:
        a ServiceCall with a result of type PolicySchemaList
      • createMetastoreUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> createMetastoreUsers​(CreateMetastoreUsersOptions createMetastoreUsersOptions)
        Grant users and groups permission to the metastore. You require administrator role or can_administer permission to perform this action.
        Parameters:
        createMetastoreUsersOptions - the CreateMetastoreUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • deleteMetastoreUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteMetastoreUsers​(DeleteMetastoreUsersOptions deleteMetastoreUsersOptions)
        Revoke permission to access metastore. You require administrator role or can_administer permission to perform this action.
        Parameters:
        deleteMetastoreUsersOptions - the DeleteMetastoreUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • updateMetastoreUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> updateMetastoreUsers​(UpdateMetastoreUsersOptions updateMetastoreUsersOptions)
        Updates user and groups permission in the metastore. You require administrator role or can_administer permission to perform this action.
        Parameters:
        updateMetastoreUsersOptions - the UpdateMetastoreUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • createBucketUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> createBucketUsers​(CreateBucketUsersOptions createBucketUsersOptions)
        Grant users and groups permission to the bucket. You require can_administer permission to perform this action.
        Parameters:
        createBucketUsersOptions - the CreateBucketUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • getDefaultPolicies

        public com.ibm.cloud.sdk.core.http.ServiceCall<DefaultPolicySchema> getDefaultPolicies()
        Get AMS default policies. Get AMS default policies.
        Returns:
        a ServiceCall with a result of type DefaultPolicySchema
      • getDataPolicy

        public com.ibm.cloud.sdk.core.http.ServiceCall<PolicySchema> getDataPolicy​(GetDataPolicyOptions getDataPolicyOptions)
        Get policy. Get policy detail.
        Parameters:
        getDataPolicyOptions - the GetDataPolicyOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type PolicySchema
      • deleteDataPolicy

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteDataPolicy​(DeleteDataPolicyOptions deleteDataPolicyOptions)
        Revoke data policy access management policy. You require catalog can_administer permission to perform this action.
        Parameters:
        deleteDataPolicyOptions - the DeleteDataPolicyOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • createEngineUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> createEngineUsers​(CreateEngineUsersOptions createEngineUsersOptions)
        Grant permission to the engine. You require administrator role or can_administer permission to perform this action.
        Parameters:
        createEngineUsersOptions - the CreateEngineUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • deleteBucketUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteBucketUsers​(DeleteBucketUsersOptions deleteBucketUsersOptions)
        Revoke permission to access bucket. You require can_administer permission to perform this action.
        Parameters:
        deleteBucketUsersOptions - the DeleteBucketUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • updateBucketUsers

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> updateBucketUsers​(UpdateBucketUsersOptions updateBucketUsersOptions)
        Updates user and groups permission in the bucket. You require can_administer permission to perform this action.
        Parameters:
        updateBucketUsersOptions - the UpdateBucketUsersOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • getBuckets

        public com.ibm.cloud.sdk.core.http.ServiceCall<GetBucketsOKBody> getBuckets​(GetBucketsOptions getBucketsOptions)
        Get buckets. Get list of all buckets registered to Lakehouse.
        Parameters:
        getBucketsOptions - the GetBucketsOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type GetBucketsOKBody
      • getBuckets

        public com.ibm.cloud.sdk.core.http.ServiceCall<GetBucketsOKBody> getBuckets()
        Get buckets. Get list of all buckets registered to Lakehouse.
        Returns:
        a ServiceCall with a result of type GetBucketsOKBody
      • deactivateBucket

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> deactivateBucket​(DeactivateBucketOptions deactivateBucketOptions)
        Deactivate bucket. Deactivate an active bucket in Lakehouse.
        Parameters:
        deactivateBucketOptions - the DeactivateBucketOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • unregisterBucket

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> unregisterBucket​(UnregisterBucketOptions unregisterBucketOptions)
        Unregister Bucket. Unregister a bucket from Lakehouse.
        Parameters:
        unregisterBucketOptions - the UnregisterBucketOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • updateBucket

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> updateBucket​(UpdateBucketOptions updateBucketOptions)
        Update bucket. Update bucket details/credentials.
        Parameters:
        updateBucketOptions - the UpdateBucketOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • activateBucket

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> activateBucket​(ActivateBucketOptions activateBucketOptions)
        Active bucket. Activate an invalid bucket in Lakehouse.
        Parameters:
        activateBucketOptions - the ActivateBucketOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • getDatabases

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> getDatabases​(GetDatabasesOptions getDatabasesOptions)
        Get databases. Get list of all databases in Lakehouse.
        Parameters:
        getDatabasesOptions - the GetDatabasesOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • getDatabases

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> getDatabases()
        Get databases. Get list of all databases in Lakehouse.
        Returns:
        a ServiceCall with a result of type InputStream
      • createDatabaseCatalog

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> createDatabaseCatalog​(CreateDatabaseCatalogOptions createDatabaseCatalogOptions)
        Add/Create database. Add or create a new database in Lakehouse.
        Parameters:
        createDatabaseCatalogOptions - the CreateDatabaseCatalogOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • deleteDatabaseCatalog

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteDatabaseCatalog​(DeleteDatabaseCatalogOptions deleteDatabaseCatalogOptions)
        Delete database. Delete a database from Lakehouse.
        Parameters:
        deleteDatabaseCatalogOptions - the DeleteDatabaseCatalogOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • updateDatabase

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> updateDatabase​(UpdateDatabaseOptions updateDatabaseOptions)
        Update database. Update database details.
        Parameters:
        updateDatabaseOptions - the UpdateDatabaseOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • getEngines

        public com.ibm.cloud.sdk.core.http.ServiceCall<GetEnginesOKBody> getEngines()
        Get engines. Get all engine details.
        Returns:
        a ServiceCall with a result of type GetEnginesOKBody
      • getDeployments

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> getDeployments​(GetDeploymentsOptions getDeploymentsOptions)
        Get instance details. Get instance details.
        Parameters:
        getDeploymentsOptions - the GetDeploymentsOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • getDeployments

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> getDeployments()
        Get instance details. Get instance details.
        Returns:
        a ServiceCall with a result of type InputStream
      • updateEngine

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> updateEngine​(UpdateEngineOptions updateEngineOptions)
        Update engine. Update engine.
        Parameters:
        updateEngineOptions - the UpdateEngineOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • createEngine

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> createEngine​(CreateEngineOptions createEngineOptions)
        Create engine. Create a new engine.
        Parameters:
        createEngineOptions - the CreateEngineOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • deleteEngine

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteEngine​(DeleteEngineOptions deleteEngineOptions)
        Delete engine. Delete an engine from lakehouse.
        Parameters:
        deleteEngineOptions - the DeleteEngineOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • testLHConsole

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> testLHConsole​(TestLHConsoleOptions testLhConsoleOptions)
        Readiness API. Verify lhconsole server is up and running.
        Parameters:
        testLhConsoleOptions - the TestLHConsoleOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • testLHConsole

        public com.ibm.cloud.sdk.core.http.ServiceCall<SuccessResponse> testLHConsole()
        Readiness API. Verify lhconsole server is up and running.
        Returns:
        a ServiceCall with a result of type SuccessResponse
      • getMetastores

        public com.ibm.cloud.sdk.core.http.ServiceCall<GetMetastoresOKBody> getMetastores()
        Get Catalogs. Get list of all registered metastores.
        Returns:
        a ServiceCall with a result of type GetMetastoresOKBody
      • getHMS

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> getHMS​(GetHMSOptions getHmsOptions)
        Get Metastore. Get list of all registered HMS metastores.
        Parameters:
        getHmsOptions - the GetHMSOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • getHMS

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> getHMS()
        Get Metastore. Get list of all registered HMS metastores.
        Returns:
        a ServiceCall with a result of type InputStream
      • addMetastoreToEngine

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> addMetastoreToEngine​(AddMetastoreToEngineOptions addMetastoreToEngineOptions)
        Add catalog to engine. Associate a catalog to an engine.
        Parameters:
        addMetastoreToEngineOptions - the AddMetastoreToEngineOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • removeCatalogFromEngine

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> removeCatalogFromEngine​(RemoveCatalogFromEngineOptions removeCatalogFromEngineOptions)
        Remove catalog from engine. Remove a catalog from an engine.
        Parameters:
        removeCatalogFromEngineOptions - the RemoveCatalogFromEngineOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • deleteQuery

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteQuery​(DeleteQueryOptions deleteQueryOptions)
        Delete query. Delete a saved query.
        Parameters:
        deleteQueryOptions - the DeleteQueryOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • getQueries

        public com.ibm.cloud.sdk.core.http.ServiceCall<GetQueriesOKBody> getQueries()
        Get queries. List all saved queries.
        Returns:
        a ServiceCall with a result of type GetQueriesOKBody
      • deleteSchema

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteSchema​(DeleteSchemaOptions deleteSchemaOptions)
        Delete schema. Delete a schema.
        Parameters:
        deleteSchemaOptions - the DeleteSchemaOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • postQuery

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> postQuery​(PostQueryOptions postQueryOptions)
        Run SQL statement. Using this API to run a SQL statement.
        Parameters:
        postQueryOptions - the PostQueryOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • deleteTable

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteTable​(DeleteTableOptions deleteTableOptions)
        Delete table. Delete one or multiple tables for a given schema and catalog.
        Parameters:
        deleteTableOptions - the DeleteTableOptions containing the options for the call
        Returns:
        a ServiceCall with a void result
      • updateTable

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> updateTable​(UpdateTableOptions updateTableOptions)
        Update table. Update the given table - rename table, add/drop/rename columns.
        Parameters:
        updateTableOptions - the UpdateTableOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • getTables

        public com.ibm.cloud.sdk.core.http.ServiceCall<GetTablesOKBody> getTables​(GetTablesOptions getTablesOptions)
        Get tables. List all tables in a schema in a catalog for a given engine.
        Parameters:
        getTablesOptions - the GetTablesOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type GetTablesOKBody
      • parseCsv

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> parseCsv​(ParseCsvOptions parseCsvOptions)
        Parse CSV for table creation. When creating a tabble, parse the CSV file.
        Parameters:
        parseCsvOptions - the ParseCsvOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream
      • uplaodCsv

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> uplaodCsv​(UplaodCsvOptions uplaodCsvOptions)
        Upload CSV for table creation. When creating a table, upload a CSV file.
        Parameters:
        uplaodCsvOptions - the UplaodCsvOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type InputStream