Skip to content
DocsTry Aspire
DocsTry

AzureRedisCacheResource Methods

ClassMethods2 members
Represents an Azure Cache for Redis resource.
AddAsExistingResource(AzureResourceInfrastructure)Section titled AddAsExistingResource(AzureResourceInfrastructure)overrideProvisionableResource
Adds a new Primitives.ProvisionableResource into infra. The new resource represents a reference to the current Azure.AzureProvisioningResource via https://learn.microsoft.com/azure/azure-resource-manager/bicep/existing-resource.
public class AzureRedisCacheResource
{
public override ProvisionableResource AddAsExistingResource(
AzureResourceInfrastructure infra)
{
// ...
}
}
infraAzureResourceInfrastructureThe Azure.AzureResourceInfrastructure to add the existing resource into.
ProvisionableResourceA new Primitives.ProvisionableResource, typically using the FromExisting method on the derived Primitives.ProvisionableResource class.
AddRoleAssignments(IAddRoleAssignmentsContext)Section titled AddRoleAssignments(IAddRoleAssignmentsContext)override
Adds role assignments to this Azure resource.
public class AzureRedisCacheResource
{
public override void AddRoleAssignments(
IAddRoleAssignmentsContext roleAssignmentContext)
{
// ...
}
}
roleAssignmentContextIAddRoleAssignmentsContextThe context containing information about the role assignments and what principal to use.