# AzureApiManagementApiResource.WithInboundPolicy

- Module: [Aspire.Hosting.Azure.ApiManagement](/reference/api/go/aspire.hosting.azure.apimanagement.md)
- Defined on: [AzureApiManagementApiResource](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

Appends an XML policy statement to the API-level inbound policy section.

## Definition

```go
type AzureApiManagementApiResource interface {
    // ... omitted for brevity
    WithInboundPolicy(policyXml string) AzureApiManagementApiResource
}
```

## Signature

```go
WithInboundPolicy(policyXml string) AzureApiManagementApiResource
```

## Parameters

- `policyXml` (`string`) -- One or more well-formed APIM policy elements without a `policies` envelope.

## Returns

[`AzureApiManagementApiResource`](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource.md) -- The resource builder.

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

## Defined on

- [AzureApiManagementApiResource](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementapiresource.md) -- `handle`
