Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information. Code generated by Microsoft (R) AutoRest Code Generator.
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */
package com.microsoft.azure.management.containerservice.implementation; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable;
An instance of this class provides access to all the operations defined in ContainerServices.
/** * An instance of this class provides access to all the operations defined * in ContainerServices. */
public class ContainerServicesInner implements InnerSupportsGet<ContainerServiceInner>, InnerSupportsDelete<Void>, InnerSupportsListing<ContainerServiceInner> {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private ContainerServicesService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private ContainerServiceManagementClientImpl client;
Initializes an instance of ContainerServicesInner.
Params:
  • retrofit – the Retrofit instance built from a Retrofit Builder.
  • client – the instance of the service client containing this operation class.
/** * Initializes an instance of ContainerServicesInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public ContainerServicesInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { this.service = retrofit.create(ContainerServicesService.class); this.client = client; }
The interface defining all the services for ContainerServices to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for ContainerServices to be * used by Retrofit to perform actually REST calls. */
interface ContainerServicesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices") Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Body ContainerServiceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices beginCreateOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Body ContainerServiceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices beginDelete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices") Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices listOrchestrators" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators") Observable<Response<ResponseBody>> listOrchestrators(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Query("resource-type") String resourceType, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices listNext" }) @GET Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ContainerServices listByResourceGroupNext" }) @GET Observable<Response<ResponseBody>> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
  • CloudException – thrown if the request is rejected by server
  • RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns:the PagedList<ContainerServiceInner> object if successful.
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;ContainerServiceInner&gt; object if successful. */
public PagedList<ContainerServiceInner> list() { ServiceResponse<Page<ContainerServiceInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<ContainerServiceInner>(response.body()) { @Override public Page<ContainerServiceInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<ContainerServiceInner>> listAsync(final ListOperationCallback<ContainerServiceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(), new Func1<String, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<ContainerServiceInner> object
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ContainerServiceInner&gt; object */
public Observable<Page<ContainerServiceInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<ContainerServiceInner>>, Page<ContainerServiceInner>>() { @Override public Page<ContainerServiceInner> call(ServiceResponse<Page<ContainerServiceInner>> response) { return response.body(); } }); }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<ContainerServiceInner> object
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ContainerServiceInner&gt; object */
public Observable<ServiceResponse<Page<ContainerServiceInner>>> listWithServiceResponseAsync() { return listSinglePageAsync() .concatMap(new Func1<ServiceResponse<Page<ContainerServiceInner>>, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(ServiceResponse<Page<ContainerServiceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the PagedList<ContainerServiceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ContainerServiceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ContainerServiceInner>>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2017-07-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ContainerServiceInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<ContainerServiceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ContainerServiceInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ContainerServiceInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ContainerServiceInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Creates or updates a container service. Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • parameters – Parameters supplied to the Create or Update a Container Service operation.
Throws:
Returns:the ContainerServiceInner object if successful.
/** * Creates or updates a container service. * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param parameters Parameters supplied to the Create or Update a Container Service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ContainerServiceInner object if successful. */
public ContainerServiceInner createOrUpdate(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).toBlocking().last().body(); }
Creates or updates a container service. Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • parameters – Parameters supplied to the Create or Update a Container Service operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates or updates a container service. * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param parameters Parameters supplied to the Create or Update a Container Service operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<ContainerServiceInner> createOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, final ServiceCallback<ContainerServiceInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters), serviceCallback); }
Creates or updates a container service. Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • parameters – Parameters supplied to the Create or Update a Container Service operation.
Throws:
Returns:the observable for the request
/** * Creates or updates a container service. * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param parameters Parameters supplied to the Create or Update a Container Service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ContainerServiceInner> createOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).map(new Func1<ServiceResponse<ContainerServiceInner>, ContainerServiceInner>() { @Override public ContainerServiceInner call(ServiceResponse<ContainerServiceInner> response) { return response.body(); } }); }
Creates or updates a container service. Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • parameters – Parameters supplied to the Create or Update a Container Service operation.
Throws:
Returns:the observable for the request
/** * Creates or updates a container service. * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param parameters Parameters supplied to the Create or Update a Container Service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<ContainerServiceInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (containerServiceName == null) { throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); final String apiVersion = "2017-07-01"; Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, containerServiceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ContainerServiceInner>() { }.getType()); }
Creates or updates a container service. Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • parameters – Parameters supplied to the Create or Update a Container Service operation.
Throws:
Returns:the ContainerServiceInner object if successful.
/** * Creates or updates a container service. * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param parameters Parameters supplied to the Create or Update a Container Service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ContainerServiceInner object if successful. */
public ContainerServiceInner beginCreateOrUpdate(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).toBlocking().single().body(); }
Creates or updates a container service. Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • parameters – Parameters supplied to the Create or Update a Container Service operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates or updates a container service. * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param parameters Parameters supplied to the Create or Update a Container Service operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<ContainerServiceInner> beginCreateOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, final ServiceCallback<ContainerServiceInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters), serviceCallback); }
Creates or updates a container service. Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • parameters – Parameters supplied to the Create or Update a Container Service operation.
Throws:
Returns:the observable to the ContainerServiceInner object
/** * Creates or updates a container service. * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param parameters Parameters supplied to the Create or Update a Container Service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ContainerServiceInner object */
public Observable<ContainerServiceInner> beginCreateOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).map(new Func1<ServiceResponse<ContainerServiceInner>, ContainerServiceInner>() { @Override public ContainerServiceInner call(ServiceResponse<ContainerServiceInner> response) { return response.body(); } }); }
Creates or updates a container service. Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • parameters – Parameters supplied to the Create or Update a Container Service operation.
Throws:
Returns:the observable to the ContainerServiceInner object
/** * Creates or updates a container service. * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param parameters Parameters supplied to the Create or Update a Container Service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ContainerServiceInner object */
public Observable<ServiceResponse<ContainerServiceInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (containerServiceName == null) { throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); final String apiVersion = "2017-07-01"; return service.beginCreateOrUpdate(resourceGroupName, containerServiceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ContainerServiceInner>>>() { @Override public Observable<ServiceResponse<ContainerServiceInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ContainerServiceInner> clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ContainerServiceInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ContainerServiceInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ContainerServiceInner>() { }.getType()) .register(201, new TypeToken<ContainerServiceInner>() { }.getType()) .register(202, new TypeToken<ContainerServiceInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets the properties of the specified container service. Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
Returns:the ContainerServiceInner object if successful.
/** * Gets the properties of the specified container service. * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ContainerServiceInner object if successful. */
public ContainerServiceInner getByResourceGroup(String resourceGroupName, String containerServiceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().single().body(); }
Gets the properties of the specified container service. Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets the properties of the specified container service. * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<ContainerServiceInner> getByResourceGroupAsync(String resourceGroupName, String containerServiceName, final ServiceCallback<ContainerServiceInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); }
Gets the properties of the specified container service. Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
Returns:the observable to the ContainerServiceInner object
/** * Gets the properties of the specified container service. * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ContainerServiceInner object */
public Observable<ContainerServiceInner> getByResourceGroupAsync(String resourceGroupName, String containerServiceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1<ServiceResponse<ContainerServiceInner>, ContainerServiceInner>() { @Override public ContainerServiceInner call(ServiceResponse<ContainerServiceInner> response) { return response.body(); } }); }
Gets the properties of the specified container service. Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
Returns:the observable to the ContainerServiceInner object
/** * Gets the properties of the specified container service. * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ContainerServiceInner object */
public Observable<ServiceResponse<ContainerServiceInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (containerServiceName == null) { throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2017-07-01"; return service.getByResourceGroup(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ContainerServiceInner>>>() { @Override public Observable<ServiceResponse<ContainerServiceInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ContainerServiceInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ContainerServiceInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ContainerServiceInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ContainerServiceInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Deletes the specified container service. Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
/** * Deletes the specified container service. * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void delete(String resourceGroupName, String containerServiceName) { deleteWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().last().body(); }
Deletes the specified container service. Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes the specified container service. * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String containerServiceName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); }
Deletes the specified container service. Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
Returns:the observable for the request
/** * Deletes the specified container service. * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String containerServiceName) { return deleteWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes the specified container service. Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
Returns:the observable for the request
/** * Deletes the specified container service. * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (containerServiceName == null) { throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2017-07-01"; Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Deletes the specified container service. Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
/** * Deletes the specified container service. * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDelete(String resourceGroupName, String containerServiceName) { beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().single().body(); }
Deletes the specified container service. Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes the specified container service. * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String containerServiceName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); }
Deletes the specified container service. Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes the specified container service. * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String containerServiceName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes the specified container service. Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually.
Params:
  • resourceGroupName – The name of the resource group.
  • containerServiceName – The name of the container service in the specified subscription and resource group.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes the specified container service. * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. * * @param resourceGroupName The name of the resource group. * @param containerServiceName The name of the container service in the specified subscription and resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (containerServiceName == null) { throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2017-07-01"; return service.beginDelete(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginDeleteDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(202, new TypeToken<Void>() { }.getType()) .register(204, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the PagedList<ContainerServiceInner> object if successful.
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;ContainerServiceInner&gt; object if successful. */
public PagedList<ContainerServiceInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<ContainerServiceInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<ContainerServiceInner>(response.body()) { @Override public Page<ContainerServiceInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • resourceGroupName – The name of the resource group.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param resourceGroupName The name of the resource group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<ContainerServiceInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<ContainerServiceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), new Func1<String, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the observable to the PagedList<ContainerServiceInner> object
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ContainerServiceInner&gt; object */
public Observable<Page<ContainerServiceInner>> listByResourceGroupAsync(final String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1<ServiceResponse<Page<ContainerServiceInner>>, Page<ContainerServiceInner>>() { @Override public Page<ContainerServiceInner> call(ServiceResponse<Page<ContainerServiceInner>> response) { return response.body(); } }); }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the observable to the PagedList<ContainerServiceInner> object
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ContainerServiceInner&gt; object */
public Observable<ServiceResponse<Page<ContainerServiceInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1<ServiceResponse<Page<ContainerServiceInner>>, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(ServiceResponse<Page<ContainerServiceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. ServiceResponse> * @param resourceGroupName The name of the resource group.
Throws:
Returns:the PagedList<ContainerServiceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * ServiceResponse<PageImpl<ContainerServiceInner>> * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ContainerServiceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ContainerServiceInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2017-07-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ContainerServiceInner>> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse<Page<ContainerServiceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ContainerServiceInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ContainerServiceInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ContainerServiceInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
Params:
  • location – The name of a supported Azure region.
Throws:
Returns:the OrchestratorVersionProfileListResultInner object if successful.
/** * Gets a list of supported orchestrators in the specified subscription. * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. * * @param location The name of a supported Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OrchestratorVersionProfileListResultInner object if successful. */
public OrchestratorVersionProfileListResultInner listOrchestrators(String location) { return listOrchestratorsWithServiceResponseAsync(location).toBlocking().single().body(); }
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
Params:
  • location – The name of a supported Azure region.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of supported orchestrators in the specified subscription. * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. * * @param location The name of a supported Azure region. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<OrchestratorVersionProfileListResultInner> listOrchestratorsAsync(String location, final ServiceCallback<OrchestratorVersionProfileListResultInner> serviceCallback) { return ServiceFuture.fromResponse(listOrchestratorsWithServiceResponseAsync(location), serviceCallback); }
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
Params:
  • location – The name of a supported Azure region.
Throws:
Returns:the observable to the OrchestratorVersionProfileListResultInner object
/** * Gets a list of supported orchestrators in the specified subscription. * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. * * @param location The name of a supported Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OrchestratorVersionProfileListResultInner object */
public Observable<OrchestratorVersionProfileListResultInner> listOrchestratorsAsync(String location) { return listOrchestratorsWithServiceResponseAsync(location).map(new Func1<ServiceResponse<OrchestratorVersionProfileListResultInner>, OrchestratorVersionProfileListResultInner>() { @Override public OrchestratorVersionProfileListResultInner call(ServiceResponse<OrchestratorVersionProfileListResultInner> response) { return response.body(); } }); }
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
Params:
  • location – The name of a supported Azure region.
Throws:
Returns:the observable to the OrchestratorVersionProfileListResultInner object
/** * Gets a list of supported orchestrators in the specified subscription. * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. * * @param location The name of a supported Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OrchestratorVersionProfileListResultInner object */
public Observable<ServiceResponse<OrchestratorVersionProfileListResultInner>> listOrchestratorsWithServiceResponseAsync(String location) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } final String apiVersion = "2019-08-01"; final String resourceType = null; return service.listOrchestrators(this.client.subscriptionId(), location, apiVersion, resourceType, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OrchestratorVersionProfileListResultInner>>>() { @Override public Observable<ServiceResponse<OrchestratorVersionProfileListResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<OrchestratorVersionProfileListResultInner> clientResponse = listOrchestratorsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
Params:
  • location – The name of a supported Azure region.
  • resourceType – resource type for which the list of orchestrators needs to be returned
Throws:
Returns:the OrchestratorVersionProfileListResultInner object if successful.
/** * Gets a list of supported orchestrators in the specified subscription. * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. * * @param location The name of a supported Azure region. * @param resourceType resource type for which the list of orchestrators needs to be returned * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OrchestratorVersionProfileListResultInner object if successful. */
public OrchestratorVersionProfileListResultInner listOrchestrators(String location, String resourceType) { return listOrchestratorsWithServiceResponseAsync(location, resourceType).toBlocking().single().body(); }
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
Params:
  • location – The name of a supported Azure region.
  • resourceType – resource type for which the list of orchestrators needs to be returned
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of supported orchestrators in the specified subscription. * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. * * @param location The name of a supported Azure region. * @param resourceType resource type for which the list of orchestrators needs to be returned * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<OrchestratorVersionProfileListResultInner> listOrchestratorsAsync(String location, String resourceType, final ServiceCallback<OrchestratorVersionProfileListResultInner> serviceCallback) { return ServiceFuture.fromResponse(listOrchestratorsWithServiceResponseAsync(location, resourceType), serviceCallback); }
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
Params:
  • location – The name of a supported Azure region.
  • resourceType – resource type for which the list of orchestrators needs to be returned
Throws:
Returns:the observable to the OrchestratorVersionProfileListResultInner object
/** * Gets a list of supported orchestrators in the specified subscription. * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. * * @param location The name of a supported Azure region. * @param resourceType resource type for which the list of orchestrators needs to be returned * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OrchestratorVersionProfileListResultInner object */
public Observable<OrchestratorVersionProfileListResultInner> listOrchestratorsAsync(String location, String resourceType) { return listOrchestratorsWithServiceResponseAsync(location, resourceType).map(new Func1<ServiceResponse<OrchestratorVersionProfileListResultInner>, OrchestratorVersionProfileListResultInner>() { @Override public OrchestratorVersionProfileListResultInner call(ServiceResponse<OrchestratorVersionProfileListResultInner> response) { return response.body(); } }); }
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
Params:
  • location – The name of a supported Azure region.
  • resourceType – resource type for which the list of orchestrators needs to be returned
Throws:
Returns:the observable to the OrchestratorVersionProfileListResultInner object
/** * Gets a list of supported orchestrators in the specified subscription. * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. * * @param location The name of a supported Azure region. * @param resourceType resource type for which the list of orchestrators needs to be returned * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OrchestratorVersionProfileListResultInner object */
public Observable<ServiceResponse<OrchestratorVersionProfileListResultInner>> listOrchestratorsWithServiceResponseAsync(String location, String resourceType) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } final String apiVersion = "2019-08-01"; return service.listOrchestrators(this.client.subscriptionId(), location, apiVersion, resourceType, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OrchestratorVersionProfileListResultInner>>>() { @Override public Observable<ServiceResponse<OrchestratorVersionProfileListResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<OrchestratorVersionProfileListResultInner> clientResponse = listOrchestratorsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<OrchestratorVersionProfileListResultInner> listOrchestratorsDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<OrchestratorVersionProfileListResultInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<OrchestratorVersionProfileListResultInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ContainerServiceInner> object if successful.
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;ContainerServiceInner&gt; object if successful. */
public PagedList<ContainerServiceInner> listNext(final String nextPageLink) { ServiceResponse<Page<ContainerServiceInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<ContainerServiceInner>(response.body()) { @Override public Page<ContainerServiceInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<ContainerServiceInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<ContainerServiceInner>> serviceFuture, final ListOperationCallback<ContainerServiceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ContainerServiceInner> object
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ContainerServiceInner&gt; object */
public Observable<Page<ContainerServiceInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<ContainerServiceInner>>, Page<ContainerServiceInner>>() { @Override public Page<ContainerServiceInner> call(ServiceResponse<Page<ContainerServiceInner>> response) { return response.body(); } }); }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ContainerServiceInner> object
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ContainerServiceInner&gt; object */
public Observable<ServiceResponse<Page<ContainerServiceInner>>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<ContainerServiceInner>>, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(ServiceResponse<Page<ContainerServiceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of container services in the specified subscription. Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ContainerServiceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of container services in the specified subscription. * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * ServiceResponse<PageImpl<ContainerServiceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ContainerServiceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ContainerServiceInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ContainerServiceInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<ContainerServiceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ContainerServiceInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ContainerServiceInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ContainerServiceInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ContainerServiceInner> object if successful.
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;ContainerServiceInner&gt; object if successful. */
public PagedList<ContainerServiceInner> listByResourceGroupNext(final String nextPageLink) { ServiceResponse<Page<ContainerServiceInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<ContainerServiceInner>(response.body()) { @Override public Page<ContainerServiceInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<ContainerServiceInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<ContainerServiceInner>> serviceFuture, final ListOperationCallback<ContainerServiceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ContainerServiceInner> object
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ContainerServiceInner&gt; object */
public Observable<Page<ContainerServiceInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<ContainerServiceInner>>, Page<ContainerServiceInner>>() { @Override public Page<ContainerServiceInner> call(ServiceResponse<Page<ContainerServiceInner>> response) { return response.body(); } }); }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ContainerServiceInner> object
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ContainerServiceInner&gt; object */
public Observable<ServiceResponse<Page<ContainerServiceInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<ContainerServiceInner>>, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(ServiceResponse<Page<ContainerServiceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of container services in the specified resource group. Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ContainerServiceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of container services in the specified resource group. * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. * ServiceResponse<PageImpl<ContainerServiceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ContainerServiceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ContainerServiceInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ContainerServiceInner>>>>() { @Override public Observable<ServiceResponse<Page<ContainerServiceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ContainerServiceInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<ContainerServiceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ContainerServiceInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ContainerServiceInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ContainerServiceInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }