Iot Hub - Manual Failover

Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see https://aka.ms/manualfailover

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover?api-version=2023-06-30

URI Parameters

Name In Required Type Description
iotHubName
path True

string

Name of the IoT hub to failover

resourceGroupName
path True

string

Name of the resource group containing the IoT hub resource

subscriptionId
path True

string

The subscription identifier.

api-version
query True

string

The version of the API.

Request Body

Name Required Type Description
failoverRegion True

string

Region the hub will be failed over to

Responses

Name Type Description
200 OK

Long running manual failover operation for the IoT hub completed

202 Accepted

Manual failover initiated

Headers

  • Azure-AsyncOperation: string
  • Location: string
Other Status Codes

ErrorDetails

DefaultErrorResponse

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

IotHub_ManualFailover

Sample request

POST https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/failover?api-version=2023-06-30

{
  "failoverRegion": "testHub"
}

Sample response

Azure-AsyncOperation: https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/operationResults/b3NfaWhfYmJhZmM4OWItNzQ3My00OWExLTg0NWUtNzQ3NWU2ODBkNDA3?api-version=2023-06-30-preview&operationSource=os_ih&asyncinfo
Location: https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/operationResults/b3NfaWhfYmJhZmM4OWItNzQ3My00OWExLTg0NWUtNzQ3NWU2ODBkNDA3?api-version=2022-11-01-preview&operationSource=os_ih

Definitions

Name Description
ErrorDetails

Error details.

FailoverInput

Use to provide failover region when requesting manual Failover for a hub.

ErrorDetails

Error details.

Name Type Description
code

string

The error code.

details

string

The error details.

httpStatusCode

string

The HTTP status code.

message

string

The error message.

FailoverInput

Use to provide failover region when requesting manual Failover for a hub.

Name Type Description
failoverRegion

string

Region the hub will be failed over to