Erstellt oder aktualisiert ein Back-End
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}?api-version=2022-08-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
backendId
|
path |
True
|
string
|
Bezeichner der Back-End-Entität. Muss im aktuellen API Management-Dienst instance eindeutig sein.
|
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe. Für den Namen wird die Groß-/Kleinschreibung nicht beachtet.
|
serviceName
|
path |
True
|
string
|
Der Name des API Management-Diensts.
Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
|
subscriptionId
|
path |
True
|
string
|
Hierbei handelt es sich um die ID des Zielabonnements.
|
api-version
|
query |
True
|
string
|
Hierbei handelt es sich um die für diesen Vorgang zu verwendende API-Version.
|
Name |
Erforderlich |
Typ |
Beschreibung |
If-Match
|
|
string
|
ETag der Entität. Nicht erforderlich beim Erstellen einer Entität, aber erforderlich beim Aktualisieren einer Entität.
|
Anforderungstext
Name |
Erforderlich |
Typ |
Beschreibung |
properties.protocol
|
True
|
BackendProtocol
|
Back-End-Kommunikationsprotokoll.
|
properties.url
|
True
|
string
|
Laufzeit-URL des Back-Ends.
|
properties.credentials
|
|
BackendCredentialsContract
|
Eigenschaften des Back-End-Anmeldeinformationsvertrags
|
properties.description
|
|
string
|
Back-End-Beschreibung.
|
properties.properties
|
|
BackendProperties
|
Vertrag für Back-End-Eigenschaften
|
properties.proxy
|
|
BackendProxyContract
|
Vertragseigenschaften des Back-End-Gateways
|
properties.resourceId
|
|
string
|
Verwaltungs-URI der Ressource im externen System. Bei dieser URL kann es sich um die Arm-Ressourcen-ID von Logic Apps, Funktions-Apps oder API-Apps handeln.
|
properties.title
|
|
string
|
Back-End-Titel.
|
properties.tls
|
|
BackendTlsProperties
|
Back-End-TLS-Eigenschaften
|
Antworten
Name |
Typ |
Beschreibung |
200 OK
|
BackendContract
|
Das vorhandene Back-End wurde erfolgreich aktualisiert.
Headers
ETag: string
|
201 Created
|
BackendContract
|
Das Back-End wurde erfolgreich erstellt.
Headers
ETag: string
|
Other Status Codes
|
ErrorResponse
|
Fehlerantwort mit Beschreibung des Grunds für den Fehler.
|
Sicherheit
azure_auth
Azure Active Directory OAuth2-Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel Ihres Benutzerkontos
|
Beispiele
ApiManagementCreateBackendProxyBackend
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend?api-version=2022-08-01
{
"properties": {
"description": "description5308",
"url": "https://backendname2644/",
"protocol": "http",
"tls": {
"validateCertificateChain": true,
"validateCertificateName": true
},
"proxy": {
"url": "http://192.168.1.1:8080",
"username": "Contoso\\admin",
"password": "<password>"
},
"credentials": {
"query": {
"sv": [
"xx",
"bb",
"cc"
]
},
"header": {
"x-my-1": [
"val1",
"val2"
]
},
"authorization": {
"scheme": "Basic",
"parameter": "opensesma"
}
}
}
}
import com.azure.resourcemanager.apimanagement.models.BackendAuthorizationHeaderCredentials;
import com.azure.resourcemanager.apimanagement.models.BackendCredentialsContract;
import com.azure.resourcemanager.apimanagement.models.BackendProtocol;
import com.azure.resourcemanager.apimanagement.models.BackendProxyContract;
import com.azure.resourcemanager.apimanagement.models.BackendTlsProperties;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/** Samples for Backend CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json
*/
/**
* Sample code: ApiManagementCreateBackendProxyBackend.
*
* @param manager Entry point to ApiManagementManager.
*/
public static void apiManagementCreateBackendProxyBackend(
com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
manager
.backends()
.define("proxybackend")
.withExistingService("rg1", "apimService1")
.withUrl("https://backendname2644/")
.withProtocol(BackendProtocol.HTTP)
.withDescription("description5308")
.withCredentials(
new BackendCredentialsContract()
.withQuery(mapOf("sv", Arrays.asList("xx", "bb", "cc")))
.withHeaderProperty(mapOf("x-my-1", Arrays.asList("val1", "val2")))
.withAuthorization(
new BackendAuthorizationHeaderCredentials().withScheme("Basic").withParameter("opensesma")))
.withProxy(
new BackendProxyContract()
.withUrl("http://192.168.1.1:8080")
.withUsername("Contoso\\admin")
.withPassword("fakeTokenPlaceholder"))
.withTls(new BackendTlsProperties().withValidateCertificateChain(true).withValidateCertificateName(true))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.apimanagement import ApiManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-apimanagement
# USAGE
python api_management_create_backend_proxy_backend.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ApiManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.backend.create_or_update(
resource_group_name="rg1",
service_name="apimService1",
backend_id="proxybackend",
parameters={
"properties": {
"credentials": {
"authorization": {"parameter": "opensesma", "scheme": "Basic"},
"header": {"x-my-1": ["val1", "val2"]},
"query": {"sv": ["xx", "bb", "cc"]},
},
"description": "description5308",
"protocol": "http",
"proxy": {"password": "<password>", "url": "http://192.168.1.1:8080", "username": "Contoso\\admin"},
"tls": {"validateCertificateChain": True, "validateCertificateName": True},
"url": "https://backendname2644/",
}
},
)
print(response)
# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armapimanagement_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json
func ExampleBackendClient_CreateOrUpdate_apiManagementCreateBackendProxyBackend() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackendClient().CreateOrUpdate(ctx, "rg1", "apimService1", "proxybackend", armapimanagement.BackendContract{
Properties: &armapimanagement.BackendContractProperties{
Description: to.Ptr("description5308"),
Credentials: &armapimanagement.BackendCredentialsContract{
Authorization: &armapimanagement.BackendAuthorizationHeaderCredentials{
Parameter: to.Ptr("opensesma"),
Scheme: to.Ptr("Basic"),
},
Header: map[string][]*string{
"x-my-1": {
to.Ptr("val1"),
to.Ptr("val2")},
},
Query: map[string][]*string{
"sv": {
to.Ptr("xx"),
to.Ptr("bb"),
to.Ptr("cc")},
},
},
Proxy: &armapimanagement.BackendProxyContract{
Password: to.Ptr("<password>"),
URL: to.Ptr("http://192.168.1.1:8080"),
Username: to.Ptr("Contoso\\admin"),
},
TLS: &armapimanagement.BackendTLSProperties{
ValidateCertificateChain: to.Ptr(true),
ValidateCertificateName: to.Ptr(true),
},
URL: to.Ptr("https://backendname2644/"),
Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
},
}, &armapimanagement.BackendClientCreateOrUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BackendContract = armapimanagement.BackendContract{
// Name: to.Ptr("proxybackend"),
// Type: to.Ptr("Microsoft.ApiManagement/service/backends"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend"),
// Properties: &armapimanagement.BackendContractProperties{
// Description: to.Ptr("description5308"),
// Credentials: &armapimanagement.BackendCredentialsContract{
// Authorization: &armapimanagement.BackendAuthorizationHeaderCredentials{
// Parameter: to.Ptr("opensesma"),
// Scheme: to.Ptr("Basic"),
// },
// Header: map[string][]*string{
// "x-my-1": []*string{
// to.Ptr("val1"),
// to.Ptr("val2")},
// },
// Query: map[string][]*string{
// "sv": []*string{
// to.Ptr("xx"),
// to.Ptr("bb"),
// to.Ptr("cc")},
// },
// },
// Proxy: &armapimanagement.BackendProxyContract{
// Password: to.Ptr("<password>"),
// URL: to.Ptr("http://192.168.1.1:8080"),
// Username: to.Ptr("Contoso\\admin"),
// },
// TLS: &armapimanagement.BackendTLSProperties{
// ValidateCertificateChain: to.Ptr(false),
// ValidateCertificateName: to.Ptr(false),
// },
// URL: to.Ptr("https://backendname2644/"),
// Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ApiManagementClient } = require("@azure/arm-apimanagement");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or Updates a backend.
*
* @summary Creates or Updates a backend.
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json
*/
async function apiManagementCreateBackendProxyBackend() {
const subscriptionId = process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1";
const serviceName = "apimService1";
const backendId = "proxybackend";
const parameters = {
description: "description5308",
credentials: {
authorization: { parameter: "opensesma", scheme: "Basic" },
header: { xMy1: ["val1", "val2"] },
query: { sv: ["xx", "bb", "cc"] },
},
proxy: {
password: "<password>",
url: "http://192.168.1.1:8080",
username: "Contoso\\admin",
},
tls: { validateCertificateChain: true, validateCertificateName: true },
url: "https://backendname2644/",
protocol: "http",
};
const credential = new DefaultAzureCredential();
const client = new ApiManagementClient(credential, subscriptionId);
const result = await client.backend.createOrUpdate(
resourceGroupName,
serviceName,
backendId,
parameters
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend",
"type": "Microsoft.ApiManagement/service/backends",
"name": "proxybackend",
"properties": {
"description": "description5308",
"url": "https://backendname2644/",
"protocol": "http",
"credentials": {
"query": {
"sv": [
"xx",
"bb",
"cc"
]
},
"header": {
"x-my-1": [
"val1",
"val2"
]
},
"authorization": {
"scheme": "Basic",
"parameter": "opensesma"
}
},
"proxy": {
"url": "http://192.168.1.1:8080",
"username": "Contoso\\admin",
"password": "<password>"
},
"tls": {
"validateCertificateChain": false,
"validateCertificateName": false
}
}
}
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend",
"type": "Microsoft.ApiManagement/service/backends",
"name": "proxybackend",
"properties": {
"description": "description5308",
"url": "https://backendname2644/",
"protocol": "http",
"credentials": {
"query": {
"sv": [
"xx",
"bb",
"cc"
]
},
"header": {
"x-my-1": [
"val1",
"val2"
]
},
"authorization": {
"scheme": "Basic",
"parameter": "opensesma"
}
},
"proxy": {
"url": "http://192.168.1.1:8080",
"username": "Contoso\\admin",
"password": "<password>"
},
"tls": {
"validateCertificateChain": false,
"validateCertificateName": false
}
}
}
ApiManagementCreateBackendServiceFabric
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend?api-version=2022-08-01
{
"properties": {
"description": "Service Fabric Test App 1",
"protocol": "http",
"url": "fabric:/mytestapp/mytestservice",
"properties": {
"serviceFabricCluster": {
"managementEndpoints": [
"https://somecluster.com"
],
"clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
"serverX509Names": [
{
"name": "ServerCommonName1",
"issuerCertificateThumbprint": "IssuerCertificateThumbprint1"
}
],
"maxPartitionResolutionRetries": 5
}
}
}
}
import com.azure.resourcemanager.apimanagement.models.BackendProperties;
import com.azure.resourcemanager.apimanagement.models.BackendProtocol;
import com.azure.resourcemanager.apimanagement.models.BackendServiceFabricClusterProperties;
import com.azure.resourcemanager.apimanagement.models.X509CertificateName;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/** Samples for Backend CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json
*/
/**
* Sample code: ApiManagementCreateBackendServiceFabric.
*
* @param manager Entry point to ApiManagementManager.
*/
public static void apiManagementCreateBackendServiceFabric(
com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
manager
.backends()
.define("sfbackend")
.withExistingService("rg1", "apimService1")
.withUrl("fabric:/mytestapp/mytestservice")
.withProtocol(BackendProtocol.HTTP)
.withDescription("Service Fabric Test App 1")
.withProperties(
new BackendProperties()
.withServiceFabricCluster(
new BackendServiceFabricClusterProperties()
.withClientCertificateId(
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1")
.withMaxPartitionResolutionRetries(5)
.withManagementEndpoints(Arrays.asList("https://somecluster.com"))
.withServerX509Names(
Arrays
.asList(
new X509CertificateName()
.withName("ServerCommonName1")
.withIssuerCertificateThumbprint("IssuerCertificateThumbprint1")))))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.apimanagement import ApiManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-apimanagement
# USAGE
python api_management_create_backend_service_fabric.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ApiManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.backend.create_or_update(
resource_group_name="rg1",
service_name="apimService1",
backend_id="sfbackend",
parameters={
"properties": {
"description": "Service Fabric Test App 1",
"properties": {
"serviceFabricCluster": {
"clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
"managementEndpoints": ["https://somecluster.com"],
"maxPartitionResolutionRetries": 5,
"serverX509Names": [
{"issuerCertificateThumbprint": "IssuerCertificateThumbprint1", "name": "ServerCommonName1"}
],
}
},
"protocol": "http",
"url": "fabric:/mytestapp/mytestservice",
}
},
)
print(response)
# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armapimanagement_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json
func ExampleBackendClient_CreateOrUpdate_apiManagementCreateBackendServiceFabric() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackendClient().CreateOrUpdate(ctx, "rg1", "apimService1", "sfbackend", armapimanagement.BackendContract{
Properties: &armapimanagement.BackendContractProperties{
Description: to.Ptr("Service Fabric Test App 1"),
Properties: &armapimanagement.BackendProperties{
ServiceFabricCluster: &armapimanagement.BackendServiceFabricClusterProperties{
ClientCertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
ManagementEndpoints: []*string{
to.Ptr("https://somecluster.com")},
MaxPartitionResolutionRetries: to.Ptr[int32](5),
ServerX509Names: []*armapimanagement.X509CertificateName{
{
Name: to.Ptr("ServerCommonName1"),
IssuerCertificateThumbprint: to.Ptr("IssuerCertificateThumbprint1"),
}},
},
},
URL: to.Ptr("fabric:/mytestapp/mytestservice"),
Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
},
}, &armapimanagement.BackendClientCreateOrUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BackendContract = armapimanagement.BackendContract{
// Name: to.Ptr("sfbackend"),
// Type: to.Ptr("Microsoft.ApiManagement/service/backends"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend"),
// Properties: &armapimanagement.BackendContractProperties{
// Description: to.Ptr("Service Fabric Test App 1"),
// Properties: &armapimanagement.BackendProperties{
// ServiceFabricCluster: &armapimanagement.BackendServiceFabricClusterProperties{
// ClientCertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
// ManagementEndpoints: []*string{
// to.Ptr("https://somecluster.com")},
// MaxPartitionResolutionRetries: to.Ptr[int32](5),
// ServerX509Names: []*armapimanagement.X509CertificateName{
// {
// Name: to.Ptr("ServerCommonName1"),
// IssuerCertificateThumbprint: to.Ptr("IssuerCertificateThumbprint1"),
// }},
// },
// },
// URL: to.Ptr("fabric:/mytestapp/mytestservice"),
// Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ApiManagementClient } = require("@azure/arm-apimanagement");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or Updates a backend.
*
* @summary Creates or Updates a backend.
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json
*/
async function apiManagementCreateBackendServiceFabric() {
const subscriptionId = process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1";
const serviceName = "apimService1";
const backendId = "sfbackend";
const parameters = {
description: "Service Fabric Test App 1",
properties: {
serviceFabricCluster: {
clientCertificateId:
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
managementEndpoints: ["https://somecluster.com"],
maxPartitionResolutionRetries: 5,
serverX509Names: [
{
name: "ServerCommonName1",
issuerCertificateThumbprint: "IssuerCertificateThumbprint1",
},
],
},
},
url: "fabric:/mytestapp/mytestservice",
protocol: "http",
};
const credential = new DefaultAzureCredential();
const client = new ApiManagementClient(credential, subscriptionId);
const result = await client.backend.createOrUpdate(
resourceGroupName,
serviceName,
backendId,
parameters
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend",
"type": "Microsoft.ApiManagement/service/backends",
"name": "sfbackend",
"properties": {
"description": "Service Fabric Test App 1",
"url": "fabric:/mytestapp/mytestservice",
"protocol": "http",
"properties": {
"serviceFabricCluster": {
"managementEndpoints": [
"https://somecluster.com"
],
"clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
"serverX509Names": [
{
"name": "ServerCommonName1",
"issuerCertificateThumbprint": "IssuerCertificateThumbprint1"
}
],
"maxPartitionResolutionRetries": 5
}
}
}
}
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend",
"type": "Microsoft.ApiManagement/service/backends",
"name": "sfbackend",
"properties": {
"description": "Service Fabric Test App 1",
"url": "fabric:/mytestapp/mytestservice",
"protocol": "http",
"properties": {
"serviceFabricCluster": {
"managementEndpoints": [
"https://somecluster.com"
],
"clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
"serverX509Names": [
{
"name": "ServerCommonName1",
"issuerCertificateThumbprint": "IssuerCertificateThumbprint1"
}
],
"maxPartitionResolutionRetries": 5
}
}
}
}
Definitionen
Informationen zum Autorisierungsheader.
Name |
Typ |
Beschreibung |
parameter
|
string
|
Authentifizierungsparameterwert.
|
scheme
|
string
|
Name des Authentifizierungsschemas.
|
BackendContract
Back-End-Details.
Name |
Typ |
Beschreibung |
id
|
string
|
Vollqualifizierte Ressourcen-ID für die Ressource. Beispiel: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
Der Name der Ressource
|
properties.credentials
|
BackendCredentialsContract
|
Eigenschaften des Back-End-Anmeldeinformationsvertrags
|
properties.description
|
string
|
Back-End-Beschreibung.
|
properties.properties
|
BackendProperties
|
Vertrag für Back-End-Eigenschaften
|
properties.protocol
|
BackendProtocol
|
Back-End-Kommunikationsprotokoll.
|
properties.proxy
|
BackendProxyContract
|
Vertragseigenschaften des Back-End-Gateways
|
properties.resourceId
|
string
|
Verwaltungs-URI der Ressource im externen System. Bei dieser URL kann es sich um die Arm-Ressourcen-ID von Logic Apps, Funktions-Apps oder API-Apps handeln.
|
properties.title
|
string
|
Back-End-Titel.
|
properties.tls
|
BackendTlsProperties
|
Back-End-TLS-Eigenschaften
|
properties.url
|
string
|
Laufzeit-URL des Back-Ends.
|
type
|
string
|
Der Typ der Ressource. Z.B. "Microsoft.Compute/virtualMachines" oder "Microsoft.Storage/storageAccounts"
|
BackendCredentialsContract
Details zu den Anmeldeinformationen, die zum Herstellen einer Verbindung mit dem Back-End verwendet werden.
Name |
Typ |
Beschreibung |
authorization
|
BackendAuthorizationHeaderCredentials
|
Autorisierungsheaderauthentifizierung
|
certificate
|
string[]
|
Liste der Clientzertifikatfingerabdrücke. Wird ignoriert, wenn certificatesIds bereitgestellt werden.
|
certificateIds
|
string[]
|
Liste der Clientzertifikat-IDs.
|
header
|
object
|
Beschreibung des Headerparameters.
|
query
|
object
|
Beschreibung des Abfrageparameters.
|
BackendProperties
Spezifische Eigenschaften für den Back-End-Typ.
BackendProtocol
Back-End-Kommunikationsprotokoll.
Name |
Typ |
Beschreibung |
http
|
string
|
Das Back-End ist ein RESTful-Dienst.
|
soap
|
string
|
Das Back-End ist ein SOAP-Dienst.
|
BackendProxyContract
Details zum Back-End-WebProxy-Server, der in der Anforderung an das Back-End verwendet werden soll.
Name |
Typ |
Beschreibung |
password
|
string
|
Kennwort zum Herstellen einer Verbindung mit dem WebProxy-Server
|
url
|
string
|
WebProxy Server AbsoluteUri-Eigenschaft, die den gesamten URI enthält, der im URI instance gespeichert ist, einschließlich aller Fragmente und Abfragezeichenfolgen.
|
username
|
string
|
Benutzername zum Herstellen einer Verbindung mit dem WebProxy-Server
|
BackendServiceFabricClusterProperties
Eigenschaften des Service Fabric-Typ-Back-Ends.
Name |
Typ |
Beschreibung |
clientCertificateId
|
string
|
Die Clientzertifikat-ID für den Verwaltungsendpunkt.
|
clientCertificatethumbprint
|
string
|
Der Fingerabdruck des Clientzertifikats für den Verwaltungsendpunkt. Wird ignoriert, wenn certificatesIds bereitgestellt werden.
|
managementEndpoints
|
string[]
|
Der Clusterverwaltungsendpunkt.
|
maxPartitionResolutionRetries
|
integer
|
Maximale Anzahl von Wiederholungsversuchen beim Auflösen der Partition.
|
serverCertificateThumbprints
|
string[]
|
Fingerabdruck von Zertifikaten, die der Clusterverwaltungsdienst für die TLS-Kommunikation verwendet
|
serverX509Names
|
X509CertificateName[]
|
Server X509-Zertifikatnamenauflistung
|
BackendTlsProperties
Eigenschaften, die die TLS-Zertifikatüberprüfung steuern.
Name |
Typ |
Standardwert |
Beschreibung |
validateCertificateChain
|
boolean
|
True
|
Flag, das angibt, ob die SSL-Zertifikatkette überprüft werden soll, wenn selbstsignierte Zertifikate für diesen Back-End-Host verwendet werden sollen.
|
validateCertificateName
|
boolean
|
True
|
Flag, das angibt, ob die SSL-Zertifikatnamenüberprüfung durchgeführt werden soll, wenn selbstsignierte Zertifikate für diesen Back-End-Host verwendet werden sollen.
|
ErrorFieldContract
Fehler Feldvertrag.
Name |
Typ |
Beschreibung |
code
|
string
|
Fehlercode auf Eigenschaftsebene.
|
message
|
string
|
Für Menschen lesbare Darstellung eines Fehlers auf Eigenschaftsebene.
|
target
|
string
|
Der Eigenschaftsname.
|
ErrorResponse
Fehlerantwort.
Name |
Typ |
Beschreibung |
error.code
|
string
|
Der vom Dienst definierte Fehlercode. Dieser Code dient als Unterstatus für den in der Antwort angegebenen HTTP-Fehlercode.
|
error.details
|
ErrorFieldContract[]
|
Die Liste der ungültigen Felder, die in der Anforderung gesendet werden, im Falle eines Validierungsfehlers.
|
error.message
|
string
|
Lesbare Darstellung des Fehlers.
|
X509CertificateName
Eigenschaften des Servers X509Names.
Name |
Typ |
Beschreibung |
issuerCertificateThumbprint
|
string
|
Fingerabdruck für den Aussteller des Zertifikats.
|
name
|
string
|
Allgemeiner Name des Zertifikats.
|