AzureCosmosDBResource
Classnet10.0
A resource that represents an Azure Cosmos DB.
namespace Aspire.Hosting;
public class AzureCosmosDBResource : Aspire.Hosting.Azure.AzureProvisioningResource, Aspire.Hosting.ApplicationModel.IExpressionValue, Aspire.Hosting.ApplicationModel.IManifestExpressionProvider, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithConnectionString, Aspire.Hosting.ApplicationModel.IResourceWithEndpoints, Aspire.Hosting.ApplicationModel.IValueProvider, Aspire.Hosting.ApplicationModel.IValueWithReferences, Aspire.Hosting.Azure.IAzureNspAssociationTarget, Aspire.Hosting.Azure.IAzurePrivateEndpointTarget, Aspire.Hosting.Azure.IResourceWithAzureFunctionsConfig{ // ...}AzureProvisioningResourceIExpressionValueIManifestExpressionProviderIResourceIResourceWithConnectionStringIResourceWithEndpointsIValueProviderIValueWithReferencesIAzureNspAssociationTargetIAzurePrivateEndpointTargetIResourceWithAzureFunctionsConfig
12 members
Constructors1
Section titled Constructors A resource that represents an Azure Cosmos DB.
Properties9
Section titled PropertiesBicepSecretOutputReference Gets the "connectionString" reference from the secret outputs of the Azure Cosmos DB resource.
ReferenceExpression Gets the connection string template for the manifest for the Azure Cosmos DB resource.
BicepOutputReference Gets the "connectionString" output reference from the bicep template for the Azure Cosmos DB resource. This is used when Entra ID authentication is used. The connection string is an output of the bicep template.
IsEmulator getbool Gets a value indicating whether the Azure Cosmos DB resource is running in the local emulator.
ReferenceExpression Gets the account endpoint URI expression for the Cosmos DB account.
bool Gets a value indicating whether the resource uses access key authentication.
Methods2
Section titled MethodsProvisionableResource 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. Adds role assignments to this Azure resource.