# AzureApiManagementResource.AddNamedValue

- 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`

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

## Definition

```go
type AzureApiManagementResource interface {
    // ... omitted for brevity
    AddNamedValue(
        name string,
        value string,
        options ...*AddNamedValueOptions,
    ) AzureApiManagementNamedValueResource
}
```

## Signature

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

## Defined on

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