# WithInboundPolicy

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

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

## Definition

```go
func (AzureApiManagementApiResource) 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()`.

## Applies to

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