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 |
|---|---|---|---|---|
|
portal
|
path | True |
string minLength: 1maxLength: 80 |
Portalconfiguratie-id. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
De naam van de resourcegroep. De naam is niet hoofdlettergevoelig. |
|
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
De naam van de API Management-service. |
|
subscription
|
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 |
De CORS-instellingen (Cross-Origin Resource Sharing) van de ontwikkelaarsportal. |
|
| properties.csp |
De CSP-instellingen (Content Security Policy) van de ontwikkelaarsportal. |
|
| properties.delegation |
De instellingen voor delegatie van de ontwikkelaarsportal. |
|
| properties.enableBasicAuth |
boolean |
Basisverificatiemethode in- of uitschakelen. |
| properties.signin | ||
| properties.signup |
Antwoorden
| Name | Type | Description |
|---|---|---|
| 200 OK |
De bewerking is voltooid. |
|
| Other Status Codes |
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 |
|---|---|
|
Error |
Aanvullende informatie over de resourcebeheerfout. |
|
Error |
De foutdetails. |
|
Error |
Foutreactie |
|
Portal |
Het configuratiecontract voor de ontwikkelaarsportal. |
|
Portal |
De CORS-instellingen (Cross-Origin Resource Sharing) van de ontwikkelaarsportal. |
|
Portal |
De CSP-instellingen (Content Security Policy) van de ontwikkelaarsportal. |
|
Portal |
|
|
Portal |
Eigenschappen van servicecontractvoorwaarden. |
|
Portal |
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 |
De fout bevat aanvullende informatie. |
|
| code |
string |
De foutcode. |
| details |
De foutdetails. |
|
| message |
string |
Het foutbericht. |
| target |
string |
Het foutdoel. |
ErrorResponse
Foutreactie
| Name | Type | Description |
|---|---|---|
| error |
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 |
De CORS-instellingen (Cross-Origin Resource Sharing) van de ontwikkelaarsportal. |
||
| properties.csp |
De CSP-instellingen (Content Security Policy) van de ontwikkelaarsportal. |
||
| properties.delegation |
De instellingen voor delegatie van de ontwikkelaarsportal. |
||
| properties.enableBasicAuth |
boolean |
True |
Basisverificatiemethode in- of uitschakelen. |
| properties.signin | |||
| properties.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 |
PortalConfigCspProperties
De CSP-instellingen (Content Security Policy) van de ontwikkelaarsportal.
| Name | Type | Default value | Description |
|---|---|---|---|
| allowedSources |
string[] |
Toegestane bronnen, bijvoorbeeld |
|
| mode | 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 |
Servicevoorwaarden. |