Class CredentialsApi

java.lang.Object
io.unitycatalog.client.api.CredentialsApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.9.0") public class CredentialsApi extends Object
  • Constructor Details

    • CredentialsApi

      public CredentialsApi()
    • CredentialsApi

      public CredentialsApi(ApiClient apiClient)
  • Method Details

    • getApiException

      protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException
      Throws:
      IOException
    • createCredential

      public CredentialInfo createCredential(CreateCredentialRequest createCredentialRequest) throws ApiException
      Create a credential Creates a new credential. The type of credential to be created is determined by the **purpose** field.
      Parameters:
      createCredentialRequest - (optional)
      Returns:
      CredentialInfo
      Throws:
      ApiException - if fails to make API call
    • createCredentialWithHttpInfo

      public ApiResponse<CredentialInfo> createCredentialWithHttpInfo(CreateCredentialRequest createCredentialRequest) throws ApiException
      Create a credential Creates a new credential. The type of credential to be created is determined by the **purpose** field.
      Parameters:
      createCredentialRequest - (optional)
      Returns:
      ApiResponse<CredentialInfo>
      Throws:
      ApiException - if fails to make API call
    • deleteCredential

      public Object deleteCredential(String name, Boolean force) throws ApiException
      Delete a credential Deletes a credential from the metastore. The caller must be a metastore admin or the owner of the credential.
      Parameters:
      name - Name of the credential. (required)
      force - Force deletion even if there are dependent external locations. (optional)
      Returns:
      Object
      Throws:
      ApiException - if fails to make API call
    • deleteCredentialWithHttpInfo

      public ApiResponse<Object> deleteCredentialWithHttpInfo(String name, Boolean force) throws ApiException
      Delete a credential Deletes a credential from the metastore. The caller must be a metastore admin or the owner of the credential.
      Parameters:
      name - Name of the credential. (required)
      force - Force deletion even if there are dependent external locations. (optional)
      Returns:
      ApiResponse<Object>
      Throws:
      ApiException - if fails to make API call
    • getCredential

      public CredentialInfo getCredential(String name) throws ApiException
      Get a credential Gets a credential from the metastore. The caller must be a metastore admin, the owner of the credential, or have some permission on the credential.
      Parameters:
      name - Name of the credential. (required)
      Returns:
      CredentialInfo
      Throws:
      ApiException - if fails to make API call
    • getCredentialWithHttpInfo

      public ApiResponse<CredentialInfo> getCredentialWithHttpInfo(String name) throws ApiException
      Get a credential Gets a credential from the metastore. The caller must be a metastore admin, the owner of the credential, or have some permission on the credential.
      Parameters:
      name - Name of the credential. (required)
      Returns:
      ApiResponse<CredentialInfo>
      Throws:
      ApiException - if fails to make API call
    • listCredentials

      public ListCredentialsResponse listCredentials(Integer maxResults, String pageToken, CredentialPurpose purpose) throws ApiException
      List credentials Gets an array of credentials (as __CredentialInfo__ objects). The array is limited to only those credentials the caller has permission to access. If the caller is a metastore admin, retrieval of credentials is unrestricted. There is no guarantee of a specific ordering of the elements in the array.
      Parameters:
      maxResults - Maximum number of credentials to return. - If not set, the default max page size is used. - When set to a value greater than 0, the page length is the minimum of this value and a server-configured value. - When set to 0, the page length is set to a server-configured value (recommended). - When set to a value less than 0, an invalid parameter error is returned. (optional)
      pageToken - Opaque pagination token to go to next page based on previous query. (optional)
      purpose - Return only credentials for the specified purpose. (optional)
      Returns:
      ListCredentialsResponse
      Throws:
      ApiException - if fails to make API call
    • listCredentialsWithHttpInfo

      public ApiResponse<ListCredentialsResponse> listCredentialsWithHttpInfo(Integer maxResults, String pageToken, CredentialPurpose purpose) throws ApiException
      List credentials Gets an array of credentials (as __CredentialInfo__ objects). The array is limited to only those credentials the caller has permission to access. If the caller is a metastore admin, retrieval of credentials is unrestricted. There is no guarantee of a specific ordering of the elements in the array.
      Parameters:
      maxResults - Maximum number of credentials to return. - If not set, the default max page size is used. - When set to a value greater than 0, the page length is the minimum of this value and a server-configured value. - When set to 0, the page length is set to a server-configured value (recommended). - When set to a value less than 0, an invalid parameter error is returned. (optional)
      pageToken - Opaque pagination token to go to next page based on previous query. (optional)
      purpose - Return only credentials for the specified purpose. (optional)
      Returns:
      ApiResponse<ListCredentialsResponse>
      Throws:
      ApiException - if fails to make API call
    • updateCredential

      public CredentialInfo updateCredential(String name, UpdateCredentialRequest updateCredentialRequest) throws ApiException
      Update a credential Updates a credential.
      Parameters:
      name - Name of the credential. (required)
      updateCredentialRequest - (optional)
      Returns:
      CredentialInfo
      Throws:
      ApiException - if fails to make API call
    • updateCredentialWithHttpInfo

      public ApiResponse<CredentialInfo> updateCredentialWithHttpInfo(String name, UpdateCredentialRequest updateCredentialRequest) throws ApiException
      Update a credential Updates a credential.
      Parameters:
      name - Name of the credential. (required)
      updateCredentialRequest - (optional)
      Returns:
      ApiResponse<CredentialInfo>
      Throws:
      ApiException - if fails to make API call