Java Code Examples for com.microsoft.rest.ServiceResponse#body()
The following examples show how to use
com.microsoft.rest.ServiceResponse#body() .
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: ProvidersInner.java From azure-libraries-for-java with MIT License | 5 votes |
/** * Get available application frameworks and their versions. * Description for Get available application frameworks and their versions. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws DefaultErrorResponseException 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<ApplicationStackResourceInner> object if successful. */ public PagedList<ApplicationStackResourceInner> list() { ServiceResponse<Page<ApplicationStackResourceInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<ApplicationStackResourceInner>(response.body()) { @Override public Page<ApplicationStackResourceInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 2
Source File: OperationsInner.java From azure-libraries-for-java with MIT License | 5 votes |
/** * Lists all of the available Key Vault Rest API operations. * * @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<OperationInner> object if successful. */ public PagedList<OperationInner> list() { ServiceResponse<Page<OperationInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<OperationInner>(response.body()) { @Override public Page<OperationInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 3
Source File: NatGatewaysInner.java From azure-libraries-for-java with MIT License | 5 votes |
/** * Gets all the Nat Gateways in a subscription. * * @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<NatGatewayInner> object if successful. */ public PagedList<NatGatewayInner> list() { ServiceResponse<Page<NatGatewayInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<NatGatewayInner>(response.body()) { @Override public Page<NatGatewayInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 4
Source File: ImagesInner.java From azure-libraries-for-java with MIT License | 5 votes |
/** * Gets the list of images under a resource group. * * @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<ImageInner> object if successful. */ public PagedList<ImageInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<ImageInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<ImageInner>(response.body()) { @Override public Page<ImageInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 5
Source File: SnapshotsInner.java From azure-libraries-for-java with MIT License | 5 votes |
/** * Lists snapshots under a subscription. * * @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<SnapshotInner> object if successful. */ public PagedList<SnapshotInner> list() { ServiceResponse<Page<SnapshotInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<SnapshotInner>(response.body()) { @Override public Page<SnapshotInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 6
Source File: UsersInner.java From azure-libraries-for-java with MIT License | 5 votes |
/** * Gets list of users for the current tenant. * * @param filter The filter to apply to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws GraphErrorException 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<UserInner> object if successful. */ public PagedList<UserInner> list(final String filter) { ServiceResponse<Page<UserInner>> response = listSinglePageAsync(filter).toBlocking().single(); return new PagedList<UserInner>(response.body()) { @Override public Page<UserInner> nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().body(); } }; }
Example 7
Source File: ComputePoliciesImpl.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. * * @param resourceGroupName The name of the Azure resource group. * @param accountName The name of the Data Lake Analytics account. * @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<ComputePolicy> object if successful. */ public PagedList<ComputePolicy> listByAccount(final String resourceGroupName, final String accountName) { ServiceResponse<Page<ComputePolicy>> response = listByAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); return new PagedList<ComputePolicy>(response.body()) { @Override public Page<ComputePolicy> nextPage(String nextPageLink) { return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 8
Source File: QueuesInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Gets the queues within a namespace. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param namespaceName The namespace name * @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<QueueInner> object if successful. */ public PagedList<QueueInner> listByNamespace(final String resourceGroupName, final String namespaceName) { ServiceResponse<Page<QueueInner>> response = listByNamespaceSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); return new PagedList<QueueInner>(response.body()) { @Override public Page<QueueInner> nextPage(String nextPageLink) { return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 9
Source File: SensitivityLabelsInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Gets the sensitivity labels of a given database. * * @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 databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. * @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<SensitivityLabelInner> object if successful. */ public PagedList<SensitivityLabelInner> listCurrentByDatabase(final String resourceGroupName, final String serverName, final String databaseName, final String filter) { ServiceResponse<Page<SensitivityLabelInner>> response = listCurrentByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter).toBlocking().single(); return new PagedList<SensitivityLabelInner>(response.body()) { @Override public Page<SensitivityLabelInner> nextPage(String nextPageLink) { return listCurrentByDatabaseNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 10
Source File: QueuesInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Gets all authorization rules for a queue. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param namespaceName The namespace name * @param queueName The queue name. * @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<SharedAccessAuthorizationRuleInner> object if successful. */ public PagedList<SharedAccessAuthorizationRuleInner> listAuthorizationRules(final String resourceGroupName, final String namespaceName, final String queueName) { ServiceResponse<Page<SharedAccessAuthorizationRuleInner>> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, queueName).toBlocking().single(); return new PagedList<SharedAccessAuthorizationRuleInner>(response.body()) { @Override public Page<SharedAccessAuthorizationRuleInner> nextPage(String nextPageLink) { return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 11
Source File: PoolsInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Lists all of the pools in the specified account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @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<PoolInner> object if successful. */ public PagedList<PoolInner> listByBatchAccount(final String resourceGroupName, final String accountName) { ServiceResponse<Page<PoolInner>> response = listByBatchAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); return new PagedList<PoolInner>(response.body()) { @Override public Page<PoolInner> nextPage(String nextPageLink) { return listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 12
Source File: VirtualNetworkPeeringsInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Gets all virtual network peerings in a virtual network. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @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<VirtualNetworkPeeringInner> object if successful. */ public PagedList<VirtualNetworkPeeringInner> list(final String resourceGroupName, final String virtualNetworkName) { ServiceResponse<Page<VirtualNetworkPeeringInner>> response = listSinglePageAsync(resourceGroupName, virtualNetworkName).toBlocking().single(); return new PagedList<VirtualNetworkPeeringInner>(response.body()) { @Override public Page<VirtualNetworkPeeringInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 13
Source File: WebSiteManagementClientImpl.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Gets a list of meters for a given location. * Description for Gets a list of meters for a given location. * * @param billingLocation Azure Location of billable resource * @param osType App Service OS type meters used for * @throws IllegalArgumentException thrown if parameters fail the validation * @throws DefaultErrorResponseException 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<BillingMeterInner> object if successful. */ public PagedList<BillingMeterInner> listBillingMeters(final String billingLocation, final String osType) { ServiceResponse<Page<BillingMeterInner>> response = listBillingMetersSinglePageAsync(billingLocation, osType).toBlocking().single(); return new PagedList<BillingMeterInner>(response.body()) { @Override public Page<BillingMeterInner> nextPage(String nextPageLink) { return listBillingMetersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 14
Source File: ServerKeysInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Gets a list of server keys. * * @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. * @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<ServerKeyInner> object if successful. */ public PagedList<ServerKeyInner> listByServer(final String resourceGroupName, final String serverName) { ServiceResponse<Page<ServerKeyInner>> response = listByServerSinglePageAsync(resourceGroupName, serverName).toBlocking().single(); return new PagedList<ServerKeyInner>(response.body()) { @Override public Page<ServerKeyInner> nextPage(String nextPageLink) { return listByServerNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 15
Source File: FirewallRulesInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Gets all firewall rules in the specified redis cache. * * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. * @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<RedisFirewallRuleInner> object if successful. */ public PagedList<RedisFirewallRuleInner> listByRedisResource(final String resourceGroupName, final String cacheName) { ServiceResponse<Page<RedisFirewallRuleInner>> response = listByRedisResourceSinglePageAsync(resourceGroupName, cacheName).toBlocking().single(); return new PagedList<RedisFirewallRuleInner>(response.body()) { @Override public Page<RedisFirewallRuleInner> nextPage(String nextPageLink) { return listByRedisResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 16
Source File: JobStepsInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Gets all job steps for a job's current version. * * @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 jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @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<JobStepInner> object if successful. */ public PagedList<JobStepInner> listByJob(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName) { ServiceResponse<Page<JobStepInner>> response = listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName).toBlocking().single(); return new PagedList<JobStepInner>(response.body()) { @Override public Page<JobStepInner> nextPage(String nextPageLink) { return listByJobNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 17
Source File: BlobContainersInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. * @param filter Optional. When specified, only container names starting with the filter will be listed. * @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<ListContainerItemInner> object if successful. */ public PagedList<ListContainerItemInner> list(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) { ServiceResponse<Page<ListContainerItemInner>> response = listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter).toBlocking().single(); return new PagedList<ListContainerItemInner>(response.body()) { @Override public Page<ListContainerItemInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 18
Source File: ContainerGroupsInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Get a list of container groups in the specified subscription and resource group. * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes. * * @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<ContainerGroupInner> object if successful. */ public PagedList<ContainerGroupInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<ContainerGroupInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<ContainerGroupInner>(response.body()) { @Override public Page<ContainerGroupInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 19
Source File: RecordSetsInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Lists all record sets in a DNS zone. * * @param resourceGroupName The name of the resource group. * @param zoneName The name of the DNS zone (without a terminating dot). * @param top The maximum number of record sets to return. If not specified, returns up to 100 record sets. * @param recordsetnamesuffix The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .<recordSetNameSuffix> * @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<RecordSetInner> object if successful. */ public PagedList<RecordSetInner> listByDnsZone(final String resourceGroupName, final String zoneName, final Integer top, final String recordsetnamesuffix) { ServiceResponse<Page<RecordSetInner>> response = listByDnsZoneSinglePageAsync(resourceGroupName, zoneName, top, recordsetnamesuffix).toBlocking().single(); return new PagedList<RecordSetInner>(response.body()) { @Override public Page<RecordSetInner> nextPage(String nextPageLink) { return listByDnsZoneNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Example 20
Source File: WebhooksInner.java From azure-libraries-for-java with MIT License | 3 votes |
/** * Lists recent events for the specified webhook. * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @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<EventInner> object if successful. */ public PagedList<EventInner> listEvents(final String resourceGroupName, final String registryName, final String webhookName) { ServiceResponse<Page<EventInner>> response = listEventsSinglePageAsync(resourceGroupName, registryName, webhookName).toBlocking().single(); return new PagedList<EventInner>(response.body()) { @Override public Page<EventInner> nextPage(String nextPageLink) { return listEventsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }