-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathWatchlist.tsp
More file actions
81 lines (73 loc) · 2.6 KB
/
Copy pathWatchlist.tsp
File metadata and controls
81 lines (73 loc) · 2.6 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
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./VirtualResource.tsp";
using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
namespace Microsoft.SecurityInsights;
/**
* Represents a Watchlist in Azure Security Insights.
*/
model Watchlist is Azure.ResourceManager.ProxyResource<WatchlistProperties> {
...ResourceNameParameter<
Resource = Watchlist,
KeyName = "watchlistAlias",
SegmentName = "watchlists",
NamePattern = ""
>;
/**
* Etag of the azure resource
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
etag?: string;
}
@armResourceOperations
interface Watchlists {
/**
* Get a watchlist, without its watchlist items.
*/
get is Extension.Read<OperationalInsights, Watchlist, Error = CloudError>;
/**
* Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties.
*/
createOrUpdate is Extension.CreateOrReplaceAsync<
OperationalInsights,
Watchlist,
LroHeaders = ArmAsyncOperationHeader<FinalResult = Watchlist>,
Error = ErrorResponse
>;
/**
* Delete a watchlist.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@Azure.Core.useFinalStateVia("azure-async-operation")
delete is Extension.DeleteWithoutOkAsync<
OperationalInsights,
Watchlist,
LroHeaders = ArmCombinedLroHeaders<FinalResult = Watchlist>,
Error = ErrorResponse
>;
/**
* Get all watchlists, without watchlist items.
*/
list is Extension.ListByTarget<
OperationalInsights,
Watchlist,
Parameters = {
/**
* Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. Optional.
*/
@query("$skipToken")
$skipToken?: string;
},
Response = ArmResponse<WatchlistList>,
Error = CloudError
>;
}
@@doc(Watchlist.name, "The watchlist alias");
@@doc(Watchlist.properties, "Watchlist properties");
@@doc(Watchlists.createOrUpdate::parameters.resource, "The watchlist");