forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.tsp
More file actions
97 lines (87 loc) · 3.51 KB
/
routes.tsp
File metadata and controls
97 lines (87 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.ResourceManager;
namespace Microsoft.DataReplication;
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Cannot use @armResourceOperations decorator here, the auto-generated routes do not match feature requirements"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "Cannot use @armResourceOperations decorator here, the auto-generated routes do not match feature requirements"
interface CheckNameAvailability {
/**
* Checks the resource name availability.
*/
@summary("Performs the resource name availability check.")
@route("/subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability")
@post
post(
...ApiVersionParameter,
...SubscriptionIdParameter,
...LocationResourceParameter,
/**
* Resource details.
*/
@body
body?: CheckNameAvailabilityModel,
): ArmResponse<CheckNameAvailabilityResponseModel> | ErrorResponse;
}
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Cannot use @armResourceOperations decorator here, the auto-generated routes do not match feature requirements"
interface DeploymentPreflight {
/**
* Performs resource deployment preflight validation.
*/
@summary("Performs resource deployment validation.")
@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight")
@armResourceAction(DeploymentPreflightModel)
@post
post(
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,
/**
* Deployment Id.
*/
@path
deploymentId: string,
/**
* Deployment preflight model.
*/
@body
body?: DeploymentPreflightModel,
): ArmResponse<DeploymentPreflightModel> | ErrorResponse;
}
@armResourceOperations
interface OperationResults {
/**
* Gets the operations.
*/
@summary("Gets the operation result status.")
@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/operationResults/{operationId}")
@armResourceRead(ArmResponse<OperationStatus>)
@get
get(
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,
...Foundations.OperationIdParameter,
): ArmResponse<OperationStatus> | ErrorResponse;
}
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Cannot use @armResourceOperations decorator here, the auto-generated routes do not match feature requirements"
interface LocationBasedOperationResults {
/**
* Gets the location based operation result.
*/
@summary("Gets the location based operation result status.")
@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/locations/{location}/operationResults/{operationId}")
@armResourceRead(ArmResponse<OperationStatus>)
@get
get(
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,
...LocationResourceParameter,
...Foundations.OperationIdParameter,
): ArmResponse<OperationStatus> | ErrorResponse;
}