# AddNamedValue

- 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: [`AzureApiManagementResource`](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Adds a non-secret named value to the API Management service.

## Definition

```go
func (AzureApiManagementResource) AddNamedValue(
    name string,
    value string,
    options ...*AddNamedValueOptions,
) AzureApiManagementNamedValueResource
```

## Parameters

- `name` (`string`) -- The globally unique Aspire resource name and default physical named-value name.
- `value` (`string`) -- The named value.
- `options` (`...*AddNamedValueOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddNamedValueOptions` argument.

- `DisplayName` (`*string`) -- The name used to reference the value in policies. The resource name is used when omitted.
- `NamedValueName` (`*string`) -- The physical named-value identifier in API Management. The resource name is used when omitted.
- `Tags` (`[]string`) -- Tags used to organize the named value.

## Returns

[`AzureApiManagementNamedValueResource`](/reference/api/go/aspire.hosting.azure.apimanagement/azureapimanagementnamedvalueresource.md) -- A builder for the named-value resource.

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

## Applies to

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