共用方式為


RabbitMQBuilderExtensions.WithManagementPlugin Method

Definition

Overloads

WithManagementPlugin(IResourceBuilder<RabbitMQServerResource>)

Configures the RabbitMQ container resource to enable the RabbitMQ management plugin.

WithManagementPlugin(IResourceBuilder<RabbitMQServerResource>, Nullable<Int32>)

Configures the RabbitMQ container resource to enable the RabbitMQ management plugin.

WithManagementPlugin(IResourceBuilder<RabbitMQServerResource>)

Source:
RabbitMQBuilderExtensions.cs
Source:
RabbitMQBuilderExtensions.cs

Configures the RabbitMQ container resource to enable the RabbitMQ management plugin.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource> WithManagementPlugin (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource> builder);
static member WithManagementPlugin : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource>
<Extension()>
Public Function WithManagementPlugin (builder As IResourceBuilder(Of RabbitMQServerResource)) As IResourceBuilder(Of RabbitMQServerResource)

Parameters

builder
IResourceBuilder<RabbitMQServerResource>

The resource builder.

Returns

The IResourceBuilder<T>.

Exceptions

Thrown when the current container image and tag do not match the defaults for RabbitMQServerResource.

Remarks

This method only supports custom tags matching the default RabbitMQ ones for the corresponding management tag to be inferred automatically, e.g. 4, 4.0-alpine, 4.0.2-management-alpine, etc.
Calling this method on a resource configured with an unrecognized image registry, name, or tag will result in a DistributedApplicationException being thrown. This version of the package defaults to the tag of the container image.

Applies to

WithManagementPlugin(IResourceBuilder<RabbitMQServerResource>, Nullable<Int32>)

Source:
RabbitMQBuilderExtensions.cs
Source:
RabbitMQBuilderExtensions.cs

Configures the RabbitMQ container resource to enable the RabbitMQ management plugin.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource> WithManagementPlugin (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource> builder, int? port);
static member WithManagementPlugin : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource> * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource>
<Extension()>
Public Function WithManagementPlugin (builder As IResourceBuilder(Of RabbitMQServerResource), port As Nullable(Of Integer)) As IResourceBuilder(Of RabbitMQServerResource)

Parameters

builder
IResourceBuilder<RabbitMQServerResource>

The resource builder.

port
Nullable<Int32>

The host port that can be used to access the management UI page when running locally.

Returns

The IResourceBuilder<T>.

Examples

Use WithManagementPlugin(IResourceBuilder<RabbitMQServerResource>, Nullable<Int32>) to specify a port to access the RabbitMQ management UI page.

var rabbitmq = builder.AddRabbitMQ("rabbitmq")
                      .WithDataVolume()
                      .WithManagementPlugin(port: 15672);

Applies to