Skip to content
Docs Try Aspire

AzureEnvironmentResourceExtensions Methods

Class Methods 3 members
Provides extension methods for adding Azure environment resources to the application model.
AddAzureEnvironment(IDistributedApplicationBuilder) Section titled AddAzureEnvironment(IDistributedApplicationBuilder) extension IResourceBuilder<AzureEnvironmentResource>
Adds an Azure environment resource to the application model.
public static class AzureEnvironmentResourceExtensions
{
public static IResourceBuilder<AzureEnvironmentResource> AddAzureEnvironment(
this IDistributedApplicationBuilder builder)
{
// ...
}
}
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder.
IResourceBuilder<AzureEnvironmentResource> The ApplicationModel.IResourceBuilder`1.
WithLocation(IResourceBuilder<AzureEnvironmentResource>, IResourceBuilder<ParameterResource>) Section titled WithLocation(IResourceBuilder<AzureEnvironmentResource>, IResourceBuilder<ParameterResource>) extension IResourceBuilder<AzureEnvironmentResource>
Sets the location of the Azure environment resource.
public static class AzureEnvironmentResourceExtensions
{
public static IResourceBuilder<AzureEnvironmentResource> WithLocation(
this IResourceBuilder<AzureEnvironmentResource> builder,
IResourceBuilder<ParameterResource> location)
{
// ...
}
}
builder IResourceBuilder<AzureEnvironmentResource> The ApplicationModel.IResourceBuilder`1.
location IResourceBuilder<ParameterResource> The Azure location.
IResourceBuilder<AzureEnvironmentResource> The ApplicationModel.IResourceBuilder`1.
This method is used to set the location of the Azure environment resource. The location is used to determine where the resources will be deployed.
WithResourceGroup(IResourceBuilder<AzureEnvironmentResource>, IResourceBuilder<ParameterResource>) Section titled WithResourceGroup(IResourceBuilder<AzureEnvironmentResource>, IResourceBuilder<ParameterResource>) extension IResourceBuilder<AzureEnvironmentResource>
Sets the resource group name of the Azure environment resource.
public static class AzureEnvironmentResourceExtensions
{
public static IResourceBuilder<AzureEnvironmentResource> WithResourceGroup(
this IResourceBuilder<AzureEnvironmentResource> builder,
IResourceBuilder<ParameterResource> resourceGroup)
{
// ...
}
}
builder IResourceBuilder<AzureEnvironmentResource> The ApplicationModel.IResourceBuilder`1.
resourceGroup IResourceBuilder<ParameterResource> The Azure resource group name.
IResourceBuilder<AzureEnvironmentResource> The ApplicationModel.IResourceBuilder`1.
This method is used to set the resource group name of the Azure environment resource. The resource group name is used to determine where the resources will be deployed.