/** * Gets all resource providers for a subscription. * ServiceResponse<PageImpl<ProviderInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ProviderInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<ProviderInner>>> 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<ProviderInner>>>>() { @Override public Observable<ServiceResponse<Page<ProviderInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ProviderInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<ProviderInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Gets all the resource groups for a subscription. * ServiceResponse<PageImpl<ResourceGroupInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ResourceGroupInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<ResourceGroupInner>>> 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<ResourceGroupInner>>>>() { @Override public Observable<ServiceResponse<Page<ResourceGroupInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ResourceGroupInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<ResourceGroupInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Get all the resources in a subscription. * ServiceResponse<PageImpl<GenericResourceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<GenericResourceInner>>> 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<GenericResourceInner>>>>() { @Override public Observable<ServiceResponse<Page<GenericResourceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<GenericResourceInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<GenericResourceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Gets the names and values of all resource tags that are defined in a subscription. * ServiceResponse<PageImpl<TagDetailsInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<TagDetailsInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<TagDetailsInner>>> 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<TagDetailsInner>>>>() { @Override public Observable<ServiceResponse<Page<TagDetailsInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<TagDetailsInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<TagDetailsInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Get all the deployments for a resource group. * ServiceResponse<PageImpl<DeploymentExtendedInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<DeploymentExtendedInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<DeploymentExtendedInner>>> 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<DeploymentExtendedInner>>>>() { @Override public Observable<ServiceResponse<Page<DeploymentExtendedInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<DeploymentExtendedInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<DeploymentExtendedInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Get all the resources for a resource group. * ServiceResponse<PageImpl<GenericResourceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<GenericResourceInner>>> 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<GenericResourceInner>>>>() { @Override public Observable<ServiceResponse<Page<GenericResourceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<GenericResourceInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<GenericResourceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Get all the deployments for a resource group. * ServiceResponse<PageImpl<DeploymentExtendedInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<DeploymentExtendedInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<DeploymentExtendedInner>>> 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<DeploymentExtendedInner>>>>() { @Override public Observable<ServiceResponse<Page<DeploymentExtendedInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<DeploymentExtendedInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<DeploymentExtendedInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Get all the resources in a subscription. * ServiceResponse<PageImpl<GenericResourceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<GenericResourceInner>>> 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<GenericResourceInner>>>>() { @Override public Observable<ServiceResponse<Page<GenericResourceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<GenericResourceInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<GenericResourceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Gets a resource by ID. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} * @param apiVersion The API version to use for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GenericResourceInner object */ public Observable<ServiceResponse<GenericResourceInner>> getByIdWithServiceResponseAsync(String resourceId, String apiVersion) { if (resourceId == null) { throw new IllegalArgumentException("Parameter resourceId is required and cannot be null."); } if (apiVersion == null) { throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null."); } return service.getById(resourceId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<GenericResourceInner>>>() { @Override public Observable<ServiceResponse<GenericResourceInner>> call(Response<ResponseBody> response) { try { ServiceResponse<GenericResourceInner> clientResponse = getByIdDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Gets all deployments operations for a deployment. * ServiceResponse<PageImpl<DeploymentOperationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<DeploymentOperationInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable<ServiceResponse<Page<DeploymentOperationInner>>> 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<DeploymentOperationInner>>>>() { @Override public Observable<ServiceResponse<Page<DeploymentOperationInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<DeploymentOperationInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<DeploymentOperationInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
/** * Deletes a resource by ID. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} * @param apiVersion The API version to use for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<Void>> deleteByIdWithServiceResponseAsync(String resourceId, String apiVersion) { if (resourceId == null) { throw new IllegalArgumentException("Parameter resourceId is required and cannot be null."); } if (apiVersion == null) { throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null."); } Observable<Response<ResponseBody>> observable = service.deleteById(resourceId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
/** * Deletes a resource by ID. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} * @param apiVersion The API version to use for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<Void>> deleteByIdWithServiceResponseAsync(String resourceId, String apiVersion) { if (resourceId == null) { throw new IllegalArgumentException("Parameter resourceId is required and cannot be null."); } if (apiVersion == null) { throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null."); } Observable<Response<ResponseBody>> observable = service.deleteById(resourceId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
/** * Create a resource by ID. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} * @param apiVersion The API version to use for the operation. * @param parameters Create or update resource parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<GenericResourceInner>> createOrUpdateByIdWithServiceResponseAsync(String resourceId, String apiVersion, GenericResourceInner parameters) { if (resourceId == null) { throw new IllegalArgumentException("Parameter resourceId is required and cannot be null."); } if (apiVersion == null) { throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); Observable<Response<ResponseBody>> observable = service.createOrUpdateById(resourceId, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<GenericResourceInner>() { }.getType()); }
/** * Updates a resource by ID. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} * @param apiVersion The API version to use for the operation. * @param parameters Update resource parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<GenericResourceInner>> updateByIdWithServiceResponseAsync(String resourceId, String apiVersion, GenericResourceInner parameters) { if (resourceId == null) { throw new IllegalArgumentException("Parameter resourceId is required and cannot be null."); } if (apiVersion == null) { throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); Observable<Response<ResponseBody>> observable = service.updateById(resourceId, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<GenericResourceInner>() { }.getType()); }
/** * Create a resource by ID. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} * @param apiVersion The API version to use for the operation. * @param parameters Create or update resource parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<GenericResourceInner>> createOrUpdateByIdWithServiceResponseAsync(String resourceId, String apiVersion, GenericResourceInner parameters) { if (resourceId == null) { throw new IllegalArgumentException("Parameter resourceId is required and cannot be null."); } if (apiVersion == null) { throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); Observable<Response<ResponseBody>> observable = service.createOrUpdateById(resourceId, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<GenericResourceInner>() { }.getType()); }
/** * Updates a resource by ID. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} * @param apiVersion The API version to use for the operation. * @param parameters Update resource parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<GenericResourceInner>> updateByIdWithServiceResponseAsync(String resourceId, String apiVersion, GenericResourceInner parameters) { if (resourceId == null) { throw new IllegalArgumentException("Parameter resourceId is required and cannot be null."); } if (apiVersion == null) { throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); Observable<Response<ResponseBody>> observable = service.updateById(resourceId, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<GenericResourceInner>() { }.getType()); }
/** * Deletes a resource group. * When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations. * * @param resourceGroupName The name of the resource group to delete. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(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."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
/** * Deletes a resource group. * When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations. * * @param resourceGroupName The name of the resource group to delete. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(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."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
/** * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<Void>> moveResourcesWithServiceResponseAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { if (sourceResourceGroupName == null) { throw new IllegalArgumentException("Parameter sourceResourceGroupName 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."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); Observable<Response<ResponseBody>> observable = service.moveResources(sourceResourceGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
/** * Validates whether resources can be moved from one resource group to another resource group. * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. * * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ public Observable<ServiceResponse<Void>> validateMoveResourcesWithServiceResponseAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { if (sourceResourceGroupName == null) { throw new IllegalArgumentException("Parameter sourceResourceGroupName 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."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); Observable<Response<ResponseBody>> observable = service.validateMoveResources(sourceResourceGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }