-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathDiskAccess.tsp
More file actions
116 lines (105 loc) · 3.64 KB
/
Copy pathDiskAccess.tsp
File metadata and controls
116 lines (105 loc) · 3.64 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Common;
namespace ComputeDisk;
/**
* disk access resource.
*/
model DiskAccess
is Azure.ResourceManager.TrackedResource<DiskAccessProperties> {
...ResourceNameParameter<
Resource = DiskAccess,
KeyName = "diskAccessName",
SegmentName = "diskAccesses",
NamePattern = "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
>;
/**
* The extended location where the disk access will be created. Extended location cannot be changed.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property"
extendedLocation?: ExtendedLocation;
}
@armResourceOperations
interface DiskAccesses {
/**
* Gets information about a disk access resource.
*/
get is ComputeResourceRead<DiskAccess>;
/**
* Creates or updates a disk access resource
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "For backward compatibility"
createOrUpdate is ComputeResourceCreateOrReplaceAsync<
DiskAccess,
Response =
| ArmResourceUpdatedResponse<DiskAccess>
| (ArmAcceptedLroResponse<LroHeaders = ArmLroLocationHeader<FinalResult = DiskAccess> &
Azure.Core.Foundations.RetryAfterHeader> & {
@bodyRoot _: DiskAccess;
})
>;
/**
* Updates (patches) a disk access resource.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "For backward compatibility"
@patch(#{ implicitOptionality: false })
update is ComputeCustomPatchAsync<
DiskAccess,
DiskAccessUpdate,
Response =
| ArmResponse<DiskAccess>
| (ArmAcceptedLroResponse<LroHeaders = ArmLroLocationHeader<FinalResult = DiskAccess> &
Azure.Core.Foundations.RetryAfterHeader> & {
@bodyRoot _: DiskAccess;
})
>;
/**
* Deletes a disk access resource.
*/
#suppress "deprecated" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility"
delete is ComputeResourceDeleteAsync<DiskAccess>;
/**
* Lists all the disk access resources under a resource group.
*/
listByResourceGroup is ComputeResourceListByParent<
DiskAccess,
Response = DiskAccessList
>;
/**
* Lists all the disk access resources under a subscription.
*/
list is ComputeListBySubscription<DiskAccess, Response = DiskAccessList>;
/**
* Gets the private link resources possible under disk access resource
*/
@get
@action("privatelinkresources")
getPrivateLinkResources is ComputeResourceActionSync<
DiskAccess,
void,
PrivateLinkResourceListResult
>;
}
@@doc(
DiskAccess.name,
"The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters."
);
@@doc(DiskAccess.properties, "");
@@doc(
DiskAccesses.createOrUpdate::parameters.resource,
"disk access object supplied in the body of the Put disk access operation."
);
@@doc(
DiskAccesses.update::parameters.properties,
"disk access object supplied in the body of the Patch disk access operation."
);