-
Notifications
You must be signed in to change notification settings - Fork 995
Add Region to DevTunnelOptions to ensure setting region devtunnel is created in #14112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
796e858
4e0a0b1
4039f15
eb11a8d
c2f9af1
ca389d3
41145cd
758dfd2
ac2669e
e4025e3
1e24582
3f6b77e
9eb6141
e5880fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,36 @@ public sealed class DevTunnelOptions | |
| /// </summary> | ||
| public List<string>? Labels { get; set; } | ||
|
|
||
| internal string ToLoggerString() => $"{{ Description={Description}, AllowAnonymous={AllowAnonymous}, Labels=[{string.Join(", ", Labels ?? [])}] }}"; | ||
| /// <summary> | ||
| /// Optional region to create the dev tunnel in. | ||
| /// If not specified, the region will be selected automatically based on the ping. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Set this value, for example to <code>DevTunnelRegion.NorthEurope</code>, when an existing tunnel must be reused in a specific service region. | ||
| /// </remarks> | ||
| public DevTunnelRegion? Region { get; set; } | ||
|
|
||
|
DamianEdwards marked this conversation as resolved.
Comment on lines
+26
to
+34
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leaving the generated
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The guidance is in the repo-level agent instructions under Code Review Instructions → API Files and Public API Surface. Relevant text:
Also the general repo guidance says:
|
||
| internal string RegionCode => | ||
| Region switch | ||
| { | ||
| DevTunnelRegion.WestEurope => "euw", | ||
|
DamianEdwards marked this conversation as resolved.
|
||
| DevTunnelRegion.UkSouth => "uks1", | ||
| DevTunnelRegion.NorthEurope => "eun1", | ||
| DevTunnelRegion.EastUs => "use", | ||
| DevTunnelRegion.EastUs2 => "use2", | ||
| DevTunnelRegion.WestUs2 => "usw2", | ||
| DevTunnelRegion.WestUs3 => "usw3", | ||
| DevTunnelRegion.CentralIndia => "inc1", | ||
| DevTunnelRegion.SouthEastAsia => "asse", | ||
| DevTunnelRegion.BrazilSouth => "brs", | ||
| DevTunnelRegion.AustraliaCentral => "auc1", | ||
| DevTunnelRegion.AustraliaEast => "aue", | ||
| DevTunnelRegion.JapanEast => "jpe1", | ||
| null => string.Empty, | ||
| _ => throw new ArgumentException("Invalid region specified", nameof(Region)), | ||
| }; | ||
|
|
||
| internal string ToLoggerString() => $"{{ Description={Description}, AllowAnonymous={AllowAnonymous}, Labels=[{string.Join(", ", Labels ?? [])}], Region={Region} }}"; | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
@@ -53,3 +82,74 @@ public sealed class DevTunnelPortOptions | |
|
|
||
| internal string ToLoggerString() => $"{{ Description={Description}, AllowAnonymous={AllowAnonymous}, Protocol={Protocol}, Labels=[{string.Join(", ", Labels ?? [])}] }}"; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Region options for dev tunnel creation. | ||
| /// </summary> | ||
| public enum DevTunnelRegion : byte | ||
| { | ||
| /// <summary> | ||
| /// West Europe region. | ||
| /// </summary> | ||
| WestEurope, | ||
|
|
||
| /// <summary> | ||
| /// UK South region. | ||
| /// </summary> | ||
| UkSouth, | ||
|
|
||
| /// <summary> | ||
| /// North Europe region. | ||
| /// </summary> | ||
| NorthEurope, | ||
|
|
||
| /// <summary> | ||
| /// East US region. | ||
| /// </summary> | ||
| EastUs, | ||
|
|
||
| /// <summary> | ||
| /// East US 2 region. | ||
| /// </summary> | ||
| EastUs2, | ||
|
|
||
| /// <summary> | ||
| /// Central India region. | ||
| /// </summary> | ||
| CentralIndia, | ||
|
|
||
| /// <summary> | ||
| /// West US 3 region. | ||
| /// </summary> | ||
| WestUs3, | ||
|
|
||
| /// <summary> | ||
| /// West US 2 region. | ||
| /// </summary> | ||
| WestUs2, | ||
|
|
||
| /// <summary> | ||
| /// Southeast Asia region. | ||
| /// </summary> | ||
| SouthEastAsia, | ||
|
|
||
| /// <summary> | ||
| /// Brazil South region. | ||
| /// </summary> | ||
| BrazilSouth, | ||
|
|
||
| /// <summary> | ||
| /// Australia Central region. | ||
| /// </summary> | ||
| AustraliaCentral, | ||
|
|
||
| /// <summary> | ||
| /// Australia East region. | ||
| /// </summary> | ||
| AustraliaEast, | ||
|
|
||
| /// <summary> | ||
| /// Japan East region. | ||
| /// </summary> | ||
| JapanEast | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.