diff --git a/logic/resource-manager/v2018_07_01_preview/pom.xml b/logic/resource-manager/v2018_07_01_preview/pom.xml
index b29b60f67754..52da931472d6 100644
--- a/logic/resource-manager/v2018_07_01_preview/pom.xml
+++ b/logic/resource-manager/v2018_07_01_preview/pom.xml
@@ -11,11 +11,11 @@
com.microsoft.azure
azure-arm-parent
- 1.1.0
- ../../../pom.management.xml
+ 0.0.3-beta
+ ../../../pom.xml
azure-mgmt-logic
- 1.0.0-beta-1
+ 1.0.0-beta
jar
Microsoft Azure SDK for Logic Management
This package contains Microsoft Logic Management SDK.
diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRuns.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRuns.java
index dcb60a663085..47e14731fbd6 100644
--- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRuns.java
+++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRuns.java
@@ -8,8 +8,8 @@
package com.microsoft.azure.management.logic.v2018_07_01_preview;
-import rx.Observable;
import rx.Completable;
+import rx.Observable;
import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.WorkflowRunsInner;
import com.microsoft.azure.arm.model.HasInner;
@@ -49,4 +49,15 @@ public interface WorkflowRuns extends HasInner {
*/
Observable listAsync(final String resourceGroupName, final String workflowName);
+ /**
+ * Deletes a workflow run.
+ *
+ * @param resourceGroupName The resource group name.
+ * @param workflowName The workflow name.
+ * @param runName The workflow run name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String workflowName, String runName);
+
}
diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsImpl.java
index b6a1bf12a6eb..d760acbec168 100644
--- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsImpl.java
+++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsImpl.java
@@ -11,10 +11,10 @@
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRuns;
+import rx.Completable;
import rx.Observable;
import rx.functions.Func1;
import com.microsoft.azure.Page;
-import rx.Completable;
import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowWorkflowRun;
class WorkflowRunsImpl extends WrapperImpl implements WorkflowRuns {
@@ -69,4 +69,10 @@ public WorkflowWorkflowRun call(WorkflowRunInner inner) {
});
}
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String workflowName, String runName) {
+ WorkflowRunsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, workflowName, runName).toCompletable();
+ }
+
}
diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsInner.java
index 155417f9c6b2..0f5ba74fed8c 100644
--- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsInner.java
+++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsInner.java
@@ -24,6 +24,7 @@
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
import retrofit2.http.Path;
import retrofit2.http.POST;
import retrofit2.http.Query;
@@ -66,6 +67,10 @@ interface WorkflowRunsService {
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}")
Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRuns delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRuns cancel" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel")
Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -420,6 +425,99 @@ private ServiceResponse getDelegate(Response res
.build(response);
}
+ /**
+ * Deletes a workflow run.
+ *
+ * @param resourceGroupName The resource group name.
+ * @param workflowName The workflow name.
+ * @param runName The workflow run name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String workflowName, String runName) {
+ deleteWithServiceResponseAsync(resourceGroupName, workflowName, runName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes a workflow run.
+ *
+ * @param resourceGroupName The resource group name.
+ * @param workflowName The workflow name.
+ * @param runName The workflow run name.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture deleteAsync(String resourceGroupName, String workflowName, String runName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workflowName, runName), serviceCallback);
+ }
+
+ /**
+ * Deletes a workflow run.
+ *
+ * @param resourceGroupName The resource group name.
+ * @param workflowName The workflow name.
+ * @param runName The workflow run name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String workflowName, String runName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, workflowName, runName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a workflow run.
+ *
+ * @param resourceGroupName The resource group name.
+ * @param workflowName The workflow name.
+ * @param runName The workflow run name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (workflowName == null) {
+ throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
+ }
+ if (runName == null) {
+ throw new IllegalArgumentException("Parameter runName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.delete(this.client.subscriptionId(), resourceGroupName, workflowName, runName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
/**
* Cancels a workflow run.
*