Delen via


Server Administrators - Create Or Update

Hiermee maakt of werkt u active directory-beheerder bij op een bestaande server. De updateactie overschrijft de bestaande beheerder.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/administrators/activeDirectory?api-version=2017-12-01

URI-parameters

Name In Vereist Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

De naam van de resourcegroep. De naam is niet hoofdlettergevoelig.

serverName
path True

string

De naam van de server.

subscriptionId
path True

string

minLength: 1

De id van het doelabonnement.

api-version
query True

string

minLength: 1

De API-versie die voor deze bewerking moet worden gebruikt.

Aanvraagbody

Name Vereist Type Description
properties.administratorType True

AdministratorType

Het type beheerder.

properties.login True

string

De aanmeldingsaccountnaam van de serverbeheerder.

properties.sid True

string (uuid)

De sid van de serverbeheerder (Secure ID).

properties.tenantId True

string (uuid)

De tenant-id van de Active Directory-beheerder van de server.

Antwoorden

Name Type Description
200 OK

ServerAdministratorResource

De Active Directory-beheerder is bijgewerkt

202 Accepted

ServerAdministratorResource

Bewerking wordt uitgevoerd

Other Status Codes

CloudError

Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.

Beveiliging

azure_auth

Azure Active Directory OAuth2-stroom

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

ServerAdministratorCreate

Voorbeeldaanvraag

PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory?api-version=2017-12-01

{
  "properties": {
    "administratorType": "ActiveDirectory",
    "login": "bob@contoso.com",
    "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
    "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"
  }
}

Voorbeeldrespons

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory",
  "name": "activeDirectory",
  "type": "Microsoft.DBforPostgreSQL/servers/administrators",
  "properties": {
    "administratorType": "ActiveDirectory",
    "login": "bob@contoso.com",
    "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
    "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"
  }
}
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory",
  "name": "activeDirectory",
  "type": "Microsoft.DBforPostgreSQL/servers/administrators",
  "properties": {
    "administratorType": "ActiveDirectory",
    "login": "bob@contoso.com",
    "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
    "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"
  }
}

Definities

Name Description
AdministratorType

Het type beheerder.

CloudError

Een foutreactie van de Batch-service.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorResponse

Foutreactie

ServerAdministratorResource

Vertegenwoordigt een en externe beheerder die moet worden gemaakt.

AdministratorType

Het type beheerder.

Waarde Description
ActiveDirectory

CloudError

Een foutreactie van de Batch-service.

Name Type Description
error

ErrorResponse

Foutreactie
Veelvoorkomende foutreactie voor alle Azure Resource Manager-API's om foutdetails te retourneren voor mislukte bewerkingen. (Dit volgt ook de OData-foutreactie-indeling.)

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

object

De aanvullende informatie.

type

string

Het extra informatietype.

ErrorResponse

Foutreactie

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

De fout bevat aanvullende informatie.

code

string

De foutcode.

details

ErrorResponse[]

De foutdetails.

message

string

Het foutbericht.

target

string

Het foutdoel.

ServerAdministratorResource

Vertegenwoordigt een en externe beheerder die moet worden gemaakt.

Name Type Description
id

string

Volledig gekwalificeerde resource-id voor de resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

De naam van de resource

properties.administratorType

AdministratorType

Het type beheerder.

properties.login

string

De aanmeldingsaccountnaam van de serverbeheerder.

properties.sid

string (uuid)

De sid van de serverbeheerder (Secure ID).

properties.tenantId

string (uuid)

De tenant-id van de Active Directory-beheerder van de server.

type

string

Het type resource. Bijvoorbeeld 'Microsoft.Compute/virtualMachines' of 'Microsoft.Storage/storageAccounts'