AzureApiManagementApiResource

Handle
📦 Aspire.Hosting.Azure.ApiManagement v17.0.0-preview.1.26567.5

Represents an API hosted by an Azure API Management service.

type AzureApiManagementApiResource interface {
Resource
ResourceWithParent
}

Methods

methodAddOperationbuilder
Adds an explicitly modeled operation to an API.
AddOperation(
name string,
method string,
urlTemplate string,
options ...*AddOperationOptions,
) AzureApiManagementOperationResource
namestringThe globally unique Aspire resource name and default physical operation name.
methodstringThe HTTP method.
urlTemplatestringThe URL template relative to the API path.
options...*AddOperationOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddOperationOptions argument.

DisplayName*stringThe operation display name. The resource name is used when omitted.
OperationName*stringThe physical operation identifier in API Management. The Aspire resource name is used when omitted.
AzureApiManagementOperationResource

A builder for the operation resource.

Returns a handle; failures surface later via Err().

methodWithApiBackendbuilder
Configures an API to route requests to a backend.
WithApiBackend(backend AzureApiManagementBackendResource) AzureApiManagementApiResource
backendAzureApiManagementBackendResource
AzureApiManagementApiResource

Returns a handle; failures surface later via Err().

methodWithApiBackendPoolbuilder
Configures an API to route requests to a backend pool.
WithApiBackendPool(backend AzureApiManagementBackendPoolResource) AzureApiManagementApiResource
backendAzureApiManagementBackendPoolResource
AzureApiManagementApiResource

Returns a handle; failures surface later via Err().

Sends API-level API Management diagnostics to Application Insights.
WithApplicationInsights(
applicationInsights AzureApplicationInsightsResource,
options ...*AzureApiManagementDiagnosticOptions,
) AzureApiManagementApiResource
applicationInsightsAzureApplicationInsightsResourceThe Application Insights resource.
options...*AzureApiManagementDiagnosticOptionsOptional settings, described under Options.

Optional parameters are passed as the existing *AzureApiManagementDiagnosticOptions struct.

AzureApiManagementApiResource

The resource builder.

Returns a handle; failures surface later via Err().

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

The resource builder.

Returns a handle; failures surface later via Err().

Includes a policy fragment in the API-level inbound policy.
WithInboundPolicyFragment(fragment AzureApiManagementPolicyFragmentResource) AzureApiManagementApiResource
fragmentAzureApiManagementPolicyFragmentResourceThe policy fragment to include.
AzureApiManagementApiResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithOpenApiDocumentbuilder
Imports an OpenAPI document from a file into an API.
WithOpenApiDocument(
documentPath string,
options ...*WithOpenApiDocumentOptions,
) AzureApiManagementApiResource
documentPathstringThe document path, relative to the AppHost directory when not absolute.
options...*WithOpenApiDocumentOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithOpenApiDocumentOptions argument.

Format*AzureApiManagementOpenApiFormatThe document format. The file extension is used when omitted.
AzureApiManagementApiResource

The API Management API resource builder.

Returns a handle; failures surface later via Err().

methodWithOpenApiEndpointbuilder
Imports an OpenAPI document exposed by the API's target compute resource.
WithOpenApiEndpoint(options ...*WithOpenApiEndpointOptions) AzureApiManagementApiResource
options...*WithOpenApiEndpointOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithOpenApiEndpointOptions argument.

DocumentPath*stringThe absolute path of the OpenAPI endpoint, such as /openapi/v1.json.
EndpointName*stringThe target endpoint name. An external HTTP or HTTPS endpoint is selected when omitted.
Format*AzureApiManagementOpenApiFormatThe document format. The endpoint path extension is used when omitted.
AzureApiManagementApiResource

The API Management API resource builder.

Returns a handle; failures surface later via Err().

methodWithPolicybuilder
Replaces the complete API-level policy document.
WithPolicy(policyXml string) AzureApiManagementApiResource
policyXmlstringA complete APIM policies XML document.
AzureApiManagementApiResource

The resource builder.

Returns a handle; failures surface later via Err().