-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathBillingStatistic.tsp
More file actions
69 lines (61 loc) · 2.07 KB
/
Copy pathBillingStatistic.tsp
File metadata and controls
69 lines (61 loc) · 2.07 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
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 TypeSpec.Versioning;
namespace Microsoft.SecurityInsights;
// FIXME: BillingStatistic has no properties property
/**
* Billing statistic
*/
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@discriminator("kind")
model BillingStatistic
is Azure.ResourceManager.Legacy.DiscriminatedProxyResource<BillingStatisticKind> {
...ResourceNameParameter<
Resource = BillingStatistic,
KeyName = "billingStatisticName",
SegmentName = "billingStatistics",
NamePattern = "^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$"
>;
/**
* Resource Etag.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@visibility(Lifecycle.Read)
etag?: string;
}
alias workspaceExternalResource = Extension.ExternalResource<
"Microsoft.OperationalInsights",
"workspaces",
"workspaceName",
NamePattern = "^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$",
Description = "The name of the workspace."
>;
@armResourceOperations(#{ omitTags: true })
interface BillingStatistics {
/**
* Gets a billing statistic
*/
@tag("billingStatistics")
get is Extension.Read<workspaceExternalResource, BillingStatistic>;
/**
* Gets all Microsoft Sentinel billing statistics.
*/
@tag("billingStatistics")
list is Extension.ListByTarget<
workspaceExternalResource,
BillingStatistic,
Response = ArmResponse<BillingStatisticList>
>;
}
@@doc(BillingStatistic.name, "The name of the billing statistic");
@@minLength(Extension.ExternalResource.name, 1);
@@maxLength(Extension.ExternalResource.name, 90);
@@added(BillingStatistic, Versions.v2025_10_01_preview);
@@added(BillingStatistics, Versions.v2025_10_01_preview);