# AzureApiManagementApiResource Constructors

- Package: [Aspire.Hosting.Azure.ApiManagement](/reference/api/csharp/aspire.hosting.azure.apimanagement.md)
- Type: [AzureApiManagementApiResource](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementapiresource.md)
- Kind: `Constructors`
- Members: `1`

Represents an API hosted by an Azure API Management service.

<a id="constructor"></a>
<a id="constructor-string-string-string-string-bool-icomputeresource-azureapimanagementresource"></a>

## AzureApiManagementApiResource(string, string, string, string, bool, IComputeResource, AzureApiManagementResource)

- Name: `Constructor(string, string, string, string, bool, IComputeResource, AzureApiManagementResource)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.ApiManagement/AzureApiManagementApiResource.cs#L34-L37)

Initializes an API that routes to a compute resource.

```csharp
public class AzureApiManagementApiResource
{
    public AzureApiManagementApiResource(
        string name,
        string apiName,
        string path,
        string displayName,
        bool subscriptionRequired,
        IComputeResource target,
        AzureApiManagementResource parent)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the Aspire resource.
- `apiName` (`string`)
  The physical API name in API Management.
- `path` (`string`)
  The public gateway path for the API.
- `displayName` (`string`)
  The display name for the API.
- `subscriptionRequired` (`bool`)
  Whether callers must provide an API Management subscription key.
- `target` (`IComputeResource`)
  The backend compute resource.
- `parent` ([AzureApiManagementResource](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource.md))
  The parent API Management service.
