IotHubStatusCode Enum

  • java.lang.Object
    • java.lang.Enum<IotHubStatusCode>
      • com.microsoft.azure.sdk.iot.device.IotHubStatusCode

public enum IotHubStatusCode

An IoT Hub status code. Included in a message from an IoT Hub to a device.

Fields

BAD_FORMAT

The request failed because it had one or more format issues.

ERROR

The request failed for an unknown reason.

INTERNAL_SERVER_ERROR

The service encountered an error while handling the request.

IO_ERROR

The request failed because of network level issues.

MESSAGE_CANCELLED_ONCLOSE

The request failed to be sent to the service and/or acknowledged by the service before the client was closed.

MESSAGE_EXPIRED

The request failed to be sent to the service and/or acknowledged by the service before it expired.

NOT_FOUND

The request failed because the resource the request targeted does not exist.

OK

The request completed without exception

PRECONDITION_FAILED

The request failed because the request provided an out of date ETag or version number.

QUOTA_EXCEEDED

The request failed because the quota for such operations has been exceeded.

For file upload operations, this signifies that the maximum number of concurrent file upload operations are already happening.

For telemetry operations, this signifies that the IoT hub has reached its daily quota for the number of messages ingested.

REQUEST_ENTITY_TOO_LARGE

The request failed because the request payload exceeded IoT Hub's size limits.

SERVER_BUSY

The request was rejected by the service because it is too busy to handle it right now.

THROTTLED

The request was rejected by the service because the service is handling too many requests right now.

UNAUTHORIZED

The request failed because the provided credentials are out of date or incorrect.

Inherited Members

com.microsoft.azure.sdk.iot.device._iot_hub_status_code_1a07fcee33f9d6dc733cc20123d126d178

Methods

getConnectionStatusException(IotHubStatusCode statusCode, String statusDescription)

public static IotHubServiceException getConnectionStatusException(IotHubStatusCode statusCode, String statusDescription)

Parameters

statusCode
IotHubStatusCode
statusDescription
String

Returns

getIotHubStatusCode(int httpsStatus)

public static IotHubStatusCode getIotHubStatusCode(int httpsStatus)

Returns the IoT Hub status code referenced by the HTTPS status code.

Parameters

httpsStatus
int
the HTTPS status code.

Returns

the corresponding IoT Hub status code.

Exceptions

IllegalArgumentException
if the HTTPS status code does not map to an IoT Hub status code.

isRetryable(IotHubStatusCode statusCode)

public static boolean isRetryable(IotHubStatusCode statusCode)

Returns true if this event callback signals that the asynchronous action was unsuccessful, but could be retried. Returns false if it was successful, or it was unsuccessful but should not be retried.

Parameters

statusCode
IotHubStatusCode
The status code.

Returns

boolean
true if this event callback signals that the asynchronous action was unsuccessful, but could be retried, and false otherwise.

isSuccessful(IotHubStatusCode statusCode)

public static boolean isSuccessful(IotHubStatusCode statusCode)

Returns true if this event callback signals that the asynchronous action was successful, and false otherwise.

Parameters

statusCode
IotHubStatusCode
The status code.

Returns

boolean
true if this event callback signals that the asynchronous action was successful, and false otherwise.

toException(IotHubStatusCode statusCode)

public static IotHubClientException toException(IotHubStatusCode statusCode)

Parameters

statusCode
IotHubStatusCode

Returns

Applies to