@azure/arm-defendereasm 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +2047 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.js +40 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsDeleteSample.js +40 -0
- package/dist-esm/samples-dev/labelsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.js +40 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.js +60 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsUpdateSample.js +40 -0
- package/dist-esm/samples-dev/labelsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +58 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.js +40 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.js +43 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.js +39 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesGetSample.js +39 -0
- package/dist-esm/samples-dev/workspacesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js +59 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js +58 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.js +39 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.js.map +1 -0
- package/dist-esm/src/easmMgmtClient.d.ts +23 -0
- package/dist-esm/src/easmMgmtClient.d.ts.map +1 -0
- package/dist-esm/src/easmMgmtClient.js +103 -0
- package/dist-esm/src/easmMgmtClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +11 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +21 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +492 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +66 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +23 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +574 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +16 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +137 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +5 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +12 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/labels.d.ts +87 -0
- package/dist-esm/src/operations/labels.d.ts.map +1 -0
- package/dist-esm/src/operations/labels.js +395 -0
- package/dist-esm/src/operations/labels.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +138 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/tasks.d.ts +21 -0
- package/dist-esm/src/operations/tasks.d.ts.map +1 -0
- package/dist-esm/src/operations/tasks.js +55 -0
- package/dist-esm/src/operations/tasks.js.map +1 -0
- package/dist-esm/src/operations/workspaces.d.ts +96 -0
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operations/workspaces.js +496 -0
- package/dist-esm/src/operations/workspaces.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +12 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/labels.d.ts +62 -0
- package/dist-esm/src/operationsInterfaces/labels.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/labels.js +9 -0
- package/dist-esm/src/operationsInterfaces/labels.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/tasks.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/tasks.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/tasks.js +9 -0
- package/dist-esm/src/operationsInterfaces/tasks.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +60 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js.map +1 -0
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/defendereasm_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/defendereasm_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/defendereasm_operations_test.spec.js +120 -0
- package/dist-esm/test/defendereasm_operations_test.spec.js.map +1 -0
- package/package.json +123 -0
- package/review/arm-defendereasm.api.md +400 -0
- package/rollup.config.js +122 -0
- package/src/easmMgmtClient.ts +151 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +42 -0
- package/src/models/index.ts +562 -0
- package/src/models/mappers.ts +639 -0
- package/src/models/parameters.ts +161 -0
- package/src/operations/index.ts +12 -0
- package/src/operations/labels.ts +543 -0
- package/src/operations/operations.ts +149 -0
- package/src/operations/tasks.ts +75 -0
- package/src/operations/workspaces.ts +625 -0
- package/src/operationsInterfaces/index.ts +12 -0
- package/src/operationsInterfaces/labels.ts +120 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/tasks.ts +29 -0
- package/src/operationsInterfaces/workspaces.ts +114 -0
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +33 -0
- package/types/arm-defendereasm.d.ts +724 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
## API Report File for "@azure/arm-defendereasm"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import * as coreAuth from '@azure/core-auth';
|
|
8
|
+
import * as coreClient from '@azure/core-client';
|
|
9
|
+
import { OperationState } from '@azure/core-lro';
|
|
10
|
+
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
11
|
+
import { SimplePollerLike } from '@azure/core-lro';
|
|
12
|
+
|
|
13
|
+
// @public
|
|
14
|
+
export type ActionType = string;
|
|
15
|
+
|
|
16
|
+
// @public
|
|
17
|
+
export type CreatedByType = string;
|
|
18
|
+
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export class EasmMgmtClient extends coreClient.ServiceClient {
|
|
21
|
+
// (undocumented)
|
|
22
|
+
$host: string;
|
|
23
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: EasmMgmtClientOptionalParams);
|
|
24
|
+
// (undocumented)
|
|
25
|
+
apiVersion: string;
|
|
26
|
+
// (undocumented)
|
|
27
|
+
labels: Labels;
|
|
28
|
+
// (undocumented)
|
|
29
|
+
operations: Operations;
|
|
30
|
+
// (undocumented)
|
|
31
|
+
subscriptionId: string;
|
|
32
|
+
// (undocumented)
|
|
33
|
+
tasks: Tasks;
|
|
34
|
+
// (undocumented)
|
|
35
|
+
workspaces: Workspaces;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// @public
|
|
39
|
+
export interface EasmMgmtClientOptionalParams extends coreClient.ServiceClientOptions {
|
|
40
|
+
$host?: string;
|
|
41
|
+
apiVersion?: string;
|
|
42
|
+
endpoint?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// @public
|
|
46
|
+
export interface ErrorAdditionalInfo {
|
|
47
|
+
readonly info?: Record<string, unknown>;
|
|
48
|
+
readonly type?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// @public
|
|
52
|
+
export interface ErrorDetail {
|
|
53
|
+
readonly additionalInfo?: ErrorAdditionalInfo[];
|
|
54
|
+
readonly code?: string;
|
|
55
|
+
readonly details?: ErrorDetail[];
|
|
56
|
+
readonly message?: string;
|
|
57
|
+
readonly target?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// @public
|
|
61
|
+
export interface ErrorResponse {
|
|
62
|
+
error?: ErrorDetail;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// @public
|
|
66
|
+
export function getContinuationToken(page: unknown): string | undefined;
|
|
67
|
+
|
|
68
|
+
// @public
|
|
69
|
+
export enum KnownActionType {
|
|
70
|
+
Internal = "Internal"
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// @public
|
|
74
|
+
export enum KnownCreatedByType {
|
|
75
|
+
Application = "Application",
|
|
76
|
+
Key = "Key",
|
|
77
|
+
ManagedIdentity = "ManagedIdentity",
|
|
78
|
+
User = "User"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// @public
|
|
82
|
+
export enum KnownOrigin {
|
|
83
|
+
System = "system",
|
|
84
|
+
User = "user",
|
|
85
|
+
UserSystem = "user,system"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// @public
|
|
89
|
+
export enum KnownResourceState {
|
|
90
|
+
Accepted = "Accepted",
|
|
91
|
+
Canceled = "Canceled",
|
|
92
|
+
ConfiguringApplication = "ConfiguringApplication",
|
|
93
|
+
Creating = "Creating",
|
|
94
|
+
CreatingArtifacts = "CreatingArtifacts",
|
|
95
|
+
DeletingArtifacts = "DeletingArtifacts",
|
|
96
|
+
Failed = "Failed",
|
|
97
|
+
InstallingApplication = "InstallingApplication",
|
|
98
|
+
MigratingApplicationData = "MigratingApplicationData",
|
|
99
|
+
NotSpecified = "NotSpecified",
|
|
100
|
+
ProvisioningResources = "ProvisioningResources",
|
|
101
|
+
RunningValidations = "RunningValidations",
|
|
102
|
+
Succeeded = "Succeeded"
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// @public
|
|
106
|
+
export interface LabelPatchResource extends LabelResource {
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// @public
|
|
110
|
+
export interface LabelResource extends ProxyResource {
|
|
111
|
+
color?: string;
|
|
112
|
+
displayName?: string;
|
|
113
|
+
readonly provisioningState?: ResourceState;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// @public
|
|
117
|
+
export interface LabelResourceList {
|
|
118
|
+
nextLink?: string;
|
|
119
|
+
value?: LabelResource[];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// @public
|
|
123
|
+
export interface LabelResourceProperties extends ResourceBaseProperties {
|
|
124
|
+
color?: string;
|
|
125
|
+
displayName?: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// @public
|
|
129
|
+
export interface Labels {
|
|
130
|
+
beginCreateAndUpdate(resourceGroupName: string, workspaceName: string, labelName: string, options?: LabelsCreateAndUpdateOptionalParams): Promise<SimplePollerLike<OperationState<LabelsCreateAndUpdateResponse>, LabelsCreateAndUpdateResponse>>;
|
|
131
|
+
beginCreateAndUpdateAndWait(resourceGroupName: string, workspaceName: string, labelName: string, options?: LabelsCreateAndUpdateOptionalParams): Promise<LabelsCreateAndUpdateResponse>;
|
|
132
|
+
beginDelete(resourceGroupName: string, workspaceName: string, labelName: string, options?: LabelsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
133
|
+
beginDeleteAndWait(resourceGroupName: string, workspaceName: string, labelName: string, options?: LabelsDeleteOptionalParams): Promise<void>;
|
|
134
|
+
getByWorkspace(resourceGroupName: string, workspaceName: string, labelName: string, options?: LabelsGetByWorkspaceOptionalParams): Promise<LabelsGetByWorkspaceResponse>;
|
|
135
|
+
listByWorkspace(resourceGroupName: string, workspaceName: string, options?: LabelsListByWorkspaceOptionalParams): PagedAsyncIterableIterator<LabelResource>;
|
|
136
|
+
update(resourceGroupName: string, workspaceName: string, labelName: string, options?: LabelsUpdateOptionalParams): Promise<LabelsUpdateResponse>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// @public
|
|
140
|
+
export interface LabelsCreateAndUpdateOptionalParams extends coreClient.OperationOptions {
|
|
141
|
+
labelResource?: LabelResource;
|
|
142
|
+
resumeFrom?: string;
|
|
143
|
+
updateIntervalInMs?: number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// @public
|
|
147
|
+
export type LabelsCreateAndUpdateResponse = LabelResource;
|
|
148
|
+
|
|
149
|
+
// @public
|
|
150
|
+
export interface LabelsDeleteOptionalParams extends coreClient.OperationOptions {
|
|
151
|
+
resumeFrom?: string;
|
|
152
|
+
updateIntervalInMs?: number;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// @public
|
|
156
|
+
export interface LabelsGetByWorkspaceOptionalParams extends coreClient.OperationOptions {
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// @public
|
|
160
|
+
export type LabelsGetByWorkspaceResponse = LabelResource;
|
|
161
|
+
|
|
162
|
+
// @public
|
|
163
|
+
export interface LabelsListByWorkspaceNextOptionalParams extends coreClient.OperationOptions {
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// @public
|
|
167
|
+
export type LabelsListByWorkspaceNextResponse = LabelResourceList;
|
|
168
|
+
|
|
169
|
+
// @public
|
|
170
|
+
export interface LabelsListByWorkspaceOptionalParams extends coreClient.OperationOptions {
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// @public
|
|
174
|
+
export type LabelsListByWorkspaceResponse = LabelResourceList;
|
|
175
|
+
|
|
176
|
+
// @public
|
|
177
|
+
export interface LabelsUpdateOptionalParams extends coreClient.OperationOptions {
|
|
178
|
+
labelPatchResource?: LabelPatchResource;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// @public
|
|
182
|
+
export type LabelsUpdateResponse = LabelResource;
|
|
183
|
+
|
|
184
|
+
// @public
|
|
185
|
+
export interface Operation {
|
|
186
|
+
readonly actionType?: ActionType;
|
|
187
|
+
display?: OperationDisplay;
|
|
188
|
+
readonly isDataAction?: boolean;
|
|
189
|
+
readonly name?: string;
|
|
190
|
+
readonly origin?: Origin;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// @public
|
|
194
|
+
export interface OperationDisplay {
|
|
195
|
+
readonly description?: string;
|
|
196
|
+
readonly operation?: string;
|
|
197
|
+
readonly provider?: string;
|
|
198
|
+
readonly resource?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// @public
|
|
202
|
+
export interface OperationListResult {
|
|
203
|
+
readonly nextLink?: string;
|
|
204
|
+
readonly value?: Operation[];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// @public
|
|
208
|
+
export interface Operations {
|
|
209
|
+
list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// @public
|
|
213
|
+
export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// @public
|
|
217
|
+
export type OperationsListNextResponse = OperationListResult;
|
|
218
|
+
|
|
219
|
+
// @public
|
|
220
|
+
export interface OperationsListOptionalParams extends coreClient.OperationOptions {
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// @public
|
|
224
|
+
export type OperationsListResponse = OperationListResult;
|
|
225
|
+
|
|
226
|
+
// @public
|
|
227
|
+
export type Origin = string;
|
|
228
|
+
|
|
229
|
+
// @public
|
|
230
|
+
export interface ProxyResource extends Resource {
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// @public
|
|
234
|
+
export interface Resource {
|
|
235
|
+
readonly id?: string;
|
|
236
|
+
readonly name?: string;
|
|
237
|
+
readonly systemData?: SystemData;
|
|
238
|
+
readonly type?: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// @public
|
|
242
|
+
export interface ResourceBaseProperties {
|
|
243
|
+
readonly provisioningState?: ResourceState;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// @public
|
|
247
|
+
export type ResourceState = string;
|
|
248
|
+
|
|
249
|
+
// @public
|
|
250
|
+
export interface SystemData {
|
|
251
|
+
createdAt?: Date;
|
|
252
|
+
createdBy?: string;
|
|
253
|
+
createdByType?: CreatedByType;
|
|
254
|
+
lastModifiedAt?: Date;
|
|
255
|
+
lastModifiedBy?: string;
|
|
256
|
+
lastModifiedByType?: CreatedByType;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// @public
|
|
260
|
+
export interface TaskResource extends ProxyResource {
|
|
261
|
+
completedAt?: string;
|
|
262
|
+
lastPolledAt?: string;
|
|
263
|
+
metadata?: Record<string, unknown>;
|
|
264
|
+
phase?: string;
|
|
265
|
+
readonly provisioningState?: ResourceState;
|
|
266
|
+
reason?: string;
|
|
267
|
+
startedAt?: string;
|
|
268
|
+
state?: string;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// @public
|
|
272
|
+
export interface TaskResourceProperties extends ResourceBaseProperties {
|
|
273
|
+
completedAt?: string;
|
|
274
|
+
lastPolledAt?: string;
|
|
275
|
+
metadata?: Record<string, unknown>;
|
|
276
|
+
phase?: string;
|
|
277
|
+
reason?: string;
|
|
278
|
+
startedAt?: string;
|
|
279
|
+
state?: string;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// @public
|
|
283
|
+
export interface Tasks {
|
|
284
|
+
getByWorkspace(resourceGroupName: string, workspaceName: string, taskId: string, options?: TasksGetByWorkspaceOptionalParams): Promise<TasksGetByWorkspaceResponse>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// @public
|
|
288
|
+
export interface TasksGetByWorkspaceOptionalParams extends coreClient.OperationOptions {
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// @public
|
|
292
|
+
export type TasksGetByWorkspaceResponse = TaskResource;
|
|
293
|
+
|
|
294
|
+
// @public
|
|
295
|
+
export interface TrackedResource extends Resource {
|
|
296
|
+
location: string;
|
|
297
|
+
tags?: {
|
|
298
|
+
[propertyName: string]: string;
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// @public
|
|
303
|
+
export interface WorkspacePatchResource {
|
|
304
|
+
readonly systemData?: SystemData;
|
|
305
|
+
tags?: {
|
|
306
|
+
[propertyName: string]: string;
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// @public
|
|
311
|
+
export interface WorkspaceResource extends TrackedResource {
|
|
312
|
+
readonly dataPlaneEndpoint?: string;
|
|
313
|
+
readonly provisioningState?: ResourceState;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// @public
|
|
317
|
+
export interface WorkspaceResourceList {
|
|
318
|
+
nextLink?: string;
|
|
319
|
+
value?: WorkspaceResource[];
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// @public
|
|
323
|
+
export interface WorkspaceResourceProperties extends ResourceBaseProperties {
|
|
324
|
+
readonly dataPlaneEndpoint?: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// @public
|
|
328
|
+
export interface Workspaces {
|
|
329
|
+
beginCreateAndUpdate(resourceGroupName: string, workspaceName: string, options?: WorkspacesCreateAndUpdateOptionalParams): Promise<SimplePollerLike<OperationState<WorkspacesCreateAndUpdateResponse>, WorkspacesCreateAndUpdateResponse>>;
|
|
330
|
+
beginCreateAndUpdateAndWait(resourceGroupName: string, workspaceName: string, options?: WorkspacesCreateAndUpdateOptionalParams): Promise<WorkspacesCreateAndUpdateResponse>;
|
|
331
|
+
beginDelete(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
332
|
+
beginDeleteAndWait(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise<void>;
|
|
333
|
+
get(resourceGroupName: string, workspaceName: string, options?: WorkspacesGetOptionalParams): Promise<WorkspacesGetResponse>;
|
|
334
|
+
listByResourceGroup(resourceGroupName: string, options?: WorkspacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator<WorkspaceResource>;
|
|
335
|
+
listBySubscription(options?: WorkspacesListBySubscriptionOptionalParams): PagedAsyncIterableIterator<WorkspaceResource>;
|
|
336
|
+
update(resourceGroupName: string, workspaceName: string, options?: WorkspacesUpdateOptionalParams): Promise<WorkspacesUpdateResponse>;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// @public
|
|
340
|
+
export interface WorkspacesCreateAndUpdateOptionalParams extends coreClient.OperationOptions {
|
|
341
|
+
resumeFrom?: string;
|
|
342
|
+
updateIntervalInMs?: number;
|
|
343
|
+
workspaceResource?: WorkspaceResource;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// @public
|
|
347
|
+
export type WorkspacesCreateAndUpdateResponse = WorkspaceResource;
|
|
348
|
+
|
|
349
|
+
// @public
|
|
350
|
+
export interface WorkspacesDeleteOptionalParams extends coreClient.OperationOptions {
|
|
351
|
+
resumeFrom?: string;
|
|
352
|
+
updateIntervalInMs?: number;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// @public
|
|
356
|
+
export interface WorkspacesGetOptionalParams extends coreClient.OperationOptions {
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// @public
|
|
360
|
+
export type WorkspacesGetResponse = WorkspaceResource;
|
|
361
|
+
|
|
362
|
+
// @public
|
|
363
|
+
export interface WorkspacesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// @public
|
|
367
|
+
export type WorkspacesListByResourceGroupNextResponse = WorkspaceResourceList;
|
|
368
|
+
|
|
369
|
+
// @public
|
|
370
|
+
export interface WorkspacesListByResourceGroupOptionalParams extends coreClient.OperationOptions {
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// @public
|
|
374
|
+
export type WorkspacesListByResourceGroupResponse = WorkspaceResourceList;
|
|
375
|
+
|
|
376
|
+
// @public
|
|
377
|
+
export interface WorkspacesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// @public
|
|
381
|
+
export type WorkspacesListBySubscriptionNextResponse = WorkspaceResourceList;
|
|
382
|
+
|
|
383
|
+
// @public
|
|
384
|
+
export interface WorkspacesListBySubscriptionOptionalParams extends coreClient.OperationOptions {
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// @public
|
|
388
|
+
export type WorkspacesListBySubscriptionResponse = WorkspaceResourceList;
|
|
389
|
+
|
|
390
|
+
// @public
|
|
391
|
+
export interface WorkspacesUpdateOptionalParams extends coreClient.OperationOptions {
|
|
392
|
+
workspacePatchResource?: WorkspacePatchResource;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// @public
|
|
396
|
+
export type WorkspacesUpdateResponse = WorkspaceResource;
|
|
397
|
+
|
|
398
|
+
// (No @packageDocumentation comment for this package)
|
|
399
|
+
|
|
400
|
+
```
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
10
|
+
import cjs from "@rollup/plugin-commonjs";
|
|
11
|
+
import sourcemaps from "rollup-plugin-sourcemaps";
|
|
12
|
+
import multiEntry from "@rollup/plugin-multi-entry";
|
|
13
|
+
import json from "@rollup/plugin-json";
|
|
14
|
+
|
|
15
|
+
import nodeBuiltins from "builtin-modules";
|
|
16
|
+
|
|
17
|
+
// #region Warning Handler
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A function that can determine whether a rollup warning should be ignored. If
|
|
21
|
+
* the function returns `true`, then the warning will not be displayed.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
function ignoreNiseSinonEval(warning) {
|
|
25
|
+
return (
|
|
26
|
+
warning.code === "EVAL" &&
|
|
27
|
+
warning.id &&
|
|
28
|
+
(warning.id.includes("node_modules/nise") ||
|
|
29
|
+
warning.id.includes("node_modules/sinon")) === true
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function ignoreChaiCircularDependency(warning) {
|
|
34
|
+
return (
|
|
35
|
+
warning.code === "CIRCULAR_DEPENDENCY" &&
|
|
36
|
+
warning.importer && warning.importer.includes("node_modules/chai") === true
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Construct a warning handler for the shared rollup configuration
|
|
44
|
+
* that ignores certain warnings that are not relevant to testing.
|
|
45
|
+
*/
|
|
46
|
+
function makeOnWarnForTesting() {
|
|
47
|
+
return (warning, warn) => {
|
|
48
|
+
// If every inhibitor returns false (i.e. no inhibitors), then show the warning
|
|
49
|
+
if (warningInhibitors.every((inhib) => !inhib(warning))) {
|
|
50
|
+
warn(warning);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// #endregion
|
|
56
|
+
|
|
57
|
+
function makeBrowserTestConfig() {
|
|
58
|
+
const config = {
|
|
59
|
+
input: {
|
|
60
|
+
include: ["dist-esm/test/**/*.spec.js"],
|
|
61
|
+
exclude: ["dist-esm/test/**/node/**"]
|
|
62
|
+
},
|
|
63
|
+
output: {
|
|
64
|
+
file: `dist-test/index.browser.js`,
|
|
65
|
+
format: "umd",
|
|
66
|
+
sourcemap: true
|
|
67
|
+
},
|
|
68
|
+
preserveSymlinks: false,
|
|
69
|
+
plugins: [
|
|
70
|
+
multiEntry({ exports: false }),
|
|
71
|
+
nodeResolve({
|
|
72
|
+
mainFields: ["module", "browser"]
|
|
73
|
+
}),
|
|
74
|
+
cjs(),
|
|
75
|
+
json(),
|
|
76
|
+
sourcemaps()
|
|
77
|
+
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
|
78
|
+
],
|
|
79
|
+
onwarn: makeOnWarnForTesting(),
|
|
80
|
+
// Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
|
|
81
|
+
// rollup started respecting the "sideEffects" field in package.json. Since
|
|
82
|
+
// our package.json sets "sideEffects=false", this also applies to test
|
|
83
|
+
// code, which causes all tests to be removed by tree-shaking.
|
|
84
|
+
treeshake: false
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return config;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const defaultConfigurationOptions = {
|
|
91
|
+
disableBrowserBundle: false
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export function makeConfig(pkg, options) {
|
|
95
|
+
options = {
|
|
96
|
+
...defaultConfigurationOptions,
|
|
97
|
+
...(options || {})
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const baseConfig = {
|
|
101
|
+
// Use the package's module field if it has one
|
|
102
|
+
input: pkg["module"] || "dist-esm/src/index.js",
|
|
103
|
+
external: [
|
|
104
|
+
...nodeBuiltins,
|
|
105
|
+
...Object.keys(pkg.dependencies),
|
|
106
|
+
...Object.keys(pkg.devDependencies)
|
|
107
|
+
],
|
|
108
|
+
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
|
109
|
+
preserveSymlinks: false,
|
|
110
|
+
plugins: [sourcemaps(), nodeResolve()]
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const config = [baseConfig];
|
|
114
|
+
|
|
115
|
+
if (!options.disableBrowserBundle) {
|
|
116
|
+
config.push(makeBrowserTestConfig());
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return config;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export default makeConfig(require("./package.json"));
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
11
|
+
import {
|
|
12
|
+
PipelineRequest,
|
|
13
|
+
PipelineResponse,
|
|
14
|
+
SendRequest
|
|
15
|
+
} from "@azure/core-rest-pipeline";
|
|
16
|
+
import * as coreAuth from "@azure/core-auth";
|
|
17
|
+
import {
|
|
18
|
+
WorkspacesImpl,
|
|
19
|
+
LabelsImpl,
|
|
20
|
+
TasksImpl,
|
|
21
|
+
OperationsImpl
|
|
22
|
+
} from "./operations";
|
|
23
|
+
import { Workspaces, Labels, Tasks, Operations } from "./operationsInterfaces";
|
|
24
|
+
import { EasmMgmtClientOptionalParams } from "./models";
|
|
25
|
+
|
|
26
|
+
export class EasmMgmtClient extends coreClient.ServiceClient {
|
|
27
|
+
$host: string;
|
|
28
|
+
apiVersion: string;
|
|
29
|
+
subscriptionId: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Initializes a new instance of the EasmMgmtClient class.
|
|
33
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
34
|
+
* @param subscriptionId The ID of the target subscription.
|
|
35
|
+
* @param options The parameter options
|
|
36
|
+
*/
|
|
37
|
+
constructor(
|
|
38
|
+
credentials: coreAuth.TokenCredential,
|
|
39
|
+
subscriptionId: string,
|
|
40
|
+
options?: EasmMgmtClientOptionalParams
|
|
41
|
+
) {
|
|
42
|
+
if (credentials === undefined) {
|
|
43
|
+
throw new Error("'credentials' cannot be null");
|
|
44
|
+
}
|
|
45
|
+
if (subscriptionId === undefined) {
|
|
46
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Initializing default values for options
|
|
50
|
+
if (!options) {
|
|
51
|
+
options = {};
|
|
52
|
+
}
|
|
53
|
+
const defaults: EasmMgmtClientOptionalParams = {
|
|
54
|
+
requestContentType: "application/json; charset=utf-8",
|
|
55
|
+
credential: credentials
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const packageDetails = `azsdk-js-arm-defendereasm/1.0.0-beta.1`;
|
|
59
|
+
const userAgentPrefix =
|
|
60
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
61
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
62
|
+
: `${packageDetails}`;
|
|
63
|
+
|
|
64
|
+
const optionsWithDefaults = {
|
|
65
|
+
...defaults,
|
|
66
|
+
...options,
|
|
67
|
+
userAgentOptions: {
|
|
68
|
+
userAgentPrefix
|
|
69
|
+
},
|
|
70
|
+
endpoint:
|
|
71
|
+
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
72
|
+
};
|
|
73
|
+
super(optionsWithDefaults);
|
|
74
|
+
|
|
75
|
+
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
|
76
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
77
|
+
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
|
78
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
79
|
+
(pipelinePolicy) =>
|
|
80
|
+
pipelinePolicy.name ===
|
|
81
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
if (
|
|
85
|
+
!options ||
|
|
86
|
+
!options.pipeline ||
|
|
87
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
88
|
+
!bearerTokenAuthenticationPolicyFound
|
|
89
|
+
) {
|
|
90
|
+
this.pipeline.removePolicy({
|
|
91
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
92
|
+
});
|
|
93
|
+
this.pipeline.addPolicy(
|
|
94
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
95
|
+
credential: credentials,
|
|
96
|
+
scopes:
|
|
97
|
+
optionsWithDefaults.credentialScopes ??
|
|
98
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
99
|
+
challengeCallbacks: {
|
|
100
|
+
authorizeRequestOnChallenge:
|
|
101
|
+
coreClient.authorizeRequestOnClaimChallenge
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
// Parameter assignments
|
|
107
|
+
this.subscriptionId = subscriptionId;
|
|
108
|
+
|
|
109
|
+
// Assigning values to Constant parameters
|
|
110
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
111
|
+
this.apiVersion = options.apiVersion || "2023-04-01-preview";
|
|
112
|
+
this.workspaces = new WorkspacesImpl(this);
|
|
113
|
+
this.labels = new LabelsImpl(this);
|
|
114
|
+
this.tasks = new TasksImpl(this);
|
|
115
|
+
this.operations = new OperationsImpl(this);
|
|
116
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
120
|
+
private addCustomApiVersionPolicy(apiVersion?: string) {
|
|
121
|
+
if (!apiVersion) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const apiVersionPolicy = {
|
|
125
|
+
name: "CustomApiVersionPolicy",
|
|
126
|
+
async sendRequest(
|
|
127
|
+
request: PipelineRequest,
|
|
128
|
+
next: SendRequest
|
|
129
|
+
): Promise<PipelineResponse> {
|
|
130
|
+
const param = request.url.split("?");
|
|
131
|
+
if (param.length > 1) {
|
|
132
|
+
const newParams = param[1].split("&").map((item) => {
|
|
133
|
+
if (item.indexOf("api-version") > -1) {
|
|
134
|
+
return "api-version=" + apiVersion;
|
|
135
|
+
} else {
|
|
136
|
+
return item;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
140
|
+
}
|
|
141
|
+
return next(request);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
workspaces: Workspaces;
|
|
148
|
+
labels: Labels;
|
|
149
|
+
tasks: Tasks;
|
|
150
|
+
operations: Operations;
|
|
151
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/// <reference lib="esnext.asynciterable" />
|
|
10
|
+
export { getContinuationToken } from "./pagingHelper";
|
|
11
|
+
export * from "./models";
|
|
12
|
+
export { EasmMgmtClient } from "./easmMgmtClient";
|
|
13
|
+
export * from "./operationsInterfaces";
|