Class SqlScriptClient


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

      • getSqlScriptsByWorkspace

        public com.azure.core.http.rest.PagedIterable<SqlScriptResource> getSqlScriptsByWorkspace()
        Lists sql scripts.
        Returns:
        a list of sql scripts 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.
      • getSqlScriptsByWorkspace

        public com.azure.core.http.rest.PagedIterable<SqlScriptResource> getSqlScriptsByWorkspace​(com.azure.core.util.Context context)
        Lists sql scripts.
        Parameters:
        context - The context to associate with this operation.
        Returns:
        a list of sql scripts 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.
      • createOrUpdateSqlScript

        public SqlScriptResource createOrUpdateSqlScript​(String sqlScriptName,
                                                         SqlScriptResource sqlScript,
                                                         String ifMatch)
        Creates or updates a Sql Script.
        Parameters:
        sqlScriptName - The sql script name.
        sqlScript - Sql Script resource definition.
        ifMatch - ETag of the SQL script entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.
        Returns:
        sql Script 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.
      • createOrUpdateSqlScript

        public SqlScriptResource createOrUpdateSqlScript​(String sqlScriptName,
                                                         SqlScriptResource sqlScript)
        Creates or updates a Sql Script.
        Parameters:
        sqlScriptName - The sql script name.
        sqlScript - Sql Script resource definition.
        Returns:
        sql Script 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.
      • createOrUpdateSqlScriptWithResponse

        public com.azure.core.http.rest.Response<SqlScriptResource> createOrUpdateSqlScriptWithResponse​(String sqlScriptName,
                                                                                                        SqlScriptResource sqlScript,
                                                                                                        String ifMatch,
                                                                                                        com.azure.core.util.Context context)
        Creates or updates a Sql Script.
        Parameters:
        sqlScriptName - The sql script name.
        sqlScript - Sql Script resource definition.
        ifMatch - ETag of the SQL script 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:
        sql Script 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.
      • getSqlScript

        public SqlScriptResource getSqlScript​(String sqlScriptName,
                                              String ifNoneMatch)
        Gets a sql script.
        Parameters:
        sqlScriptName - The sql script name.
        ifNoneMatch - ETag of the sql compute 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 sql script.
        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.
      • getSqlScriptWithResponse

        public com.azure.core.http.rest.Response<SqlScriptResource> getSqlScriptWithResponse​(String sqlScriptName,
                                                                                             String ifNoneMatch,
                                                                                             com.azure.core.util.Context context)
        Gets a sql script.
        Parameters:
        sqlScriptName - The sql script name.
        ifNoneMatch - ETag of the sql compute 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 sql script 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.
      • deleteSqlScript

        public void deleteSqlScript​(String sqlScriptName)
        Deletes a Sql Script.
        Parameters:
        sqlScriptName - The sql script 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.
      • deleteSqlScriptWithResponse

        public com.azure.core.http.rest.Response<Void> deleteSqlScriptWithResponse​(String sqlScriptName,
                                                                                   com.azure.core.util.Context context)
        Deletes a Sql Script.
        Parameters:
        sqlScriptName - The sql script 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.
      • renameSqlScript

        public void renameSqlScript​(String sqlScriptName,
                                    ArtifactRenameRequest request)
        Renames a sqlScript.
        Parameters:
        sqlScriptName - The sql script 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.
      • renameSqlScriptWithResponse

        public com.azure.core.http.rest.Response<Void> renameSqlScriptWithResponse​(String sqlScriptName,
                                                                                   ArtifactRenameRequest request,
                                                                                   com.azure.core.util.Context context)
        Renames a sqlScript.
        Parameters:
        sqlScriptName - The sql script 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.