AzureUserAssignedIdentityExtensions.AddAzureUserAssignedIdentity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an Azure user‑assigned identity resource to the application model.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureUserAssignedIdentityResource> AddAzureUserAssignedIdentity(this Aspire.Hosting.IDistributedApplicationBuilder builder, string name);
static member AddAzureUserAssignedIdentity : Aspire.Hosting.IDistributedApplicationBuilder * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureUserAssignedIdentityResource>
<Extension()>
Public Function AddAzureUserAssignedIdentity (builder As IDistributedApplicationBuilder, name As String) As IResourceBuilder(Of AzureUserAssignedIdentityResource)
Parameters
- builder
- IDistributedApplicationBuilder
The builder for the distributed application.
- name
- String
The name of the resource.
Returns
A reference to the IResourceBuilder<T> builder.
Exceptions
Thrown when builder
is null.
Thrown when name
is null or empty.
Remarks
This method adds an Azure user‑assigned identity resource to the application model. It configures the infrastructure for the resource and returns a builder for the resource. The resource is added to the infrastructure only if the application is not in run mode.