Servers - Restart

Uruchamia ponownie serwer.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart?api-version=2022-12-01

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
resourceGroupName
path True

string

Nazwa grupy zasobów. W nazwie jest uwzględniana wielkość liter.

serverName
path True

string

Nazwa serwera.

Regex pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*

subscriptionId
path True

string

Identyfikator subskrypcji docelowej.

api-version
query True

string

Wersja interfejsu API do użycia dla tej operacji.

Treść żądania

Nazwa Typ Opis
failoverMode

FailoverMode

Tryb trybu failover.

restartWithFailover

boolean

Wskazuje, czy należy ponownie uruchomić serwer z trybem failover.

Odpowiedzi

Nazwa Typ Opis
200 OK

OK

202 Accepted

Zaakceptowano

Headers

Location: string

Other Status Codes

ErrorResponse

Odpowiedź na błąd opisująca, dlaczego operacja nie powiodła się.

Zabezpieczenia

azure_auth

Przepływ OAuth2 usługi Azure Active Directory

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

Scopes

Nazwa Opis
user_impersonation personifikacja konta użytkownika

Przykłady

ServerRestart
ServerRestartWithFailover

ServerRestart

Sample Request

POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/restart?api-version=2022-12-01

Sample Response

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-12-01
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-12-01

ServerRestartWithFailover

Sample Request

POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/restart?api-version=2022-12-01

{
  "restartWithFailover": true,
  "failoverMode": "ForcedFailover"
}

Sample Response

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-12-01
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-12-01

Definicje

Nazwa Opis
ErrorAdditionalInfo

Dodatkowe informacje o błędzie zarządzania zasobami.

ErrorDetail

Szczegóły błędu.

ErrorResponse

Odpowiedź na błąd

FailoverMode

Tryb trybu failover.

RestartParameter

Reprezentuje parametry ponownego uruchomienia serwera.

ErrorAdditionalInfo

Dodatkowe informacje o błędzie zarządzania zasobami.

Nazwa Typ Opis
info

object

Dodatkowe informacje.

type

string

Dodatkowy typ informacji.

ErrorDetail

Szczegóły błędu.

Nazwa Typ Opis
additionalInfo

ErrorAdditionalInfo[]

Dodatkowe informacje o błędzie.

code

string

Kod błędu.

details

ErrorDetail[]

Szczegóły błędu.

message

string

Komunikat o błędzie.

target

string

Element docelowy błędu.

ErrorResponse

Odpowiedź na błąd

Nazwa Typ Opis
error

ErrorDetail

Obiekt error.

FailoverMode

Tryb trybu failover.

Nazwa Typ Opis
ForcedFailover

string

ForcedSwitchover

string

PlannedFailover

string

PlannedSwitchover

string

RestartParameter

Reprezentuje parametry ponownego uruchomienia serwera.

Nazwa Typ Opis
failoverMode

FailoverMode

Tryb trybu failover.

restartWithFailover

boolean

Wskazuje, czy należy ponownie uruchomić serwer z trybem failover.