1879 references to IResourceBuilder
Aspire.Hosting (257)
ContainerResourceBuilderExtensions.cs (76)
20/// <returns>The <see cref="IResourceBuilder{T}"/> for chaining.</returns>
21public static IResourceBuilder<ContainerResource> AddContainer(this IDistributedApplicationBuilder builder, [ResourceName] string name, string image)
37/// <returns>The <see cref="IResourceBuilder{T}"/> for chaining.</returns>
38public static IResourceBuilder<ContainerResource> AddContainer(this IDistributedApplicationBuilder builder, [ResourceName] string name, string image, string tag)
58/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
59public static IResourceBuilder<T> WithVolume<T>(this IResourceBuilder<T> builder, string? name, string target, bool isReadOnly = false) where T : ContainerResource
74/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
75public static IResourceBuilder<T> WithVolume<T>(this IResourceBuilder<T> builder, string target) where T : ContainerResource
92/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
93public static IResourceBuilder<T> WithBindMount<T>(this IResourceBuilder<T> builder, string source, string target, bool isReadOnly = false) where T : ContainerResource
109/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
110public static IResourceBuilder<T> WithEntrypoint<T>(this IResourceBuilder<T> builder, string entrypoint) where T : ContainerResource
126public static IResourceBuilder<T> WithImageTag<T>(this IResourceBuilder<T> builder, string tag) where T : ContainerResource
147public static IResourceBuilder<T> WithImageRegistry<T>(this IResourceBuilder<T> builder, string? registry) where T : ContainerResource
168public static IResourceBuilder<T> WithImage<T>(this IResourceBuilder<T> builder, string image, string tag = "latest") where T : ContainerResource
194public static IResourceBuilder<T> WithImageSHA256<T>(this IResourceBuilder<T> builder, string sha256) where T : ContainerResource
212/// This is intended to pass additional arguments to the underlying container runtime run command to enable advanced features such as exposing GPUs to the container. To pass runtime arguments to the actual container, use the <see cref="ResourceBuilderExtensions.WithArgs{T}(IResourceBuilder{T}, string[])"/> method.
217/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
218public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, params string[] args) where T : ContainerResource
229/// This is intended to pass additional arguments to the underlying container runtime run command to enable advanced features such as exposing GPUs to the container. To pass runtime arguments to the actual container, use the <see cref="ResourceBuilderExtensions.WithArgs{T}(IResourceBuilder{T}, Action{CommandLineArgsCallbackContext})"/> method.
234/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
235public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Action<ContainerRuntimeArgsCallbackContext> callback) where T : ContainerResource
251/// This is intended to pass additional arguments to the underlying container runtime run command to enable advanced features such as exposing GPUs to the container. To pass runtime arguments to the actual container, use the <see cref="ResourceBuilderExtensions.WithArgs{T}(IResourceBuilder{T}, Func{CommandLineArgsCallbackContext, Task})"/> method.
256/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
257public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Func<ContainerRuntimeArgsCallbackContext, Task> callback) where T : ContainerResource
272/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
281public static IResourceBuilder<T> WithLifetime<T>(this IResourceBuilder<T> builder, ContainerLifetime lifetime) where T : ContainerResource
288private static IResourceBuilder<T> ThrowResourceIsNotContainer<T>(IResourceBuilder<T> builder) where T : ContainerResource
297/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
298public static IResourceBuilder<T> PublishAsContainer<T>(this IResourceBuilder<T> builder) where T : ContainerResource
309/// <param name="builder">The <see cref="IResourceBuilder{T}"/>.</param>
313/// <returns>A <see cref="IResourceBuilder{T}"/>.</returns>
326/// When generating the manifest for deployment tools, the <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>
340public static IResourceBuilder<T> WithDockerfile<T>(this IResourceBuilder<T> builder, string contextPath, string? dockerfilePath = null, string? stage = null) where T : ContainerResource
377/// <returns>A <see cref="IResourceBuilder{ContainerResource}"/>.</returns>
398public static IResourceBuilder<ContainerResource> AddDockerfile(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, string? dockerfilePath = null, string? stage = null)
421public static IResourceBuilder<T> WithContainerName<T>(this IResourceBuilder<T> builder, string name) where T : ContainerResource
438/// Thrown when <see cref="ContainerResourceBuilderExtensions.WithBuildArg{T}(IResourceBuilder{T}, string, object)"/> is
439/// called before <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>.
443/// The <see cref="ContainerResourceBuilderExtensions.WithBuildArg{T}(IResourceBuilder{T}, string, object)"/> extension method
445/// <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>.
457public static IResourceBuilder<T> WithBuildArg<T>(this IResourceBuilder<T> builder, string name, object value) where T : ContainerResource
484/// Thrown when <see cref="ContainerResourceBuilderExtensions.WithBuildArg{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/> is
485/// called before <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>.
489/// The <see cref="ContainerResourceBuilderExtensions.WithBuildArg{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/> extension method
491/// <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>.
504public static IResourceBuilder<T> WithBuildArg<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) where T : ContainerResource
527/// Thrown when <see cref="ContainerResourceBuilderExtensions.WithBuildSecret{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/> is
528/// called before <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>.
532/// The <see cref="ContainerResourceBuilderExtensions.WithBuildSecret{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/> extension method
547public static IResourceBuilder<T> WithBuildSecret<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) where T : ContainerResource
ParameterResourceBuilderExtensions.cs (15)
25public static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, [ResourceName] string name, bool secret = false)
45public static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, [ResourceName] string name, string value, bool publishValueAsDefault = false, bool secret = false)
66public static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, string name, Func<string> valueGetter, bool publishValueAsDefault = false, bool secret = false)
95public static IResourceBuilder<ParameterResource> AddParameterFromConfiguration(this IDistributedApplicationBuilder builder, string name, string configurationKey, bool secret = false)
122public static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, [ResourceName] string name, ParameterDefault value, bool secret = false, bool persist = false)
149internal static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder,
210/// Adds a parameter to the distributed application but wrapped in a resource with a connection string for use with <see cref="ResourceBuilderExtensions.WithReference{TDestination}(IResourceBuilder{TDestination}, IResourceBuilder{IResourceWithConnectionString}, string?, bool)"/>
217public static IResourceBuilder<IResourceWithConnectionString> AddConnectionString(this IDistributedApplicationBuilder builder, [ResourceName] string name, string? environmentVariableName = null)
222var parameterBuilder = builder.AddParameter(name, _ =>
238/// <returns>The configured <see cref="IResourceBuilder{T}"/>.</returns>
239public static IResourceBuilder<T> PublishAsConnectionString<T>(this IResourceBuilder<T> builder)
251/// <param name="builder">The <see cref="IResourceBuilder{T}"/>.</param>
252public static void ConfigureConnectionStringManifestPublisher(IResourceBuilder<IResourceWithConnectionString> builder)
ProjectResourceBuilderExtensions.cs (29)
28/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
61public static IResourceBuilder<ProjectResource> AddProject<TProject>(this IDistributedApplicationBuilder builder, [ResourceName] string name) where TProject : IProjectMetadata, new()
75/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
94public static IResourceBuilder<ProjectResource> AddProject(this IDistributedApplicationBuilder builder, [ResourceName] string name, string projectPath)
111/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
141public static IResourceBuilder<ProjectResource> AddProject<TProject>(this IDistributedApplicationBuilder builder, [ResourceName] string name, string? launchProfileName) where TProject : IProjectMetadata, new()
160/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
179public static IResourceBuilder<ProjectResource> AddProject(this IDistributedApplicationBuilder builder, [ResourceName] string name, string projectPath, string? launchProfileName)
199/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
228public static IResourceBuilder<ProjectResource> AddProject<TProject>(this IDistributedApplicationBuilder builder, [ResourceName] string name, Action<ProjectResourceOptions> configure) where TProject : IProjectMetadata, new()
250/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
268public static IResourceBuilder<ProjectResource> AddProject(this IDistributedApplicationBuilder builder, [ResourceName] string name, string projectPath, Action<ProjectResourceOptions> configure)
287private static IResourceBuilder<ProjectResource> WithProjectDefaults(this IResourceBuilder<ProjectResource> builder, ProjectResourceOptions options)
541/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
546/// reverse proxy for each process. When <see cref="WithReplicas(IResourceBuilder{ProjectResource}, int)"/> is
563public static IResourceBuilder<ProjectResource> WithReplicas(this IResourceBuilder<ProjectResource> builder, int replicas)
575/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
584/// into the project and set to true. If the <see cref="DisableForwardedHeaders(IResourceBuilder{ProjectResource})"/>
597public static IResourceBuilder<ProjectResource> DisableForwardedHeaders(this IResourceBuilder<ProjectResource> builder)
611/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
612public static IResourceBuilder<ProjectResource> WithEndpointsInEnvironment(
613this IResourceBuilder<ProjectResource> builder, Func<EndpointAnnotation, bool> filter)
644private static void SetAspNetCoreUrls(this IResourceBuilder<ProjectResource> builder)
691private static void SetBothPortsEnvVariables(this IResourceBuilder<ProjectResource> builder)
700private static void SetOnePortsEnvVariable(this IResourceBuilder<ProjectResource> builder, EnvironmentCallbackContext context, string portEnvVariable, string scheme)
735private static void SetKestrelUrlOverrideEnvVariables(this IResourceBuilder<ProjectResource> builder)
ResourceBuilderExtensions.cs (106)
29public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, string? value) where T : IResourceWithEnvironment
45public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, in ReferenceExpression.ExpressionInterpolatedStringHandler value)
67public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, ReferenceExpression value)
88public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, Func<string> callback) where T : IResourceWithEnvironment
104public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, Action<EnvironmentCallbackContext> callback) where T : IResourceWithEnvironment
119public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, Func<EnvironmentCallbackContext, Task> callback) where T : IResourceWithEnvironment
135public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, EndpointReference endpointReference) where T : IResourceWithEnvironment
155public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> parameter) where T : IResourceWithEnvironment
174/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
175public static IResourceBuilder<T> WithEnvironment<T>(
176this IResourceBuilder<T> builder,
178IResourceBuilder<IResourceWithConnectionString> resource)
197/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
198public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, params string[] args) where T : IResourceWithArgs
212/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
213public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, params object[] args) where T : IResourceWithArgs
227/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
228public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, Action<CommandLineArgsCallbackContext> callback) where T : IResourceWithArgs
246/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
247public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, Func<CommandLineArgsCallbackContext, Task> callback) where T : IResourceWithArgs
261/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
262public static IResourceBuilder<T> WithManifestPublishingCallback<T>(this IResourceBuilder<T> builder, Action<ManifestPublishingContext> callback) where T : IResource
277/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
278public static IResourceBuilder<T> WithManifestPublishingCallback<T>(this IResourceBuilder<T> builder, Func<ManifestPublishingContext, Task> callback) where T : IResource
293/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
294public static IResourceBuilder<T> WithConnectionStringRedirection<T>(this IResourceBuilder<T> builder, IResourceWithConnectionString resource) where T : IResourceWithConnectionString
342/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
343public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<IResourceWithConnectionString> source, string? connectionName = null, bool optional = false)
367/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
368public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<IResourceWithServiceDiscovery> source)
386/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
387public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, string name, Uri uri)
414/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
415public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, EndpointReference endpointReference)
425private static void ApplyEndpoints<T>(this IResourceBuilder<T> builder, IResourceWithEndpoints resourceWithEndpoints, string? endpointName = null)
466public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string endpointName, Action<EndpointAnnotation> callback, bool createIfNotExists = true) where T : IResourceWithEndpoints
497/// Exposes an endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string)"/>.
509/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
512public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, string? scheme = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true, bool? isExternal = null) where T : IResourceWithEndpoints
547/// Exposes an HTTP endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string)"/>.
557/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
559public static IResourceBuilder<T> WithHttpEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true) where T : IResourceWithEndpoints
567/// Exposes an HTTPS endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string)"/>.
577/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
579public static IResourceBuilder<T> WithHttpsEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true) where T : IResourceWithEndpoints
592public static IResourceBuilder<T> WithExternalHttpEndpoints<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints
613/// Gets an <see cref="EndpointReference"/> by name from the resource. These endpoints are declared either using <see cref="WithEndpoint{T}(IResourceBuilder{T}, int?, int?, string?, string?, string?, bool, bool?)"/> or by launch settings (for project resources).
614/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>.
620public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints
632/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
633public static IResourceBuilder<T> AsHttp2Service<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints
645/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
646public static IResourceBuilder<T> ExcludeFromManifest<T>(this IResourceBuilder<T> builder) where T : IResource
664/// resources, calling <see cref="WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> also results
667/// <para>The <see cref="WithHealthCheck{T}(IResourceBuilder{T}, string)"/> method can be used to associate
680public static IResourceBuilder<T> WaitFor<T>(this IResourceBuilder<T> builder, IResourceBuilder<IResource> dependency) where T : IResourceWithWaitSupport
700var parentBuilder = builder.ApplicationBuilder.CreateResourceBuilder(dependencyResourceWithParent.Parent);
733public static IResourceBuilder<T> WaitForCompletion<T>(this IResourceBuilder<T> builder, IResourceBuilder<IResource> dependency, int exitCode = 0) where T : IResourceWithWaitSupport
760/// The <see cref="WithHealthCheck{T}(IResourceBuilder{T}, string)"/> method is used in conjunction with
761/// the <see cref="WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> to associate a resource
762/// registered in the application hosts dependency injection container. The <see cref="WithHealthCheck{T}(IResourceBuilder{T}, string)"/>
787public static IResourceBuilder<T> WithHealthCheck<T>(this IResourceBuilder<T> builder, string key) where T : IResource
831public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints
844internal static IResourceBuilder<T> WithHttpHealthCheckInternal<T>(this IResourceBuilder<T> builder, string desiredScheme, string endpointName, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints
926public static IResourceBuilder<T> WithHttpsHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints
974public static IResourceBuilder<T> WithCommand<T>(
975this IResourceBuilder<T> builder,
Aspire.Hosting.AWS (88)
CDK\CDKExtensions.cs (16)
24public static IResourceBuilder<IStackResource> AddAWSCDKStack(this IDistributedApplicationBuilder builder, [ResourceName] string name)
34public static IResourceBuilder<IStackResource> AddAWSCDKStack(this IDistributedApplicationBuilder builder, [ResourceName] string name,
56public static IResourceBuilder<IStackResource<T>> AddAWSCDKStack<T>(this IDistributedApplicationBuilder builder,
79public static IResourceBuilder<IConstructResource<T>> AddConstruct<T>(
80this IResourceBuilder<IResourceWithConstruct> builder, [ResourceName] string name,
114public static IResourceBuilder<IStackResource<TStack>> AddOutput<TStack>(
115this IResourceBuilder<IStackResource<TStack>> builder,
140public static IResourceBuilder<IConstructResource<T>> AddOutput<T>(
141this IResourceBuilder<IConstructResource<T>> builder,
154public static StackOutputReference GetOutput<T>(this IResourceBuilder<IConstructResource<T>> builder, string name, ConstructOutputDelegate<T> output)
178public static IResourceBuilder<TDestination> WithReference<TDestination, TConstruct>(this IResourceBuilder<TDestination> builder, IResourceBuilder<IResourceWithConstruct<TConstruct>> construct, ConstructOutputDelegate<TConstruct> outputDelegate, string outputName, string? configSection = null)
204public static IResourceBuilder<TDestination> WithEnvironment<TDestination, TConstruct>(this IResourceBuilder<TDestination> builder, string name, IResourceBuilder<IResourceWithConstruct<TConstruct>> construct, ConstructOutputDelegate<TConstruct> outputDelegate, string? outputName = default)
CDK\Resources\S3ResourceExtensions.cs (20)
28public static IResourceBuilder<IConstructResource<Bucket>> AddS3Bucket(this IResourceBuilder<IStackResource> builder, [ResourceName] string name, IBucketProps? props = null)
38public static IResourceBuilder<IConstructResource<Bucket>> AddEventNotification(this IResourceBuilder<IConstructResource<Bucket>> builder, IResourceBuilder<IConstructResource<IQueue>> destination, EventType eventType, params INotificationKeyFilter[] filters)
48public static IResourceBuilder<IConstructResource<Bucket>> AddObjectCreatedNotification(this IResourceBuilder<IConstructResource<Bucket>> builder, IResourceBuilder<IConstructResource<IQueue>> destination, params INotificationKeyFilter[] filters)
58public static IResourceBuilder<IConstructResource<Bucket>> AddObjectCreatedNotification(this IResourceBuilder<IConstructResource<Bucket>> builder, IResourceBuilder<IConstructResource<ITopic>> destination, params INotificationKeyFilter[] filters)
68public static IResourceBuilder<IConstructResource<Bucket>> AddObjectRemovedNotification(this IResourceBuilder<IConstructResource<Bucket>> builder, IResourceBuilder<IConstructResource<IQueue>> destination, params INotificationKeyFilter[] filters)
78public static IResourceBuilder<IConstructResource<Bucket>> AddObjectRemovedNotification(this IResourceBuilder<IConstructResource<Bucket>> builder, IResourceBuilder<IConstructResource<ITopic>> destination, params INotificationKeyFilter[] filters)
90public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<IConstructResource<Bucket>> bucket, string? configSection = null)
CloudFormation\CloudFormationExtensions.cs (15)
25public static IResourceBuilder<ICloudFormationTemplateResource> AddAWSCloudFormationTemplate(this IDistributedApplicationBuilder builder, [ResourceName] string name, string templatePath, string? stackName = null)
46public static IResourceBuilder<ICloudFormationTemplateResource> WithParameter(this IResourceBuilder<ICloudFormationTemplateResource> builder, string parameterName, string parameterValue)
59public static IResourceBuilder<ICloudFormationStackResource> AddAWSCloudFormationStack(this IDistributedApplicationBuilder builder, [ResourceName] string name, string? stackName = null)
79public static StackOutputReference GetOutput(this IResourceBuilder<ICloudFormationResource> builder, string name)
91/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
92public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, StackOutputReference stackOutputReference)
124public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IAWSSDKConfig awsSdkConfig)
137public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IAmazonCloudFormation cloudFormationClient)
152public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<ICloudFormationResource> cloudFormationResourceBuilder, string configSection = Constants.DefaultConfigSection)
Aspire.Hosting.AWS.Tests (10)
Aspire.Hosting.Azure (56)
AzureBicepResourceExtensions.cs (47)
22/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
23public static IResourceBuilder<AzureBicepResource> AddBicepTemplate(this IDistributedApplicationBuilder builder, [ResourceName] string name, string bicepFile)
39/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
40public static IResourceBuilder<AzureBicepResource> AddBicepTemplateString(this IDistributedApplicationBuilder builder, [ResourceName] string name, string bicepContent)
55public static BicepOutputReference GetOutput(this IResourceBuilder<AzureBicepResource> builder, string name)
66public static BicepSecretOutputReference GetSecretOutput(this IResourceBuilder<AzureBicepResource> builder, string name)
78/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
79public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, BicepOutputReference bicepOutputReference)
95/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
96public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, BicepSecretOutputReference bicepOutputReference)
111/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
112public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name)
127/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
128public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, string value)
143/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
144public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, IEnumerable<string> value)
159/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
160public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, JsonNode value)
175/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
176public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, Func<object?> valueCallback)
191/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
192public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value)
205/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
206public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, ParameterResource value)
221/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
222public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<IResourceWithConnectionString> value)
237/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
238public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, BicepOutputReference value)
253/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
254public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, ReferenceExpression value)
269/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
270public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, EndpointReference value)
Aspire.Hosting.Azure.AppConfiguration (2)
Aspire.Hosting.Azure.AppContainers (16)
ContainerAppExtensions.cs (12)
26/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> extension method
28/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> method is used
29/// in conjunction with the <see cref="AzureContainerAppContainerExtensions.PublishAsAzureContainerApp{T}(IResourceBuilder{T}, Action{AzureResourceInfrastructure, ContainerApp})"/>
31/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> method takes
43/// passing them to the <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/>
44/// method via the <see cref="AzureContainerAppContainerExtensions.PublishAsAzureContainerApp{T}(IResourceBuilder{T}, Action{AzureResourceInfrastructure, ContainerApp})"/>
58public static void ConfigureCustomDomain(this ContainerApp app, IResourceBuilder<ParameterResource> customDomain, IResourceBuilder<ParameterResource> certificateName)
Aspire.Hosting.Azure.ApplicationInsights (5)
Aspire.Hosting.Azure.CognitiveServices (5)
Aspire.Hosting.Azure.CosmosDB (17)
Aspire.Hosting.Azure.EventHubs (15)
Aspire.Hosting.Azure.Functions (11)
Aspire.Hosting.Azure.KeyVault (2)
Aspire.Hosting.Azure.OperationalInsights (2)
Aspire.Hosting.Azure.PostgreSQL (32)
Aspire.Hosting.Azure.Redis (22)
Aspire.Hosting.Azure.Search (2)
Aspire.Hosting.Azure.ServiceBus (9)
Aspire.Hosting.Azure.SignalR (2)
Aspire.Hosting.Azure.Sql (23)
Aspire.Hosting.Azure.Storage (28)
AzureStorageExtensions.cs (28)
27public static IResourceBuilder<AzureStorageResource> AddAzureStorage(this IDistributedApplicationBuilder builder, [ResourceName] string name)
89/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
90public static IResourceBuilder<AzureStorageResource> RunAsEmulator(this IResourceBuilder<AzureStorageResource> builder, Action<IResourceBuilder<AzureStorageEmulatorResource>>? configureContainer = null)
133var surrogateBuilder = builder.ApplicationBuilder.CreateResourceBuilder(surrogate);
159public static IResourceBuilder<AzureStorageEmulatorResource> WithDataBindMount(this IResourceBuilder<AzureStorageEmulatorResource> builder, string? path = null, bool isReadOnly = false)
169public static IResourceBuilder<AzureStorageEmulatorResource> WithDataVolume(this IResourceBuilder<AzureStorageEmulatorResource> builder, string? name = null, bool isReadOnly = false)
178public static IResourceBuilder<AzureStorageEmulatorResource> WithBlobPort(this IResourceBuilder<AzureStorageEmulatorResource> builder, int port)
192public static IResourceBuilder<AzureStorageEmulatorResource> WithQueuePort(this IResourceBuilder<AzureStorageEmulatorResource> builder, int port)
206public static IResourceBuilder<AzureStorageEmulatorResource> WithTablePort(this IResourceBuilder<AzureStorageEmulatorResource> builder, int port)
217/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param>
219/// <returns>An <see cref="IResourceBuilder{T}"/> for the <see cref="AzureBlobStorageResource"/>.</returns>
220public static IResourceBuilder<AzureBlobStorageResource> AddBlobs(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name)
229/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param>
231/// <returns>An <see cref="IResourceBuilder{T}"/> for the <see cref="AzureTableStorageResource"/>.</returns>
232public static IResourceBuilder<AzureTableStorageResource> AddTables(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name)
241/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param>
243/// <returns>An <see cref="IResourceBuilder{T}"/> for the <see cref="AzureQueueStorageResource"/>.</returns>
244public static IResourceBuilder<AzureQueueStorageResource> AddQueues(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name)
Aspire.Hosting.Azure.Tests (168)
AzureBicepResourceTests.cs (83)
31var bicepResource = builder.AddBicepTemplateString("mytemplate", "content")
40public static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> AzureExtensions =>
43private static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> CreateAllAzureExtensions(string resourceName)
82public void AzureExtensionsAutomaticallyAddAzureProvisioning(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource)
94public void BicepResourcesAreIdempotent(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource)
97var azureResourceBuilder = addAzureResource(builder);
110public static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> AzureExtensionsWithHyphen =>
115public void AzureResourcesProduceValidBicep(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource)
118var azureResourceBuilder = addAzureResource(builder);
136var bicepResource = builder.AddBicepTemplateString("templ", "content");
148var bicepResource = builder.AddBicepTemplateString("templ", "content");
160var bicepResource = builder.AddBicepTemplateString("templ", "content");
170var bicepResource = builder.AddBicepTemplateString("templ", "content");
180var param = builder.AddParameter("p1");
182var b2 = builder.AddBicepTemplateString("temp2", "content");
224var cosmos = builder.AddAzureCosmosDB("cosmos").RunAsEmulator(e =>
246var cosmos = builder.AddAzureCosmosDB("cosmos")
340var cosmos = builder.AddAzureCosmosDB("cosmos")
433var appConfig = builder.AddAzureAppConfiguration("appConfig");
499var appInsights = builder.AddAzureApplicationInsights("appInsights");
556var appInsights = builder.AddAzureApplicationInsights("appInsights");
621var law = builder.AddAzureLogAnalyticsWorkspace("mylaw");
622var appInsights = builder.AddAzureApplicationInsights("appInsights", law);
679var logAnalyticsWorkspace = builder.AddAzureLogAnalyticsWorkspace("logAnalyticsWorkspace");
721var appInsights = builder.AddAzureApplicationInsights("ai");
725var serviceA = builder.AddProject<ProjectA>("serviceA", o => o.ExcludeLaunchProfile = true)
738var infrastructure1 = builder.AddAzureInfrastructure("infrastructure1", (infrastructure) =>
760var skuName = builder.AddParameter("skuName");
763var infrastructure1 = builder.AddAzureInfrastructure("infrastructure1", (infrastructure) =>
799var skuName = builder.AddParameter("skuName");
802var infrastructure1 = builder.AddAzureInfrastructure("infrastructure1", (infrastructure) =>
838var redis = builder.AddRedis("cache")
905var mykv = builder.AddAzureKeyVault("mykv");
967var mykv = builder.AddAzureKeyVault("mykv");
1029var signalr = builder.AddAzureSignalR("signalr");
1102var sql = builder.AddSqlServer("sql").AsAzureSqlDatabase();
1196var sql = builder.AddSqlServer("sql").AsAzureSqlDatabase();
1279var usr = builder.AddParameter("usr");
1280var pwd = builder.AddParameter("pwd", secret: true);
1283var postgres = builder.AddPostgres("postgres", usr, pwd).AsAzurePostgresFlexibleServer();
1397var usr = builder.AddParameter("usr");
1398var pwd = builder.AddParameter("pwd", secret: true);
1401var postgres = builder.AddPostgres("postgres", usr, pwd).AsAzurePostgresFlexibleServer();
1506var usr = builder.AddParameter("usr");
1507var pwd = builder.AddParameter("pwd", secret: true);
1510var postgres = builder.AddPostgres("postgres", usr, pwd).PublishAsAzurePostgresFlexibleServer();
1543var postgres = builder.AddPostgres("postgres1")
1561var param = builder.AddParameter("param");
1605var serviceBus = builder.AddAzureServiceBus("sb");
1705var wps = builder.AddAzureWebPubSub("wps1");
1772var wps = builder.AddAzureWebPubSub("wps1")
1840var storage = builder.AddAzureStorage("storage").RunAsEmulator(e =>
1849var blob = storage.AddBlobs("blob");
1850var queue = storage.AddQueues("queue");
1851var table = storage.AddTables("table");
1878var storagesku = builder.AddParameter("storagesku");
1879var storage = builder.AddAzureStorage("storage")
1986var blob = storage.AddBlobs("blob");
2001var queue = storage.AddQueues("queue");
2016var table = storage.AddTables("table");
2036var storagesku = builder.AddParameter("storagesku");
2037var storage = builder.AddAzureStorage("storage")
2145var blob = storage.AddBlobs("blob");
2160var queue = storage.AddQueues("queue");
2175var table = storage.AddTables("table");
2195var storagesku = builder.AddParameter("storagesku");
2196var storage = builder.AddAzureStorage("storage")
2303var blob = storage.AddBlobs("blob");
2318var queue = storage.AddQueues("queue");
2333var table = storage.AddTables("table");
2353var storagesku = builder.AddParameter("storagesku");
2354var storage = builder.AddAzureStorage("storage")
2462var blob = storage.AddBlobs("blob");
2477var queue = storage.AddQueues("queue");
2492var table = storage.AddTables("table");
2513var sku = builder.AddParameter("searchSku");
2514var search = builder.AddAzureSearch("search")
2608var ai = builder.AddAzureApplicationInsights("ai").PublishAsConnectionString();
2609var serviceBus = builder.AddAzureServiceBus("servicebus").PublishAsConnectionString();
2611var serviceA = builder.AddProject<ProjectA>("serviceA", o => o.ExcludeLaunchProfile = true)
2636var openai = builder.AddAzureOpenAI("openai")
2752var provisioningResource = builder.AddAzureInfrastructure("infrastructure", r =>
2766var provisioningResource = builder.AddAzureInfrastructure("infrastructure", r =>
Aspire.Hosting.Azure.WebPubSub (9)
Aspire.Hosting.Containers.Tests (32)
WithDockerfileTests.cs (20)
28var parameter = builder.AddParameter("secret", secret: true);
164var parameter = builder.AddParameter("message");
167var container = builder.AddContainer("testcontainer", "testimage")
212var parameter = builder.AddParameter("message");
215var container = builder.AddDockerfile("testcontainer", tempContextPath, tempDockerfilePath, "runner")
259var parameter = builder.AddParameter("secret", secret: true);
262var container = builder.AddContainer("testcontainer", "testimage")
305var parameter = builder.AddParameter("secret", secret: true);
308var container = builder.AddDockerfile("testcontainer", tempContextPath, tempDockerfilePath)
348var parameter = builder.AddParameter("message");
419var parameter = builder.AddParameter("message");
596var container = builder.AddContainer("mycontainer", "myimage");
617var container = builder.AddContainer("mycontainer", "myimage")
633var container = builder.AddDockerfile("mycontainer", tempContextPath);
648var container = builder.AddContainer("mycontainer", "myimage")
664var container = builder.AddDockerfile("mycontainer", tempContextPath, "Dockerfile");
679var container = builder.AddContainer("mycontainer", "myimage")
695var container = builder.AddDockerfile("mycontainer", tempContextPath, "Otherdockerfile");
710var container = builder.AddContainer("mycontainer", "myimage")
726var container = builder.AddDockerfile("mycontainer", tempContextPath, tempDockerfilePath);
Aspire.Hosting.Dapr (20)
Aspire.Hosting.Dapr.Tests (3)
Aspire.Hosting.Elasticsearch (9)
Aspire.Hosting.Elasticsearch.Tests (14)
Aspire.Hosting.Garnet (20)
GarnetBuilderExtensions.cs (20)
54/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
55public static IResourceBuilder<GarnetResource> AddGarnet(this IDistributedApplicationBuilder builder, [ResourceName] string name,
89/// Use <see cref="WithPersistence(IResourceBuilder{GarnetResource}, TimeSpan?)"/> to adjust Garnet persistence configuration, e.g.:
102/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
103public static IResourceBuilder<GarnetResource> WithDataVolume(this IResourceBuilder<GarnetResource> builder,
122/// Use <see cref="WithPersistence(IResourceBuilder{GarnetResource}, TimeSpan?)"/> to adjust Garnet persistence configuration, e.g.:
135/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
136public static IResourceBuilder<GarnetResource> WithDataBindMount(this IResourceBuilder<GarnetResource> builder,
155/// Use with <see cref="WithDataBindMount(IResourceBuilder{GarnetResource}, string, bool)"/>
156/// or <see cref="WithDataVolume(IResourceBuilder{GarnetResource}, string?, bool)"/> to persist Garnet data across sessions with custom persistence configuration, e.g.:
166/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
168public static IResourceBuilder<GarnetResource> WithPersistence(this IResourceBuilder<GarnetResource> builder,
176/// Use with <see cref="WithDataBindMount(IResourceBuilder{GarnetResource}, string, bool)"/>
177/// or <see cref="WithDataVolume(IResourceBuilder{GarnetResource}, string?, bool)"/> to persist Garnet data across sessions with custom persistence configuration, e.g.:
186/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
187public static IResourceBuilder<GarnetResource> WithPersistence(this IResourceBuilder<GarnetResource> builder,
Aspire.Hosting.Garnet.Tests (18)
Aspire.Hosting.Kafka (16)
Aspire.Hosting.Kafka.Tests (14)
Aspire.Hosting.Keycloak (13)
Aspire.Hosting.Keycloak.Tests (13)
Aspire.Hosting.Milvus (20)
MilvusBuilderExtensions.cs (20)
41/// <returns>A reference to the <see cref="IResourceBuilder{MilvusServerResource}"/>.</returns>
42public static IResourceBuilder<MilvusServerResource> AddMilvus(this IDistributedApplicationBuilder builder,
44IResourceBuilder<ParameterResource>? apiKey = null,
93/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
94public static IResourceBuilder<MilvusDatabaseResource> AddDatabase(this IResourceBuilder<MilvusServerResource> builder, [ResourceName] string name, string? databaseName = null)
129/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
130public static IResourceBuilder<T> WithAttu<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<AttuResource>>? configureContainer = null, string? containerName = null) where T : MilvusServerResource
137var resourceBuilder = builder.ApplicationBuilder.AddResource(attuContainer)
155/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
156public static IResourceBuilder<MilvusServerResource> WithDataVolume(this IResourceBuilder<MilvusServerResource> builder, string? name = null, bool isReadOnly = false)
168/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
169public static IResourceBuilder<MilvusServerResource> WithDataBindMount(this IResourceBuilder<MilvusServerResource> builder, string source, bool isReadOnly = false)
181/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
182public static IResourceBuilder<MilvusServerResource> WithConfigurationBindMount(this IResourceBuilder<MilvusServerResource> builder, string configurationFilePath)
Aspire.Hosting.Milvus.Tests (33)
Aspire.Hosting.MongoDB (25)
MongoDBBuilderExtensions.cs (25)
33/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
34public static IResourceBuilder<MongoDBServerResource> AddMongoDB(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port)
47/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
48public static IResourceBuilder<MongoDBServerResource> AddMongoDB(this IDistributedApplicationBuilder builder,
51IResourceBuilder<ParameterResource>? userName = null,
52IResourceBuilder<ParameterResource>? password = null)
95/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
96public static IResourceBuilder<MongoDBDatabaseResource> AddDatabase(this IResourceBuilder<MongoDBServerResource> builder, [ResourceName] string name, string? databaseName = null)
135/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
136public static IResourceBuilder<T> WithMongoExpress<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<MongoExpressContainerResource>>? configureContainer = null, string? containerName = null) where T : MongoDBServerResource
143var resourceBuilder = builder.ApplicationBuilder.AddResource(mongoExpressContainer)
161public static IResourceBuilder<MongoExpressContainerResource> WithHostPort(this IResourceBuilder<MongoExpressContainerResource> builder, int? port)
177/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
178public static IResourceBuilder<MongoDBServerResource> WithDataVolume(this IResourceBuilder<MongoDBServerResource> builder, string? name = null, bool isReadOnly = false)
191/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
192public static IResourceBuilder<MongoDBServerResource> WithDataBindMount(this IResourceBuilder<MongoDBServerResource> builder, string source, bool isReadOnly = false)
206/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
207public static IResourceBuilder<MongoDBServerResource> WithInitBindMount(this IResourceBuilder<MongoDBServerResource> builder, string source, bool isReadOnly = true)
Aspire.Hosting.MongoDB.Tests (29)
Aspire.Hosting.MySql (22)
MySqlBuilderExtensions.cs (22)
28/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
29public static IResourceBuilder<MySqlServerResource> AddMySql(this IDistributedApplicationBuilder builder, [ResourceName] string name, IResourceBuilder<ParameterResource>? password = null, int? port = null)
70/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
71public static IResourceBuilder<MySqlDatabaseResource> AddDatabase(this IResourceBuilder<MySqlServerResource> builder, [ResourceName] string name, string? databaseName = null)
93/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
94public static IResourceBuilder<T> WithPhpMyAdmin<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<PhpMyAdminContainerResource>>? configureContainer = null, string? containerName = null) where T : MySqlServerResource
108var phpMyAdminContainerBuilder = builder.ApplicationBuilder.AddResource(phpMyAdminContainer)
185public static IResourceBuilder<PhpMyAdminContainerResource> WithHostPort(this IResourceBuilder<PhpMyAdminContainerResource> builder, int? port)
201/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
202public static IResourceBuilder<MySqlServerResource> WithDataVolume(this IResourceBuilder<MySqlServerResource> builder, string? name = null, bool isReadOnly = false)
215/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
216public static IResourceBuilder<MySqlServerResource> WithDataBindMount(this IResourceBuilder<MySqlServerResource> builder, string source, bool isReadOnly = false)
230/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
231public static IResourceBuilder<MySqlServerResource> WithInitBindMount(this IResourceBuilder<MySqlServerResource> builder, string source, bool isReadOnly = true)
Aspire.Hosting.MySql.Tests (39)
Aspire.Hosting.Nats (14)
Aspire.Hosting.Nats.Tests (10)
Aspire.Hosting.NodeJs (6)
Aspire.Hosting.NodeJs.Tests (4)
Aspire.Hosting.Oracle (18)
Aspire.Hosting.Oracle.Tests (26)
Aspire.Hosting.Orleans (20)
Aspire.Hosting.PostgreSQL (39)
PostgresBuilderExtensions.cs (39)
30/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
34/// using the <see cref="ResourceBuilderExtensions.WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/>
40public static IResourceBuilder<PostgresServerResource> AddPostgres(this IDistributedApplicationBuilder builder,
42IResourceBuilder<ParameterResource>? userName = null,
43IResourceBuilder<ParameterResource>? password = null,
97/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
101/// using the <see cref="ResourceBuilderExtensions.WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/>
105/// Note that by default calling <see cref="AddDatabase(IResourceBuilder{PostgresServerResource}, string, string?)"/>
107/// will create the database. As a result if <see cref="ResourceBuilderExtensions.WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/>
111public static IResourceBuilder<PostgresDatabaseResource> AddDatabase(this IResourceBuilder<PostgresServerResource> builder, [ResourceName] string name, string? databaseName = null)
133/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
134public static IResourceBuilder<T> WithPgAdmin<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<PgAdminContainerResource>>? configureContainer = null, string? containerName = null) where T : PostgresServerResource
140var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingPgAdminResource);
149var pgAdminContainerBuilder = builder.ApplicationBuilder.AddResource(pgAdminContainer)
219public static IResourceBuilder<PgAdminContainerResource> WithHostPort(this IResourceBuilder<PgAdminContainerResource> builder, int? port)
235public static IResourceBuilder<PgWebContainerResource> WithHostPort(this IResourceBuilder<PgWebContainerResource> builder, int? port)
267/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
268public static IResourceBuilder<PostgresServerResource> WithPgWeb(this IResourceBuilder<PostgresServerResource> builder, Action<IResourceBuilder<PgWebContainerResource>>? configureContainer = null, string? containerName = null)
273var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingPgWebResource);
282var pgwebContainerBuilder = builder.ApplicationBuilder.AddResource(pgwebContainer)
355/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
356public static IResourceBuilder<PostgresServerResource> WithDataVolume(this IResourceBuilder<PostgresServerResource> builder, string? name = null, bool isReadOnly = false)
370/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
371public static IResourceBuilder<PostgresServerResource> WithDataBindMount(this IResourceBuilder<PostgresServerResource> builder, string source, bool isReadOnly = false)
385/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
386public static IResourceBuilder<PostgresServerResource> WithInitBindMount(this IResourceBuilder<PostgresServerResource> builder, string source, bool isReadOnly = true)
Aspire.Hosting.PostgreSQL.Tests (54)
Aspire.Hosting.Python (10)
Aspire.Hosting.Python.Tests (4)
Aspire.Hosting.Qdrant (13)
Aspire.Hosting.Qdrant.Tests (25)
Aspire.Hosting.RabbitMQ (20)
Aspire.Hosting.RabbitMQ.Tests (23)
Aspire.Hosting.Redis (39)
RedisBuilderExtensions.cs (39)
29/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
33/// using the <see cref="ResourceBuilderExtensions.WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/>
39public static IResourceBuilder<RedisResource> AddRedis(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port = null)
73/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for the <see cref="RedisResource"/>.</param>
77public static IResourceBuilder<RedisResource> WithRedisCommander(this IResourceBuilder<RedisResource> builder, Action<IResourceBuilder<RedisCommanderResource>>? configureContainer = null, string? containerName = null)
83var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingRedisCommanderResource);
92var resourceBuilder = builder.ApplicationBuilder.AddResource(resource)
138/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for the <see cref="RedisResource"/>.</param>
142public static IResourceBuilder<RedisResource> WithRedisInsight(this IResourceBuilder<RedisResource> builder, Action<IResourceBuilder<RedisInsightResource>>? configureContainer = null, string? containerName = null)
148var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingRedisCommanderResource);
157var resourceBuilder = builder.ApplicationBuilder.AddResource(resource)
325public static IResourceBuilder<RedisCommanderResource> WithHostPort(this IResourceBuilder<RedisCommanderResource> builder, int? port)
341public static IResourceBuilder<RedisInsightResource> WithHostPort(this IResourceBuilder<RedisInsightResource> builder, int? port)
355/// Use <see cref="WithPersistence(IResourceBuilder{RedisResource}, TimeSpan?, long)"/> to adjust Redis persistence configuration, e.g.:
368/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
369public static IResourceBuilder<RedisResource> WithDataVolume(this IResourceBuilder<RedisResource> builder, string? name = null, bool isReadOnly = false)
385/// Use <see cref="WithPersistence(IResourceBuilder{RedisResource}, TimeSpan?, long)"/> to adjust Redis persistence configuration, e.g.:
398/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
399public static IResourceBuilder<RedisResource> WithDataBindMount(this IResourceBuilder<RedisResource> builder, string source, bool isReadOnly = false)
416/// Use with <see cref="WithDataBindMount(IResourceBuilder{RedisResource}, string, bool)"/>
417/// or <see cref="WithDataVolume(IResourceBuilder{RedisResource}, string?, bool)"/> to persist Redis data across sessions with custom persistence configuration, e.g.:
427/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
428public static IResourceBuilder<RedisResource> WithPersistence(this IResourceBuilder<RedisResource> builder, TimeSpan? interval = null, long keysChangedThreshold = 1)
447/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
449public static IResourceBuilder<RedisInsightResource> WithDataVolume(this IResourceBuilder<RedisInsightResource> builder, string? name = null)
461/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
462public static IResourceBuilder<RedisInsightResource> WithDataBindMount(this IResourceBuilder<RedisInsightResource> builder, string source)
Aspire.Hosting.Redis.Tests (42)
Aspire.Hosting.Seq (7)
Aspire.Hosting.SqlServer (12)
Aspire.Hosting.SqlServer.Tests (28)
Aspire.Hosting.Testing (4)
Aspire.Hosting.Testing.Tests (1)
Aspire.Hosting.Tests (171)
Dcp\ApplicationExecutorTests.cs (11)
107var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo")
139var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo")
171var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo")
204var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo")
364(Action<IResourceBuilder<ExecutableResource>> AddEndpoint, string ErrorMessageFragment)[] testcases = [
393var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo");
808(Action<IResourceBuilder<ContainerResource>> AddEndpoint, string ErrorMessageFragment)[] testcases = [
832var ctr = builder.AddContainer("database", "image");
975var container = builder.AddContainer("database", "image");
976var exe = builder.AddExecutable("node", "node.exe", ".");
977var project = builder.AddProject<TestProject>("project");
ResourceExtensionsTests.cs (14)
16var parent = builder.AddResource(new ParentResource("parent"));
25var parent = builder.AddResource(new ParentResource("parent"))
36var parent = builder.AddResource(new ParentResource("parent"))
47var parent = builder.AddResource(new ParentResource("parent"))
50var child = builder.AddResource(new ChildResource("child", parent.Resource));
60var parent = builder.AddResource(new ParentResource("parent"))
63var child = builder.AddResource(new ChildResource("child", parent.Resource))
74var container = builder.AddContainer("grafana", "grafana/grafana", "latest").WithImageSHA256("1adbcc2df3866ff5ec1d836e9d2220c904c7f98901b918d3cc5e1118ab1af991");
84var container = builder.AddContainer("grafana", "grafana/grafana", "10.3.1");
94var container = builder.AddContainer("elasticsearch", "library/elasticsearch", "8.14.0")
128var passwordParameter = builder.AddParameter("ElasticPassword");
130var container = builder.AddContainer("elasticsearch", "library/elasticsearch", "8.14.0")
161var passwordParameter = builder.AddParameter("ElasticPassword");
163var container = builder.AddContainer("elasticsearch", "library/elasticsearch", "8.14.0")
WaitForTests.cs (21)
20var throwingResource = builder.AddContainer("throwingresource", "doesnotmatter")
22var dependingContainerResource = builder.AddContainer("dependingcontainerresource", "doesnotmatter")
24var dependingExecutableResource = builder.AddExecutable("dependingexecutableresource", "doesnotmatter", "alsodoesntmatter")
43var resource = builder.AddResource(new CustomResource("test"));
64var parentResourceBuilder = builder.AddResource(new CustomResource("parent"));
65var childResourceBuilder = builder.AddResource(new CustomChildResource("child", parentResourceBuilder.Resource));
88var dependency = builder.AddResource(new CustomResource("test"));
89var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22")
129var dependency = builder.AddResource(new CustomResource("test"));
130var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22")
177var dependency = builder.AddResource(new CustomResource("test"));
178var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22")
225var dependency = builder.AddResource(new CustomResource("test"));
226var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22")
272var dependency = builder.AddResource(new CustomResource("test"))
275var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22")
307var dependency = builder.AddResource(new CustomResource("test"));
309var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22")
347var parentResource = builder.AddResource(new CustomResource("parent"));
348var childResource = builder.AddResource(new CustomChildResource("child", parentResource.Resource));
349var containerResource = builder.AddContainer("container", "image", "tag")
WithEndpointTests.cs (19)
22var projectA = builder.AddProject<ProjectA>("projecta")
39var projectA = builder.AddProject<ProjectA>("projecta")
74var projectA = builder.AddProject<ProjectA>("projecta")
111var projectA = builder.AddProject<ProjectA>("projecta")
129var projectA = builder.AddProject<ProjectA>("projecta")
146var projectA = builder.AddProject<ProjectA>("projecta").WithEndpoint("mybinding", endpoint =>
230var container = builder.AddContainer("app", "image")
248var container = builder.AddContainer("app", "image")
269var container = builder.AddContainer("app", "image")
297var container = builder.AddContainer("app", "image")
324var container = builder.AddContainer("app", "image")
351var container = builder.AddContainer("app", "image")
378var container = builder.AddContainer("app", "image")
405var container = builder.AddContainer("app", "image")
432var container = builder.AddContainer("app", "image")
459var project = builder.AddProject<TestProject>("proj")
521var project = builder.AddProject<TestProject>("proj")
557var container0 = builder.AddContainer("app0", "image")
560var container1 = builder.AddContainer("app1", "image")
Aspire.Hosting.Valkey (15)
ValkeyBuilderExtensions.cs (15)
54/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
55public static IResourceBuilder<ValkeyResource> AddValkey(this IDistributedApplicationBuilder builder,
94/// Use <see cref="WithPersistence(IResourceBuilder{ValkeyResource}, TimeSpan?, long)"/> to adjust Valkey persistence configuration, e.g.:
101/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
102public static IResourceBuilder<ValkeyResource> WithDataVolume(this IResourceBuilder<ValkeyResource> builder,
125/// Use <see cref="WithPersistence(IResourceBuilder{ValkeyResource}, TimeSpan?, long)"/> to adjust Valkey persistence configuration, e.g.:
132/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
133public static IResourceBuilder<ValkeyResource> WithDataBindMount(this IResourceBuilder<ValkeyResource> builder,
152/// Use with <see cref="WithDataBindMount(IResourceBuilder{ValkeyResource}, string, bool)"/>
153/// or <see cref="WithDataVolume(IResourceBuilder{ValkeyResource}, string?, bool)"/> to persist Valkey data across sessions with custom persistence configuration, e.g.:
160/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
161public static IResourceBuilder<ValkeyResource> WithPersistence(this IResourceBuilder<ValkeyResource> builder,
Aspire.Hosting.Valkey.Tests (14)
Aspire.Playground.Tests (1)
AWS.AppHost (1)
AWSCDK.AppHost (4)
AzureContainerApps.AppHost (6)
AzureFunctionsEndToEnd.AppHost (5)
AzureSearch.AppHost (1)
AzureStorageEndToEnd.AppHost (3)
BicepSample.AppHost (19)
CdkSample.AppHost (19)
CosmosEndToEnd.AppHost (1)
CustomResources.AppHost (2)
Dapr.AppHost (3)
DatabaseMigration.AppHost (1)
Elasticsearch.AppHost (1)
EventHubs.AppHost (2)
KafkaBasic.AppHost (1)
Keycloak.AppHost (2)
MilvusPlayground.AppHost (1)
Mongo.AppHost (1)
MySqlDb.AppHost (1)
Nats.AppHost (1)
OpenAIEndToEnd.AppHost (1)
OracleEndToEnd.AppHost (2)
Orleans.AppHost (3)
ParameterEndToEnd.AppHost (2)
PostgresEndToEnd.AppHost (13)
ProxylessEndToEnd.AppHost (1)
Qdrant.AppHost (1)
Redis.AppHost (3)
Seq.AppHost (1)
SignalR.AppHost (1)
SqlServerEndToEnd.AppHost (5)
Stress.AppHost (9)
TestProject.AppHost (8)
TestShop.AppHost (6)
WaitForSandbox.AppHost (3)
WebPubSub.AppHost (2)
WithDockerfile.AppHost (2)