# AzureApiManagementOperationResource

- Module: [Aspire.Hosting.Azure.ApiManagement](/reference/api/typescript/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 operation in an Azure API Management API.

## Definition

```typescript
interface AzureApiManagementOperationResource
  extends IResource,
    IResourceWithParent,
    AzureApiManagementApiResource]] {
  withInboundPolicy(policyXml: string): AzureApiManagementOperationResource;
  withInboundPolicyFragment(fragment: AzureApiManagementPolicyFragmentResource): AzureApiManagementOperationResource;
  withPolicy(policyXml: string): AzureApiManagementOperationResource;
}
```

## Methods

- [withInboundPolicy](/reference/api/typescript/aspire.hosting.azure.apimanagement/azureapimanagementoperationresource/withinboundpolicy.md) -- `method` -- Appends an XML policy statement to the operation-level inbound policy section.
    ```typescript
  withInboundPolicy(policyXml: string): AzureApiManagementOperationResource
  ```
- [withInboundPolicyFragment](/reference/api/typescript/aspire.hosting.azure.apimanagement/azureapimanagementoperationresource/withinboundpolicyfragment.md) -- `method` -- Includes a policy fragment in the operation-level inbound policy.
    ```typescript
  withInboundPolicyFragment(fragment: AzureApiManagementPolicyFragmentResource): AzureApiManagementOperationResource
  ```
- [withPolicy](/reference/api/typescript/aspire.hosting.azure.apimanagement/azureapimanagementoperationresource/withpolicy.md) -- `method` -- Replaces the complete operation-level policy document.
    ```typescript
  withPolicy(policyXml: string): AzureApiManagementOperationResource
  ```
