Interface Hosts
public interface Hosts
Resource collection API of Hosts.
-
Method Summary
Modifier and TypeMethodDescriptionBegins definition for a new HostModel resource.void
Deletes an host.void
Deletes an host.void
delete
(String resourceGroupName, String hostname, Boolean force, com.azure.core.util.Context context) Deletes an host.void
deleteById
(String id) Deletes an host.void
deleteByIdWithResponse
(String id, Boolean force, com.azure.core.util.Context context) Deletes an host.Gets a host.com.azure.core.http.rest.Response<HostModel>
getByIdWithResponse
(String id, com.azure.core.util.Context context) Gets a host.getByResourceGroup
(String resourceGroupName, String hostname) Gets a host.com.azure.core.http.rest.Response<HostModel>
getByResourceGroupWithResponse
(String resourceGroupName, String hostname, com.azure.core.util.Context context) Gets a host.com.azure.core.http.rest.PagedIterable<HostModel>
list()
Implements GET hosts in a subscription.com.azure.core.http.rest.PagedIterable<HostModel>
list
(com.azure.core.util.Context context) Implements GET hosts in a subscription.com.azure.core.http.rest.PagedIterable<HostModel>
listByResourceGroup
(String resourceGroupName) Implements GET hosts in a resource group.com.azure.core.http.rest.PagedIterable<HostModel>
listByResourceGroup
(String resourceGroupName, com.azure.core.util.Context context) Implements GET hosts in a resource group.
-
Method Details
-
getByResourceGroup
Gets a host.Implements host GET method.
- Parameters:
resourceGroupName
- The Resource Group Name.hostname
- Name of the host.- Returns:
- define the host.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getByResourceGroupWithResponse
com.azure.core.http.rest.Response<HostModel> getByResourceGroupWithResponse(String resourceGroupName, String hostname, com.azure.core.util.Context context) Gets a host.Implements host GET method.
- Parameters:
resourceGroupName
- The Resource Group Name.hostname
- Name of the host.context
- The context to associate with this operation.- Returns:
- define the host along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
Deletes an host.Implements host DELETE method.
- Parameters:
resourceGroupName
- The Resource Group Name.hostname
- Name of the host.force
- Whether force delete was specified.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
Deletes an host.Implements host DELETE method.
- Parameters:
resourceGroupName
- The Resource Group Name.hostname
- Name of the host.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
void delete(String resourceGroupName, String hostname, Boolean force, com.azure.core.util.Context context) Deletes an host.Implements host DELETE method.
- Parameters:
resourceGroupName
- The Resource Group Name.hostname
- Name of the host.force
- Whether force delete was specified.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<HostModel> list()Implements GET hosts in a subscription.List of hosts in a subscription.
- Returns:
- list of Hosts as paginated response with
PagedIterable
. - Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
Implements GET hosts in a subscription.List of hosts in a subscription.
- Parameters:
context
- The context to associate with this operation.- Returns:
- list of Hosts as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listByResourceGroup
Implements GET hosts in a resource group.List of hosts in a resource group.
- Parameters:
resourceGroupName
- The Resource Group Name.- Returns:
- list of Hosts as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listByResourceGroup
com.azure.core.http.rest.PagedIterable<HostModel> listByResourceGroup(String resourceGroupName, com.azure.core.util.Context context) Implements GET hosts in a resource group.List of hosts in a resource group.
- Parameters:
resourceGroupName
- The Resource Group Name.context
- The context to associate with this operation.- Returns:
- list of Hosts as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getById
Gets a host.Implements host GET method.
- Parameters:
id
- the resource ID.- Returns:
- define the host along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getByIdWithResponse
com.azure.core.http.rest.Response<HostModel> getByIdWithResponse(String id, com.azure.core.util.Context context) Gets a host.Implements host GET method.
- Parameters:
id
- the resource ID.context
- The context to associate with this operation.- Returns:
- define the host along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteById
Deletes an host.Implements host DELETE method.
- Parameters:
id
- the resource ID.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteByIdWithResponse
Deletes an host.Implements host DELETE method.
- Parameters:
id
- the resource ID.force
- Whether force delete was specified.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
define
Begins definition for a new HostModel resource.- Parameters:
name
- resource name.- Returns:
- the first stage of the new HostModel definition.
-