Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "@typespec/versioning";
import "./models.tsp";
import "../Common/main.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using TypeSpec.Versioning;
using Common;

namespace Microsoft.Network;
Expand Down Expand Up @@ -108,6 +110,126 @@ interface ExpressRouteCircuits {
ArmResponse<ExpressRouteCircuitStats>,
Error = CloudError
>;

/**
* Retrieves the details of all the link failover tests performed on the express route circuit.
*/
@tag("ExpressRouteCircuits")
@action("getCircuitLinkFailoverAllTestsDetails")
@added(Versions.v2025_07_01)
getCircuitLinkFailoverAllTestsDetails is ArmResourceActionAsync<
ExpressRouteCircuit,
void,
Response = {
#suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@body body: ExpressRouteLinkFailoverAllTestsDetailsList;
},
Parameters = {
/**
* The type of failover test.
*/
@query("failoverTestType")
failoverTestType?: string;

/**
* Fetch only the latest tests.
*/
@query("fetchLatest")
fetchLatest?: boolean;
},
LroHeaders = ArmLroLocationHeader<FinalResult = ExpressRouteLinkFailoverAllTestsDetailsList> &
Azure.Core.Foundations.RetryAfterHeader,
Error = CloudError
>;

/**
* Retrieves the details of a particular link failover test performed on the express route circuit.
*/
@tag("ExpressRouteCircuits")
@action("getCircuitLinkFailoverSingleTestDetails")
@added(Versions.v2025_07_01)
getCircuitLinkFailoverSingleTestDetails is ArmResourceActionAsync<
ExpressRouteCircuit,
void,
Response = {
#suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@body body: ExpressRouteLinkFailoverSingleTestDetailsList;
},
Parameters = {
/**
* The link type.
*/
@query("linkType")
linkType: string;

/**
* The circuit test category.
*/
@query("circuitTestCategory")
circuitTestCategory: string;

/**
* The unique Guid value which identifies the test.
*/
@query("failoverTestId")
failoverTestId: string;
},
LroHeaders = ArmLroLocationHeader<FinalResult = ExpressRouteLinkFailoverSingleTestDetailsList> &
Azure.Core.Foundations.RetryAfterHeader,
Error = CloudError
>;

/**
* Starts link failover simulation on the express route circuit for the specified link type and test category.
*/
@tag("ExpressRouteCircuits")
@action("startCircuitLinkFailoverTest")
@added(Versions.v2025_07_01)
startCircuitLinkFailoverTest is ArmResourceActionAsync<
ExpressRouteCircuit,
void,
{
/** The result of the start circuit link failover test operation. */
@body body: stringApplicationJson;
},
Parameters = {
/**
* The link type.
*/
@query("linkType")
linkType: string;

/**
* The circuit test category.
*/
@query("circuitTestCategory")
circuitTestCategory: string;
},
LroHeaders = ArmLroLocationHeader<FinalResult = stringApplicationJson> &
Azure.Core.Foundations.RetryAfterHeader,
Error = CloudError
>;

/**
* Stops link failover simulation on the express route circuit.
*/
@tag("ExpressRouteCircuits")
@action("stopCircuitLinkFailoverTest")
@added(Versions.v2025_07_01)
stopCircuitLinkFailoverTest is ArmResourceActionAsync<
ExpressRouteCircuit,
{
/** Parameters supplied to stop the link failover simulation on the express route circuit. */
@bodyRoot stopParameters: ExpressRouteLinkFailoverStopApiParameters;
},
{
/** The result of the stop circuit link failover test operation. */
@body body: stringApplicationJson;
},
LroHeaders = ArmLroLocationHeader<FinalResult = stringApplicationJson> &
Azure.Core.Foundations.RetryAfterHeader,
Error = CloudError
>;
}

@@doc(ExpressRouteCircuit.name, "The name of express route circuit.");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters": {
"api-version": "2025-07-01",
"failoverTestType": "SingleSiteFailover",
"fetchLatest": true,
"resourceGroupName": "rg1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"circuitName": "circuit1"
},
"responses": {
"200": {
"body": [
{
"status": "Completed",
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-01-01T01:00:00Z",
"testGuid": "00000000-0000-0000-0000-000000000001",
"testType": "SingleSiteFailover",
"issues": [],
"wasSimulationSuccessful": true,
"circuitTestCategory": "BgpDisconnect",
"linkType": "Primary",
"bgpStatus": [
{
"type": "IPv4",
"link": "Primary",
"status": "Connected",
"checkTimeUtc": "2025-01-01T00:30:00Z"
}
]
}
]
},
"202": {
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2025-07-01"
}
}
},
"operationId": "ExpressRouteCircuits_GetCircuitLinkFailoverAllTestsDetails",
"title": "ExpressRouteCircuitGetCircuitLinkFailoverAllTestsDetails"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parameters": {
"api-version": "2025-07-01",
"linkType": "Primary",
"circuitTestCategory": "BgpDisconnect",
"failoverTestId": "00000000-0000-0000-0000-000000000001",
"resourceGroupName": "rg1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"circuitName": "circuit1"
},
"responses": {
"200": {
"body": [
{
"startTimeUtc": "2025-01-01T00:00:00Z",
"endTimeUtc": "2025-01-01T01:00:00Z",
"status": "Completed",
"wasSimulationSuccessful": true,
"linkType": "Primary",
"circuitTestCategory": "BgpDisconnect",
"isSimulationVerified": true,
"redundantRoutes": {
"beforeSimulation": [
{
"route": "10.0.0.0/24",
"nextHop": "10.0.0.1",
"primaryASPath": "65000 65001",
"secondaryASPath": "65000 65002"
}
],
"duringSimulation": [
{
"route": "10.0.0.0/24",
"nextHop": "10.0.0.2",
"primaryASPath": "65000 65001",
"secondaryASPath": "65000 65002"
}
]
},
"nonRedundantRoutes": {
"beforeSimulation": [],
"duringSimulation": []
},
"bgpStatus": [
{
"type": "IPv4",
"link": "Primary",
"status": "Connected",
"checkTimeUtc": "2025-01-01T00:30:00Z"
}
]
}
]
},
"202": {
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2025-07-01"
}
}
},
"operationId": "ExpressRouteCircuits_GetCircuitLinkFailoverSingleTestDetails",
"title": "ExpressRouteCircuitGetCircuitLinkFailoverSingleTestDetails"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"api-version": "2025-07-01",
"linkType": "Primary",
"circuitTestCategory": "BgpDisconnect",
"resourceGroupName": "rg1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"circuitName": "circuit1"
},
"responses": {
"200": {
"body": ""
},
"202": {
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2025-07-01"
}
}
},
"operationId": "ExpressRouteCircuits_StartCircuitLinkFailoverTest",
"title": "ExpressRouteCircuitStartCircuitLinkFailoverTest"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"api-version": "2025-07-01",
"resourceGroupName": "rg1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"circuitName": "circuit1",
"stopParameters": {
"circuitTestCategory": "BgpDisconnect",
"linkType": "Primary",
"wasSimulationSuccessful": true,
"isVerified": true
}
},
"responses": {
"200": {
"body": ""
},
"202": {
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2025-07-01"
}
}
},
"operationId": "ExpressRouteCircuits_StopCircuitLinkFailoverTest",
"title": "ExpressRouteCircuitStopCircuitLinkFailoverTest"
}
Loading
Loading