Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithStorageRoleAssignments

Method
📦 Aspire.Hosting.Azure.Storage v17.0.0
func (Resource) WithStorageRoleAssignments(
target AzureStorageResource,
roles []AzureStorageRole,
) Resource

Signature

methodWithStorageRoleAssignmentsbuilder
Assigns the specified roles to the given resource, granting it the necessary permissions on the target Azure Storage account. This replaces the default role assignments for the resource.
WithStorageRoleAssignments(
target AzureStorageResource,
roles []AzureStorageRole,
) Resource
targetAzureStorageResourceThe target Azure Storage account.
roles[]AzureStorageRoleThe storage roles to be assigned.
Resource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: