# AzureApiManagementResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.ApiManagement](/reference/api/csharp/aspire.hosting.azure.apimanagement.md)
- Version: `17.0.0-preview.1.26567.5`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.ApiManagement/AzureApiManagementResource.cs)
- Inherits: `AzureProvisioningResource`
- Implements: `IResource`, `IAzurePrivateEndpointTarget`

Represents an Azure API Management service.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureApiManagementResource
    : Aspire.Hosting.Azure.AzureProvisioningResource,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.Azure.IAzurePrivateEndpointTarget
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Azure.ApiManagement/AzureApiManagementResource`

## Remarks

API Management is provisioned in Azure and acts as a gateway for APIs added with [AzureApiManagementExtensions.AddApi(IResourceBuilder<AzureApiManagementResource>, string, IResourceBuilder<T>, string, string?, bool, string?)](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementextensions/methods.md#addapi-iresourcebuilder-azureapimanagementresource-string-iresourcebuilder-t-string-string-bool-string).

## Constructors

- [AzureApiManagementResource(string, AzureApiManagementOptions, Action<AzureResourceInfrastructure>)](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource/constructors.md#constructor-string-azureapimanagementoptions-action-azureresourceinfrastructure) -- Represents an Azure API Management service.

## Properties

- [GatewayUrl](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource/properties.md#gatewayurl) : `BicepOutputReference` `get` `ats ignored` -- Gets the default gateway URL output reference.
- [Id](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource/properties.md#id) : `BicepOutputReference` `get` `ats ignored` -- Gets the resource ID output reference.
- [Identity](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource/properties.md#identity) : `AzureUserAssignedIdentityResource` `get` `ats export` -- Gets the user-assigned managed identity used for backend authentication and Key Vault access.
- [NameOutputReference](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource/properties.md#nameoutputreference) : `BicepOutputReference` `get` `ats ignored` -- Gets the physical service name output reference.
- [Options](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource/properties.md#options) : [AzureApiManagementOptions](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementoptions.md) `get` -- Gets the configured service options.
- [PrincipalId](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource/properties.md#principalid) : `BicepOutputReference` `get` `ats ignored` -- Gets the user-assigned managed identity principal ID output reference.

## Methods

- [AddAsExistingResource(AzureResourceInfrastructure)](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementresource/methods.md#addasexistingresource-azureresourceinfrastructure) : `ProvisionableResource` -- Adds a new `Primitives.ProvisionableResource` into `infra`. The new resource represents a reference to the current `Azure.AzureProvisioningResource` via https://learn.microsoft.com/azure/azure-resource-manager/bicep/existing-resource.
