diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
index f536c098907f..ffa56e0ca5e0 100755
--- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
+++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
@@ -1982,7 +1982,7 @@
-
+
diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java
index 0381c1d7c68c..acd20cfc1cb4 100644
--- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java
+++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java
@@ -8,7 +8,6 @@
import com.azure.core.http.HttpPipeline;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient;
import com.azure.resourcemanager.appservice.fluent.AppServiceCertificateOrdersClient;
import com.azure.resourcemanager.appservice.fluent.AppServiceEnvironmentsClient;
import com.azure.resourcemanager.appservice.fluent.AppServicePlansClient;
@@ -25,6 +24,7 @@
import com.azure.resourcemanager.appservice.fluent.StaticSitesClient;
import com.azure.resourcemanager.appservice.fluent.TopLevelDomainsClient;
import com.azure.resourcemanager.appservice.fluent.WebAppsClient;
+import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient;
/** Initializes a new instance of the WebSiteManagementClient type. */
@ServiceClient(builder = WebSiteManagementClientBuilder.class)
diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java
index 04a53826f5ce..dc4b30792bf1 100644
--- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java
+++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java
@@ -31,6 +31,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.appservice.WebSiteManagementClient;
import com.azure.resourcemanager.appservice.fluent.inner.AppServiceCertificateCollectionInner;
import com.azure.resourcemanager.appservice.fluent.inner.AppServiceCertificateOrderCollectionInner;
@@ -373,37 +374,6 @@ Mono>> retrieveCertificateEmailHistory(
@QueryParam("api-version") String apiVersion,
Context context);
- @Headers({"Accept: application/json", "Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers"
- + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}")
- @ExpectedResponses({200, 201})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginCreateOrUpdateWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("certificateOrderName") String certificateOrderName,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") AppServiceCertificateOrderInner certificateDistinguishedName,
- Context context);
-
- @Headers({"Accept: application/json", "Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers"
- + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}")
- @ExpectedResponses({200, 201})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginCreateOrUpdateCertificateWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("certificateOrderName") String certificateOrderName,
- @PathParam("name") String name,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") AppServiceCertificateResourceInner keyVaultCertificate,
- Context context);
-
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -491,6 +461,7 @@ public Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context)
.map(
@@ -634,6 +605,7 @@ public Mono> validatePurchaseInformationWithResponseAsync(
} else {
appServiceCertificateOrder.validate();
}
+ context = this.client.mergeContext(context);
return service
.validatePurchaseInformation(
this.client.getEndpoint(),
@@ -782,6 +754,7 @@ public Mono> listByResourceGroupS
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listByResourceGroup(
this.client.getEndpoint(),
@@ -945,6 +918,7 @@ public Mono> getByResourceGroupWithRes
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.getByResourceGroup(
this.client.getEndpoint(),
@@ -1141,6 +1115,7 @@ public Mono>> createOrUpdateWithResponseAsync(
} else {
certificateDistinguishedName.validate();
}
+ context = this.client.mergeContext(context);
return service
.createOrUpdate(
this.client.getEndpoint(),
@@ -1164,10 +1139,11 @@ public Mono>> createOrUpdateWithResponseAsync(
* @return sSL certificate purchase order.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, AppServiceCertificateOrderInner> beginCreateOrUpdate(
- String resourceGroupName,
- String certificateOrderName,
- AppServiceCertificateOrderInner certificateDistinguishedName) {
+ public PollerFlux, AppServiceCertificateOrderInner>
+ beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String certificateOrderName,
+ AppServiceCertificateOrderInner certificateDistinguishedName) {
Mono>> mono =
createOrUpdateWithResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName);
return this
@@ -1192,11 +1168,12 @@ public PollerFlux, AppServiceCertifi
* @return sSL certificate purchase order.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, AppServiceCertificateOrderInner> beginCreateOrUpdate(
- String resourceGroupName,
- String certificateOrderName,
- AppServiceCertificateOrderInner certificateDistinguishedName,
- Context context) {
+ public PollerFlux, AppServiceCertificateOrderInner>
+ beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String certificateOrderName,
+ AppServiceCertificateOrderInner certificateDistinguishedName,
+ Context context) {
Mono>> mono =
createOrUpdateWithResponseAsync(
resourceGroupName, certificateOrderName, certificateDistinguishedName, context);
@@ -1209,6 +1186,48 @@ public PollerFlux, AppServiceCertifi
AppServiceCertificateOrderInner.class);
}
+ /**
+ * Description for Create or update a certificate purchase order.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param certificateOrderName Name of the certificate order.
+ * @param certificateDistinguishedName SSL certificate purchase order.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sSL certificate purchase order.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, AppServiceCertificateOrderInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String certificateOrderName,
+ AppServiceCertificateOrderInner certificateDistinguishedName) {
+ return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName)
+ .getSyncPoller();
+ }
+
+ /**
+ * Description for Create or update a certificate purchase order.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param certificateOrderName Name of the certificate order.
+ * @param certificateDistinguishedName SSL certificate purchase order.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sSL certificate purchase order.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, AppServiceCertificateOrderInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String certificateOrderName,
+ AppServiceCertificateOrderInner certificateDistinguishedName,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, context)
+ .getSyncPoller();
+ }
+
/**
* Description for Create or update a certificate purchase order.
*
@@ -1225,17 +1244,9 @@ public Mono createOrUpdateAsync(
String resourceGroupName,
String certificateOrderName,
AppServiceCertificateOrderInner certificateDistinguishedName) {
- Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName);
- return this
- .client
- .getLroResultAsync(
- mono,
- this.client.getHttpPipeline(),
- AppServiceCertificateOrderInner.class,
- AppServiceCertificateOrderInner.class)
+ return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1256,18 +1267,9 @@ public Mono createOrUpdateAsync(
String certificateOrderName,
AppServiceCertificateOrderInner certificateDistinguishedName,
Context context) {
- Mono>> mono =
- createOrUpdateWithResponseAsync(
- resourceGroupName, certificateOrderName, certificateDistinguishedName, context);
- return this
- .client
- .getLroResultAsync(
- mono,
- this.client.getHttpPipeline(),
- AppServiceCertificateOrderInner.class,
- AppServiceCertificateOrderInner.class)
+ return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, context)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1391,6 +1393,7 @@ public Mono> deleteWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.delete(
this.client.getEndpoint(),
@@ -1568,6 +1571,7 @@ public Mono> updateWithResponseAsync(
} else {
certificateDistinguishedName.validate();
}
+ context = this.client.mergeContext(context);
return service
.update(
this.client.getEndpoint(),
@@ -1765,6 +1769,7 @@ public Mono> listCertificatesS
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listCertificates(
this.client.getEndpoint(),
@@ -1944,6 +1949,7 @@ public Mono> getCertificateWithResp
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.getCertificate(
this.client.getEndpoint(),
@@ -2153,6 +2159,7 @@ public Mono>> createOrUpdateCertificateWithResponseAsy
} else {
keyVaultCertificate.validate();
}
+ context = this.client.mergeContext(context);
return service
.createOrUpdateCertificate(
this.client.getEndpoint(),
@@ -2179,7 +2186,7 @@ public Mono>> createOrUpdateCertificateWithResponseAsy
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public PollerFlux, AppServiceCertificateResourceInner>
- beginCreateOrUpdateCertificate(
+ beginCreateOrUpdateCertificateAsync(
String resourceGroupName,
String certificateOrderName,
String name,
@@ -2211,7 +2218,7 @@ public Mono>> createOrUpdateCertificateWithResponseAsy
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public PollerFlux, AppServiceCertificateResourceInner>
- beginCreateOrUpdateCertificate(
+ beginCreateOrUpdateCertificateAsync(
String resourceGroupName,
String certificateOrderName,
String name,
@@ -2229,6 +2236,55 @@ public Mono>> createOrUpdateCertificateWithResponseAsy
AppServiceCertificateResourceInner.class);
}
+ /**
+ * Description for Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param certificateOrderName Name of the certificate order.
+ * @param name Name of the certificate.
+ * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return key Vault container ARM resource for a certificate that is purchased through Azure.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, AppServiceCertificateResourceInner>
+ beginCreateOrUpdateCertificate(
+ String resourceGroupName,
+ String certificateOrderName,
+ String name,
+ AppServiceCertificateResourceInner keyVaultCertificate) {
+ return beginCreateOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate)
+ .getSyncPoller();
+ }
+
+ /**
+ * Description for Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param certificateOrderName Name of the certificate order.
+ * @param name Name of the certificate.
+ * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return key Vault container ARM resource for a certificate that is purchased through Azure.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, AppServiceCertificateResourceInner>
+ beginCreateOrUpdateCertificate(
+ String resourceGroupName,
+ String certificateOrderName,
+ String name,
+ AppServiceCertificateResourceInner keyVaultCertificate,
+ Context context) {
+ return beginCreateOrUpdateCertificateAsync(
+ resourceGroupName, certificateOrderName, name, keyVaultCertificate, context)
+ .getSyncPoller();
+ }
+
/**
* Description for Creates or updates a certificate and associates with key vault secret.
*
@@ -2247,18 +2303,9 @@ public Mono createOrUpdateCertificateAsync(
String certificateOrderName,
String name,
AppServiceCertificateResourceInner keyVaultCertificate) {
- Mono>> mono =
- createOrUpdateCertificateWithResponseAsync(
- resourceGroupName, certificateOrderName, name, keyVaultCertificate);
- return this
- .client
- .getLroResultAsync(
- mono,
- this.client.getHttpPipeline(),
- AppServiceCertificateResourceInner.class,
- AppServiceCertificateResourceInner.class)
+ return beginCreateOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -2281,18 +2328,10 @@ public Mono createOrUpdateCertificateAsync(
String name,
AppServiceCertificateResourceInner keyVaultCertificate,
Context context) {
- Mono>> mono =
- createOrUpdateCertificateWithResponseAsync(
- resourceGroupName, certificateOrderName, name, keyVaultCertificate, context);
- return this
- .client
- .getLroResultAsync(
- mono,
- this.client.getHttpPipeline(),
- AppServiceCertificateResourceInner.class,
- AppServiceCertificateResourceInner.class)
+ return beginCreateOrUpdateCertificateAsync(
+ resourceGroupName, certificateOrderName, name, keyVaultCertificate, context)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -2432,6 +2471,7 @@ public Mono> deleteCertificateWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.deleteCertificate(
this.client.getEndpoint(),
@@ -2622,6 +2662,7 @@ public Mono> updateCertificateWithR
} else {
keyVaultCertificate.validate();
}
+ context = this.client.mergeContext(context);
return service
.updateCertificate(
this.client.getEndpoint(),
@@ -2845,6 +2886,7 @@ public Mono> reissueWithResponseAsync(
} else {
reissueCertificateOrderRequest.validate();
}
+ context = this.client.mergeContext(context);
return service
.reissue(
this.client.getEndpoint(),
@@ -3042,6 +3084,7 @@ public Mono> renewWithResponseAsync(
} else {
renewCertificateOrderRequest.validate();
}
+ context = this.client.mergeContext(context);
return service
.renew(
this.client.getEndpoint(),
@@ -3213,6 +3256,7 @@ public Mono> resendEmailWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.resendEmail(
this.client.getEndpoint(),
@@ -3373,6 +3417,7 @@ public Mono> resendRequestEmailsWithResponseAsync(
}
NameIdentifierInner nameIdentifier = new NameIdentifierInner();
nameIdentifier.withName(name);
+ context = this.client.mergeContext(context);
return service
.resendRequestEmails(
this.client.getEndpoint(),
@@ -3548,6 +3593,7 @@ public Mono> retrieveSiteSealWithResponseAsync(
} else {
siteSealRequest.validate();
}
+ context = this.client.mergeContext(context);
return service
.retrieveSiteSeal(
this.client.getEndpoint(),
@@ -3726,6 +3772,7 @@ public Mono> verifyDomainOwnershipWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.verifyDomainOwnership(
this.client.getEndpoint(),
@@ -3878,6 +3925,7 @@ public Mono>> retrieveCertificateActi
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.retrieveCertificateActions(
this.client.getEndpoint(),
@@ -4048,6 +4096,7 @@ public Mono>> retrieveCertificateEmailHisto
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.retrieveCertificateEmailHistory(
this.client.getEndpoint(),
@@ -4139,460 +4188,6 @@ public List retrieveCertificateEmailHistory(
return retrieveCertificateEmailHistoryAsync(resourceGroupName, name, context).block();
}
- /**
- * Description for Create or update a certificate purchase order.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param certificateDistinguishedName SSL certificate purchase order.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return sSL certificate purchase order.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync(
- String resourceGroupName,
- String certificateOrderName,
- AppServiceCertificateOrderInner certificateDistinguishedName) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (certificateOrderName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (certificateDistinguishedName == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter certificateDistinguishedName is required and cannot be null."));
- } else {
- certificateDistinguishedName.validate();
- }
- return FluxUtil
- .withContext(
- context ->
- service
- .beginCreateOrUpdateWithoutPolling(
- this.client.getEndpoint(),
- resourceGroupName,
- certificateOrderName,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- certificateDistinguishedName,
- context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
- }
-
- /**
- * Description for Create or update a certificate purchase order.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param certificateDistinguishedName SSL certificate purchase order.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return sSL certificate purchase order.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync(
- String resourceGroupName,
- String certificateOrderName,
- AppServiceCertificateOrderInner certificateDistinguishedName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (certificateOrderName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (certificateDistinguishedName == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter certificateDistinguishedName is required and cannot be null."));
- } else {
- certificateDistinguishedName.validate();
- }
- return service
- .beginCreateOrUpdateWithoutPolling(
- this.client.getEndpoint(),
- resourceGroupName,
- certificateOrderName,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- certificateDistinguishedName,
- context);
- }
-
- /**
- * Description for Create or update a certificate purchase order.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param certificateDistinguishedName SSL certificate purchase order.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return sSL certificate purchase order.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono beginCreateOrUpdateWithoutPollingAsync(
- String resourceGroupName,
- String certificateOrderName,
- AppServiceCertificateOrderInner certificateDistinguishedName) {
- return beginCreateOrUpdateWithoutPollingWithResponseAsync(
- resourceGroupName, certificateOrderName, certificateDistinguishedName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Description for Create or update a certificate purchase order.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param certificateDistinguishedName SSL certificate purchase order.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return sSL certificate purchase order.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono beginCreateOrUpdateWithoutPollingAsync(
- String resourceGroupName,
- String certificateOrderName,
- AppServiceCertificateOrderInner certificateDistinguishedName,
- Context context) {
- return beginCreateOrUpdateWithoutPollingWithResponseAsync(
- resourceGroupName, certificateOrderName, certificateDistinguishedName, context)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Description for Create or update a certificate purchase order.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param certificateDistinguishedName SSL certificate purchase order.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return sSL certificate purchase order.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AppServiceCertificateOrderInner beginCreateOrUpdateWithoutPolling(
- String resourceGroupName,
- String certificateOrderName,
- AppServiceCertificateOrderInner certificateDistinguishedName) {
- return beginCreateOrUpdateWithoutPollingAsync(
- resourceGroupName, certificateOrderName, certificateDistinguishedName)
- .block();
- }
-
- /**
- * Description for Create or update a certificate purchase order.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param certificateDistinguishedName SSL certificate purchase order.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return sSL certificate purchase order.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AppServiceCertificateOrderInner beginCreateOrUpdateWithoutPolling(
- String resourceGroupName,
- String certificateOrderName,
- AppServiceCertificateOrderInner certificateDistinguishedName,
- Context context) {
- return beginCreateOrUpdateWithoutPollingAsync(
- resourceGroupName, certificateOrderName, certificateDistinguishedName, context)
- .block();
- }
-
- /**
- * Description for Creates or updates a certificate and associates with key vault secret.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param name Name of the certificate.
- * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return key Vault container ARM resource for a certificate that is purchased through Azure.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono>
- beginCreateOrUpdateCertificateWithoutPollingWithResponseAsync(
- String resourceGroupName,
- String certificateOrderName,
- String name,
- AppServiceCertificateResourceInner keyVaultCertificate) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (certificateOrderName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."));
- }
- if (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (keyVaultCertificate == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null."));
- } else {
- keyVaultCertificate.validate();
- }
- return FluxUtil
- .withContext(
- context ->
- service
- .beginCreateOrUpdateCertificateWithoutPolling(
- this.client.getEndpoint(),
- resourceGroupName,
- certificateOrderName,
- name,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- keyVaultCertificate,
- context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
- }
-
- /**
- * Description for Creates or updates a certificate and associates with key vault secret.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param name Name of the certificate.
- * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return key Vault container ARM resource for a certificate that is purchased through Azure.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono>
- beginCreateOrUpdateCertificateWithoutPollingWithResponseAsync(
- String resourceGroupName,
- String certificateOrderName,
- String name,
- AppServiceCertificateResourceInner keyVaultCertificate,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (certificateOrderName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."));
- }
- if (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (keyVaultCertificate == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null."));
- } else {
- keyVaultCertificate.validate();
- }
- return service
- .beginCreateOrUpdateCertificateWithoutPolling(
- this.client.getEndpoint(),
- resourceGroupName,
- certificateOrderName,
- name,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- keyVaultCertificate,
- context);
- }
-
- /**
- * Description for Creates or updates a certificate and associates with key vault secret.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param name Name of the certificate.
- * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return key Vault container ARM resource for a certificate that is purchased through Azure.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono beginCreateOrUpdateCertificateWithoutPollingAsync(
- String resourceGroupName,
- String certificateOrderName,
- String name,
- AppServiceCertificateResourceInner keyVaultCertificate) {
- return beginCreateOrUpdateCertificateWithoutPollingWithResponseAsync(
- resourceGroupName, certificateOrderName, name, keyVaultCertificate)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Description for Creates or updates a certificate and associates with key vault secret.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param name Name of the certificate.
- * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return key Vault container ARM resource for a certificate that is purchased through Azure.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono beginCreateOrUpdateCertificateWithoutPollingAsync(
- String resourceGroupName,
- String certificateOrderName,
- String name,
- AppServiceCertificateResourceInner keyVaultCertificate,
- Context context) {
- return beginCreateOrUpdateCertificateWithoutPollingWithResponseAsync(
- resourceGroupName, certificateOrderName, name, keyVaultCertificate, context)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Description for Creates or updates a certificate and associates with key vault secret.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param name Name of the certificate.
- * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return key Vault container ARM resource for a certificate that is purchased through Azure.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AppServiceCertificateResourceInner beginCreateOrUpdateCertificateWithoutPolling(
- String resourceGroupName,
- String certificateOrderName,
- String name,
- AppServiceCertificateResourceInner keyVaultCertificate) {
- return beginCreateOrUpdateCertificateWithoutPollingAsync(
- resourceGroupName, certificateOrderName, name, keyVaultCertificate)
- .block();
- }
-
- /**
- * Description for Creates or updates a certificate and associates with key vault secret.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param certificateOrderName Name of the certificate order.
- * @param name Name of the certificate.
- * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return key Vault container ARM resource for a certificate that is purchased through Azure.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AppServiceCertificateResourceInner beginCreateOrUpdateCertificateWithoutPolling(
- String resourceGroupName,
- String certificateOrderName,
- String name,
- AppServiceCertificateResourceInner keyVaultCertificate,
- Context context) {
- return beginCreateOrUpdateCertificateWithoutPollingAsync(
- resourceGroupName, certificateOrderName, name, keyVaultCertificate, context)
- .block();
- }
-
/**
* Get the next page of items.
*
@@ -4637,6 +4232,7 @@ public Mono> listNextSinglePageAs
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listNext(nextLink, context)
.map(
@@ -4695,6 +4291,7 @@ public Mono> listByResourceGroupN
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listByResourceGroupNext(nextLink, context)
.map(
@@ -4753,6 +4350,7 @@ public Mono> listCertificatesN
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listCertificatesNext(nextLink, context)
.map(
diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java
index 7550af44f578..0d53862c1ab5 100644
--- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java
+++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java
@@ -31,6 +31,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.appservice.WebSiteManagementClient;
import com.azure.resourcemanager.appservice.fluent.inner.AddressResponseInner;
import com.azure.resourcemanager.appservice.fluent.inner.AppServiceEnvironmentCollectionInner;
@@ -619,110 +620,6 @@ Mono> listWebWorkerUsages(
@QueryParam("api-version") String apiVersion,
Context context);
- @Headers({"Accept: application/json", "Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web"
- + "/hostingEnvironments/{name}")
- @ExpectedResponses({200, 201, 202})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginCreateOrUpdateWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope,
- Context context);
-
- @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
- @Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web"
- + "/hostingEnvironments/{name}")
- @ExpectedResponses({202, 204})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginDeleteWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @QueryParam("forceDelete") Boolean forceDelete,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- Context context);
-
- @Headers({"Accept: application/json", "Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web"
- + "/hostingEnvironments/{name}/changeVirtualNetwork")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginChangeVnetWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") VirtualNetworkProfile vnetInfo,
- Context context);
-
- @Headers({"Accept: application/json", "Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web"
- + "/hostingEnvironments/{name}/multiRolePools/default")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginCreateOrUpdateMultiRolePoolWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") WorkerPoolResourceInner multiRolePoolEnvelope,
- Context context);
-
- @Headers({"Accept: application/json", "Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web"
- + "/hostingEnvironments/{name}/resume")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginResumeWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- Context context);
-
- @Headers({"Accept: application/json", "Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web"
- + "/hostingEnvironments/{name}/suspend")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginSuspendWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- Context context);
-
- @Headers({"Accept: application/json", "Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web"
- + "/hostingEnvironments/{name}/workerPools/{workerPoolName}")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
- Mono> beginCreateOrUpdateWorkerPoolWithoutPolling(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @PathParam("workerPoolName") String workerPoolName,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") WorkerPoolResourceInner workerPoolEnvelope,
- Context context);
-
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -744,6 +641,13 @@ Mono> listByResourceGroupNext(
Mono> listCapacitiesNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> changeVnetNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -793,6 +697,13 @@ Mono> listMultiRoleUsagesNext(
Mono> getOutboundNetworkDependenciesEndpointsNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> resumeNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -807,6 +718,13 @@ Mono> listAppServicePlansNext(
Mono> listWebAppsNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
+ Mono> suspendNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -915,6 +833,7 @@ public Mono> listSinglePageAsy
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context)
.map(
@@ -1059,6 +978,7 @@ public Mono> listByResourceGro
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listByResourceGroup(
this.client.getEndpoint(),
@@ -1220,6 +1140,7 @@ public Mono> getByResourceGroupWith
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.getByResourceGroup(
this.client.getEndpoint(),
@@ -1411,6 +1332,7 @@ public Mono>> createOrUpdateWithResponseAsync(
} else {
hostingEnvironmentEnvelope.validate();
}
+ context = this.client.mergeContext(context);
return service
.createOrUpdate(
this.client.getEndpoint(),
@@ -1435,7 +1357,7 @@ public Mono>> createOrUpdateWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public PollerFlux, AppServiceEnvironmentResourceInner>
- beginCreateOrUpdate(
+ beginCreateOrUpdateAsync(
String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) {
Mono>> mono =
createOrUpdateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope);
@@ -1462,7 +1384,7 @@ public Mono>> createOrUpdateWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public PollerFlux, AppServiceEnvironmentResourceInner>
- beginCreateOrUpdate(
+ beginCreateOrUpdateAsync(
String resourceGroupName,
String name,
AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope,
@@ -1478,6 +1400,46 @@ public Mono>> createOrUpdateWithResponseAsync(
AppServiceEnvironmentResourceInner.class);
}
+ /**
+ * Description for Create or update an App Service Environment.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param name Name of the App Service Environment.
+ * @param hostingEnvironmentEnvelope App Service Environment ARM resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return app Service Environment ARM resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, AppServiceEnvironmentResourceInner>
+ beginCreateOrUpdate(
+ String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) {
+ return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope).getSyncPoller();
+ }
+
+ /**
+ * Description for Create or update an App Service Environment.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param name Name of the App Service Environment.
+ * @param hostingEnvironmentEnvelope App Service Environment ARM resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return app Service Environment ARM resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, AppServiceEnvironmentResourceInner>
+ beginCreateOrUpdate(
+ String resourceGroupName,
+ String name,
+ AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context).getSyncPoller();
+ }
+
/**
* Description for Create or update an App Service Environment.
*
@@ -1492,17 +1454,9 @@ public Mono>> createOrUpdateWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono createOrUpdateAsync(
String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) {
- Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope);
- return this
- .client
- .getLroResultAsync(
- mono,
- this.client.getHttpPipeline(),
- AppServiceEnvironmentResourceInner.class,
- AppServiceEnvironmentResourceInner.class)
+ return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1523,17 +1477,9 @@ public Mono createOrUpdateAsync(
String name,
AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope,
Context context) {
- Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context);
- return this
- .client
- .getLroResultAsync(
- mono,
- this.client.getHttpPipeline(),
- AppServiceEnvironmentResourceInner.class,
- AppServiceEnvironmentResourceInner.class)
+ return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1658,6 +1604,7 @@ public Mono>> deleteWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.delete(
this.client.getEndpoint(),
@@ -1682,7 +1629,8 @@ public Mono>> deleteWithResponseAsync(
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, Void> beginDelete(String resourceGroupName, String name, Boolean forceDelete) {
+ public PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String name, Boolean forceDelete) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete);
return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class);
}
@@ -1701,12 +1649,48 @@ public PollerFlux, Void> beginDelete(String resourceGroupName,
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, Void> beginDelete(
+ public PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String name, Boolean forceDelete, Context context) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete, context);
return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class);
}
+ /**
+ * Description for Delete an App Service Environment.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param name Name of the App Service Environment.
+ * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service
+ * Environment contains resources. The default is <code>false</code>.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Boolean forceDelete) {
+ return beginDeleteAsync(resourceGroupName, name, forceDelete).getSyncPoller();
+ }
+
+ /**
+ * Description for Delete an App Service Environment.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param name Name of the App Service Environment.
+ * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service
+ * Environment contains resources. The default is <code>false</code>.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String name, Boolean forceDelete, Context context) {
+ return beginDeleteAsync(resourceGroupName, name, forceDelete, context).getSyncPoller();
+ }
+
/**
* Description for Delete an App Service Environment.
*
@@ -1721,12 +1705,9 @@ public PollerFlux, Void> beginDelete(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono deleteAsync(String resourceGroupName, String name, Boolean forceDelete) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete);
- return this
- .client
- .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class)
+ return beginDeleteAsync(resourceGroupName, name, forceDelete)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1744,12 +1725,9 @@ public Mono deleteAsync(String resourceGroupName, String name, Boolean for
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono deleteAsync(String resourceGroupName, String name, Boolean forceDelete, Context context) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete, context);
- return this
- .client
- .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class)
+ return beginDeleteAsync(resourceGroupName, name, forceDelete, context)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1766,12 +1744,9 @@ public Mono deleteAsync(String resourceGroupName, String name, Boolean for
public Mono deleteAsync(String resourceGroupName, String name) {
final Boolean forceDelete = null;
final Context context = null;
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete);
- return this
- .client
- .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class)
+ return beginDeleteAsync(resourceGroupName, name, forceDelete)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1924,6 +1899,7 @@ public Mono> updateWithResponseAsyn
} else {
hostingEnvironmentEnvelope.validate();
}
+ context = this.client.mergeContext(context);
return service
.update(
this.client.getEndpoint(),
@@ -2115,6 +2091,7 @@ public Mono> listCapacitiesSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listCapacities(
this.client.getEndpoint(),
@@ -2278,6 +2255,7 @@ public Mono> getVipInfoWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.getVipInfo(
this.client.getEndpoint(),
@@ -2378,7 +2356,7 @@ public AddressResponseInner getVipInfo(String resourceGroupName, String name, Co
* @return collection of App Service apps.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono>> changeVnetWithResponseAsync(
+ public Mono> changeVnetSinglePageAsync(
String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -2406,16 +2384,40 @@ public Mono>> changeVnetWithResponseAsync(
}
return FluxUtil
.withContext(
- context ->
- service
- .changeVnet(
- this.client.getEndpoint(),
- resourceGroupName,
- name,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- vnetInfo,
- context))
+ context -> {
+ Mono>> mono =
+ service
+ .changeVnet(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ name,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ vnetInfo,
+ context)
+ .cache();
+ return Mono
+ .zip(
+ mono,
+ this
+ .client
+ .getLroResultAsync(
+ mono,
+ this.client.getHttpPipeline(),
+ WebAppCollectionInner.class,
+ WebAppCollectionInner.class)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError));
+ })
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getT1().getRequest(),
+ res.getT1().getStatusCode(),
+ res.getT1().getHeaders(),
+ res.getT2().value(),
+ res.getT2().nextLink(),
+ null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
@@ -2432,7 +2434,7 @@ public Mono>> changeVnetWithResponseAsync(
* @return collection of App Service apps.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono>> changeVnetWithResponseAsync(
+ public Mono> changeVnetSinglePageAsync(
String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -2458,15 +2460,36 @@ public Mono>> changeVnetWithResponseAsync(
} else {
vnetInfo.validate();
}
- return service
- .changeVnet(
- this.client.getEndpoint(),
- resourceGroupName,
- name,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- vnetInfo,
- context);
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ service
+ .changeVnet(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ name,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ vnetInfo,
+ context)
+ .cache();
+ return Mono
+ .zip(
+ mono,
+ this
+ .client
+ .getLroResultAsync(
+ mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getT1().getRequest(),
+ res.getT1().getStatusCode(),
+ res.getT1().getHeaders(),
+ res.getT2().value(),
+ res.getT2().nextLink(),
+ null));
}
/**
@@ -2480,14 +2503,11 @@ public Mono>> changeVnetWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, WebAppCollectionInner> beginChangeVnet(
- String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) {
- Mono>> mono = changeVnetWithResponseAsync(resourceGroupName, name, vnetInfo);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux changeVnetAsync(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) {
+ return new PagedFlux<>(
+ () -> changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo),
+ nextLink -> changeVnetNextSinglePageAsync(nextLink));
}
/**
@@ -2502,14 +2522,12 @@ public PollerFlux, WebAppCollectionInner> begi
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, WebAppCollectionInner> beginChangeVnet(
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux changeVnetAsync(
String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) {
- Mono>> mono = changeVnetWithResponseAsync(resourceGroupName, name, vnetInfo, context);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class);
+ return new PagedFlux<>(
+ () -> changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo, context),
+ nextLink -> changeVnetNextSinglePageAsync(nextLink));
}
/**
@@ -2523,16 +2541,9 @@ public PollerFlux, WebAppCollectionInner> begi
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono changeVnetAsync(
- String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) {
- Mono>> mono = changeVnetWithResponseAsync(resourceGroupName, name, vnetInfo);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class)
- .last()
- .flatMap(client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable changeVnet(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) {
+ return new PagedIterable<>(changeVnetAsync(resourceGroupName, name, vnetInfo));
}
/**
@@ -2547,50 +2558,10 @@ public Mono changeVnetAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono changeVnetAsync(
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable changeVnet(
String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) {
- Mono>> mono = changeVnetWithResponseAsync(resourceGroupName, name, vnetInfo, context);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class)
- .last()
- .flatMap(client::getLroFinalResultOrError);
- }
-
- /**
- * Description for Move an App Service Environment to a different VNET.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param name Name of the App Service Environment.
- * @param vnetInfo Specification for using a Virtual Network.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of App Service apps.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public WebAppCollectionInner changeVnet(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) {
- return changeVnetAsync(resourceGroupName, name, vnetInfo).block();
- }
-
- /**
- * Description for Move an App Service Environment to a different VNET.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param name Name of the App Service Environment.
- * @param vnetInfo Specification for using a Virtual Network.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of App Service apps.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public WebAppCollectionInner changeVnet(
- String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) {
- return changeVnetAsync(resourceGroupName, name, vnetInfo, context).block();
+ return new PagedIterable<>(changeVnetAsync(resourceGroupName, name, vnetInfo, context));
}
/**
@@ -2672,6 +2643,7 @@ public Mono>> listDiagnosticsW
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listDiagnostics(
this.client.getEndpoint(),
@@ -2852,6 +2824,7 @@ public Mono> getDiagnosticsItemWith
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.getDiagnosticsItem(
this.client.getEndpoint(),
@@ -3037,6 +3010,7 @@ public Mono> getInboundNetworkDep
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.getInboundNetworkDependenciesEndpoints(
this.client.getEndpoint(),
@@ -3214,6 +3188,7 @@ public Mono> listMultiRolePoolsSinglePage
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listMultiRolePools(
this.client.getEndpoint(),
@@ -3380,6 +3355,7 @@ public Mono> getMultiRolePoolWithResponseAsync
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.getMultiRolePool(
this.client.getEndpoint(),
@@ -3562,6 +3538,7 @@ public Mono>> createOrUpdateMultiRolePoolWithResponseA
} else {
multiRolePoolEnvelope.validate();
}
+ context = this.client.mergeContext(context);
return service
.createOrUpdateMultiRolePool(
this.client.getEndpoint(),
@@ -3585,8 +3562,9 @@ public Mono>> createOrUpdateMultiRolePoolWithResponseA
* @return worker pool of an App Service Environment ARM resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool(
- String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) {
+ public PollerFlux, WorkerPoolResourceInner>
+ beginCreateOrUpdateMultiRolePoolAsync(
+ String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) {
Mono>> mono =
createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope);
return this
@@ -3608,8 +3586,9 @@ public PollerFlux, WorkerPoolResourceInner>
* @return worker pool of an App Service Environment ARM resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool(
- String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) {
+ public PollerFlux, WorkerPoolResourceInner>
+ beginCreateOrUpdateMultiRolePoolAsync(
+ String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) {
Mono>> mono =
createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope, context);
return this
@@ -3618,6 +3597,42 @@ public PollerFlux, WorkerPoolResourceInner>
mono, this.client.getHttpPipeline(), WorkerPoolResourceInner.class, WorkerPoolResourceInner.class);
}
+ /**
+ * Description for Create or update a multi-role pool.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param name Name of the App Service Environment.
+ * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return worker pool of an App Service Environment ARM resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool(
+ String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) {
+ return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope).getSyncPoller();
+ }
+
+ /**
+ * Description for Create or update a multi-role pool.
+ *
+ * @param resourceGroupName Name of the resource group to which the resource belongs.
+ * @param name Name of the App Service Environment.
+ * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return worker pool of an App Service Environment ARM resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool(
+ String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) {
+ return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope, context)
+ .getSyncPoller();
+ }
+
/**
* Description for Create or update a multi-role pool.
*
@@ -3632,14 +3647,9 @@ public PollerFlux, WorkerPoolResourceInner>
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono createOrUpdateMultiRolePoolAsync(
String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) {
- Mono>> mono =
- createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WorkerPoolResourceInner.class, WorkerPoolResourceInner.class)
+ return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -3657,14 +3667,9 @@ public Mono createOrUpdateMultiRolePoolAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono createOrUpdateMultiRolePoolAsync(
String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) {
- Mono>> mono =
- createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope, context);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WorkerPoolResourceInner.class, WorkerPoolResourceInner.class)
+ return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope, context)
.last()
- .flatMap(client::getLroFinalResultOrError);
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -3796,6 +3801,7 @@ public Mono> updateMultiRolePoolWithResponseAs
} else {
multiRolePoolEnvelope.validate();
}
+ context = this.client.mergeContext(context);
return service
.updateMultiRolePool(
this.client.getEndpoint(),
@@ -3992,6 +3998,7 @@ public Mono> listMultiRolePoolInsta
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listMultiRolePoolInstanceMetricDefinitions(
this.client.getEndpoint(),
@@ -4179,6 +4186,7 @@ public Mono> listMultiRoleMetricDef
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listMultiRoleMetricDefinitions(
this.client.getEndpoint(),
@@ -4356,6 +4364,7 @@ public Mono> listMultiRolePoolSkusSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listMultiRolePoolSkus(
this.client.getEndpoint(),
@@ -4528,6 +4537,7 @@ public Mono> listMultiRoleUsagesSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listMultiRoleUsages(
this.client.getEndpoint(),
@@ -4691,6 +4701,7 @@ public Mono>> listOperationsWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listOperations(
this.client.getEndpoint(),
@@ -4867,6 +4878,7 @@ public Mono> getOutboundNetworkD
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.getOutboundNetworkDependenciesEndpoints(
this.client.getEndpoint(),
@@ -5033,6 +5045,7 @@ public Mono> rebootWithResponseAsync(String resourceGroupName, St
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.reboot(
this.client.getEndpoint(),
@@ -5114,7 +5127,7 @@ public void reboot(String resourceGroupName, String name, Context context) {
* @return collection of App Service apps.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono>> resumeWithResponseAsync(String resourceGroupName, String name) {
+ public Mono> resumeSinglePageAsync(String resourceGroupName, String name) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -5136,15 +5149,39 @@ public Mono>> resumeWithResponseAsync(String resourceG
}
return FluxUtil
.withContext(
- context ->
- service
- .resume(
- this.client.getEndpoint(),
- resourceGroupName,
- name,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- context))
+ context -> {
+ Mono>> mono =
+ service
+ .resume(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ name,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ context)
+ .cache();
+ return Mono
+ .zip(
+ mono,
+ this
+ .client
+ .getLroResultAsync(
+ mono,
+ this.client.getHttpPipeline(),
+ WebAppCollectionInner.class,
+ WebAppCollectionInner.class)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError));
+ })
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getT1().getRequest(),
+ res.getT1().getStatusCode(),
+ res.getT1().getHeaders(),
+ res.getT2().value(),
+ res.getT2().nextLink(),
+ null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
@@ -5160,7 +5197,7 @@ public Mono>> resumeWithResponseAsync(String resourceG
* @return collection of App Service apps.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono>> resumeWithResponseAsync(
+ public Mono> resumeSinglePageAsync(
String resourceGroupName, String name, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -5181,55 +5218,35 @@ public Mono>> resumeWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- return service
- .resume(
- this.client.getEndpoint(),
- resourceGroupName,
- name,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- context);
- }
-
- /**
- * Description for Resume an App Service Environment.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param name Name of the App Service Environment.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of App Service apps.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, WebAppCollectionInner> beginResume(
- String resourceGroupName, String name) {
- Mono>> mono = resumeWithResponseAsync(resourceGroupName, name);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class);
- }
-
- /**
- * Description for Resume an App Service Environment.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param name Name of the App Service Environment.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of App Service apps.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, WebAppCollectionInner> beginResume(
- String resourceGroupName, String name, Context context) {
- Mono>> mono = resumeWithResponseAsync(resourceGroupName, name, context);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class);
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ service
+ .resume(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ name,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ context)
+ .cache();
+ return Mono
+ .zip(
+ mono,
+ this
+ .client
+ .getLroResultAsync(
+ mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getT1().getRequest(),
+ res.getT1().getStatusCode(),
+ res.getT1().getHeaders(),
+ res.getT2().value(),
+ res.getT2().nextLink(),
+ null));
}
/**
@@ -5242,15 +5259,10 @@ public PollerFlux, WebAppCollectionInner> begi
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono resumeAsync(String resourceGroupName, String name) {
- Mono>> mono = resumeWithResponseAsync(resourceGroupName, name);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class)
- .last()
- .flatMap(client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux resumeAsync(String resourceGroupName, String name) {
+ return new PagedFlux<>(
+ () -> resumeSinglePageAsync(resourceGroupName, name), nextLink -> resumeNextSinglePageAsync(nextLink));
}
/**
@@ -5264,15 +5276,11 @@ public Mono resumeAsync(String resourceGroupName, String
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono resumeAsync(String resourceGroupName, String name, Context context) {
- Mono>> mono = resumeWithResponseAsync(resourceGroupName, name, context);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class)
- .last()
- .flatMap(client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux resumeAsync(String resourceGroupName, String name, Context context) {
+ return new PagedFlux<>(
+ () -> resumeSinglePageAsync(resourceGroupName, name, context),
+ nextLink -> resumeNextSinglePageAsync(nextLink));
}
/**
@@ -5285,9 +5293,9 @@ public Mono resumeAsync(String resourceGroupName, String
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public WebAppCollectionInner resume(String resourceGroupName, String name) {
- return resumeAsync(resourceGroupName, name).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable resume(String resourceGroupName, String name) {
+ return new PagedIterable<>(resumeAsync(resourceGroupName, name));
}
/**
@@ -5301,9 +5309,9 @@ public WebAppCollectionInner resume(String resourceGroupName, String name) {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public WebAppCollectionInner resume(String resourceGroupName, String name, Context context) {
- return resumeAsync(resourceGroupName, name, context).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable resume(String resourceGroupName, String name, Context context) {
+ return new PagedIterable<>(resumeAsync(resourceGroupName, name, context));
}
/**
@@ -5394,6 +5402,7 @@ public Mono> listAppServicePlansSinglePageAsy
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listAppServicePlans(
this.client.getEndpoint(),
@@ -5572,6 +5581,7 @@ public Mono> listWebAppsSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ context = this.client.mergeContext(context);
return service
.listWebApps(
this.client.getEndpoint(),
@@ -5711,7 +5721,7 @@ public PagedIterable listWebApps(String resourceGroupName, String nam
* @return collection of App Service apps.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono>> suspendWithResponseAsync(String resourceGroupName, String name) {
+ public Mono> suspendSinglePageAsync(String resourceGroupName, String name) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -5733,15 +5743,39 @@ public Mono>> suspendWithResponseAsync(String resource
}
return FluxUtil
.withContext(
- context ->
- service
- .suspend(
- this.client.getEndpoint(),
- resourceGroupName,
- name,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- context))
+ context -> {
+ Mono>> mono =
+ service
+ .suspend(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ name,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ context)
+ .cache();
+ return Mono
+ .zip(
+ mono,
+ this
+ .client
+ .getLroResultAsync(
+ mono,
+ this.client.getHttpPipeline(),
+ WebAppCollectionInner.class,
+ WebAppCollectionInner.class)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError));
+ })
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getT1().getRequest(),
+ res.getT1().getStatusCode(),
+ res.getT1().getHeaders(),
+ res.getT2().value(),
+ res.getT2().nextLink(),
+ null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
@@ -5757,7 +5791,7 @@ public Mono>> suspendWithResponseAsync(String resource
* @return collection of App Service apps.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono>> suspendWithResponseAsync(
+ public Mono> suspendSinglePageAsync(
String resourceGroupName, String name, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -5778,55 +5812,35 @@ public Mono>> suspendWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- return service
- .suspend(
- this.client.getEndpoint(),
- resourceGroupName,
- name,
- this.client.getSubscriptionId(),
- this.client.getApiVersion(),
- context);
- }
-
- /**
- * Description for Suspend an App Service Environment.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param name Name of the App Service Environment.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of App Service apps.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, WebAppCollectionInner> beginSuspend(
- String resourceGroupName, String name) {
- Mono>> mono = suspendWithResponseAsync(resourceGroupName, name);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class);
- }
-
- /**
- * Description for Suspend an App Service Environment.
- *
- * @param resourceGroupName Name of the resource group to which the resource belongs.
- * @param name Name of the App Service Environment.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of App Service apps.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PollerFlux, WebAppCollectionInner> beginSuspend(
- String resourceGroupName, String name, Context context) {
- Mono>> mono = suspendWithResponseAsync(resourceGroupName, name, context);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class);
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ service
+ .suspend(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ name,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ context)
+ .cache();
+ return Mono
+ .zip(
+ mono,
+ this
+ .client
+ .getLroResultAsync(
+ mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getT1().getRequest(),
+ res.getT1().getStatusCode(),
+ res.getT1().getHeaders(),
+ res.getT2().value(),
+ res.getT2().nextLink(),
+ null));
}
/**
@@ -5839,15 +5853,10 @@ public PollerFlux, WebAppCollectionInner> begi
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return collection of App Service apps.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono suspendAsync(String resourceGroupName, String name) {
- Mono>> mono = suspendWithResponseAsync(resourceGroupName, name);
- return this
- .client
- .getLroResultAsync(
- mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class)
- .last()
- .flatMap(client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux