@azure/arm-chaos 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 +3725 -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/capabilitiesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/capabilitiesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/capabilitiesCreateOrUpdateSample.js +36 -0
- package/dist-esm/samples-dev/capabilitiesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/capabilitiesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/capabilitiesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/capabilitiesDeleteSample.js +35 -0
- package/dist-esm/samples-dev/capabilitiesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/capabilitiesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/capabilitiesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/capabilitiesGetSample.js +35 -0
- package/dist-esm/samples-dev/capabilitiesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/capabilitiesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/capabilitiesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/capabilitiesListSample.js +48 -0
- package/dist-esm/samples-dev/capabilitiesListSample.js.map +1 -0
- package/dist-esm/samples-dev/capabilityTypesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/capabilityTypesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/capabilityTypesGetSample.js +32 -0
- package/dist-esm/samples-dev/capabilityTypesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/capabilityTypesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/capabilityTypesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/capabilityTypesListSample.js +45 -0
- package/dist-esm/samples-dev/capabilityTypesListSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsCancelSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsCancelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsCancelSample.js +31 -0
- package/dist-esm/samples-dev/experimentsCancelSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.js +66 -0
- package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/experimentsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsGetExecutionDetailsSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsGetExecutionDetailsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsGetExecutionDetailsSample.js +32 -0
- package/dist-esm/samples-dev/experimentsGetExecutionDetailsSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsGetSample.js +31 -0
- package/dist-esm/samples-dev/experimentsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsGetStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsGetStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsGetStatusSample.js +32 -0
- package/dist-esm/samples-dev/experimentsGetStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsListAllSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsListAllSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsListAllSample.js +45 -0
- package/dist-esm/samples-dev/experimentsListAllSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsListAllStatusesSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsListAllStatusesSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsListAllStatusesSample.js +45 -0
- package/dist-esm/samples-dev/experimentsListAllStatusesSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsListExecutionDetailsSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsListExecutionDetailsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsListExecutionDetailsSample.js +45 -0
- package/dist-esm/samples-dev/experimentsListExecutionDetailsSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsListSample.js +46 -0
- package/dist-esm/samples-dev/experimentsListSample.js.map +1 -0
- package/dist-esm/samples-dev/experimentsStartSample.d.ts +2 -0
- package/dist-esm/samples-dev/experimentsStartSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/experimentsStartSample.js +31 -0
- package/dist-esm/samples-dev/experimentsStartSample.js.map +1 -0
- package/dist-esm/samples-dev/targetTypesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/targetTypesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/targetTypesGetSample.js +31 -0
- package/dist-esm/samples-dev/targetTypesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/targetTypesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/targetTypesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/targetTypesListSample.js +46 -0
- package/dist-esm/samples-dev/targetTypesListSample.js.map +1 -0
- package/dist-esm/samples-dev/targetsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/targetsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/targetsCreateOrUpdateSample.js +41 -0
- package/dist-esm/samples-dev/targetsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/targetsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/targetsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/targetsDeleteSample.js +34 -0
- package/dist-esm/samples-dev/targetsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/targetsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/targetsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/targetsGetSample.js +34 -0
- package/dist-esm/samples-dev/targetsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/targetsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/targetsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/targetsListSample.js +49 -0
- package/dist-esm/samples-dev/targetsListSample.js.map +1 -0
- package/dist-esm/src/chaosManagementClient.d.ts +25 -0
- package/dist-esm/src/chaosManagementClient.d.ts.map +1 -0
- package/dist-esm/src/chaosManagementClient.js +108 -0
- package/dist-esm/src/chaosManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +980 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +36 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +50 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +1530 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +25 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +264 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/capabilities.d.ts +81 -0
- package/dist-esm/src/operations/capabilities.d.ts.map +1 -0
- package/dist-esm/src/operations/capabilities.js +308 -0
- package/dist-esm/src/operations/capabilities.js.map +1 -0
- package/dist-esm/src/operations/capabilityTypes.d.ts +46 -0
- package/dist-esm/src/operations/capabilityTypes.d.ts.map +1 -0
- package/dist-esm/src/operations/capabilityTypes.js +169 -0
- package/dist-esm/src/operations/capabilityTypes.js.map +1 -0
- package/dist-esm/src/operations/experiments.d.ts +153 -0
- package/dist-esm/src/operations/experiments.d.ts.map +1 -0
- package/dist-esm/src/operations/experiments.js +687 -0
- package/dist-esm/src/operations/experiments.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +7 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +14 -0
- package/dist-esm/src/operations/index.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 +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/targetTypes.d.ts +42 -0
- package/dist-esm/src/operations/targetTypes.d.ts.map +1 -0
- package/dist-esm/src/operations/targetTypes.js +162 -0
- package/dist-esm/src/operations/targetTypes.js.map +1 -0
- package/dist-esm/src/operations/targets.d.ts +75 -0
- package/dist-esm/src/operations/targets.d.ts.map +1 -0
- package/dist-esm/src/operations/targets.js +292 -0
- package/dist-esm/src/operations/targets.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/capabilities.d.ts +50 -0
- package/dist-esm/src/operationsInterfaces/capabilities.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/capabilities.js +9 -0
- package/dist-esm/src/operationsInterfaces/capabilities.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/capabilityTypes.d.ts +21 -0
- package/dist-esm/src/operationsInterfaces/capabilityTypes.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/capabilityTypes.js +9 -0
- package/dist-esm/src/operationsInterfaces/capabilityTypes.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/experiments.d.ts +83 -0
- package/dist-esm/src/operationsInterfaces/experiments.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/experiments.js +9 -0
- package/dist-esm/src/operationsInterfaces/experiments.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +14 -0
- package/dist-esm/src/operationsInterfaces/index.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/targetTypes.d.ts +19 -0
- package/dist-esm/src/operationsInterfaces/targetTypes.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/targetTypes.js +9 -0
- package/dist-esm/src/operationsInterfaces/targetTypes.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/targets.d.ts +46 -0
- package/dist-esm/src/operationsInterfaces/targets.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/targets.js +9 -0
- package/dist-esm/src/operationsInterfaces/targets.js.map +1 -0
- package/dist-esm/test/chaos_examples.spec.d.ts +4 -0
- package/dist-esm/test/chaos_examples.spec.d.ts.map +1 -0
- package/dist-esm/test/chaos_examples.spec.js +261 -0
- package/dist-esm/test/chaos_examples.spec.js.map +1 -0
- package/package.json +120 -0
- package/review/arm-chaos.api.md +682 -0
- package/rollup.config.js +122 -0
- package/src/chaosManagementClient.ts +165 -0
- package/src/index.ts +12 -0
- package/src/models/index.ts +1111 -0
- package/src/models/mappers.ts +1640 -0
- package/src/models/parameters.ts +302 -0
- package/src/operations/capabilities.ts +435 -0
- package/src/operations/capabilityTypes.ts +221 -0
- package/src/operations/experiments.ts +892 -0
- package/src/operations/index.ts +14 -0
- package/src/operations/operations.ts +137 -0
- package/src/operations/targetTypes.ts +199 -0
- package/src/operations/targets.ts +406 -0
- package/src/operationsInterfaces/capabilities.ts +99 -0
- package/src/operationsInterfaces/capabilityTypes.ts +44 -0
- package/src/operationsInterfaces/experiments.ts +157 -0
- package/src/operationsInterfaces/index.ts +14 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/targetTypes.ts +40 -0
- package/src/operationsInterfaces/targets.ts +91 -0
- package/tsconfig.json +33 -0
- package/types/arm-chaos.d.ts +1337 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,892 @@
|
|
|
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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Experiments } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { ChaosManagementClient } from "../chaosManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
Experiment,
|
|
17
|
+
ExperimentsListAllNextOptionalParams,
|
|
18
|
+
ExperimentsListAllOptionalParams,
|
|
19
|
+
ExperimentsListNextOptionalParams,
|
|
20
|
+
ExperimentsListOptionalParams,
|
|
21
|
+
ExperimentStatus,
|
|
22
|
+
ExperimentsListAllStatusesNextOptionalParams,
|
|
23
|
+
ExperimentsListAllStatusesOptionalParams,
|
|
24
|
+
ExperimentExecutionDetails,
|
|
25
|
+
ExperimentsListExecutionDetailsNextOptionalParams,
|
|
26
|
+
ExperimentsListExecutionDetailsOptionalParams,
|
|
27
|
+
ExperimentsListAllResponse,
|
|
28
|
+
ExperimentsListResponse,
|
|
29
|
+
ExperimentsDeleteOptionalParams,
|
|
30
|
+
ExperimentsGetOptionalParams,
|
|
31
|
+
ExperimentsGetResponse,
|
|
32
|
+
ExperimentsCreateOrUpdateOptionalParams,
|
|
33
|
+
ExperimentsCreateOrUpdateResponse,
|
|
34
|
+
ExperimentsCancelOptionalParams,
|
|
35
|
+
ExperimentsCancelResponse,
|
|
36
|
+
ExperimentsStartOptionalParams,
|
|
37
|
+
ExperimentsStartResponse,
|
|
38
|
+
ExperimentsListAllStatusesResponse,
|
|
39
|
+
ExperimentsGetStatusOptionalParams,
|
|
40
|
+
ExperimentsGetStatusResponse,
|
|
41
|
+
ExperimentsListExecutionDetailsResponse,
|
|
42
|
+
ExperimentsGetExecutionDetailsOptionalParams,
|
|
43
|
+
ExperimentsGetExecutionDetailsResponse,
|
|
44
|
+
ExperimentsListAllNextResponse,
|
|
45
|
+
ExperimentsListNextResponse,
|
|
46
|
+
ExperimentsListAllStatusesNextResponse,
|
|
47
|
+
ExperimentsListExecutionDetailsNextResponse
|
|
48
|
+
} from "../models";
|
|
49
|
+
|
|
50
|
+
/// <reference lib="esnext.asynciterable" />
|
|
51
|
+
/** Class containing Experiments operations. */
|
|
52
|
+
export class ExperimentsImpl implements Experiments {
|
|
53
|
+
private readonly client: ChaosManagementClient;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Initialize a new instance of the class Experiments class.
|
|
57
|
+
* @param client Reference to the service client
|
|
58
|
+
*/
|
|
59
|
+
constructor(client: ChaosManagementClient) {
|
|
60
|
+
this.client = client;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Get a list of Experiment resources in a subscription.
|
|
65
|
+
* @param options The options parameters.
|
|
66
|
+
*/
|
|
67
|
+
public listAll(
|
|
68
|
+
options?: ExperimentsListAllOptionalParams
|
|
69
|
+
): PagedAsyncIterableIterator<Experiment> {
|
|
70
|
+
const iter = this.listAllPagingAll(options);
|
|
71
|
+
return {
|
|
72
|
+
next() {
|
|
73
|
+
return iter.next();
|
|
74
|
+
},
|
|
75
|
+
[Symbol.asyncIterator]() {
|
|
76
|
+
return this;
|
|
77
|
+
},
|
|
78
|
+
byPage: () => {
|
|
79
|
+
return this.listAllPagingPage(options);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private async *listAllPagingPage(
|
|
85
|
+
options?: ExperimentsListAllOptionalParams
|
|
86
|
+
): AsyncIterableIterator<Experiment[]> {
|
|
87
|
+
let result = await this._listAll(options);
|
|
88
|
+
yield result.value || [];
|
|
89
|
+
let continuationToken = result.nextLink;
|
|
90
|
+
while (continuationToken) {
|
|
91
|
+
result = await this._listAllNext(continuationToken, options);
|
|
92
|
+
continuationToken = result.nextLink;
|
|
93
|
+
yield result.value || [];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
private async *listAllPagingAll(
|
|
98
|
+
options?: ExperimentsListAllOptionalParams
|
|
99
|
+
): AsyncIterableIterator<Experiment> {
|
|
100
|
+
for await (const page of this.listAllPagingPage(options)) {
|
|
101
|
+
yield* page;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get a list of Experiment resources in a resource group.
|
|
107
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
108
|
+
* @param options The options parameters.
|
|
109
|
+
*/
|
|
110
|
+
public list(
|
|
111
|
+
resourceGroupName: string,
|
|
112
|
+
options?: ExperimentsListOptionalParams
|
|
113
|
+
): PagedAsyncIterableIterator<Experiment> {
|
|
114
|
+
const iter = this.listPagingAll(resourceGroupName, options);
|
|
115
|
+
return {
|
|
116
|
+
next() {
|
|
117
|
+
return iter.next();
|
|
118
|
+
},
|
|
119
|
+
[Symbol.asyncIterator]() {
|
|
120
|
+
return this;
|
|
121
|
+
},
|
|
122
|
+
byPage: () => {
|
|
123
|
+
return this.listPagingPage(resourceGroupName, options);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
private async *listPagingPage(
|
|
129
|
+
resourceGroupName: string,
|
|
130
|
+
options?: ExperimentsListOptionalParams
|
|
131
|
+
): AsyncIterableIterator<Experiment[]> {
|
|
132
|
+
let result = await this._list(resourceGroupName, options);
|
|
133
|
+
yield result.value || [];
|
|
134
|
+
let continuationToken = result.nextLink;
|
|
135
|
+
while (continuationToken) {
|
|
136
|
+
result = await this._listNext(
|
|
137
|
+
resourceGroupName,
|
|
138
|
+
continuationToken,
|
|
139
|
+
options
|
|
140
|
+
);
|
|
141
|
+
continuationToken = result.nextLink;
|
|
142
|
+
yield result.value || [];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
private async *listPagingAll(
|
|
147
|
+
resourceGroupName: string,
|
|
148
|
+
options?: ExperimentsListOptionalParams
|
|
149
|
+
): AsyncIterableIterator<Experiment> {
|
|
150
|
+
for await (const page of this.listPagingPage(resourceGroupName, options)) {
|
|
151
|
+
yield* page;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Get a list of statuses of a Experiment resource.
|
|
157
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
158
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
159
|
+
* @param options The options parameters.
|
|
160
|
+
*/
|
|
161
|
+
public listAllStatuses(
|
|
162
|
+
resourceGroupName: string,
|
|
163
|
+
experimentName: string,
|
|
164
|
+
options?: ExperimentsListAllStatusesOptionalParams
|
|
165
|
+
): PagedAsyncIterableIterator<ExperimentStatus> {
|
|
166
|
+
const iter = this.listAllStatusesPagingAll(
|
|
167
|
+
resourceGroupName,
|
|
168
|
+
experimentName,
|
|
169
|
+
options
|
|
170
|
+
);
|
|
171
|
+
return {
|
|
172
|
+
next() {
|
|
173
|
+
return iter.next();
|
|
174
|
+
},
|
|
175
|
+
[Symbol.asyncIterator]() {
|
|
176
|
+
return this;
|
|
177
|
+
},
|
|
178
|
+
byPage: () => {
|
|
179
|
+
return this.listAllStatusesPagingPage(
|
|
180
|
+
resourceGroupName,
|
|
181
|
+
experimentName,
|
|
182
|
+
options
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
private async *listAllStatusesPagingPage(
|
|
189
|
+
resourceGroupName: string,
|
|
190
|
+
experimentName: string,
|
|
191
|
+
options?: ExperimentsListAllStatusesOptionalParams
|
|
192
|
+
): AsyncIterableIterator<ExperimentStatus[]> {
|
|
193
|
+
let result = await this._listAllStatuses(
|
|
194
|
+
resourceGroupName,
|
|
195
|
+
experimentName,
|
|
196
|
+
options
|
|
197
|
+
);
|
|
198
|
+
yield result.value || [];
|
|
199
|
+
let continuationToken = result.nextLink;
|
|
200
|
+
while (continuationToken) {
|
|
201
|
+
result = await this._listAllStatusesNext(
|
|
202
|
+
resourceGroupName,
|
|
203
|
+
experimentName,
|
|
204
|
+
continuationToken,
|
|
205
|
+
options
|
|
206
|
+
);
|
|
207
|
+
continuationToken = result.nextLink;
|
|
208
|
+
yield result.value || [];
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
private async *listAllStatusesPagingAll(
|
|
213
|
+
resourceGroupName: string,
|
|
214
|
+
experimentName: string,
|
|
215
|
+
options?: ExperimentsListAllStatusesOptionalParams
|
|
216
|
+
): AsyncIterableIterator<ExperimentStatus> {
|
|
217
|
+
for await (const page of this.listAllStatusesPagingPage(
|
|
218
|
+
resourceGroupName,
|
|
219
|
+
experimentName,
|
|
220
|
+
options
|
|
221
|
+
)) {
|
|
222
|
+
yield* page;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Get a list of execution details of a Experiment resource.
|
|
228
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
229
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
230
|
+
* @param options The options parameters.
|
|
231
|
+
*/
|
|
232
|
+
public listExecutionDetails(
|
|
233
|
+
resourceGroupName: string,
|
|
234
|
+
experimentName: string,
|
|
235
|
+
options?: ExperimentsListExecutionDetailsOptionalParams
|
|
236
|
+
): PagedAsyncIterableIterator<ExperimentExecutionDetails> {
|
|
237
|
+
const iter = this.listExecutionDetailsPagingAll(
|
|
238
|
+
resourceGroupName,
|
|
239
|
+
experimentName,
|
|
240
|
+
options
|
|
241
|
+
);
|
|
242
|
+
return {
|
|
243
|
+
next() {
|
|
244
|
+
return iter.next();
|
|
245
|
+
},
|
|
246
|
+
[Symbol.asyncIterator]() {
|
|
247
|
+
return this;
|
|
248
|
+
},
|
|
249
|
+
byPage: () => {
|
|
250
|
+
return this.listExecutionDetailsPagingPage(
|
|
251
|
+
resourceGroupName,
|
|
252
|
+
experimentName,
|
|
253
|
+
options
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
private async *listExecutionDetailsPagingPage(
|
|
260
|
+
resourceGroupName: string,
|
|
261
|
+
experimentName: string,
|
|
262
|
+
options?: ExperimentsListExecutionDetailsOptionalParams
|
|
263
|
+
): AsyncIterableIterator<ExperimentExecutionDetails[]> {
|
|
264
|
+
let result = await this._listExecutionDetails(
|
|
265
|
+
resourceGroupName,
|
|
266
|
+
experimentName,
|
|
267
|
+
options
|
|
268
|
+
);
|
|
269
|
+
yield result.value || [];
|
|
270
|
+
let continuationToken = result.nextLink;
|
|
271
|
+
while (continuationToken) {
|
|
272
|
+
result = await this._listExecutionDetailsNext(
|
|
273
|
+
resourceGroupName,
|
|
274
|
+
experimentName,
|
|
275
|
+
continuationToken,
|
|
276
|
+
options
|
|
277
|
+
);
|
|
278
|
+
continuationToken = result.nextLink;
|
|
279
|
+
yield result.value || [];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
private async *listExecutionDetailsPagingAll(
|
|
284
|
+
resourceGroupName: string,
|
|
285
|
+
experimentName: string,
|
|
286
|
+
options?: ExperimentsListExecutionDetailsOptionalParams
|
|
287
|
+
): AsyncIterableIterator<ExperimentExecutionDetails> {
|
|
288
|
+
for await (const page of this.listExecutionDetailsPagingPage(
|
|
289
|
+
resourceGroupName,
|
|
290
|
+
experimentName,
|
|
291
|
+
options
|
|
292
|
+
)) {
|
|
293
|
+
yield* page;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Get a list of Experiment resources in a subscription.
|
|
299
|
+
* @param options The options parameters.
|
|
300
|
+
*/
|
|
301
|
+
private _listAll(
|
|
302
|
+
options?: ExperimentsListAllOptionalParams
|
|
303
|
+
): Promise<ExperimentsListAllResponse> {
|
|
304
|
+
return this.client.sendOperationRequest({ options }, listAllOperationSpec);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Get a list of Experiment resources in a resource group.
|
|
309
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
310
|
+
* @param options The options parameters.
|
|
311
|
+
*/
|
|
312
|
+
private _list(
|
|
313
|
+
resourceGroupName: string,
|
|
314
|
+
options?: ExperimentsListOptionalParams
|
|
315
|
+
): Promise<ExperimentsListResponse> {
|
|
316
|
+
return this.client.sendOperationRequest(
|
|
317
|
+
{ resourceGroupName, options },
|
|
318
|
+
listOperationSpec
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Delete a Experiment resource.
|
|
324
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
325
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
326
|
+
* @param options The options parameters.
|
|
327
|
+
*/
|
|
328
|
+
delete(
|
|
329
|
+
resourceGroupName: string,
|
|
330
|
+
experimentName: string,
|
|
331
|
+
options?: ExperimentsDeleteOptionalParams
|
|
332
|
+
): Promise<void> {
|
|
333
|
+
return this.client.sendOperationRequest(
|
|
334
|
+
{ resourceGroupName, experimentName, options },
|
|
335
|
+
deleteOperationSpec
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Get a Experiment resource.
|
|
341
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
342
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
343
|
+
* @param options The options parameters.
|
|
344
|
+
*/
|
|
345
|
+
get(
|
|
346
|
+
resourceGroupName: string,
|
|
347
|
+
experimentName: string,
|
|
348
|
+
options?: ExperimentsGetOptionalParams
|
|
349
|
+
): Promise<ExperimentsGetResponse> {
|
|
350
|
+
return this.client.sendOperationRequest(
|
|
351
|
+
{ resourceGroupName, experimentName, options },
|
|
352
|
+
getOperationSpec
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Create or update a Experiment resource.
|
|
358
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
359
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
360
|
+
* @param experiment Experiment resource to be created or updated.
|
|
361
|
+
* @param options The options parameters.
|
|
362
|
+
*/
|
|
363
|
+
createOrUpdate(
|
|
364
|
+
resourceGroupName: string,
|
|
365
|
+
experimentName: string,
|
|
366
|
+
experiment: Experiment,
|
|
367
|
+
options?: ExperimentsCreateOrUpdateOptionalParams
|
|
368
|
+
): Promise<ExperimentsCreateOrUpdateResponse> {
|
|
369
|
+
return this.client.sendOperationRequest(
|
|
370
|
+
{ resourceGroupName, experimentName, experiment, options },
|
|
371
|
+
createOrUpdateOperationSpec
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Cancel a running Experiment resource.
|
|
377
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
378
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
379
|
+
* @param options The options parameters.
|
|
380
|
+
*/
|
|
381
|
+
cancel(
|
|
382
|
+
resourceGroupName: string,
|
|
383
|
+
experimentName: string,
|
|
384
|
+
options?: ExperimentsCancelOptionalParams
|
|
385
|
+
): Promise<ExperimentsCancelResponse> {
|
|
386
|
+
return this.client.sendOperationRequest(
|
|
387
|
+
{ resourceGroupName, experimentName, options },
|
|
388
|
+
cancelOperationSpec
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Start a Experiment resource.
|
|
394
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
395
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
396
|
+
* @param options The options parameters.
|
|
397
|
+
*/
|
|
398
|
+
start(
|
|
399
|
+
resourceGroupName: string,
|
|
400
|
+
experimentName: string,
|
|
401
|
+
options?: ExperimentsStartOptionalParams
|
|
402
|
+
): Promise<ExperimentsStartResponse> {
|
|
403
|
+
return this.client.sendOperationRequest(
|
|
404
|
+
{ resourceGroupName, experimentName, options },
|
|
405
|
+
startOperationSpec
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Get a list of statuses of a Experiment resource.
|
|
411
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
412
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
413
|
+
* @param options The options parameters.
|
|
414
|
+
*/
|
|
415
|
+
private _listAllStatuses(
|
|
416
|
+
resourceGroupName: string,
|
|
417
|
+
experimentName: string,
|
|
418
|
+
options?: ExperimentsListAllStatusesOptionalParams
|
|
419
|
+
): Promise<ExperimentsListAllStatusesResponse> {
|
|
420
|
+
return this.client.sendOperationRequest(
|
|
421
|
+
{ resourceGroupName, experimentName, options },
|
|
422
|
+
listAllStatusesOperationSpec
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Get a status of a Experiment resource.
|
|
428
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
429
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
430
|
+
* @param statusId GUID that represents a Experiment status.
|
|
431
|
+
* @param options The options parameters.
|
|
432
|
+
*/
|
|
433
|
+
getStatus(
|
|
434
|
+
resourceGroupName: string,
|
|
435
|
+
experimentName: string,
|
|
436
|
+
statusId: string,
|
|
437
|
+
options?: ExperimentsGetStatusOptionalParams
|
|
438
|
+
): Promise<ExperimentsGetStatusResponse> {
|
|
439
|
+
return this.client.sendOperationRequest(
|
|
440
|
+
{ resourceGroupName, experimentName, statusId, options },
|
|
441
|
+
getStatusOperationSpec
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Get a list of execution details of a Experiment resource.
|
|
447
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
448
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
449
|
+
* @param options The options parameters.
|
|
450
|
+
*/
|
|
451
|
+
private _listExecutionDetails(
|
|
452
|
+
resourceGroupName: string,
|
|
453
|
+
experimentName: string,
|
|
454
|
+
options?: ExperimentsListExecutionDetailsOptionalParams
|
|
455
|
+
): Promise<ExperimentsListExecutionDetailsResponse> {
|
|
456
|
+
return this.client.sendOperationRequest(
|
|
457
|
+
{ resourceGroupName, experimentName, options },
|
|
458
|
+
listExecutionDetailsOperationSpec
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Get an execution detail of a Experiment resource.
|
|
464
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
465
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
466
|
+
* @param executionDetailsId GUID that represents a Experiment execution detail.
|
|
467
|
+
* @param options The options parameters.
|
|
468
|
+
*/
|
|
469
|
+
getExecutionDetails(
|
|
470
|
+
resourceGroupName: string,
|
|
471
|
+
experimentName: string,
|
|
472
|
+
executionDetailsId: string,
|
|
473
|
+
options?: ExperimentsGetExecutionDetailsOptionalParams
|
|
474
|
+
): Promise<ExperimentsGetExecutionDetailsResponse> {
|
|
475
|
+
return this.client.sendOperationRequest(
|
|
476
|
+
{ resourceGroupName, experimentName, executionDetailsId, options },
|
|
477
|
+
getExecutionDetailsOperationSpec
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* ListAllNext
|
|
483
|
+
* @param nextLink The nextLink from the previous successful call to the ListAll method.
|
|
484
|
+
* @param options The options parameters.
|
|
485
|
+
*/
|
|
486
|
+
private _listAllNext(
|
|
487
|
+
nextLink: string,
|
|
488
|
+
options?: ExperimentsListAllNextOptionalParams
|
|
489
|
+
): Promise<ExperimentsListAllNextResponse> {
|
|
490
|
+
return this.client.sendOperationRequest(
|
|
491
|
+
{ nextLink, options },
|
|
492
|
+
listAllNextOperationSpec
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* ListNext
|
|
498
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
499
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
500
|
+
* @param options The options parameters.
|
|
501
|
+
*/
|
|
502
|
+
private _listNext(
|
|
503
|
+
resourceGroupName: string,
|
|
504
|
+
nextLink: string,
|
|
505
|
+
options?: ExperimentsListNextOptionalParams
|
|
506
|
+
): Promise<ExperimentsListNextResponse> {
|
|
507
|
+
return this.client.sendOperationRequest(
|
|
508
|
+
{ resourceGroupName, nextLink, options },
|
|
509
|
+
listNextOperationSpec
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* ListAllStatusesNext
|
|
515
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
516
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
517
|
+
* @param nextLink The nextLink from the previous successful call to the ListAllStatuses method.
|
|
518
|
+
* @param options The options parameters.
|
|
519
|
+
*/
|
|
520
|
+
private _listAllStatusesNext(
|
|
521
|
+
resourceGroupName: string,
|
|
522
|
+
experimentName: string,
|
|
523
|
+
nextLink: string,
|
|
524
|
+
options?: ExperimentsListAllStatusesNextOptionalParams
|
|
525
|
+
): Promise<ExperimentsListAllStatusesNextResponse> {
|
|
526
|
+
return this.client.sendOperationRequest(
|
|
527
|
+
{ resourceGroupName, experimentName, nextLink, options },
|
|
528
|
+
listAllStatusesNextOperationSpec
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* ListExecutionDetailsNext
|
|
534
|
+
* @param resourceGroupName String that represents an Azure resource group.
|
|
535
|
+
* @param experimentName String that represents a Experiment resource name.
|
|
536
|
+
* @param nextLink The nextLink from the previous successful call to the ListExecutionDetails method.
|
|
537
|
+
* @param options The options parameters.
|
|
538
|
+
*/
|
|
539
|
+
private _listExecutionDetailsNext(
|
|
540
|
+
resourceGroupName: string,
|
|
541
|
+
experimentName: string,
|
|
542
|
+
nextLink: string,
|
|
543
|
+
options?: ExperimentsListExecutionDetailsNextOptionalParams
|
|
544
|
+
): Promise<ExperimentsListExecutionDetailsNextResponse> {
|
|
545
|
+
return this.client.sendOperationRequest(
|
|
546
|
+
{ resourceGroupName, experimentName, nextLink, options },
|
|
547
|
+
listExecutionDetailsNextOperationSpec
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
// Operation Specifications
|
|
552
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
553
|
+
|
|
554
|
+
const listAllOperationSpec: coreClient.OperationSpec = {
|
|
555
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments",
|
|
556
|
+
httpMethod: "GET",
|
|
557
|
+
responses: {
|
|
558
|
+
200: {
|
|
559
|
+
bodyMapper: Mappers.ExperimentListResult
|
|
560
|
+
},
|
|
561
|
+
default: {
|
|
562
|
+
bodyMapper: Mappers.ErrorResponse
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
queryParameters: [
|
|
566
|
+
Parameters.apiVersion,
|
|
567
|
+
Parameters.continuationToken,
|
|
568
|
+
Parameters.running
|
|
569
|
+
],
|
|
570
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
571
|
+
headerParameters: [Parameters.accept],
|
|
572
|
+
serializer
|
|
573
|
+
};
|
|
574
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
575
|
+
path:
|
|
576
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments",
|
|
577
|
+
httpMethod: "GET",
|
|
578
|
+
responses: {
|
|
579
|
+
200: {
|
|
580
|
+
bodyMapper: Mappers.ExperimentListResult
|
|
581
|
+
},
|
|
582
|
+
default: {
|
|
583
|
+
bodyMapper: Mappers.ErrorResponse
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
queryParameters: [
|
|
587
|
+
Parameters.apiVersion,
|
|
588
|
+
Parameters.continuationToken,
|
|
589
|
+
Parameters.running
|
|
590
|
+
],
|
|
591
|
+
urlParameters: [
|
|
592
|
+
Parameters.$host,
|
|
593
|
+
Parameters.subscriptionId,
|
|
594
|
+
Parameters.resourceGroupName
|
|
595
|
+
],
|
|
596
|
+
headerParameters: [Parameters.accept],
|
|
597
|
+
serializer
|
|
598
|
+
};
|
|
599
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
600
|
+
path:
|
|
601
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}",
|
|
602
|
+
httpMethod: "DELETE",
|
|
603
|
+
responses: {
|
|
604
|
+
200: {},
|
|
605
|
+
204: {},
|
|
606
|
+
default: {
|
|
607
|
+
bodyMapper: Mappers.ErrorResponse
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
queryParameters: [Parameters.apiVersion],
|
|
611
|
+
urlParameters: [
|
|
612
|
+
Parameters.$host,
|
|
613
|
+
Parameters.subscriptionId,
|
|
614
|
+
Parameters.resourceGroupName,
|
|
615
|
+
Parameters.experimentName
|
|
616
|
+
],
|
|
617
|
+
headerParameters: [Parameters.accept],
|
|
618
|
+
serializer
|
|
619
|
+
};
|
|
620
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
621
|
+
path:
|
|
622
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}",
|
|
623
|
+
httpMethod: "GET",
|
|
624
|
+
responses: {
|
|
625
|
+
200: {
|
|
626
|
+
bodyMapper: Mappers.Experiment
|
|
627
|
+
},
|
|
628
|
+
default: {
|
|
629
|
+
bodyMapper: Mappers.ErrorResponse
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
queryParameters: [Parameters.apiVersion],
|
|
633
|
+
urlParameters: [
|
|
634
|
+
Parameters.$host,
|
|
635
|
+
Parameters.subscriptionId,
|
|
636
|
+
Parameters.resourceGroupName,
|
|
637
|
+
Parameters.experimentName
|
|
638
|
+
],
|
|
639
|
+
headerParameters: [Parameters.accept],
|
|
640
|
+
serializer
|
|
641
|
+
};
|
|
642
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
643
|
+
path:
|
|
644
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}",
|
|
645
|
+
httpMethod: "PUT",
|
|
646
|
+
responses: {
|
|
647
|
+
200: {
|
|
648
|
+
bodyMapper: Mappers.Experiment
|
|
649
|
+
},
|
|
650
|
+
default: {
|
|
651
|
+
bodyMapper: Mappers.ErrorResponse
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
requestBody: Parameters.experiment,
|
|
655
|
+
queryParameters: [Parameters.apiVersion],
|
|
656
|
+
urlParameters: [
|
|
657
|
+
Parameters.$host,
|
|
658
|
+
Parameters.subscriptionId,
|
|
659
|
+
Parameters.resourceGroupName,
|
|
660
|
+
Parameters.experimentName
|
|
661
|
+
],
|
|
662
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
663
|
+
mediaType: "json",
|
|
664
|
+
serializer
|
|
665
|
+
};
|
|
666
|
+
const cancelOperationSpec: coreClient.OperationSpec = {
|
|
667
|
+
path:
|
|
668
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel",
|
|
669
|
+
httpMethod: "POST",
|
|
670
|
+
responses: {
|
|
671
|
+
202: {
|
|
672
|
+
bodyMapper: Mappers.ExperimentCancelOperationResult
|
|
673
|
+
},
|
|
674
|
+
default: {
|
|
675
|
+
bodyMapper: Mappers.ErrorResponse
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
queryParameters: [Parameters.apiVersion],
|
|
679
|
+
urlParameters: [
|
|
680
|
+
Parameters.$host,
|
|
681
|
+
Parameters.subscriptionId,
|
|
682
|
+
Parameters.resourceGroupName,
|
|
683
|
+
Parameters.experimentName
|
|
684
|
+
],
|
|
685
|
+
headerParameters: [Parameters.accept],
|
|
686
|
+
serializer
|
|
687
|
+
};
|
|
688
|
+
const startOperationSpec: coreClient.OperationSpec = {
|
|
689
|
+
path:
|
|
690
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start",
|
|
691
|
+
httpMethod: "POST",
|
|
692
|
+
responses: {
|
|
693
|
+
202: {
|
|
694
|
+
bodyMapper: Mappers.ExperimentStartOperationResult
|
|
695
|
+
},
|
|
696
|
+
default: {
|
|
697
|
+
bodyMapper: Mappers.ErrorResponse
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
queryParameters: [Parameters.apiVersion],
|
|
701
|
+
urlParameters: [
|
|
702
|
+
Parameters.$host,
|
|
703
|
+
Parameters.subscriptionId,
|
|
704
|
+
Parameters.resourceGroupName,
|
|
705
|
+
Parameters.experimentName
|
|
706
|
+
],
|
|
707
|
+
headerParameters: [Parameters.accept],
|
|
708
|
+
serializer
|
|
709
|
+
};
|
|
710
|
+
const listAllStatusesOperationSpec: coreClient.OperationSpec = {
|
|
711
|
+
path:
|
|
712
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/statuses",
|
|
713
|
+
httpMethod: "GET",
|
|
714
|
+
responses: {
|
|
715
|
+
200: {
|
|
716
|
+
bodyMapper: Mappers.ExperimentStatusListResult
|
|
717
|
+
},
|
|
718
|
+
default: {
|
|
719
|
+
bodyMapper: Mappers.ErrorResponse
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
queryParameters: [Parameters.apiVersion],
|
|
723
|
+
urlParameters: [
|
|
724
|
+
Parameters.$host,
|
|
725
|
+
Parameters.subscriptionId,
|
|
726
|
+
Parameters.resourceGroupName,
|
|
727
|
+
Parameters.experimentName
|
|
728
|
+
],
|
|
729
|
+
headerParameters: [Parameters.accept],
|
|
730
|
+
serializer
|
|
731
|
+
};
|
|
732
|
+
const getStatusOperationSpec: coreClient.OperationSpec = {
|
|
733
|
+
path:
|
|
734
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/statuses/{statusId}",
|
|
735
|
+
httpMethod: "GET",
|
|
736
|
+
responses: {
|
|
737
|
+
200: {
|
|
738
|
+
bodyMapper: Mappers.ExperimentStatus
|
|
739
|
+
},
|
|
740
|
+
default: {
|
|
741
|
+
bodyMapper: Mappers.ErrorResponse
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
queryParameters: [Parameters.apiVersion],
|
|
745
|
+
urlParameters: [
|
|
746
|
+
Parameters.$host,
|
|
747
|
+
Parameters.subscriptionId,
|
|
748
|
+
Parameters.resourceGroupName,
|
|
749
|
+
Parameters.experimentName,
|
|
750
|
+
Parameters.statusId
|
|
751
|
+
],
|
|
752
|
+
headerParameters: [Parameters.accept],
|
|
753
|
+
serializer
|
|
754
|
+
};
|
|
755
|
+
const listExecutionDetailsOperationSpec: coreClient.OperationSpec = {
|
|
756
|
+
path:
|
|
757
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executionDetails",
|
|
758
|
+
httpMethod: "GET",
|
|
759
|
+
responses: {
|
|
760
|
+
200: {
|
|
761
|
+
bodyMapper: Mappers.ExperimentExecutionDetailsListResult
|
|
762
|
+
},
|
|
763
|
+
default: {
|
|
764
|
+
bodyMapper: Mappers.ErrorResponse
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
queryParameters: [Parameters.apiVersion],
|
|
768
|
+
urlParameters: [
|
|
769
|
+
Parameters.$host,
|
|
770
|
+
Parameters.subscriptionId,
|
|
771
|
+
Parameters.resourceGroupName,
|
|
772
|
+
Parameters.experimentName
|
|
773
|
+
],
|
|
774
|
+
headerParameters: [Parameters.accept],
|
|
775
|
+
serializer
|
|
776
|
+
};
|
|
777
|
+
const getExecutionDetailsOperationSpec: coreClient.OperationSpec = {
|
|
778
|
+
path:
|
|
779
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executionDetails/{executionDetailsId}",
|
|
780
|
+
httpMethod: "GET",
|
|
781
|
+
responses: {
|
|
782
|
+
200: {
|
|
783
|
+
bodyMapper: Mappers.ExperimentExecutionDetails
|
|
784
|
+
},
|
|
785
|
+
default: {
|
|
786
|
+
bodyMapper: Mappers.ErrorResponse
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
queryParameters: [Parameters.apiVersion],
|
|
790
|
+
urlParameters: [
|
|
791
|
+
Parameters.$host,
|
|
792
|
+
Parameters.subscriptionId,
|
|
793
|
+
Parameters.resourceGroupName,
|
|
794
|
+
Parameters.experimentName,
|
|
795
|
+
Parameters.executionDetailsId
|
|
796
|
+
],
|
|
797
|
+
headerParameters: [Parameters.accept],
|
|
798
|
+
serializer
|
|
799
|
+
};
|
|
800
|
+
const listAllNextOperationSpec: coreClient.OperationSpec = {
|
|
801
|
+
path: "{nextLink}",
|
|
802
|
+
httpMethod: "GET",
|
|
803
|
+
responses: {
|
|
804
|
+
200: {
|
|
805
|
+
bodyMapper: Mappers.ExperimentListResult
|
|
806
|
+
},
|
|
807
|
+
default: {
|
|
808
|
+
bodyMapper: Mappers.ErrorResponse
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
queryParameters: [
|
|
812
|
+
Parameters.apiVersion,
|
|
813
|
+
Parameters.continuationToken,
|
|
814
|
+
Parameters.running
|
|
815
|
+
],
|
|
816
|
+
urlParameters: [
|
|
817
|
+
Parameters.$host,
|
|
818
|
+
Parameters.subscriptionId,
|
|
819
|
+
Parameters.nextLink
|
|
820
|
+
],
|
|
821
|
+
headerParameters: [Parameters.accept],
|
|
822
|
+
serializer
|
|
823
|
+
};
|
|
824
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
825
|
+
path: "{nextLink}",
|
|
826
|
+
httpMethod: "GET",
|
|
827
|
+
responses: {
|
|
828
|
+
200: {
|
|
829
|
+
bodyMapper: Mappers.ExperimentListResult
|
|
830
|
+
},
|
|
831
|
+
default: {
|
|
832
|
+
bodyMapper: Mappers.ErrorResponse
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
queryParameters: [
|
|
836
|
+
Parameters.apiVersion,
|
|
837
|
+
Parameters.continuationToken,
|
|
838
|
+
Parameters.running
|
|
839
|
+
],
|
|
840
|
+
urlParameters: [
|
|
841
|
+
Parameters.$host,
|
|
842
|
+
Parameters.subscriptionId,
|
|
843
|
+
Parameters.resourceGroupName,
|
|
844
|
+
Parameters.nextLink
|
|
845
|
+
],
|
|
846
|
+
headerParameters: [Parameters.accept],
|
|
847
|
+
serializer
|
|
848
|
+
};
|
|
849
|
+
const listAllStatusesNextOperationSpec: coreClient.OperationSpec = {
|
|
850
|
+
path: "{nextLink}",
|
|
851
|
+
httpMethod: "GET",
|
|
852
|
+
responses: {
|
|
853
|
+
200: {
|
|
854
|
+
bodyMapper: Mappers.ExperimentStatusListResult
|
|
855
|
+
},
|
|
856
|
+
default: {
|
|
857
|
+
bodyMapper: Mappers.ErrorResponse
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
queryParameters: [Parameters.apiVersion],
|
|
861
|
+
urlParameters: [
|
|
862
|
+
Parameters.$host,
|
|
863
|
+
Parameters.subscriptionId,
|
|
864
|
+
Parameters.resourceGroupName,
|
|
865
|
+
Parameters.nextLink,
|
|
866
|
+
Parameters.experimentName
|
|
867
|
+
],
|
|
868
|
+
headerParameters: [Parameters.accept],
|
|
869
|
+
serializer
|
|
870
|
+
};
|
|
871
|
+
const listExecutionDetailsNextOperationSpec: coreClient.OperationSpec = {
|
|
872
|
+
path: "{nextLink}",
|
|
873
|
+
httpMethod: "GET",
|
|
874
|
+
responses: {
|
|
875
|
+
200: {
|
|
876
|
+
bodyMapper: Mappers.ExperimentExecutionDetailsListResult
|
|
877
|
+
},
|
|
878
|
+
default: {
|
|
879
|
+
bodyMapper: Mappers.ErrorResponse
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
queryParameters: [Parameters.apiVersion],
|
|
883
|
+
urlParameters: [
|
|
884
|
+
Parameters.$host,
|
|
885
|
+
Parameters.subscriptionId,
|
|
886
|
+
Parameters.resourceGroupName,
|
|
887
|
+
Parameters.nextLink,
|
|
888
|
+
Parameters.experimentName
|
|
889
|
+
],
|
|
890
|
+
headerParameters: [Parameters.accept],
|
|
891
|
+
serializer
|
|
892
|
+
};
|