-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathDiskEncryptionSet.tsp
More file actions
121 lines (110 loc) · 3.98 KB
/
Copy pathDiskEncryptionSet.tsp
File metadata and controls
121 lines (110 loc) · 3.98 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
117
118
119
120
121
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 encryption set resource.
*/
model DiskEncryptionSet
is Azure.ResourceManager.TrackedResource<EncryptionSetProperties> {
...ResourceNameParameter<
Resource = DiskEncryptionSet,
KeyName = "diskEncryptionSetName",
SegmentName = "diskEncryptionSets",
NamePattern = "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
>;
/**
* The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property"
identity?: EncryptionSetIdentity;
}
@armResourceOperations
interface DiskEncryptionSets {
/**
* Gets information about a disk encryption set.
*/
get is ComputeResourceRead<DiskEncryptionSet>;
/**
* Creates or updates a disk encryption set
*/
#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<
DiskEncryptionSet,
Response =
| ArmResourceUpdatedResponse<DiskEncryptionSet>
| (ArmAcceptedLroResponse<LroHeaders = ArmLroLocationHeader<FinalResult = DiskEncryptionSet> &
Azure.Core.Foundations.RetryAfterHeader> & {
@bodyRoot _: DiskEncryptionSet;
})
>;
/**
* Updates (patches) a disk encryption set.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "For backward compatibility"
@patch(#{ implicitOptionality: false })
update is ComputeCustomPatchAsync<
DiskEncryptionSet,
DiskEncryptionSetUpdate,
Response =
| ArmResponse<DiskEncryptionSet>
| (ArmAcceptedLroResponse<LroHeaders = ArmLroLocationHeader<FinalResult = DiskEncryptionSet> &
Azure.Core.Foundations.RetryAfterHeader> & {
@bodyRoot _: DiskEncryptionSet;
})
>;
/**
* Deletes a disk encryption set.
*/
#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<DiskEncryptionSet>;
/**
* Lists all the disk encryption sets under a resource group.
*/
listByResourceGroup is ComputeResourceListByParent<
DiskEncryptionSet,
Response = DiskEncryptionSetList
>;
/**
* Lists all the disk encryption sets under a subscription.
*/
list is ComputeListBySubscription<
DiskEncryptionSet,
Response = DiskEncryptionSetList
>;
/**
* Lists all resources that are encrypted with this disk encryption set.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb"
@get
@action("associatedResources")
@list
listAssociatedResources is ComputeResourceActionSync<
DiskEncryptionSet,
void,
ResourceUriList
>;
}
@@doc(
DiskEncryptionSet.name,
"The name of the disk encryption set 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(DiskEncryptionSet.properties, "");
@@doc(
DiskEncryptionSets.createOrUpdate::parameters.resource,
"disk encryption set object supplied in the body of the Put disk encryption set operation."
);
@@doc(
DiskEncryptionSets.update::parameters.properties,
"disk encryption set object supplied in the body of the Patch disk encryption set operation."
);