Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

DevTunnelOptions Properties

ClassProperties5 members
Options for the dev tunnel resource. Controls the creation and access settings of the underyling dev tunnel.
Whether to allow anonymous access to this dev tunnel. If false, authentication is required. Defaults to false.
public bool AllowAnonymous { get; set; }
DescriptionSection titled Descriptionnullablestring?
Optional description for the tunnel.
public string? Description { get; set; }
ExpirationHoursSection titled ExpirationHoursnullableint?
Gets or sets how many hours the tunnel can remain unused or unmodified before it expires.
public int? ExpirationHours { get; set; }
ArgumentOutOfRangeExceptionThe value is outside the supported range.
Specify a whole number of hours from one hour through 30 days, inclusive. The value applies when creating a tunnel and when updating an existing tunnel. When null, no expiration override is sent: new tunnels use the service default and existing tunnels retain their configured expiration period. This is an idle expiration period, not a maximum hosting duration or an access-token lifetime.
LabelsSection titled LabelsnullableList<string>
Optional labels to attach to the tunnel.
public List<string>? Labels { get; set; }
Optional region to create the dev tunnel in. If not specified, the region will be selected automatically based on the ping.
public DevTunnelRegion? Region { get; set; }
Set this value, for example to
DevTunnelRegion.NorthEurope
, when an existing tunnel must be reused in a specific service region.