Skip to content
DocsTry Aspire
DocsTry

AzureEnvironmentResourceExtensions Methods

ClassMethods3 members
Provides extension methods for adding Azure environment resources to the application model.
AddAzureEnvironment(IDistributedApplicationBuilder)Section titled AddAzureEnvironment(IDistributedApplicationBuilder)extensionIResourceBuilder<AzureEnvironmentResource>
Adds an Azure environment resource to the application model.
public static class AzureEnvironmentResourceExtensions
{
public static IResourceBuilder<AzureEnvironmentResource> AddAzureEnvironment(
this IDistributedApplicationBuilder builder)
{
// ...
}
}
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder.
IResourceBuilder<AzureEnvironmentResource>The ApplicationModel.IResourceBuilder`1.
WithLocation(IResourceBuilder<AzureEnvironmentResource>, IResourceBuilder<ParameterResource>)Section titled WithLocation(IResourceBuilder<AzureEnvironmentResource>, IResourceBuilder<ParameterResource>)extensionIResourceBuilder<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)
{
// ...
}
}
builderIResourceBuilder<AzureEnvironmentResource>The ApplicationModel.IResourceBuilder`1.
locationIResourceBuilder<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>)extensionIResourceBuilder<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)
{
// ...
}
}
builderIResourceBuilder<AzureEnvironmentResource>The ApplicationModel.IResourceBuilder`1.
resourceGroupIResourceBuilder<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.