@azure/arm-selfhelp 2.0.0-beta.1 → 2.0.0-beta.3
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 +214 -1
- package/LICENSE +1 -1
- package/README.md +3 -2
- package/dist/index.js +1679 -907
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/checkNameAvailabilityPostSample.js +7 -7
- package/dist-esm/samples-dev/checkNameAvailabilityPostSample.js.map +1 -1
- package/dist-esm/samples-dev/diagnosticsCreateSample.js +3 -3
- package/dist-esm/samples-dev/diagnosticsGetSample.js +1 -1
- package/dist-esm/samples-dev/discoverySolutionListSample.js +6 -41
- package/dist-esm/samples-dev/discoverySolutionListSample.js.map +1 -1
- package/dist-esm/samples-dev/discoverySolutionNlpSubscriptionScopePostSample.d.ts +2 -0
- package/dist-esm/samples-dev/discoverySolutionNlpSubscriptionScopePostSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/discoverySolutionNlpSubscriptionScopePostSample.js +45 -0
- package/dist-esm/samples-dev/discoverySolutionNlpSubscriptionScopePostSample.js.map +1 -0
- package/dist-esm/samples-dev/discoverySolutionNlpTenantScopePostSample.d.ts +2 -0
- package/dist-esm/samples-dev/discoverySolutionNlpTenantScopePostSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/discoverySolutionNlpTenantScopePostSample.js +43 -0
- package/dist-esm/samples-dev/discoverySolutionNlpTenantScopePostSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +5 -3
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/simplifiedSolutionsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/simplifiedSolutionsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/simplifiedSolutionsCreateSample.js +46 -0
- package/dist-esm/samples-dev/simplifiedSolutionsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/simplifiedSolutionsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/simplifiedSolutionsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/simplifiedSolutionsGetSample.js +37 -0
- package/dist-esm/samples-dev/simplifiedSolutionsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/solutionCreateSample.js +8 -10
- package/dist-esm/samples-dev/solutionCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/solutionGetSample.js +1 -1
- package/dist-esm/samples-dev/solutionSelfHelpGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/solutionSelfHelpGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/solutionSelfHelpGetSample.js +36 -0
- package/dist-esm/samples-dev/solutionSelfHelpGetSample.js.map +1 -0
- package/dist-esm/samples-dev/solutionUpdateSample.js +1 -1
- package/dist-esm/samples-dev/solutionWarmUpSample.d.ts +2 -0
- package/dist-esm/samples-dev/solutionWarmUpSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/solutionWarmUpSample.js +37 -0
- package/dist-esm/samples-dev/solutionWarmUpSample.js.map +1 -0
- package/dist-esm/samples-dev/troubleshootersContinueSample.js +6 -6
- package/dist-esm/samples-dev/troubleshootersContinueSample.js.map +1 -1
- package/dist-esm/samples-dev/troubleshootersCreateSample.js +7 -7
- package/dist-esm/samples-dev/troubleshootersCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/troubleshootersEndSample.js +1 -1
- package/dist-esm/samples-dev/troubleshootersGetSample.js +1 -1
- package/dist-esm/samples-dev/troubleshootersRestartSample.js +1 -1
- package/dist-esm/src/helpRP.d.ts +8 -1
- package/dist-esm/src/helpRP.d.ts.map +1 -1
- package/dist-esm/src/helpRP.js +25 -15
- package/dist-esm/src/helpRP.js.map +1 -1
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +350 -89
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +49 -19
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +10 -2
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +947 -590
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +6 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +95 -44
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/checkNameAvailability.d.ts +3 -2
- package/dist-esm/src/operations/checkNameAvailability.d.ts.map +1 -1
- package/dist-esm/src/operations/checkNameAvailability.js +7 -6
- package/dist-esm/src/operations/checkNameAvailability.js.map +1 -1
- package/dist-esm/src/operations/diagnostics.d.ts +15 -16
- package/dist-esm/src/operations/diagnostics.d.ts.map +1 -1
- package/dist-esm/src/operations/diagnostics.js +33 -34
- package/dist-esm/src/operations/diagnostics.js.map +1 -1
- package/dist-esm/src/operations/discoverySolution.d.ts +5 -13
- package/dist-esm/src/operations/discoverySolution.d.ts.map +1 -1
- package/dist-esm/src/operations/discoverySolution.js +29 -37
- package/dist-esm/src/operations/discoverySolution.js.map +1 -1
- package/dist-esm/src/operations/discoverySolutionNLPSubscriptionScope.d.ts +19 -0
- package/dist-esm/src/operations/discoverySolutionNLPSubscriptionScope.d.ts.map +1 -0
- package/dist-esm/src/operations/discoverySolutionNLPSubscriptionScope.js +49 -0
- package/dist-esm/src/operations/discoverySolutionNLPSubscriptionScope.js.map +1 -0
- package/dist-esm/src/operations/discoverySolutionNLPTenantScope.d.ts +19 -0
- package/dist-esm/src/operations/discoverySolutionNLPTenantScope.d.ts.map +1 -0
- package/dist-esm/src/operations/discoverySolutionNLPTenantScope.js +49 -0
- package/dist-esm/src/operations/discoverySolutionNLPTenantScope.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +4 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +4 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/operations.js +9 -9
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/simplifiedSolutions.d.ts +52 -0
- package/dist-esm/src/operations/simplifiedSolutions.d.ts.map +1 -0
- package/dist-esm/src/operations/simplifiedSolutions.js +159 -0
- package/dist-esm/src/operations/simplifiedSolutions.js.map +1 -0
- package/dist-esm/src/operations/solution.d.ts +41 -37
- package/dist-esm/src/operations/solution.d.ts.map +1 -1
- package/dist-esm/src/operations/solution.js +92 -66
- package/dist-esm/src/operations/solution.js.map +1 -1
- package/dist-esm/src/operations/solutionSelfHelp.d.ts +23 -0
- package/dist-esm/src/operations/solutionSelfHelp.d.ts.map +1 -0
- package/dist-esm/src/operations/solutionSelfHelp.js +51 -0
- package/dist-esm/src/operations/solutionSelfHelp.js.map +1 -0
- package/dist-esm/src/operations/troubleshooters.d.ts +22 -19
- package/dist-esm/src/operations/troubleshooters.d.ts.map +1 -1
- package/dist-esm/src/operations/troubleshooters.js +48 -45
- package/dist-esm/src/operations/troubleshooters.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/checkNameAvailability.d.ts +3 -2
- package/dist-esm/src/operationsInterfaces/checkNameAvailability.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/diagnostics.d.ts +15 -16
- package/dist-esm/src/operationsInterfaces/diagnostics.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/discoverySolution.d.ts +3 -6
- package/dist-esm/src/operationsInterfaces/discoverySolution.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.js +9 -0
- package/dist-esm/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/discoverySolutionNLPTenantScope.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/discoverySolutionNLPTenantScope.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/discoverySolutionNLPTenantScope.js +9 -0
- package/dist-esm/src/operationsInterfaces/discoverySolutionNLPTenantScope.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +4 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/simplifiedSolutions.d.ts +44 -0
- package/dist-esm/src/operationsInterfaces/simplifiedSolutions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/simplifiedSolutions.js +9 -0
- package/dist-esm/src/operationsInterfaces/simplifiedSolutions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/solution.d.ts +41 -37
- package/dist-esm/src/operationsInterfaces/solution.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/solutionSelfHelp.d.ts +15 -0
- package/dist-esm/src/operationsInterfaces/solutionSelfHelp.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/solutionSelfHelp.js +9 -0
- package/dist-esm/src/operationsInterfaces/solutionSelfHelp.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/troubleshooters.d.ts +22 -19
- package/dist-esm/src/operationsInterfaces/troubleshooters.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.js.map +1 -1
- package/dist-esm/test/selfhelp_operations_test.spec.js +2 -2
- package/dist-esm/test/selfhelp_operations_test.spec.js.map +1 -1
- package/package.json +11 -11
- package/review/arm-selfhelp.api.md +198 -19
- package/src/helpRP.ts +58 -17
- package/src/lroImpl.ts +3 -3
- package/src/models/index.ts +385 -106
- package/src/models/mappers.ts +995 -597
- package/src/models/parameters.ts +105 -45
- package/src/operations/checkNameAvailability.ts +10 -9
- package/src/operations/diagnostics.ts +48 -52
- package/src/operations/discoverySolution.ts +31 -47
- package/src/operations/discoverySolutionNLPSubscriptionScope.ts +64 -0
- package/src/operations/discoverySolutionNLPTenantScope.ts +64 -0
- package/src/operations/index.ts +4 -0
- package/src/operations/operations.ts +16 -16
- package/src/operations/simplifiedSolutions.ts +216 -0
- package/src/operations/solution.ts +122 -89
- package/src/operations/solutionSelfHelp.ts +68 -0
- package/src/operations/troubleshooters.ts +64 -66
- package/src/operationsInterfaces/checkNameAvailability.ts +5 -4
- package/src/operationsInterfaces/diagnostics.ts +19 -20
- package/src/operationsInterfaces/discoverySolution.ts +4 -8
- package/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.ts +24 -0
- package/src/operationsInterfaces/discoverySolutionNLPTenantScope.ts +24 -0
- package/src/operationsInterfaces/index.ts +4 -0
- package/src/operationsInterfaces/operations.ts +1 -1
- package/src/operationsInterfaces/simplifiedSolutions.ts +74 -0
- package/src/operationsInterfaces/solution.ts +51 -42
- package/src/operationsInterfaces/solutionSelfHelp.ts +29 -0
- package/src/operationsInterfaces/troubleshooters.ts +28 -25
- package/src/pagingHelper.ts +1 -1
- package/types/arm-selfhelp.d.ts +505 -136
- package/types/tsdoc-metadata.json +1 -1
|
@@ -14,7 +14,7 @@ import { HelpRP } from "../helpRP";
|
|
|
14
14
|
import {
|
|
15
15
|
SimplePollerLike,
|
|
16
16
|
OperationState,
|
|
17
|
-
createHttpPoller
|
|
17
|
+
createHttpPoller,
|
|
18
18
|
} from "@azure/core-lro";
|
|
19
19
|
import { createLroSpec } from "../lroImpl";
|
|
20
20
|
import {
|
|
@@ -23,7 +23,8 @@ import {
|
|
|
23
23
|
SolutionGetOptionalParams,
|
|
24
24
|
SolutionGetResponse,
|
|
25
25
|
SolutionUpdateOptionalParams,
|
|
26
|
-
SolutionUpdateResponse
|
|
26
|
+
SolutionUpdateResponse,
|
|
27
|
+
SolutionWarmUpOptionalParams,
|
|
27
28
|
} from "../models";
|
|
28
29
|
|
|
29
30
|
/** Class containing Solution operations. */
|
|
@@ -39,28 +40,24 @@ export class SolutionImpl implements Solution {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
|
-
* Creates a solution for the specific Azure resource or subscription using the
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions response is the same as
|
|
54
|
-
* ‘properties.parameters’ in the request for Troubleshooters
|
|
55
|
-
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
56
|
-
* at the moment.
|
|
43
|
+
* Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and
|
|
44
|
+
* requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of
|
|
45
|
+
* self-help resources that have been thoughtfully curated by Azure engineers to aid customers in
|
|
46
|
+
* resolving typical troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and
|
|
47
|
+
* context-aware diagnostics, guided troubleshooting wizards, and data visualizations. <br/> (2.) Rich
|
|
48
|
+
* instructional video tutorials and illustrative diagrams and images. <br/> (3.) Thoughtfully
|
|
49
|
+
* assembled textual troubleshooting instructions. <br/> All these components are seamlessly converged
|
|
50
|
+
* into unified solutions tailored to address a specific support problem area.
|
|
51
|
+
* @param scope scope = resourceUri of affected resource.<br/> For example:
|
|
52
|
+
* /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
|
|
53
|
+
*
|
|
57
54
|
* @param solutionResourceName Solution resource Name.
|
|
58
55
|
* @param options The options parameters.
|
|
59
56
|
*/
|
|
60
57
|
async beginCreate(
|
|
61
58
|
scope: string,
|
|
62
59
|
solutionResourceName: string,
|
|
63
|
-
options?: SolutionCreateOptionalParams
|
|
60
|
+
options?: SolutionCreateOptionalParams,
|
|
64
61
|
): Promise<
|
|
65
62
|
SimplePollerLike<
|
|
66
63
|
OperationState<SolutionCreateResponse>,
|
|
@@ -69,21 +66,20 @@ export class SolutionImpl implements Solution {
|
|
|
69
66
|
> {
|
|
70
67
|
const directSendOperation = async (
|
|
71
68
|
args: coreClient.OperationArguments,
|
|
72
|
-
spec: coreClient.OperationSpec
|
|
69
|
+
spec: coreClient.OperationSpec,
|
|
73
70
|
): Promise<SolutionCreateResponse> => {
|
|
74
71
|
return this.client.sendOperationRequest(args, spec);
|
|
75
72
|
};
|
|
76
73
|
const sendOperationFn = async (
|
|
77
74
|
args: coreClient.OperationArguments,
|
|
78
|
-
spec: coreClient.OperationSpec
|
|
75
|
+
spec: coreClient.OperationSpec,
|
|
79
76
|
) => {
|
|
80
|
-
let currentRawResponse:
|
|
81
|
-
|
|
82
|
-
| undefined = undefined;
|
|
77
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
78
|
+
undefined;
|
|
83
79
|
const providedCallback = args.options?.onResponse;
|
|
84
80
|
const callback: coreClient.RawResponseCallback = (
|
|
85
81
|
rawResponse: coreClient.FullOperationResponse,
|
|
86
|
-
flatResponse: unknown
|
|
82
|
+
flatResponse: unknown,
|
|
87
83
|
) => {
|
|
88
84
|
currentRawResponse = rawResponse;
|
|
89
85
|
providedCallback?.(rawResponse, flatResponse);
|
|
@@ -92,8 +88,8 @@ export class SolutionImpl implements Solution {
|
|
|
92
88
|
...args,
|
|
93
89
|
options: {
|
|
94
90
|
...args.options,
|
|
95
|
-
onResponse: callback
|
|
96
|
-
}
|
|
91
|
+
onResponse: callback,
|
|
92
|
+
},
|
|
97
93
|
};
|
|
98
94
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
99
95
|
return {
|
|
@@ -101,15 +97,15 @@ export class SolutionImpl implements Solution {
|
|
|
101
97
|
rawResponse: {
|
|
102
98
|
statusCode: currentRawResponse!.status,
|
|
103
99
|
body: currentRawResponse!.parsedBody,
|
|
104
|
-
headers: currentRawResponse!.headers.toJSON()
|
|
105
|
-
}
|
|
100
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
101
|
+
},
|
|
106
102
|
};
|
|
107
103
|
};
|
|
108
104
|
|
|
109
105
|
const lro = createLroSpec({
|
|
110
106
|
sendOperationFn,
|
|
111
107
|
args: { scope, solutionResourceName, options },
|
|
112
|
-
spec: createOperationSpec
|
|
108
|
+
spec: createOperationSpec,
|
|
113
109
|
});
|
|
114
110
|
const poller = await createHttpPoller<
|
|
115
111
|
SolutionCreateResponse,
|
|
@@ -117,35 +113,31 @@ export class SolutionImpl implements Solution {
|
|
|
117
113
|
>(lro, {
|
|
118
114
|
restoreFrom: options?.resumeFrom,
|
|
119
115
|
intervalInMs: options?.updateIntervalInMs,
|
|
120
|
-
resourceLocationConfig: "azure-async-operation"
|
|
116
|
+
resourceLocationConfig: "azure-async-operation",
|
|
121
117
|
});
|
|
122
118
|
await poller.poll();
|
|
123
119
|
return poller;
|
|
124
120
|
}
|
|
125
121
|
|
|
126
122
|
/**
|
|
127
|
-
* Creates a solution for the specific Azure resource or subscription using the
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions response is the same as
|
|
139
|
-
* ‘properties.parameters’ in the request for Troubleshooters
|
|
140
|
-
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
141
|
-
* at the moment.
|
|
123
|
+
* Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and
|
|
124
|
+
* requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of
|
|
125
|
+
* self-help resources that have been thoughtfully curated by Azure engineers to aid customers in
|
|
126
|
+
* resolving typical troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and
|
|
127
|
+
* context-aware diagnostics, guided troubleshooting wizards, and data visualizations. <br/> (2.) Rich
|
|
128
|
+
* instructional video tutorials and illustrative diagrams and images. <br/> (3.) Thoughtfully
|
|
129
|
+
* assembled textual troubleshooting instructions. <br/> All these components are seamlessly converged
|
|
130
|
+
* into unified solutions tailored to address a specific support problem area.
|
|
131
|
+
* @param scope scope = resourceUri of affected resource.<br/> For example:
|
|
132
|
+
* /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
|
|
133
|
+
*
|
|
142
134
|
* @param solutionResourceName Solution resource Name.
|
|
143
135
|
* @param options The options parameters.
|
|
144
136
|
*/
|
|
145
137
|
async beginCreateAndWait(
|
|
146
138
|
scope: string,
|
|
147
139
|
solutionResourceName: string,
|
|
148
|
-
options?: SolutionCreateOptionalParams
|
|
140
|
+
options?: SolutionCreateOptionalParams,
|
|
149
141
|
): Promise<SolutionCreateResponse> {
|
|
150
142
|
const poller = await this.beginCreate(scope, solutionResourceName, options);
|
|
151
143
|
return poller.pollUntilDone();
|
|
@@ -153,33 +145,35 @@ export class SolutionImpl implements Solution {
|
|
|
153
145
|
|
|
154
146
|
/**
|
|
155
147
|
* Get the solution using the applicable solutionResourceName while creating the solution.
|
|
156
|
-
* @param scope
|
|
157
|
-
*
|
|
148
|
+
* @param scope scope = resourceUri of affected resource.<br/> For example:
|
|
149
|
+
* /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
|
|
150
|
+
*
|
|
158
151
|
* @param solutionResourceName Solution resource Name.
|
|
159
152
|
* @param options The options parameters.
|
|
160
153
|
*/
|
|
161
154
|
get(
|
|
162
155
|
scope: string,
|
|
163
156
|
solutionResourceName: string,
|
|
164
|
-
options?: SolutionGetOptionalParams
|
|
157
|
+
options?: SolutionGetOptionalParams,
|
|
165
158
|
): Promise<SolutionGetResponse> {
|
|
166
159
|
return this.client.sendOperationRequest(
|
|
167
160
|
{ scope, solutionResourceName, options },
|
|
168
|
-
getOperationSpec
|
|
161
|
+
getOperationSpec,
|
|
169
162
|
);
|
|
170
163
|
}
|
|
171
164
|
|
|
172
165
|
/**
|
|
173
166
|
* Update the requiredInputs or additional information needed to execute the solution
|
|
174
|
-
* @param scope
|
|
175
|
-
*
|
|
167
|
+
* @param scope scope = resourceUri of affected resource.<br/> For example:
|
|
168
|
+
* /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
|
|
169
|
+
*
|
|
176
170
|
* @param solutionResourceName Solution resource Name.
|
|
177
171
|
* @param options The options parameters.
|
|
178
172
|
*/
|
|
179
173
|
async beginUpdate(
|
|
180
174
|
scope: string,
|
|
181
175
|
solutionResourceName: string,
|
|
182
|
-
options?: SolutionUpdateOptionalParams
|
|
176
|
+
options?: SolutionUpdateOptionalParams,
|
|
183
177
|
): Promise<
|
|
184
178
|
SimplePollerLike<
|
|
185
179
|
OperationState<SolutionUpdateResponse>,
|
|
@@ -188,21 +182,20 @@ export class SolutionImpl implements Solution {
|
|
|
188
182
|
> {
|
|
189
183
|
const directSendOperation = async (
|
|
190
184
|
args: coreClient.OperationArguments,
|
|
191
|
-
spec: coreClient.OperationSpec
|
|
185
|
+
spec: coreClient.OperationSpec,
|
|
192
186
|
): Promise<SolutionUpdateResponse> => {
|
|
193
187
|
return this.client.sendOperationRequest(args, spec);
|
|
194
188
|
};
|
|
195
189
|
const sendOperationFn = async (
|
|
196
190
|
args: coreClient.OperationArguments,
|
|
197
|
-
spec: coreClient.OperationSpec
|
|
191
|
+
spec: coreClient.OperationSpec,
|
|
198
192
|
) => {
|
|
199
|
-
let currentRawResponse:
|
|
200
|
-
|
|
201
|
-
| undefined = undefined;
|
|
193
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
194
|
+
undefined;
|
|
202
195
|
const providedCallback = args.options?.onResponse;
|
|
203
196
|
const callback: coreClient.RawResponseCallback = (
|
|
204
197
|
rawResponse: coreClient.FullOperationResponse,
|
|
205
|
-
flatResponse: unknown
|
|
198
|
+
flatResponse: unknown,
|
|
206
199
|
) => {
|
|
207
200
|
currentRawResponse = rawResponse;
|
|
208
201
|
providedCallback?.(rawResponse, flatResponse);
|
|
@@ -211,8 +204,8 @@ export class SolutionImpl implements Solution {
|
|
|
211
204
|
...args,
|
|
212
205
|
options: {
|
|
213
206
|
...args.options,
|
|
214
|
-
onResponse: callback
|
|
215
|
-
}
|
|
207
|
+
onResponse: callback,
|
|
208
|
+
},
|
|
216
209
|
};
|
|
217
210
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
218
211
|
return {
|
|
@@ -220,15 +213,15 @@ export class SolutionImpl implements Solution {
|
|
|
220
213
|
rawResponse: {
|
|
221
214
|
statusCode: currentRawResponse!.status,
|
|
222
215
|
body: currentRawResponse!.parsedBody,
|
|
223
|
-
headers: currentRawResponse!.headers.toJSON()
|
|
224
|
-
}
|
|
216
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
217
|
+
},
|
|
225
218
|
};
|
|
226
219
|
};
|
|
227
220
|
|
|
228
221
|
const lro = createLroSpec({
|
|
229
222
|
sendOperationFn,
|
|
230
223
|
args: { scope, solutionResourceName, options },
|
|
231
|
-
spec: updateOperationSpec
|
|
224
|
+
spec: updateOperationSpec,
|
|
232
225
|
});
|
|
233
226
|
const poller = await createHttpPoller<
|
|
234
227
|
SolutionUpdateResponse,
|
|
@@ -236,7 +229,7 @@ export class SolutionImpl implements Solution {
|
|
|
236
229
|
>(lro, {
|
|
237
230
|
restoreFrom: options?.resumeFrom,
|
|
238
231
|
intervalInMs: options?.updateIntervalInMs,
|
|
239
|
-
resourceLocationConfig: "azure-async-operation"
|
|
232
|
+
resourceLocationConfig: "azure-async-operation",
|
|
240
233
|
});
|
|
241
234
|
await poller.poll();
|
|
242
235
|
return poller;
|
|
@@ -244,19 +237,39 @@ export class SolutionImpl implements Solution {
|
|
|
244
237
|
|
|
245
238
|
/**
|
|
246
239
|
* Update the requiredInputs or additional information needed to execute the solution
|
|
247
|
-
* @param scope
|
|
248
|
-
*
|
|
240
|
+
* @param scope scope = resourceUri of affected resource.<br/> For example:
|
|
241
|
+
* /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
|
|
242
|
+
*
|
|
249
243
|
* @param solutionResourceName Solution resource Name.
|
|
250
244
|
* @param options The options parameters.
|
|
251
245
|
*/
|
|
252
246
|
async beginUpdateAndWait(
|
|
253
247
|
scope: string,
|
|
254
248
|
solutionResourceName: string,
|
|
255
|
-
options?: SolutionUpdateOptionalParams
|
|
249
|
+
options?: SolutionUpdateOptionalParams,
|
|
256
250
|
): Promise<SolutionUpdateResponse> {
|
|
257
251
|
const poller = await this.beginUpdate(scope, solutionResourceName, options);
|
|
258
252
|
return poller.pollUntilDone();
|
|
259
253
|
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Warm up the solution resource by preloading asynchronous diagnostics results into cache
|
|
257
|
+
* @param scope scope = resourceUri of affected resource.<br/> For example:
|
|
258
|
+
* /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
|
|
259
|
+
*
|
|
260
|
+
* @param solutionResourceName Solution resource Name.
|
|
261
|
+
* @param options The options parameters.
|
|
262
|
+
*/
|
|
263
|
+
warmUp(
|
|
264
|
+
scope: string,
|
|
265
|
+
solutionResourceName: string,
|
|
266
|
+
options?: SolutionWarmUpOptionalParams,
|
|
267
|
+
): Promise<void> {
|
|
268
|
+
return this.client.sendOperationRequest(
|
|
269
|
+
{ scope, solutionResourceName, options },
|
|
270
|
+
warmUpOperationSpec,
|
|
271
|
+
);
|
|
272
|
+
}
|
|
260
273
|
}
|
|
261
274
|
// Operation Specifications
|
|
262
275
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -266,51 +279,51 @@ const createOperationSpec: coreClient.OperationSpec = {
|
|
|
266
279
|
httpMethod: "PUT",
|
|
267
280
|
responses: {
|
|
268
281
|
200: {
|
|
269
|
-
bodyMapper: Mappers.SolutionResource
|
|
282
|
+
bodyMapper: Mappers.SolutionResource,
|
|
270
283
|
},
|
|
271
284
|
201: {
|
|
272
|
-
bodyMapper: Mappers.SolutionResource
|
|
285
|
+
bodyMapper: Mappers.SolutionResource,
|
|
273
286
|
},
|
|
274
287
|
202: {
|
|
275
|
-
bodyMapper: Mappers.SolutionResource
|
|
288
|
+
bodyMapper: Mappers.SolutionResource,
|
|
276
289
|
},
|
|
277
290
|
204: {
|
|
278
|
-
bodyMapper: Mappers.SolutionResource
|
|
291
|
+
bodyMapper: Mappers.SolutionResource,
|
|
279
292
|
},
|
|
280
293
|
default: {
|
|
281
|
-
bodyMapper: Mappers.ErrorResponse
|
|
282
|
-
}
|
|
294
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
295
|
+
},
|
|
283
296
|
},
|
|
284
297
|
requestBody: Parameters.solutionRequestBody,
|
|
285
298
|
queryParameters: [Parameters.apiVersion],
|
|
286
299
|
urlParameters: [
|
|
287
300
|
Parameters.$host,
|
|
288
301
|
Parameters.scope,
|
|
289
|
-
Parameters.solutionResourceName
|
|
302
|
+
Parameters.solutionResourceName,
|
|
290
303
|
],
|
|
291
304
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
292
305
|
mediaType: "json",
|
|
293
|
-
serializer
|
|
306
|
+
serializer,
|
|
294
307
|
};
|
|
295
308
|
const getOperationSpec: coreClient.OperationSpec = {
|
|
296
309
|
path: "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}",
|
|
297
310
|
httpMethod: "GET",
|
|
298
311
|
responses: {
|
|
299
312
|
200: {
|
|
300
|
-
bodyMapper: Mappers.SolutionResource
|
|
313
|
+
bodyMapper: Mappers.SolutionResource,
|
|
301
314
|
},
|
|
302
315
|
default: {
|
|
303
|
-
bodyMapper: Mappers.ErrorResponse
|
|
304
|
-
}
|
|
316
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
317
|
+
},
|
|
305
318
|
},
|
|
306
319
|
queryParameters: [Parameters.apiVersion],
|
|
307
320
|
urlParameters: [
|
|
308
321
|
Parameters.$host,
|
|
309
322
|
Parameters.scope,
|
|
310
|
-
Parameters.solutionResourceName
|
|
323
|
+
Parameters.solutionResourceName,
|
|
311
324
|
],
|
|
312
325
|
headerParameters: [Parameters.accept],
|
|
313
|
-
serializer
|
|
326
|
+
serializer,
|
|
314
327
|
};
|
|
315
328
|
const updateOperationSpec: coreClient.OperationSpec = {
|
|
316
329
|
path: "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}",
|
|
@@ -318,32 +331,52 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
|
318
331
|
responses: {
|
|
319
332
|
200: {
|
|
320
333
|
bodyMapper: Mappers.SolutionResource,
|
|
321
|
-
headersMapper: Mappers.SolutionUpdateHeaders
|
|
334
|
+
headersMapper: Mappers.SolutionUpdateHeaders,
|
|
322
335
|
},
|
|
323
336
|
201: {
|
|
324
337
|
bodyMapper: Mappers.SolutionResource,
|
|
325
|
-
headersMapper: Mappers.SolutionUpdateHeaders
|
|
338
|
+
headersMapper: Mappers.SolutionUpdateHeaders,
|
|
326
339
|
},
|
|
327
340
|
202: {
|
|
328
341
|
bodyMapper: Mappers.SolutionResource,
|
|
329
|
-
headersMapper: Mappers.SolutionUpdateHeaders
|
|
342
|
+
headersMapper: Mappers.SolutionUpdateHeaders,
|
|
330
343
|
},
|
|
331
344
|
204: {
|
|
332
345
|
bodyMapper: Mappers.SolutionResource,
|
|
333
|
-
headersMapper: Mappers.SolutionUpdateHeaders
|
|
346
|
+
headersMapper: Mappers.SolutionUpdateHeaders,
|
|
334
347
|
},
|
|
335
348
|
default: {
|
|
336
|
-
bodyMapper: Mappers.ErrorResponse
|
|
337
|
-
}
|
|
349
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
350
|
+
},
|
|
338
351
|
},
|
|
339
352
|
requestBody: Parameters.solutionPatchRequestBody,
|
|
340
353
|
queryParameters: [Parameters.apiVersion],
|
|
341
354
|
urlParameters: [
|
|
342
355
|
Parameters.$host,
|
|
343
356
|
Parameters.scope,
|
|
344
|
-
Parameters.solutionResourceName
|
|
357
|
+
Parameters.solutionResourceName,
|
|
358
|
+
],
|
|
359
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
360
|
+
mediaType: "json",
|
|
361
|
+
serializer,
|
|
362
|
+
};
|
|
363
|
+
const warmUpOperationSpec: coreClient.OperationSpec = {
|
|
364
|
+
path: "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup",
|
|
365
|
+
httpMethod: "POST",
|
|
366
|
+
responses: {
|
|
367
|
+
204: {},
|
|
368
|
+
default: {
|
|
369
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
requestBody: Parameters.solutionWarmUpRequestBody,
|
|
373
|
+
queryParameters: [Parameters.apiVersion],
|
|
374
|
+
urlParameters: [
|
|
375
|
+
Parameters.$host,
|
|
376
|
+
Parameters.scope,
|
|
377
|
+
Parameters.solutionResourceName,
|
|
345
378
|
],
|
|
346
379
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
347
380
|
mediaType: "json",
|
|
348
|
-
serializer
|
|
381
|
+
serializer,
|
|
349
382
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { SolutionSelfHelp } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { HelpRP } from "../helpRP";
|
|
14
|
+
import {
|
|
15
|
+
SolutionSelfHelpGetOptionalParams,
|
|
16
|
+
SolutionSelfHelpGetResponse,
|
|
17
|
+
} from "../models";
|
|
18
|
+
|
|
19
|
+
/** Class containing SolutionSelfHelp operations. */
|
|
20
|
+
export class SolutionSelfHelpImpl implements SolutionSelfHelp {
|
|
21
|
+
private readonly client: HelpRP;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Initialize a new instance of the class SolutionSelfHelp class.
|
|
25
|
+
* @param client Reference to the service client
|
|
26
|
+
*/
|
|
27
|
+
constructor(client: HelpRP) {
|
|
28
|
+
this.client = client;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional
|
|
33
|
+
* video tutorials, links and guides to public documentation related to a specific problem that enables
|
|
34
|
+
* users to troubleshoot Azure issues.
|
|
35
|
+
* @param solutionId SolutionId is a unique id to identify a solution. You can retrieve the solution id
|
|
36
|
+
* using the Discovery api -
|
|
37
|
+
* https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP
|
|
38
|
+
* @param options The options parameters.
|
|
39
|
+
*/
|
|
40
|
+
get(
|
|
41
|
+
solutionId: string,
|
|
42
|
+
options?: SolutionSelfHelpGetOptionalParams,
|
|
43
|
+
): Promise<SolutionSelfHelpGetResponse> {
|
|
44
|
+
return this.client.sendOperationRequest(
|
|
45
|
+
{ solutionId, options },
|
|
46
|
+
getOperationSpec,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// Operation Specifications
|
|
51
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
52
|
+
|
|
53
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
54
|
+
path: "/providers/Microsoft.Help/selfHelp/{solutionId}",
|
|
55
|
+
httpMethod: "GET",
|
|
56
|
+
responses: {
|
|
57
|
+
200: {
|
|
58
|
+
bodyMapper: Mappers.SolutionResourceSelfHelp,
|
|
59
|
+
},
|
|
60
|
+
default: {
|
|
61
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
queryParameters: [Parameters.apiVersion],
|
|
65
|
+
urlParameters: [Parameters.$host, Parameters.solutionId],
|
|
66
|
+
headerParameters: [Parameters.accept],
|
|
67
|
+
serializer,
|
|
68
|
+
};
|