# Aspire.Hosting.Azure

- Module: `Aspire.Hosting.Azure`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `28`
- Types: `9`

## Handles

- [AzureBicepResource](/reference/api/go/aspire.hosting.azure/azurebicepresource.md) -- `handle` - 2 members
- [AzureEnvironmentResource](/reference/api/go/aspire.hosting.azure/azureenvironmentresource.md) -- `handle` - 2 members
- [AzureKeyVaultResource](/reference/api/go/aspire.hosting.azure/azurekeyvaultresource.md) -- `interface` `marker` - 0 members -- Represents a resource that represents an Azure Key Vault.
- [AzureKeyVaultSecretReference](/reference/api/go/aspire.hosting.azure/azurekeyvaultsecretreference.md) -- `interface` `marker` - 0 members -- Represents a reference to a secret in an Azure Key Vault resource.
- [AzureProvisioningResource](/reference/api/go/aspire.hosting.azure/azureprovisioningresource.md) -- `handle` - 1 members
- [AzureResource](/reference/api/go/aspire.hosting.azure/azureresource.md) -- `interface` `marker` - 16 members -- Represents an Azure resource, as a marker interface for `IResource`'s that can be deployed to an Azure resource group.
- [AzureResourceInfrastructure](/reference/api/go/aspire.hosting.azure/azureresourceinfrastructure.md) -- `handle` - 0 members -- An Azure Provisioning `Infrastructure` which represents the root Bicep module that is generated for an Azure resource.
- [AzureUserAssignedIdentityResource](/reference/api/go/aspire.hosting.azure/azureuserassignedidentityresource.md) -- `handle` - 0 members
- [BicepOutputReference](/reference/api/go/aspire.hosting.azure/bicepoutputreference.md) -- `handle` - 3 members -- A reference to an output from a bicep template.

## Functions

- [GetOutput](/reference/api/go/aspire.hosting.azure/getoutput.md) -- `method` - on `AzureBicepResource` -- Gets a reference to an output from a bicep template.
- [WithParameter](/reference/api/go/aspire.hosting.azure/withparameter.md) -- `method` - on `AzureBicepResource` -- Adds a Bicep parameter
- [WithLocation](/reference/api/go/aspire.hosting.azure/withlocation.md) -- `method` - on `AzureEnvironmentResource` -- Sets the location of the Azure environment resource.
- [WithResourceGroup](/reference/api/go/aspire.hosting.azure/withresourcegroup.md) -- `method` - on `AzureEnvironmentResource` -- Sets the resource group name of the Azure environment resource.
- [ConfigureInfrastructure](/reference/api/go/aspire.hosting.azure/configureinfrastructure.md) -- `method` - on `AzureProvisioningResource` -- Configures the Azure provisioning infrastructure callback
- [AsExisting](/reference/api/go/aspire.hosting.azure/asexisting.md) -- `method` - on `AzureResource` -- Marks the resource as an existing resource in both run and publish modes.
- [AsExistingInResourceGroup](/reference/api/go/aspire.hosting.azure/asexistinginresourcegroup.md) -- `method` - on `AzureResource` -- Marks the resource as an existing resource in a specific resource group and subscription in both run and publish modes.
- [AsExistingInSubscription](/reference/api/go/aspire.hosting.azure/asexistinginsubscription.md) -- `method` - on `AzureResource` -- Marks the subscription-scoped resource as an existing resource in both run and publish modes.
- [AsExistingInTenant](/reference/api/go/aspire.hosting.azure/asexistingintenant.md) -- `method` - on `AzureResource` -- Marks the current-tenant-scoped resource as an existing resource in both run and publish modes.
- [ClearDefaultRoleAssignments](/reference/api/go/aspire.hosting.azure/cleardefaultroleassignments.md) -- `method` - on `AzureResource` -- Clears all default role assignments for the specified Azure resource.
- [GetBicepIdentifier](/reference/api/go/aspire.hosting.azure/getbicepidentifier.md) -- `method` - on `AzureResource` -- Gets the Bicep identifier for the Azure resource.
- [IsExisting](/reference/api/go/aspire.hosting.azure/isexisting.md) -- `method` - on `AzureResource` -- Determines whether the Azure resource is marked as existing.
- [PublishAsConnectionString](/reference/api/go/aspire.hosting.azure/publishasconnectionstring.md) -- `method` - on `AzureResource` -- Changes the resource to be published as a connection string reference in the manifest.
- [PublishAsExisting](/reference/api/go/aspire.hosting.azure/publishasexisting.md) -- `method` - on `AzureResource` -- Marks the resource as an existing resource when the application is deployed.
- [PublishAsExistingInResourceGroup](/reference/api/go/aspire.hosting.azure/publishasexistinginresourcegroup.md) -- `method` - on `AzureResource` -- Marks the resource as an existing resource in a specific resource group and subscription when the application is deployed.
- [PublishAsExistingInSubscription](/reference/api/go/aspire.hosting.azure/publishasexistinginsubscription.md) -- `method` - on `AzureResource` -- Marks the subscription-scoped resource as an existing resource when the application is deployed.
- [PublishAsExistingInTenant](/reference/api/go/aspire.hosting.azure/publishasexistingintenant.md) -- `method` - on `AzureResource` -- Marks the current-tenant-scoped resource as an existing resource when the application is deployed.
- [RunAsExisting](/reference/api/go/aspire.hosting.azure/runasexisting.md) -- `method` - on `AzureResource` -- Marks the resource as an existing resource when the application is running.
- [RunAsExistingInResourceGroup](/reference/api/go/aspire.hosting.azure/runasexistinginresourcegroup.md) -- `method` - on `AzureResource` -- Marks the resource as an existing resource in a specific resource group and subscription when the application is running.
- [RunAsExistingInSubscription](/reference/api/go/aspire.hosting.azure/runasexistinginsubscription.md) -- `method` - on `AzureResource` -- Marks the subscription-scoped resource as an existing resource when the application is running.
- [RunAsExistingInTenant](/reference/api/go/aspire.hosting.azure/runasexistingintenant.md) -- `method` - on `AzureResource` -- Marks the current-tenant-scoped resource as an existing resource when the application is running.
- [AddAzureEnvironment](/reference/api/go/aspire.hosting.azure/addazureenvironment.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure environment resource to the application model.
- [AddAzureInfrastructure](/reference/api/go/aspire.hosting.azure/addazureinfrastructure.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure provisioning resource to the application model.
- [AddAzureProvisioning](/reference/api/go/aspire.hosting.azure/addazureprovisioning.md) -- `method` - on `DistributedApplicationBuilder` -- Adds support for generating Azure resources dynamically during application startup. The application must configure the appropriate Azure subscription and location before resources can be provisioned.
- [AddAzureUserAssignedIdentity](/reference/api/go/aspire.hosting.azure/addazureuserassignedidentity.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure user‑assigned identity resource to the application model.
- [AddBicepTemplate](/reference/api/go/aspire.hosting.azure/addbiceptemplate.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure Bicep resource to the application model.
- [AddBicepTemplateString](/reference/api/go/aspire.hosting.azure/addbiceptemplatestring.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure Bicep resource to the application model.
- [WithAzureUserAssignedIdentity](/reference/api/go/aspire.hosting.azure/withazureuserassignedidentity.md) -- `method` - on `IComputeResource` -- Associates an Azure user-assigned identity with a compute resource

## Exported values

- `AzureSubnetServiceDelegations.AppServiceEnvironments`: `string` = `"Microsoft.Web/serverFarms"` -- Delegation for Azure App Service environments.
- `AzureSubnetServiceDelegations.ApplicationGatewayForContainers`: `string` = `"Microsoft.ServiceNetworking/trafficControllers"` -- Delegation for Azure Application Gateway for Containers.
- `AzureSubnetServiceDelegations.ContainerAppEnvironments`: `string` = `"Microsoft.App/environments"` -- Delegation for Azure Container Apps environments.
- `AzureSubnetServiceDelegations.ContainerInstances`: `string` = `"Microsoft.ContainerInstance/containerGroups"` -- Delegation for Azure Container Instances (ACI), which allows container groups to be deployed into the subnet.
