addApi
Method
interface AzureApiManagementResource { // ... omitted for brevity addApi( name: string, target: IComputeResource, path: string, displayName?: string, subscriptionRequired?: boolean, apiName?: string): AzureApiManagementApiResource;}Signature
method
addApi builderAdds an API that routes requests to an Aspire compute resource.
addApi( name: string, target: IComputeResource, path: string, displayName?: string, subscriptionRequired?: boolean, apiName?: string): AzureApiManagementApiResourceParameters
namestringThe globally unique Aspire resource name and default physical API name.targetIComputeResource The backend compute resource. It must expose an HTTP or HTTPS endpoint. Internal endpoints require the API Management service to have virtual network connectivity to the target.pathstringThe public path beneath the API Management gateway hostname.displayName stringoptionalThe API display name. The resource name is used when omitted.subscriptionRequired booleanoptional= TrueWhether callers must provide an API Management subscription key. The default is `true`.apiName stringoptionalThe physical API identifier in API Management. The Aspire resource name is used when omitted.Returns
AzureApiManagementApiResource Applies to
This method applies to the following types: