Delen via


Portal Config - Create Or Update

De configuratie van de ontwikkelaarsportal maken of bijwerken.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}?api-version=2024-05-01

URI-parameters

Name In Vereist Type Description
portalConfigId
path True

string

minLength: 1
maxLength: 80

Portalconfiguratie-id.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

De naam van de API Management-service.

subscriptionId
path True

string (uuid)

De id van het doelabonnement. De waarde moet een UUID zijn.

api-version
query True

string

minLength: 1

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

Aanvraagkoptekst

Name Vereist Type Description
If-Match True

string

ETag van de entiteit. ETag moet overeenkomen met de huidige entiteitsstatus van het headerantwoord van de GET-aanvraag of moet * zijn voor een onvoorwaardelijke update.

Aanvraagbody

Name Type Description
properties.cors

PortalConfigCorsProperties

De CORS-instellingen (Cross-Origin Resource Sharing) van de ontwikkelaarsportal.

properties.csp

PortalConfigCspProperties

De CSP-instellingen (Content Security Policy) van de ontwikkelaarsportal.

properties.delegation

PortalConfigDelegationProperties

De instellingen voor delegatie van de ontwikkelaarsportal.

properties.enableBasicAuth

boolean

Basisverificatiemethode in- of uitschakelen.

properties.signin

Signin

properties.signup

Signup

Antwoorden

Name Type Description
200 OK

PortalConfigContract

De bewerking is voltooid.

Other Status Codes

ErrorResponse

Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.

Beveiliging

azure_auth

OAuth2-stroom voor Azure Active Directory.

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

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

ApiManagementCreatePortalConfig

Voorbeeldaanvraag

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default?api-version=2024-05-01


{
  "properties": {
    "enableBasicAuth": true,
    "signin": {
      "require": false
    },
    "signup": {
      "termsOfService": {
        "text": "I agree to the service terms and conditions.",
        "requireConsent": false
      }
    },
    "delegation": {
      "delegateRegistration": false,
      "delegateSubscription": false,
      "delegationUrl": null,
      "validationKey": null
    },
    "csp": {
      "mode": "reportOnly",
      "reportUri": [
        "https://report.contoso.com"
      ],
      "allowedSources": [
        "*.contoso.com"
      ]
    },
    "cors": {
      "allowedOrigins": [
        "https://contoso.com"
      ]
    }
  }
}

Voorbeeldrespons

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default",
  "type": "Microsoft.ApiManagement/service/portalconfigs",
  "name": "default",
  "properties": {
    "enableBasicAuth": true,
    "signin": {
      "require": false
    },
    "signup": {
      "termsOfService": {
        "text": "I agree to the service terms and conditions.",
        "requireConsent": false
      }
    },
    "delegation": {
      "delegateRegistration": false,
      "delegateSubscription": false,
      "delegationUrl": null,
      "validationKey": null
    },
    "csp": {
      "mode": "reportOnly",
      "reportUri": [
        "https://report.contoso.com"
      ],
      "allowedSources": [
        "*.contoso.com"
      ]
    },
    "cors": {
      "allowedOrigins": [
        "https://contoso.com"
      ]
    }
  }
}

Definities

Name Description
ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Foutreactie

PortalConfigContract

Het configuratiecontract voor de ontwikkelaarsportal.

PortalConfigCorsProperties

De CORS-instellingen (Cross-Origin Resource Sharing) van de ontwikkelaarsportal.

PortalConfigCspProperties

De CSP-instellingen (Content Security Policy) van de ontwikkelaarsportal.

PortalConfigDelegationProperties
PortalConfigTermsOfServiceProperties

Eigenschappen van servicecontractvoorwaarden.

PortalSettingsCspMode

De modus van het Content Security Policy (CSP) van de ontwikkelaarsportal.

Signin
Signup

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

object

De aanvullende informatie.

type

string

Het extra informatietype.

ErrorDetail

De foutdetails.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

De fout bevat aanvullende informatie.

code

string

De foutcode.

details

ErrorDetail[]

De foutdetails.

message

string

Het foutbericht.

target

string

Het foutdoel.

ErrorResponse

Foutreactie

Name Type Description
error

ErrorDetail

Het foutobject.

PortalConfigContract

Het configuratiecontract voor de ontwikkelaarsportal.

Name Type Default value Description
id

string

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

name

string

De naam van de resource

properties.cors

PortalConfigCorsProperties

De CORS-instellingen (Cross-Origin Resource Sharing) van de ontwikkelaarsportal.

properties.csp

PortalConfigCspProperties

De CSP-instellingen (Content Security Policy) van de ontwikkelaarsportal.

properties.delegation

PortalConfigDelegationProperties

De instellingen voor delegatie van de ontwikkelaarsportal.

properties.enableBasicAuth

boolean

True

Basisverificatiemethode in- of uitschakelen.

properties.signin

Signin

properties.signup

Signup

type

string

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

PortalConfigCorsProperties

De CORS-instellingen (Cross-Origin Resource Sharing) van de ontwikkelaarsportal.

Name Type Description
allowedOrigins

string[]

Toegestane oorsprongen, bijvoorbeeld https://trusted.com.

PortalConfigCspProperties

De CSP-instellingen (Content Security Policy) van de ontwikkelaarsportal.

Name Type Default value Description
allowedSources

string[]

Toegestane bronnen, bijvoorbeeld *.trusted.com, trusted.com, https://.

mode

PortalSettingsCspMode

disabled

De modus van het Content Security Policy (CSP) van de ontwikkelaarsportal.

reportUri

string[]

De URL's die door de browser worden gebruikt om CSP-schendingen te melden.

PortalConfigDelegationProperties

Name Type Default value Description
delegateRegistration

boolean

False

Delegatie voor gebruikersregistratie in- of uitschakelen.

delegateSubscription

boolean

False

Delegering voor productabonnementen in- of uitschakelen.

delegationUrl

string

Een eindpunt-URL voor delegering.

validationKey

string

Een met base64 gecodeerde validatiesleutel om ervoor te zorgen dat aanvragen afkomstig zijn van de Azure API Management-service.

PortalConfigTermsOfServiceProperties

Eigenschappen van servicecontractvoorwaarden.

Name Type Default value Description
requireConsent

boolean

False

Vraag de gebruiker om toestemming voor de servicevoorwaarden.

text

string

Een servicevoorwaardentekst.

PortalSettingsCspMode

De modus van het Content Security Policy (CSP) van de ontwikkelaarsportal.

Waarde Description
enabled

De browser blokkeert aanvragen die niet overeenkomen met toegestane oorsprongen.

disabled

De oorspronkelijke beperkingen worden niet toegepast in de browser.

reportOnly

De browser rapporteert aanvragen die niet overeenkomen met toegestane oorsprongen zonder deze te blokkeren.

Signin

Name Type Default value Description
require

boolean

False

Anonieme gebruikers omleiden naar de aanmeldingspagina.

Signup

Name Type Description
termsOfService

PortalConfigTermsOfServiceProperties

Servicevoorwaarden.