Class SqlScriptClient
java.lang.Object
com.azure.analytics.synapse.artifacts.SqlScriptClient
Initializes a new instance of the synchronous ArtifactsClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateSqlScript
(String sqlScriptName, SqlScriptResource sqlScript) Creates or updates a Sql Script.createOrUpdateSqlScript
(String sqlScriptName, SqlScriptResource sqlScript, String ifMatch) Creates or updates a Sql Script.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.void
deleteSqlScript
(String sqlScriptName) Deletes a Sql Script.com.azure.core.http.rest.Response<Void>
deleteSqlScriptWithResponse
(String sqlScriptName, com.azure.core.util.Context context) Deletes a Sql Script.getSqlScript
(String sqlScriptName) Gets a sql script.getSqlScript
(String sqlScriptName, String ifNoneMatch) Gets a sql script.com.azure.core.http.rest.PagedIterable<SqlScriptResource>
Lists sql scripts.com.azure.core.http.rest.PagedIterable<SqlScriptResource>
getSqlScriptsByWorkspace
(com.azure.core.util.Context context) Lists sql scripts.com.azure.core.http.rest.Response<SqlScriptResource>
getSqlScriptWithResponse
(String sqlScriptName, String ifNoneMatch, com.azure.core.util.Context context) Gets a sql script.void
renameSqlScript
(String sqlScriptName, ArtifactRenameRequest request) Renames a sqlScript.com.azure.core.http.rest.Response<Void>
renameSqlScriptWithResponse
(String sqlScriptName, ArtifactRenameRequest request, com.azure.core.util.Context context) Renames a sqlScript.
-
Method Details
-
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
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
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.
-
getSqlScript
Gets a sql script.- Parameters:
sqlScriptName
- The sql script name.- 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
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
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.
-