/
securityInsights.ts
211 lines (203 loc) · 6.84 KB
/
securityInsights.ts
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreClient from "@azure/core-client";
import * as coreAuth from "@azure/core-auth";
import {
AlertRulesImpl,
ActionsImpl,
AlertRuleTemplatesImpl,
AutomationRulesImpl,
IncidentsImpl,
BookmarksImpl,
BookmarkRelationsImpl,
BookmarkOperationsImpl,
IPGeodataImpl,
DomainWhoisImpl,
EntitiesImpl,
EntitiesGetTimelineImpl,
EntitiesRelationsImpl,
EntityRelationsImpl,
EntityQueriesImpl,
EntityQueryTemplatesImpl,
IncidentCommentsImpl,
IncidentRelationsImpl,
MetadataImpl,
OfficeConsentsImpl,
SentinelOnboardingStatesImpl,
ProductSettingsImpl,
SourceControlOperationsImpl,
SourceControlsImpl,
ThreatIntelligenceIndicatorImpl,
ThreatIntelligenceIndicatorsImpl,
ThreatIntelligenceIndicatorMetricsImpl,
WatchlistsImpl,
WatchlistItemsImpl,
DataConnectorsImpl,
DataConnectorsCheckRequirementsOperationsImpl,
OperationsImpl
} from "./operations";
import {
AlertRules,
Actions,
AlertRuleTemplates,
AutomationRules,
Incidents,
Bookmarks,
BookmarkRelations,
BookmarkOperations,
IPGeodata,
DomainWhois,
Entities,
EntitiesGetTimeline,
EntitiesRelations,
EntityRelations,
EntityQueries,
EntityQueryTemplates,
IncidentComments,
IncidentRelations,
Metadata,
OfficeConsents,
SentinelOnboardingStates,
ProductSettings,
SourceControlOperations,
SourceControls,
ThreatIntelligenceIndicator,
ThreatIntelligenceIndicators,
ThreatIntelligenceIndicatorMetrics,
Watchlists,
WatchlistItems,
DataConnectors,
DataConnectorsCheckRequirementsOperations,
Operations
} from "./operationsInterfaces";
import { SecurityInsightsOptionalParams } from "./models";
export class SecurityInsights extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;
/**
* Initializes a new instance of the SecurityInsights class.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId The ID of the target subscription.
* @param options The parameter options
*/
constructor(
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: SecurityInsightsOptionalParams
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");
}
// Initializing default values for options
if (!options) {
options = {};
}
const defaults: SecurityInsightsOptionalParams = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
};
const packageDetails = `azsdk-js-arm-securityinsight/1.0.0-beta.2`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = {
...defaults,
...options,
userAgentOptions: {
userAgentPrefix
},
baseUri: options.endpoint || "https://management.azure.com"
};
super(optionsWithDefaults);
// Parameter assignments
this.subscriptionId = subscriptionId;
// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-01-01-preview";
this.alertRules = new AlertRulesImpl(this);
this.actions = new ActionsImpl(this);
this.alertRuleTemplates = new AlertRuleTemplatesImpl(this);
this.automationRules = new AutomationRulesImpl(this);
this.incidents = new IncidentsImpl(this);
this.bookmarks = new BookmarksImpl(this);
this.bookmarkRelations = new BookmarkRelationsImpl(this);
this.bookmarkOperations = new BookmarkOperationsImpl(this);
this.iPGeodata = new IPGeodataImpl(this);
this.domainWhois = new DomainWhoisImpl(this);
this.entities = new EntitiesImpl(this);
this.entitiesGetTimeline = new EntitiesGetTimelineImpl(this);
this.entitiesRelations = new EntitiesRelationsImpl(this);
this.entityRelations = new EntityRelationsImpl(this);
this.entityQueries = new EntityQueriesImpl(this);
this.entityQueryTemplates = new EntityQueryTemplatesImpl(this);
this.incidentComments = new IncidentCommentsImpl(this);
this.incidentRelations = new IncidentRelationsImpl(this);
this.metadata = new MetadataImpl(this);
this.officeConsents = new OfficeConsentsImpl(this);
this.sentinelOnboardingStates = new SentinelOnboardingStatesImpl(this);
this.productSettings = new ProductSettingsImpl(this);
this.sourceControlOperations = new SourceControlOperationsImpl(this);
this.sourceControls = new SourceControlsImpl(this);
this.threatIntelligenceIndicator = new ThreatIntelligenceIndicatorImpl(
this
);
this.threatIntelligenceIndicators = new ThreatIntelligenceIndicatorsImpl(
this
);
this.threatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsImpl(
this
);
this.watchlists = new WatchlistsImpl(this);
this.watchlistItems = new WatchlistItemsImpl(this);
this.dataConnectors = new DataConnectorsImpl(this);
this.dataConnectorsCheckRequirementsOperations = new DataConnectorsCheckRequirementsOperationsImpl(
this
);
this.operations = new OperationsImpl(this);
}
alertRules: AlertRules;
actions: Actions;
alertRuleTemplates: AlertRuleTemplates;
automationRules: AutomationRules;
incidents: Incidents;
bookmarks: Bookmarks;
bookmarkRelations: BookmarkRelations;
bookmarkOperations: BookmarkOperations;
iPGeodata: IPGeodata;
domainWhois: DomainWhois;
entities: Entities;
entitiesGetTimeline: EntitiesGetTimeline;
entitiesRelations: EntitiesRelations;
entityRelations: EntityRelations;
entityQueries: EntityQueries;
entityQueryTemplates: EntityQueryTemplates;
incidentComments: IncidentComments;
incidentRelations: IncidentRelations;
metadata: Metadata;
officeConsents: OfficeConsents;
sentinelOnboardingStates: SentinelOnboardingStates;
productSettings: ProductSettings;
sourceControlOperations: SourceControlOperations;
sourceControls: SourceControls;
threatIntelligenceIndicator: ThreatIntelligenceIndicator;
threatIntelligenceIndicators: ThreatIntelligenceIndicators;
threatIntelligenceIndicatorMetrics: ThreatIntelligenceIndicatorMetrics;
watchlists: Watchlists;
watchlistItems: WatchlistItems;
dataConnectors: DataConnectors;
dataConnectorsCheckRequirementsOperations: DataConnectorsCheckRequirementsOperations;
operations: Operations;
}