# AzureApiManagementResource.AddSecretNamedValue

- 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 secret parameter as a named value in the API Management service.

## Definition

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

## Signature

```go
AddSecretNamedValue(
    name string,
    value ParameterResource,
    options ...*AddSecretNamedValueOptions,
) AzureApiManagementNamedValueResource
```

## Parameters

- `name` (`string`) -- The globally unique Aspire resource name and default physical named-value name.
- `value` (`ParameterResource`) -- The secret parameter containing the named value.
- `options` (`...*AddSecretNamedValueOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddSecretNamedValueOptions` 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`
