AzureApiManagementApiResource

Handle
📦 Aspire.Hosting.Azure.ApiManagement v17.0.0-preview.1.26567.5
interface AzureApiManagementApiResource
extends IResource,
IResourceWithParent,
AzureApiManagementResource]] {
addOperation(
name: string,
method: string,
urlTemplate: string,
displayName?: string,
operationName?: string): AzureApiManagementOperationResource;
withApiBackend(backend: AzureApiManagementBackendResource): AzureApiManagementApiResource;
withApiBackendPool(backend: AzureApiManagementBackendPoolResource): AzureApiManagementApiResource;
withApplicationInsights(
applicationInsights: AzureApplicationInsightsResource,
options?: AzureApiManagementDiagnosticOptions): AzureApiManagementApiResource;
withInboundPolicy(policyXml: string): AzureApiManagementApiResource;
withInboundPolicyFragment(fragment: AzureApiManagementPolicyFragmentResource): AzureApiManagementApiResource;
withOpenApiDocument(
documentPath: string,
format?: AzureApiManagementOpenApiFormat): AzureApiManagementApiResource;
withOpenApiEndpoint(
documentPath?: string,
endpointName?: string,
format?: AzureApiManagementOpenApiFormat): AzureApiManagementApiResource;
withPolicy(policyXml: string): AzureApiManagementApiResource;
}

Methods

methodaddOperationbuilder
Adds an explicitly modeled operation to an API.
addOperation(
name: string,
method: string,
urlTemplate: string,
displayName?: string,
operationName?: string): AzureApiManagementOperationResource
namestringThe globally unique Aspire resource name and default physical operation name.
methodstringThe HTTP method.
urlTemplatestringThe URL template relative to the API path.
displayNamestringoptionalThe operation display name. The resource name is used when omitted.
operationNamestringoptionalThe physical operation identifier in API Management. The Aspire resource name is used when omitted.
AzureApiManagementOperationResource
methodwithApiBackendbuilder
Configures an API to route requests to a backend.
withApiBackend(backend: AzureApiManagementBackendResource): AzureApiManagementApiResource
backendAzureApiManagementBackendResource
AzureApiManagementApiResource
methodwithApiBackendPoolbuilder
Configures an API to route requests to a backend pool.
withApiBackendPool(backend: AzureApiManagementBackendPoolResource): AzureApiManagementApiResource
backendAzureApiManagementBackendPoolResource
AzureApiManagementApiResource
Sends API-level API Management diagnostics to Application Insights.
withApplicationInsights(
applicationInsights: AzureApplicationInsightsResource,
options?: AzureApiManagementDiagnosticOptions): AzureApiManagementApiResource
applicationInsightsAzureApplicationInsightsResourceThe Application Insights resource.
optionsAzureApiManagementDiagnosticOptionsoptionalThe diagnostic options.
AzureApiManagementApiResource
methodwithInboundPolicybuilder
Appends an XML policy statement to the API-level inbound policy section.
withInboundPolicy(policyXml: string): AzureApiManagementApiResource
policyXmlstringOne or more well-formed APIM policy elements without a `policies` envelope.
AzureApiManagementApiResource
Includes a policy fragment in the API-level inbound policy.
withInboundPolicyFragment(fragment: AzureApiManagementPolicyFragmentResource): AzureApiManagementApiResource
fragmentAzureApiManagementPolicyFragmentResourceThe policy fragment to include.
AzureApiManagementApiResource
methodwithOpenApiDocumentbuilder
Imports an OpenAPI document from a file into an API.
withOpenApiDocument(
documentPath: string,
format?: AzureApiManagementOpenApiFormat): AzureApiManagementApiResource
documentPathstringThe document path, relative to the AppHost directory when not absolute.
formatAzureApiManagementOpenApiFormatoptionalThe document format. The file extension is used when omitted.
AzureApiManagementApiResource
methodwithOpenApiEndpointbuilder
Imports an OpenAPI document exposed by the API's target compute resource.
withOpenApiEndpoint(
documentPath?: string,
endpointName?: string,
format?: AzureApiManagementOpenApiFormat): AzureApiManagementApiResource
documentPathstringoptional= /openapi/v1.jsonThe absolute path of the OpenAPI endpoint, such as `/openapi/v1.json`.
endpointNamestringoptionalThe target endpoint name. An external HTTP or HTTPS endpoint is selected when omitted.
formatAzureApiManagementOpenApiFormatoptionalThe document format. The endpoint path extension is used when omitted.
AzureApiManagementApiResource
methodwithPolicybuilder
Replaces the complete API-level policy document.
withPolicy(policyXml: string): AzureApiManagementApiResource
policyXmlstringA complete APIM `policies` XML document.
AzureApiManagementApiResource