# AzureApiManagementResource.WithInboundPolicy

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

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

## Definition

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

## Signature

```go
WithInboundPolicy(policyXml string) AzureApiManagementResource
```

## Parameters

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

## Returns

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

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

## Defined on

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