Interface Devices
public interface Devices
Resource collection API of Devices.
-
Method Summary
Modifier and TypeMethodDescriptionBegins definition for a new Device resource.void
Deletes the specified device.void
deleteById
(String id) Deletes the specified device.void
deleteByIdWithResponse
(String id, com.azure.core.util.Context context) Deletes the specified device.void
deleteByResourceGroup
(String resourceGroupName, String deviceName) Deletes the specified device.Gets information about the specified device.com.azure.core.http.rest.Response<Device>
getByIdWithResponse
(String id, com.azure.core.util.Context context) Gets information about the specified device.getByResourceGroup
(String resourceGroupName, String deviceName) Gets information about the specified device.com.azure.core.http.rest.Response<Device>
getByResourceGroupWithResponse
(String resourceGroupName, String deviceName, com.azure.core.util.Context context) Gets information about the specified device.com.azure.core.http.rest.PagedIterable<Device>
list()
Lists all the devices in a subscription.com.azure.core.http.rest.PagedIterable<Device>
list
(com.azure.core.util.Context context) Lists all the devices in a subscription.com.azure.core.http.rest.PagedIterable<Device>
listByResourceGroup
(String resourceGroupName) Lists all the device resource in a resource group.com.azure.core.http.rest.PagedIterable<Device>
listByResourceGroup
(String resourceGroupName, com.azure.core.util.Context context) Lists all the device resource in a resource group.listRegistrationKey
(String resourceGroupName, String deviceName) List the registration key for the device.com.azure.core.http.rest.Response<DeviceRegistrationKey>
listRegistrationKeyWithResponse
(String resourceGroupName, String deviceName, com.azure.core.util.Context context) List the registration key for the device.
-
Method Details
-
deleteByResourceGroup
Deletes the specified device.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.deviceName
- The name of the device resource.- 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 the specified device.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.deviceName
- The name of the device resource.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.
-
getByResourceGroupWithResponse
com.azure.core.http.rest.Response<Device> getByResourceGroupWithResponse(String resourceGroupName, String deviceName, com.azure.core.util.Context context) Gets information about the specified device.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.deviceName
- The name of the device resource.context
- The context to associate with this operation.- Returns:
- information about the specified device 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.
-
getByResourceGroup
Gets information about the specified device.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.deviceName
- The name of the device resource.- Returns:
- information about the specified device.
- 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<Device> list()Lists all the devices in a subscription.- Returns:
- response for devices API service call 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
Lists all the devices in a subscription.- Parameters:
context
- The context to associate with this operation.- Returns:
- response for devices API service call 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
Lists all the device resource in a resource group.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.- Returns:
- response for devices API service call 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<Device> listByResourceGroup(String resourceGroupName, com.azure.core.util.Context context) Lists all the device resource in a resource group.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.context
- The context to associate with this operation.- Returns:
- response for devices API service call 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.
-
listRegistrationKeyWithResponse
com.azure.core.http.rest.Response<DeviceRegistrationKey> listRegistrationKeyWithResponse(String resourceGroupName, String deviceName, com.azure.core.util.Context context) List the registration key for the device.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.deviceName
- The name of the device resource.context
- The context to associate with this operation.- Returns:
- the device registration key 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.
-
listRegistrationKey
List the registration key for the device.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.deviceName
- The name of the device resource.- Returns:
- the device registration key.
- 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 information about the specified device.- Parameters:
id
- the resource ID.- Returns:
- information about the specified device 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<Device> getByIdWithResponse(String id, com.azure.core.util.Context context) Gets information about the specified device.- Parameters:
id
- the resource ID.context
- The context to associate with this operation.- Returns:
- information about the specified device 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 the specified device.- 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 the specified device.- Parameters:
id
- the resource ID.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 Device resource.- Parameters:
name
- resource name.- Returns:
- the first stage of the new Device definition.
-