Class SparkJobDefinitionClient


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

      • getSparkJobDefinitionsByWorkspace

        public com.azure.core.http.rest.PagedIterable<SparkJobDefinitionResource> getSparkJobDefinitionsByWorkspace()
        Lists spark job definitions.
        Returns:
        a list of spark job definitions 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.
      • getSparkJobDefinitionsByWorkspace

        public com.azure.core.http.rest.PagedIterable<SparkJobDefinitionResource> getSparkJobDefinitionsByWorkspace​(com.azure.core.util.Context context)
        Lists spark job definitions.
        Parameters:
        context - The context to associate with this operation.
        Returns:
        a list of spark job definitions 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.
      • createOrUpdateSparkJobDefinition

        public SparkJobDefinitionResource createOrUpdateSparkJobDefinition​(String sparkJobDefinitionName,
                                                                           SparkJobDefinitionResource sparkJobDefinition,
                                                                           String ifMatch)
        Creates or updates a Spark Job Definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        sparkJobDefinition - Spark Job Definition resource definition.
        ifMatch - ETag of the Spark Job Definition entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.
        Returns:
        spark job definition 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.
      • createOrUpdateSparkJobDefinition

        public SparkJobDefinitionResource createOrUpdateSparkJobDefinition​(String sparkJobDefinitionName,
                                                                           SparkJobDefinitionResource sparkJobDefinition)
        Creates or updates a Spark Job Definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        sparkJobDefinition - Spark Job Definition resource definition.
        Returns:
        spark job definition 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.
      • createOrUpdateSparkJobDefinitionWithResponse

        public com.azure.core.http.rest.Response<SparkJobDefinitionResource> createOrUpdateSparkJobDefinitionWithResponse​(String sparkJobDefinitionName,
                                                                                                                          SparkJobDefinitionResource sparkJobDefinition,
                                                                                                                          String ifMatch,
                                                                                                                          com.azure.core.util.Context context)
        Creates or updates a Spark Job Definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        sparkJobDefinition - Spark Job Definition resource definition.
        ifMatch - ETag of the Spark Job Definition 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:
        spark job definition 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.
      • getSparkJobDefinition

        public SparkJobDefinitionResource getSparkJobDefinition​(String sparkJobDefinitionName,
                                                                String ifNoneMatch)
        Gets a Spark Job Definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        ifNoneMatch - ETag of the Spark Job Definition 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 Spark Job Definition.
        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.
      • getSparkJobDefinition

        public SparkJobDefinitionResource getSparkJobDefinition​(String sparkJobDefinitionName)
        Gets a Spark Job Definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        Returns:
        a Spark Job Definition.
        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.
      • getSparkJobDefinitionWithResponse

        public com.azure.core.http.rest.Response<SparkJobDefinitionResource> getSparkJobDefinitionWithResponse​(String sparkJobDefinitionName,
                                                                                                               String ifNoneMatch,
                                                                                                               com.azure.core.util.Context context)
        Gets a Spark Job Definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        ifNoneMatch - ETag of the Spark Job Definition 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 Spark Job Definition 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.
      • deleteSparkJobDefinition

        public void deleteSparkJobDefinition​(String sparkJobDefinitionName)
        Deletes a Spark Job Definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition 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.
      • deleteSparkJobDefinitionWithResponse

        public com.azure.core.http.rest.Response<Void> deleteSparkJobDefinitionWithResponse​(String sparkJobDefinitionName,
                                                                                            com.azure.core.util.Context context)
        Deletes a Spark Job Definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition 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.
      • executeSparkJobDefinition

        public SparkBatchJob executeSparkJobDefinition​(String sparkJobDefinitionName)
        Executes the spark job definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        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.
      • executeSparkJobDefinitionWithResponse

        public com.azure.core.http.rest.Response<SparkBatchJob> executeSparkJobDefinitionWithResponse​(String sparkJobDefinitionName,
                                                                                                      com.azure.core.util.Context context)
        Executes the spark job definition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        context - The context to associate with this operation.
        Returns:
        the response body 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.
      • renameSparkJobDefinition

        public void renameSparkJobDefinition​(String sparkJobDefinitionName,
                                             ArtifactRenameRequest request)
        Renames a sparkJobDefinition.
        Parameters:
        sparkJobDefinitionName - The spark job definition name.
        request - proposed new 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.
      • renameSparkJobDefinitionWithResponse

        public com.azure.core.http.rest.Response<Void> renameSparkJobDefinitionWithResponse​(String sparkJobDefinitionName,
                                                                                            ArtifactRenameRequest request,
                                                                                            com.azure.core.util.Context context)
        Renames a sparkJobDefinition.
        Parameters:
        sparkJobDefinitionName - The spark job definition 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.
      • debugSparkJobDefinition

        public SparkBatchJob debugSparkJobDefinition​(SparkJobDefinitionResource sparkJobDefinitionAzureResource)
        Debug the spark job definition.
        Parameters:
        sparkJobDefinitionAzureResource - Spark Job Definition resource definition.
        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.
      • debugSparkJobDefinitionWithResponse

        public com.azure.core.http.rest.Response<SparkBatchJob> debugSparkJobDefinitionWithResponse​(SparkJobDefinitionResource sparkJobDefinitionAzureResource,
                                                                                                    com.azure.core.util.Context context)
        Debug the spark job definition.
        Parameters:
        sparkJobDefinitionAzureResource - Spark Job Definition resource definition.
        context - The context to associate with this operation.
        Returns:
        the response body 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.