/** * Creates a resource. * * @param resourceGroupName The name of the resource group for the resource. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource to create. * @param resourceName The name of the resource to create. * @param apiVersion The API version to use for the operation. * @param parameters Parameters for creating or updating the resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GenericResourceInner object */ public Observable<GenericResourceInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).map(new Func1<ServiceResponse<GenericResourceInner>, GenericResourceInner>() { @Override public GenericResourceInner call(ServiceResponse<GenericResourceInner> response) { return response.body(); } }); }
/** * Creates a resource. * * @param resourceGroupName The name of the resource group for the resource. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource to create. * @param resourceName The name of the resource to create. * @param apiVersion The API version to use for the operation. * @param parameters Parameters for creating or updating the resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GenericResourceInner object */ public Observable<GenericResourceInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).map(new Func1<ServiceResponse<GenericResourceInner>, GenericResourceInner>() { @Override public GenericResourceInner call(ServiceResponse<GenericResourceInner> response) { return response.body(); } }); }
/** * Creates a resource. * * @param resourceGroupName The name of the resource group for the resource. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource to create. * @param resourceName The name of the resource to create. * @param apiVersion The API version to use for the operation. * @param parameters Parameters for creating or updating the resource. * @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<GenericResourceInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters, final ServiceCallback<GenericResourceInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters), serviceCallback); }
/** * Creates a resource. * * @param resourceGroupName The name of the resource group for the resource. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource to create. * @param resourceName The name of the resource to create. * @param apiVersion The API version to use for the operation. * @param parameters Parameters for creating or updating the resource. * @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<GenericResourceInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters, final ServiceCallback<GenericResourceInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters), serviceCallback); }
/** * Creates a resource. * * @param resourceGroupName The name of the resource group for the resource. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource to create. * @param resourceName The name of the resource to create. * @param apiVersion The API version to use for the operation. * @param parameters Parameters for creating or updating the resource. * @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 GenericResourceInner object if successful. */ public GenericResourceInner beginCreateOrUpdate(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).toBlocking().single().body(); }
/** * Creates a resource. * * @param resourceGroupName The name of the resource group for the resource. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource to create. * @param resourceName The name of the resource to create. * @param apiVersion The API version to use for the operation. * @param parameters Parameters for creating or updating the resource. * @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 GenericResourceInner object if successful. */ public GenericResourceInner beginCreateOrUpdate(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).toBlocking().single().body(); }