Gateway Hostname Configuration - Create Or Update

Hiermee wordt de configuratie van de hostnaam voor een gateway bijgewerkt.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}?api-version=2022-08-01

URI-parameters

Name In Vereist Type Description
gatewayId
path True

string

Gateway-entiteits-id. Moet uniek zijn in het huidige API Management service-exemplaar. Mag geen waarde 'beheerd' hebben

hcId
path True

string

Configuratie-id van hostnaam van gateway. Moet uniek zijn in het bereik van de bovenliggende gateway-entiteit.

resourceGroupName
path True

string

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

serviceName
path True

string

De naam van de API Management service.

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

De id van het doelabonnement.

api-version
query True

string

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

Aanvraagkoptekst

Name Vereist Type Description
If-Match

string

ETag van de entiteit. Niet vereist bij het maken van een entiteit, maar vereist bij het bijwerken van een entiteit.

Aanvraagbody

Name Type Description
properties.certificateId

string

Id van certificaatentiteit die wordt gebruikt voor het tot stand gebrachte TLS-verbinding

properties.hostname

string

Waarde van hostnaam. Ondersteunt geldige domeinnaam, gedeeltelijk of volledig jokerteken

properties.http2Enabled

boolean

Hiermee geeft u op of HTTP/2.0 wordt ondersteund

properties.negotiateClientCertificate

boolean

Bepaalt of de gateway een clientcertificaat aanvraagt

properties.tls10Enabled

boolean

Hiermee geeft u op of TLS 1.0 wordt ondersteund

properties.tls11Enabled

boolean

Hiermee geeft u op of TLS 1.1 wordt ondersteund

Antwoorden

Name Type Description
200 OK

GatewayHostnameConfigurationContract

De configuratiedetails van de hostnaam van de gateway zijn bijgewerkt.

Headers

ETag: string

201 Created

GatewayHostnameConfigurationContract

De nieuwe configuratie van de gatewayhostnaam is gemaakt.

Headers

ETag: string

Other Status Codes

ErrorResponse

Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.

Beveiliging

azure_auth

Azure Active Directory OAuth2-stroom.

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

Scopes

Name Description
user_impersonation uw gebruikersaccount imiteren

Voorbeelden

ApiManagementCreateGatewayHostnameConfiguration

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default?api-version=2022-08-01

{
  "properties": {
    "hostname": "*",
    "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
    "negotiateClientCertificate": false,
    "tls10Enabled": false,
    "tls11Enabled": false,
    "http2Enabled": true
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default",
  "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations",
  "name": "default",
  "properties": {
    "hostname": "*",
    "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
    "negotiateClientCertificate": false,
    "tls10Enabled": false,
    "tls11Enabled": false,
    "http2Enabled": true
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default",
  "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations",
  "name": "default",
  "properties": {
    "hostname": "*",
    "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
    "negotiateClientCertificate": false,
    "tls10Enabled": false,
    "tls11Enabled": false,
    "http2Enabled": true
  }
}

Definities

Name Description
ErrorFieldContract

Fout Veldcontract.

ErrorResponse

Foutreactie.

GatewayHostnameConfigurationContract

Configuratiedetails van de hostnaam van de gateway.

ErrorFieldContract

Fout Veldcontract.

Name Type Description
code

string

Foutcode op eigenschapsniveau.

message

string

Door mensen leesbare weergave van fout op eigenschapsniveau.

target

string

Naam van eigenschap.

ErrorResponse

Foutreactie.

Name Type Description
error.code

string

Door de service gedefinieerde foutcode. Deze code fungeert als een substatus voor de HTTP-foutcode die is opgegeven in het antwoord.

error.details

ErrorFieldContract[]

De lijst met ongeldige velden verzenden in aanvraag, in het geval van een validatiefout.

error.message

string

Door mensen leesbare weergave van de fout.

GatewayHostnameConfigurationContract

Configuratiedetails van de hostnaam van de gateway.

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.certificateId

string

Id van certificaatentiteit die wordt gebruikt voor het tot stand gebrachte TLS-verbinding

properties.hostname

string

Waarde van hostnaam. Ondersteunt geldige domeinnaam, gedeeltelijk of volledig jokerteken

properties.http2Enabled

boolean

Hiermee geeft u op of HTTP/2.0 wordt ondersteund

properties.negotiateClientCertificate

boolean

Bepaalt of de gateway een clientcertificaat aanvraagt

properties.tls10Enabled

boolean

Hiermee geeft u op of TLS 1.0 wordt ondersteund

properties.tls11Enabled

boolean

Hiermee geeft u op of TLS 1.1 wordt ondersteund

type

string

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