Class DatasetClient


  • public final class DatasetClient
    extends Object
    Initializes a new instance of the synchronous ArtifactsClient type.
    • Method Detail

      • getDatasetsByWorkspace

        public com.azure.core.http.rest.PagedIterable<DatasetResource> getDatasetsByWorkspace()
        Lists datasets.
        Returns:
        a list of dataset resources as paginated response with PagedIterable.
        Throws:
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getDatasetsByWorkspace

        public com.azure.core.http.rest.PagedIterable<DatasetResource> getDatasetsByWorkspace​(com.azure.core.util.Context context)
        Lists datasets.
        Parameters:
        context - The context to associate with this operation.
        Returns:
        a list of dataset resources as paginated response with PagedIterable.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • createOrUpdateDataset

        public DatasetResource createOrUpdateDataset​(String datasetName,
                                                     DatasetResource dataset,
                                                     String ifMatch)
        Creates or updates a dataset.
        Parameters:
        datasetName - The dataset name.
        dataset - Dataset resource definition.
        ifMatch - ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.
        Returns:
        dataset resource type.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • createOrUpdateDataset

        public DatasetResource createOrUpdateDataset​(String datasetName,
                                                     DatasetResource dataset)
        Creates or updates a dataset.
        Parameters:
        datasetName - The dataset name.
        dataset - Dataset resource definition.
        Returns:
        dataset resource type.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • createOrUpdateDatasetWithResponse

        public com.azure.core.http.rest.Response<DatasetResource> createOrUpdateDatasetWithResponse​(String datasetName,
                                                                                                    DatasetResource dataset,
                                                                                                    String ifMatch,
                                                                                                    com.azure.core.util.Context context)
        Creates or updates a dataset.
        Parameters:
        datasetName - The dataset name.
        dataset - Dataset resource definition.
        ifMatch - ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.
        context - The context to associate with this operation.
        Returns:
        dataset resource type along with Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getDataset

        public DatasetResource getDataset​(String datasetName,
                                          String ifNoneMatch)
        Gets a dataset.
        Parameters:
        datasetName - The dataset name.
        ifNoneMatch - ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned.
        Returns:
        a dataset.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getDatasetWithResponse

        public com.azure.core.http.rest.Response<DatasetResource> getDatasetWithResponse​(String datasetName,
                                                                                         String ifNoneMatch,
                                                                                         com.azure.core.util.Context context)
        Gets a dataset.
        Parameters:
        datasetName - The dataset name.
        ifNoneMatch - ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned.
        context - The context to associate with this operation.
        Returns:
        a dataset along with Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteDataset

        public void deleteDataset​(String datasetName)
        Deletes a dataset.
        Parameters:
        datasetName - The dataset name.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteDatasetWithResponse

        public com.azure.core.http.rest.Response<Void> deleteDatasetWithResponse​(String datasetName,
                                                                                 com.azure.core.util.Context context)
        Deletes a dataset.
        Parameters:
        datasetName - The dataset name.
        context - The context to associate with this operation.
        Returns:
        the Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • renameDatasetWithResponse

        public com.azure.core.http.rest.Response<Void> renameDatasetWithResponse​(String datasetName,
                                                                                 ArtifactRenameRequest request,
                                                                                 com.azure.core.util.Context context)
        Renames a dataset.
        Parameters:
        datasetName - The dataset name.
        request - proposed new name.
        context - The context to associate with this operation.
        Returns:
        the Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        CloudErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.