# AzureApiManagementApiResource

- Module: [Aspire.Hosting.Azure.ApiManagement](/reference/api/go/aspire.hosting.azure.apimanagement.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Represents an API hosted by an Azure API Management service.

## Definition

```go
type AzureApiManagementApiResource interface {
    Resource
    ResourceWithParent
}
```

## Embeds

- `Resource`
- `ResourceWithParent`

## Methods

- [AddOperation](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/addoperation.md) -- `method` -- Adds an explicitly modeled operation to an API.
  ```go
  AddOperation(name string, method string, urlTemplate string, options ...*AddOperationOptions) AzureApiManagementOperationResource
  ```
- [WithApiBackend](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/withapibackend.md) -- `method` -- Configures an API to route requests to a backend.
  ```go
  WithApiBackend(backend AzureApiManagementBackendResource) AzureApiManagementApiResource
  ```
- [WithApiBackendPool](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/withapibackendpool.md) -- `method` -- Configures an API to route requests to a backend pool.
  ```go
  WithApiBackendPool(backend AzureApiManagementBackendPoolResource) AzureApiManagementApiResource
  ```
- [WithApplicationInsights](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/withapplicationinsights.md) -- `method` -- Sends API-level API Management diagnostics to Application Insights.
  ```go
  WithApplicationInsights(applicationInsights AzureApplicationInsightsResource, options ...*AzureApiManagementDiagnosticOptions) AzureApiManagementApiResource
  ```
- [WithInboundPolicy](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/withinboundpolicy.md) -- `method` -- Appends an XML policy statement to the API-level inbound policy section.
  ```go
  WithInboundPolicy(policyXml string) AzureApiManagementApiResource
  ```
- [WithInboundPolicyFragment](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/withinboundpolicyfragment.md) -- `method` -- Includes a policy fragment in the API-level inbound policy.
  ```go
  WithInboundPolicyFragment(fragment AzureApiManagementPolicyFragmentResource) AzureApiManagementApiResource
  ```
- [WithOpenApiDocument](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/withopenapidocument.md) -- `method` -- Imports an OpenAPI document from a file into an API.
  ```go
  WithOpenApiDocument(documentPath string, options ...*WithOpenApiDocumentOptions) AzureApiManagementApiResource
  ```
- [WithOpenApiEndpoint](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/withopenapiendpoint.md) -- `method` -- Imports an OpenAPI document exposed by the API's target compute resource.
  ```go
  WithOpenApiEndpoint(options ...*WithOpenApiEndpointOptions) AzureApiManagementApiResource
  ```
- [WithPolicy](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource/withpolicy.md) -- `method` -- Replaces the complete API-level policy document.
  ```go
  WithPolicy(policyXml string) AzureApiManagementApiResource
  ```
