Skip to content
DocsTry Aspire
DocsTry

AzureContainerAppEnvironmentResource Methods

ClassMethods3 members
Represents an Azure Container App Environment 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 AzureContainerAppEnvironmentResource
{
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.
GetEndpointPropertyExpression(EndpointReferenceExpression)Section titled GetEndpointPropertyExpression(EndpointReferenceExpression)ReferenceExpression
Gets a ApplicationModel.ReferenceExpression representing a deployed endpoint property for the specified ApplicationModel.EndpointReferenceExpression.
public class AzureContainerAppEnvironmentResource
{
public ReferenceExpression GetEndpointPropertyExpression(
EndpointReferenceExpression endpointReferenceExpression)
{
// ...
}
}
endpointReferenceExpressionEndpointReferenceExpressionThe endpoint reference expression for which to retrieve a deployed endpoint property.
ReferenceExpressionA ApplicationModel.ReferenceExpression representing the deployed endpoint property.
ArgumentNullExceptionThrown when endpointReferenceExpression is null.
InvalidOperationExceptionThrown when the requested endpoint property is unsupported, or when a non-HTTP/HTTPS endpoint does not specify a port.
Use this method when an endpoint property should be represented as a compute-environment-specific ApplicationModel.ReferenceExpression instead of being resolved from a local endpoint allocation. The default implementation composes values from IComputeEnvironmentResource.GetHostAddressExpression, the endpoint scheme, and endpoint ports. HTTP and HTTPS endpoints use ports 80 and 443 respectively when no explicit port is configured.
GetHostAddressExpression(EndpointReference)Section titled GetHostAddressExpression(EndpointReference)ReferenceExpression
Gets a ApplicationModel.ReferenceExpression representing the host address or host name for the specified ApplicationModel.EndpointReference.
public class AzureContainerAppEnvironmentResource
{
public ReferenceExpression GetHostAddressExpression(
EndpointReference endpointReference)
{
// ...
}
}
endpointReferenceEndpointReferenceThe endpoint reference for which to retrieve the host address or host name.
ReferenceExpressionA ApplicationModel.ReferenceExpression representing the host address or host name (not a full URL).
The returned value typically contains only the host name or address, without scheme, port, or path information.