RadiusRecipeParameterExtensions Methods
ClassMethods2 members
Recipe-parameter configuration entry points for
RadiusEnvironmentResource . These extensions attach a recipe-parameter annotation to the environment that the publisher consumes to emit a parameters block on each recipe entry under Radius.Core/recipePacks (and the legacy Applications.Core/environments inline-recipes shape). WithRecipeParameters(IResourceBuilder<RadiusEnvironmentResource>, Action<IDictionary<string, object>>) Section titled WithRecipeParameters(IResourceBuilder<RadiusEnvironmentResource>, Action<IDictionary<string, object>>)extensionIResourceBuilder<RadiusEnvironmentResource> Declares recipe parameters applied to every recipe entry in the environment's recipe pack.
public static class RadiusRecipeParameterExtensions{ public static IResourceBuilder<RadiusEnvironmentResource> WithRecipeParameters( this IResourceBuilder<RadiusEnvironmentResource> builder, Action<IDictionary<string, object>> configure) { // ... }}Parameters
builderIResourceBuilder<RadiusEnvironmentResource> The Radius environment resource builder.configureAction<IDictionary<string, object>> Callback that populates the environment-wide parameter set. Repeated calls merge, with the later call winning per key. Returns
IResourceBuilder<RadiusEnvironmentResource> The same builder for chaining.Exceptions
ArgumentExceptionA parameter key is empty or whitespace.Remarks
Environment-wide parameters apply to every recipe entry in the environment's recipe pack. A parameter scoped to a specific resource type via
RadiusRecipeParameterExtensions.WithRecipeParameters overrides an environment-wide parameter of the same key for entries of that type. Examples
Apply an environment-wide recipe parameter and a provider reference:
var builder = DistributedApplication.CreateBuilder(args);builder.AddRadiusEnvironment("radius") .WithRecipeParameters(p => { p["tier"] = "standard"; p["region"] = RadiusProviderReference.AwsRegion; });WithRecipeParameters(IResourceBuilder<RadiusEnvironmentResource>, string, Action<IDictionary<string, object>>) Section titled WithRecipeParameters(IResourceBuilder<RadiusEnvironmentResource>, string, Action<IDictionary<string, object>>)extensionIResourceBuilder<RadiusEnvironmentResource> Declares recipe parameters applied only to recipe entries of the given Radius resource type (e.g.
Radius.Data/redisCaches ). These take precedence over environment-wide parameters of the same key for that type. public static class RadiusRecipeParameterExtensions{ public static IResourceBuilder<RadiusEnvironmentResource> WithRecipeParameters( this IResourceBuilder<RadiusEnvironmentResource> builder, string resourceType, Action<IDictionary<string, object>> configure) { // ... }}Parameters
builderIResourceBuilder<RadiusEnvironmentResource> The Radius environment resource builder.resourceType stringThe Radius resource type to scope the parameters to.configureAction<IDictionary<string, object>> Callback that populates the resource-type-scoped parameter set. Repeated calls for the same type merge, with the later call winning per key. Returns
IResourceBuilder<RadiusEnvironmentResource> The same builder for chaining.Exceptions
ArgumentExceptionresourceType is empty/whitespace, or a parameter key is empty or whitespace.