AzureApiManagementApiResource
Handle
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;}9 members
Methods
Adds an explicitly modeled operation to an API.
addOperation( name: string, method: string, urlTemplate: string, displayName?: string, operationName?: string): AzureApiManagementOperationResourceParameters
namestringThe globally unique Aspire resource name and default physical operation name.methodstringThe HTTP method.urlTemplate stringThe URL template relative to the API path.displayName stringoptionalThe operation display name. The resource name is used when omitted.operationName stringoptionalThe physical operation identifier in API Management. The Aspire resource name is used when omitted.Returns
AzureApiManagementOperationResource Configures an API to route requests to a backend.
withApiBackend(backend: AzureApiManagementBackendResource): AzureApiManagementApiResourceParameters
backendAzureApiManagementBackendResource Returns
AzureApiManagementApiResource Configures an API to route requests to a backend pool.
withApiBackendPool(backend: AzureApiManagementBackendPoolResource): AzureApiManagementApiResourceParameters
backendAzureApiManagementBackendPoolResource Returns
AzureApiManagementApiResource Sends API-level API Management diagnostics to Application Insights.
withApplicationInsights( applicationInsights: AzureApplicationInsightsResource, options?: AzureApiManagementDiagnosticOptions): AzureApiManagementApiResourceParameters
applicationInsights AzureApplicationInsightsResource The Application Insights resource.optionsAzureApiManagementDiagnosticOptions optionalThe diagnostic options.Returns
AzureApiManagementApiResource Appends an XML policy statement to the API-level inbound policy section.
withInboundPolicy(policyXml: string): AzureApiManagementApiResourceParameters
policyXml stringOne or more well-formed APIM policy elements without a `policies` envelope.Returns
AzureApiManagementApiResource Includes a policy fragment in the API-level inbound policy.
withInboundPolicyFragment(fragment: AzureApiManagementPolicyFragmentResource): AzureApiManagementApiResourceParameters
fragmentAzureApiManagementPolicyFragmentResource The policy fragment to include.Returns
AzureApiManagementApiResource Imports an OpenAPI document from a file into an API.
withOpenApiDocument( documentPath: string, format?: AzureApiManagementOpenApiFormat): AzureApiManagementApiResourceParameters
documentPath stringThe document path, relative to the AppHost directory when not absolute.formatAzureApiManagementOpenApiFormat optionalThe document format. The file extension is used when omitted.Returns
AzureApiManagementApiResource Imports an OpenAPI document exposed by the API's target compute resource.
withOpenApiEndpoint( documentPath?: string, endpointName?: string, format?: AzureApiManagementOpenApiFormat): AzureApiManagementApiResourceParameters
documentPath stringoptional= /openapi/v1.jsonThe absolute path of the OpenAPI endpoint, such as `/openapi/v1.json`.endpointName stringoptionalThe target endpoint name. An external HTTP or HTTPS endpoint is selected when omitted.formatAzureApiManagementOpenApiFormat optionalThe document format. The endpoint path extension is used when omitted.Returns
AzureApiManagementApiResource Replaces the complete API-level policy document.
withPolicy(policyXml: string): AzureApiManagementApiResourceParameters
policyXml stringA complete APIM `policies` XML document.Returns
AzureApiManagementApiResource