Java Code Examples for com.microsoft.rest.ServiceFuture#fromResponse()

The following examples show how to use com.microsoft.rest.ServiceFuture#fromResponse() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CertificatesInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Create or update a certificate.
 * Description for Create or update a certificate.
 *
 * @param resourceGroupName Name of the resource group to which the resource belongs.
 * @param name Name of the certificate.
 * @param certificateEnvelope Details of certificate, if it exists already.
 * @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<CertificateInner> updateAsync(String resourceGroupName, String name, CertificatePatchResource certificateEnvelope, final ServiceCallback<CertificateInner> serviceCallback) {
    return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope), serviceCallback);
}
 
Example 2
Source File: ProximityPlacementGroupsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Create or update a proximity placement group.
 *
 * @param resourceGroupName The name of the resource group.
 * @param proximityPlacementGroupName The name of the proximity placement group.
 * @param parameters Parameters supplied to the Create Proximity Placement Group 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<ProximityPlacementGroupInner> createOrUpdateAsync(String resourceGroupName, String proximityPlacementGroupName, ProximityPlacementGroupInner parameters, final ServiceCallback<ProximityPlacementGroupInner> serviceCallback) {
    return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, proximityPlacementGroupName, parameters), serviceCallback);
}
 
Example 3
Source File: VirtualNetworkRulesInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Deletes the virtual network rule with the given name.
 *
 * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @param serverName The name of the server.
 * @param virtualNetworkRuleName The name of the virtual network rule.
 * @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 serverName, String virtualNetworkRuleName, final ServiceCallback<Void> serviceCallback) {
    return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName), serviceCallback);
}
 
Example 4
Source File: ManagedDatabasesInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Completes the restore operation on a managed database.
 *
 * @param locationName The name of the region where the resource is located.
 * @param operationId Management operation id that this request tries to complete.
 * @param lastBackupName The last backup name to apply
 * @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> beginCompleteRestoreAsync(String locationName, UUID operationId, String lastBackupName, final ServiceCallback<Void> serviceCallback) {
    return ServiceFuture.fromResponse(beginCompleteRestoreWithServiceResponseAsync(locationName, operationId, lastBackupName), serviceCallback);
}
 
Example 5
Source File: ElasticPoolsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Creates a new elastic pool or updates an existing elastic pool.
 *
 * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @param serverName The name of the server.
 * @param elasticPoolName The name of the elastic pool to be operated on (updated or created).
 * @param parameters The required parameters for creating or updating an elastic pool.
 * @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<ElasticPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters, final ServiceCallback<ElasticPoolInner> serviceCallback) {
    return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters), serviceCallback);
}
 
Example 6
Source File: NetworkInterfacesInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Gets information about the specified network interface.
 *
 * @param resourceGroupName The name of the resource group.
 * @param networkInterfaceName The name of the network interface.
 * @param expand Expands referenced resources.
 * @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<NetworkInterfaceInner> getByResourceGroupAsync(String resourceGroupName, String networkInterfaceName, String expand, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
    return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName, expand), serviceCallback);
}
 
Example 7
Source File: BastionHostsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Gets the specified Bastion Host.
 *
 * @param resourceGroupName The name of the resource group.
 * @param bastionHostName The name of the Bastion Host.
 * @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<BastionHostInner> getByResourceGroupAsync(String resourceGroupName, String bastionHostName, final ServiceCallback<BastionHostInner> serviceCallback) {
    return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, bastionHostName), serviceCallback);
}
 
Example 8
Source File: ResourcesInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * 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.
 * @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> moveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfo parameters, final ServiceCallback<Void> serviceCallback) {
    return ServiceFuture.fromResponse(moveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters), serviceCallback);
}
 
Example 9
Source File: MetricsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * **Lists the metric values for a resource**.
 *
 * @param resourceUri The identifier of 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<ResponseInner> listAsync(String resourceUri, final ServiceCallback<ResponseInner> serviceCallback) {
    return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceUri), serviceCallback);
}
 
Example 10
Source File: OperationsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Gets a list of compute operations.
 *
 * @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<ComputeOperationValueInner>> listAsync(final ServiceCallback<List<ComputeOperationValueInner>> serviceCallback) {
    return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
}
 
Example 11
Source File: VirtualMachineScaleSetRollingUpgradesInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.
 *
 * @param resourceGroupName The name of the resource group.
 * @param vmScaleSetName The name of the VM scale set.
 * @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> beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) {
    return ServiceFuture.fromResponse(beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback);
}
 
Example 12
Source File: ActionGroupsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
 *
 * @param resourceGroupName The name of the resource group.
 * @param actionGroupName The name of the action group.
 * @param actionGroupPatch Parameters supplied to the 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<ActionGroupResourceInner> updateAsync(String resourceGroupName, String actionGroupName, ActionGroupPatchBody actionGroupPatch, final ServiceCallback<ActionGroupResourceInner> serviceCallback) {
    return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, actionGroupName, actionGroupPatch), serviceCallback);
}
 
Example 13
Source File: ExpressRoutePortsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Creates or updates the specified ExpressRoutePort resource.
 *
 * @param resourceGroupName The name of the resource group.
 * @param expressRoutePortName The name of the ExpressRoutePort resource.
 * @param parameters Parameters supplied to the create ExpressRoutePort 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<ExpressRoutePortInner> beginCreateOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, final ServiceCallback<ExpressRoutePortInner> serviceCallback) {
    return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters), serviceCallback);
}
 
Example 14
Source File: PolicyAssignmentsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Gets a policy assignment by ID.
 * When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
 *
 * @param policyAssignmentId The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
 * @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<PolicyAssignmentInner> getByIdAsync(String policyAssignmentId, final ServiceCallback<PolicyAssignmentInner> serviceCallback) {
    return ServiceFuture.fromResponse(getByIdWithServiceResponseAsync(policyAssignmentId), serviceCallback);
}
 
Example 15
Source File: ElasticPoolActivitiesInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Returns elastic pool activities.
 *
 * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @param serverName The name of the server.
 * @param elasticPoolName The name of the elastic pool for which to get the current activity.
 * @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<ElasticPoolActivityInner>> listByElasticPoolAsync(String resourceGroupName, String serverName, String elasticPoolName, final ServiceCallback<List<ElasticPoolActivityInner>> serviceCallback) {
    return ServiceFuture.fromResponse(listByElasticPoolWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName), serviceCallback);
}
 
Example 16
Source File: AccountsImpl.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object.
 *
 * @param resourceGroupName The name of the Azure resource group.
 * @param accountName The name of the Data Lake Analytics account.
 * @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<DataLakeAnalyticsAccount> beginUpdateAsync(String resourceGroupName, String accountName, final ServiceCallback<DataLakeAnalyticsAccount> serviceCallback) {
    return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback);
}
 
Example 17
Source File: StorageAccountsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
 *
 * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<StorageAccountInner>> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback<List<StorageAccountInner>> serviceCallback) {
    return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback);
}
 
Example 18
Source File: IpGroupsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Gets the specified ipGroups.
 *
 * @param resourceGroupName The name of the resource group.
 * @param ipGroupsName The name of the ipGroups.
 * @param expand Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups 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<IpGroupInner> getByResourceGroupAsync(String resourceGroupName, String ipGroupsName, String expand, final ServiceCallback<IpGroupInner> serviceCallback) {
    return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ipGroupsName, expand), serviceCallback);
}
 
Example 19
Source File: NetworkSecurityGroupsInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Creates or updates a network security group in the specified resource group.
 *
 * @param resourceGroupName The name of the resource group.
 * @param networkSecurityGroupName The name of the network security group.
 * @param parameters Parameters supplied to the create or update network security group 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<NetworkSecurityGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters, final ServiceCallback<NetworkSecurityGroupInner> serviceCallback) {
    return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters), serviceCallback);
}
 
Example 20
Source File: JobsImpl.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Updates the job information for the specified job ID. (Only for use internally with Scope job type.).
 *
 * @param accountName The Azure Data Lake Analytics account to execute job operations on.
 * @param jobIdentity Job identifier. Uniquely identifies the job across all jobs submitted to the service.
 * @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<JobInformation> updateAsync(String accountName, UUID jobIdentity, final ServiceCallback<JobInformation> serviceCallback) {
    return ServiceFuture.fromResponse(updateWithServiceResponseAsync(accountName, jobIdentity), serviceCallback);
}