Skip to content

Commit 4f89e26

Browse files
author
SDK Automation
committed
Generated from 9b33d7ca67d424c5f35e9ad9de82ab51951682a2
1 parent 8467ecc commit 4f89e26

File tree

7 files changed

+209
-209
lines changed

7 files changed

+209
-209
lines changed

sdk/containerservice/mgmt-v2020_07_01/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<parent>
1212
<groupId>com.microsoft.azure</groupId>
1313
<artifactId>azure-arm-parent</artifactId>
14-
<version>1.3.2</version>
15-
<relativePath>../../parents/azure-arm-parent/pom.xml</relativePath>
14+
<version>1.1.0</version>
15+
<relativePath>../../../pom.management.xml</relativePath>
1616
</parent>
1717
<artifactId>azure-mgmt-containerservice</artifactId>
1818
<version>1.0.0-beta</version>

sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/AgentPools.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818
* Type representing AgentPools.
1919
*/
2020
public interface AgentPools extends SupportsCreating<AgentPool.DefinitionStages.Blank>, HasInner<AgentPoolsInner> {
21+
/**
22+
* Upgrade node image version of an agent pool to the latest.
23+
* Upgrade node image version of an agent pool to the latest.
24+
*
25+
* @param resourceGroupName The name of the resource group.
26+
* @param resourceName The name of the managed cluster resource.
27+
* @param agentPoolName The name of the agent pool.
28+
* @throws IllegalArgumentException thrown if parameters fail the validation
29+
* @return the observable for the request
30+
*/
31+
Observable<AgentPool> upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName);
32+
2133
/**
2234
* Gets the agent pool.
2335
* Gets the details of the agent pool by managed cluster and resource group.

sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/ManagedClusters.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,4 @@ public interface ManagedClusters extends SupportsCreating<ManagedCluster.Definit
114114
*/
115115
Observable<ManagedClusterAccessProfile> getAccessProfileAsync(String resourceGroupName, String resourceName, String roleName);
116116

117-
/**
118-
* Upgrade node image version of an agent pool to the latest.
119-
* Upgrade node image version of an agent pool to the latest.
120-
*
121-
* @param resourceGroupName The name of the resource group.
122-
* @param resourceName The name of the managed cluster resource.
123-
* @param agentPoolName The name of the agent pool.
124-
* @throws IllegalArgumentException thrown if parameters fail the validation
125-
* @return the observable for the request
126-
*/
127-
Observable<AgentPool> upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName);
128-
129117
}

sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/implementation/AgentPoolsImpl.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ private AgentPoolImpl wrapModel(String name) {
4444
return new AgentPoolImpl(name, this.manager());
4545
}
4646

47+
@Override
48+
public Observable<AgentPool> upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) {
49+
AgentPoolsInner client = this.inner();
50+
return client.upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName)
51+
.map(new Func1<AgentPoolInner, AgentPool>() {
52+
@Override
53+
public AgentPool call(AgentPoolInner inner) {
54+
return new AgentPoolImpl(inner, manager());
55+
}
56+
});
57+
}
58+
4759
@Override
4860
public Observable<AgentPool> listAsync(final String resourceGroupName, final String resourceName) {
4961
AgentPoolsInner client = this.inner();

sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/implementation/AgentPoolsInner.java

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import retrofit2.http.Headers;
2929
import retrofit2.http.HTTP;
3030
import retrofit2.http.Path;
31+
import retrofit2.http.POST;
3132
import retrofit2.http.PUT;
3233
import retrofit2.http.Query;
3334
import retrofit2.http.Url;
@@ -93,6 +94,14 @@ interface AgentPoolsService {
9394
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions")
9495
Observable<Response<ResponseBody>> getAvailableAgentPoolVersions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
9596

97+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2020_07_01.AgentPools upgradeNodeImageVersion" })
98+
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion")
99+
Observable<Response<ResponseBody>> upgradeNodeImageVersion(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
100+
101+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2020_07_01.AgentPools beginUpgradeNodeImageVersion" })
102+
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion")
103+
Observable<Response<ResponseBody>> beginUpgradeNodeImageVersion(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
104+
96105
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2020_07_01.AgentPools listNext" })
97106
@GET
98107
Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -865,6 +874,180 @@ private ServiceResponse<AgentPoolAvailableVersionsInner> getAvailableAgentPoolVe
865874
.build(response);
866875
}
867876

877+
/**
878+
* Upgrade node image version of an agent pool to the latest.
879+
* Upgrade node image version of an agent pool to the latest.
880+
*
881+
* @param resourceGroupName The name of the resource group.
882+
* @param resourceName The name of the managed cluster resource.
883+
* @param agentPoolName The name of the agent pool.
884+
* @throws IllegalArgumentException thrown if parameters fail the validation
885+
* @throws CloudException thrown if the request is rejected by server
886+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
887+
* @return the AgentPoolInner object if successful.
888+
*/
889+
public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) {
890+
return upgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().last().body();
891+
}
892+
893+
/**
894+
* Upgrade node image version of an agent pool to the latest.
895+
* Upgrade node image version of an agent pool to the latest.
896+
*
897+
* @param resourceGroupName The name of the resource group.
898+
* @param resourceName The name of the managed cluster resource.
899+
* @param agentPoolName The name of the agent pool.
900+
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
901+
* @throws IllegalArgumentException thrown if parameters fail the validation
902+
* @return the {@link ServiceFuture} object
903+
*/
904+
public ServiceFuture<AgentPoolInner> upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback<AgentPoolInner> serviceCallback) {
905+
return ServiceFuture.fromResponse(upgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback);
906+
}
907+
908+
/**
909+
* Upgrade node image version of an agent pool to the latest.
910+
* Upgrade node image version of an agent pool to the latest.
911+
*
912+
* @param resourceGroupName The name of the resource group.
913+
* @param resourceName The name of the managed cluster resource.
914+
* @param agentPoolName The name of the agent pool.
915+
* @throws IllegalArgumentException thrown if parameters fail the validation
916+
* @return the observable for the request
917+
*/
918+
public Observable<AgentPoolInner> upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) {
919+
return upgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1<ServiceResponse<AgentPoolInner>, AgentPoolInner>() {
920+
@Override
921+
public AgentPoolInner call(ServiceResponse<AgentPoolInner> response) {
922+
return response.body();
923+
}
924+
});
925+
}
926+
927+
/**
928+
* Upgrade node image version of an agent pool to the latest.
929+
* Upgrade node image version of an agent pool to the latest.
930+
*
931+
* @param resourceGroupName The name of the resource group.
932+
* @param resourceName The name of the managed cluster resource.
933+
* @param agentPoolName The name of the agent pool.
934+
* @throws IllegalArgumentException thrown if parameters fail the validation
935+
* @return the observable for the request
936+
*/
937+
public Observable<ServiceResponse<AgentPoolInner>> upgradeNodeImageVersionWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName) {
938+
if (this.client.subscriptionId() == null) {
939+
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
940+
}
941+
if (resourceGroupName == null) {
942+
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
943+
}
944+
if (resourceName == null) {
945+
throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
946+
}
947+
if (agentPoolName == null) {
948+
throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.");
949+
}
950+
final String apiVersion = "2020-07-01";
951+
Observable<Response<ResponseBody>> observable = service.upgradeNodeImageVersion(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
952+
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<AgentPoolInner>() { }.getType());
953+
}
954+
955+
/**
956+
* Upgrade node image version of an agent pool to the latest.
957+
* Upgrade node image version of an agent pool to the latest.
958+
*
959+
* @param resourceGroupName The name of the resource group.
960+
* @param resourceName The name of the managed cluster resource.
961+
* @param agentPoolName The name of the agent pool.
962+
* @throws IllegalArgumentException thrown if parameters fail the validation
963+
* @throws CloudException thrown if the request is rejected by server
964+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
965+
* @return the AgentPoolInner object if successful.
966+
*/
967+
public AgentPoolInner beginUpgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) {
968+
return beginUpgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().single().body();
969+
}
970+
971+
/**
972+
* Upgrade node image version of an agent pool to the latest.
973+
* Upgrade node image version of an agent pool to the latest.
974+
*
975+
* @param resourceGroupName The name of the resource group.
976+
* @param resourceName The name of the managed cluster resource.
977+
* @param agentPoolName The name of the agent pool.
978+
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
979+
* @throws IllegalArgumentException thrown if parameters fail the validation
980+
* @return the {@link ServiceFuture} object
981+
*/
982+
public ServiceFuture<AgentPoolInner> beginUpgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback<AgentPoolInner> serviceCallback) {
983+
return ServiceFuture.fromResponse(beginUpgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback);
984+
}
985+
986+
/**
987+
* Upgrade node image version of an agent pool to the latest.
988+
* Upgrade node image version of an agent pool to the latest.
989+
*
990+
* @param resourceGroupName The name of the resource group.
991+
* @param resourceName The name of the managed cluster resource.
992+
* @param agentPoolName The name of the agent pool.
993+
* @throws IllegalArgumentException thrown if parameters fail the validation
994+
* @return the observable to the AgentPoolInner object
995+
*/
996+
public Observable<AgentPoolInner> beginUpgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) {
997+
return beginUpgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1<ServiceResponse<AgentPoolInner>, AgentPoolInner>() {
998+
@Override
999+
public AgentPoolInner call(ServiceResponse<AgentPoolInner> response) {
1000+
return response.body();
1001+
}
1002+
});
1003+
}
1004+
1005+
/**
1006+
* Upgrade node image version of an agent pool to the latest.
1007+
* Upgrade node image version of an agent pool to the latest.
1008+
*
1009+
* @param resourceGroupName The name of the resource group.
1010+
* @param resourceName The name of the managed cluster resource.
1011+
* @param agentPoolName The name of the agent pool.
1012+
* @throws IllegalArgumentException thrown if parameters fail the validation
1013+
* @return the observable to the AgentPoolInner object
1014+
*/
1015+
public Observable<ServiceResponse<AgentPoolInner>> beginUpgradeNodeImageVersionWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName) {
1016+
if (this.client.subscriptionId() == null) {
1017+
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
1018+
}
1019+
if (resourceGroupName == null) {
1020+
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
1021+
}
1022+
if (resourceName == null) {
1023+
throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
1024+
}
1025+
if (agentPoolName == null) {
1026+
throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.");
1027+
}
1028+
final String apiVersion = "2020-07-01";
1029+
return service.beginUpgradeNodeImageVersion(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
1030+
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<AgentPoolInner>>>() {
1031+
@Override
1032+
public Observable<ServiceResponse<AgentPoolInner>> call(Response<ResponseBody> response) {
1033+
try {
1034+
ServiceResponse<AgentPoolInner> clientResponse = beginUpgradeNodeImageVersionDelegate(response);
1035+
return Observable.just(clientResponse);
1036+
} catch (Throwable t) {
1037+
return Observable.error(t);
1038+
}
1039+
}
1040+
});
1041+
}
1042+
1043+
private ServiceResponse<AgentPoolInner> beginUpgradeNodeImageVersionDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
1044+
return this.client.restClient().responseBuilderFactory().<AgentPoolInner, CloudException>newInstance(this.client.serializerAdapter())
1045+
.register(200, new TypeToken<Void>() { }.getType())
1046+
.register(202, new TypeToken<AgentPoolInner>() { }.getType())
1047+
.registerError(CloudException.class)
1048+
.build(response);
1049+
}
1050+
8681051
/**
8691052
* Gets a list of agent pools in the specified managed cluster.
8701053
* Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool.

sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/implementation/ManagedClustersImpl.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.microsoft.azure.management.containerservice.v2020_07_01.ManagedClusterAADProfile;
2828
import com.microsoft.azure.management.containerservice.v2020_07_01.ManagedClusterUpgradeProfile;
2929
import com.microsoft.azure.management.containerservice.v2020_07_01.ManagedClusterAccessProfile;
30-
import com.microsoft.azure.management.containerservice.v2020_07_01.AgentPool;
3130

3231
class ManagedClustersImpl extends GroupableResourcesCoreImpl<ManagedCluster, ManagedClusterImpl, ManagedClusterInner, ManagedClustersInner, ContainerServiceManager> implements ManagedClusters {
3332
protected ManagedClustersImpl(ContainerServiceManager manager) {
@@ -219,16 +218,4 @@ public ManagedClusterAccessProfile call(ManagedClusterAccessProfileInner inner)
219218
});
220219
}
221220

222-
@Override
223-
public Observable<AgentPool> upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) {
224-
ManagedClustersInner client = this.inner();
225-
return client.upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName)
226-
.map(new Func1<AgentPoolInner, AgentPool>() {
227-
@Override
228-
public AgentPool call(AgentPoolInner inner) {
229-
return new AgentPoolImpl(inner, manager());
230-
}
231-
});
232-
}
233-
234221
}

0 commit comments

Comments
 (0)