diff --git a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/CHANGELOG.md b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/CHANGELOG.md
index dbc32924d120..a044f445171b 100644
--- a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/CHANGELOG.md
+++ b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-11-30)
+
+- Azure Resource Manager CustomLocations client library for Java. This package contains Microsoft Azure SDK for CustomLocations Management SDK. The customLocations Rest API spec. Package tag package-2021-08-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/README.md b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/README.md
index f0c3b82aeabd..cff2ebf60fdc 100644
--- a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/README.md
+++ b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-extendedlocation
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/CustomLocationsManager.java b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/CustomLocationsManager.java
index dd1f9e16aa11..afe47f08772d 100644
--- a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/CustomLocationsManager.java
+++ b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/CustomLocationsManager.java
@@ -8,6 +8,7 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
@@ -29,6 +30,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to CustomLocationsManager. The customLocations Rest API spec. */
public final class CustomLocationsManager {
@@ -193,11 +195,24 @@ public CustomLocationsManager authenticate(TokenCredential credential, AzureProf
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
- policies.addAll(this.policies);
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/fluent/CustomLocationsClient.java b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/fluent/CustomLocationsClient.java
index 25036a4298f6..d69be82bdd4c 100644
--- a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/fluent/CustomLocationsClient.java
+++ b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/fluent/CustomLocationsClient.java
@@ -130,7 +130,7 @@ Response getByResourceGroupWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return custom Locations definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CustomLocationInner> beginCreateOrUpdate(
String resourceGroupName, String resourceName, CustomLocationInner parameters);
@@ -146,7 +146,7 @@ SyncPoller, CustomLocationInner> beginCreateOrUp
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return custom Locations definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CustomLocationInner> beginCreateOrUpdate(
String resourceGroupName, String resourceName, CustomLocationInner parameters, Context context);
@@ -190,7 +190,7 @@ CustomLocationInner createOrUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName);
/**
@@ -204,7 +204,7 @@ CustomLocationInner createOrUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context);
/**
diff --git a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/implementation/CustomLocationsClientImpl.java b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/implementation/CustomLocationsClientImpl.java
index da27ca9a7b67..ab32cff643f8 100644
--- a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/implementation/CustomLocationsClientImpl.java
+++ b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/src/main/java/com/azure/resourcemanager/extendedlocation/implementation/CustomLocationsClientImpl.java
@@ -929,7 +929,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return custom Locations definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CustomLocationInner> beginCreateOrUpdateAsync(
String resourceGroupName, String resourceName, CustomLocationInner parameters) {
Mono>> mono =
@@ -941,7 +941,7 @@ private PollerFlux, CustomLocationInner> beginCr
this.client.getHttpPipeline(),
CustomLocationInner.class,
CustomLocationInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -956,7 +956,7 @@ private PollerFlux, CustomLocationInner> beginCr
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return custom Locations definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CustomLocationInner> beginCreateOrUpdateAsync(
String resourceGroupName, String resourceName, CustomLocationInner parameters, Context context) {
context = this.client.mergeContext(context);
@@ -979,7 +979,7 @@ private PollerFlux, CustomLocationInner> beginCr
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return custom Locations definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CustomLocationInner> beginCreateOrUpdate(
String resourceGroupName, String resourceName, CustomLocationInner parameters) {
return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller();
@@ -997,7 +997,7 @@ public SyncPoller, CustomLocationInner> beginCre
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return custom Locations definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CustomLocationInner> beginCreateOrUpdate(
String resourceGroupName, String resourceName, CustomLocationInner parameters, Context context) {
return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller();
@@ -1180,12 +1180,13 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -1199,7 +1200,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String resourceName, Context context) {
context = this.client.mergeContext(context);
@@ -1219,7 +1220,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) {
return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller();
}
@@ -1235,7 +1236,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, Context context) {
return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller();