@azure/arm-keyvault-profile-2020-09-01-hybrid 1.0.0 → 2.0.0-alpha.20220309.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 +11 -0
- package/LICENSE +21 -0
- package/README.md +83 -77
- package/dist/index.js +3453 -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/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/keyVaultManagementClient.d.ts +23 -0
- package/dist-esm/src/keyVaultManagementClient.d.ts.map +1 -0
- package/dist-esm/src/keyVaultManagementClient.js +56 -0
- package/dist-esm/src/keyVaultManagementClient.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +1008 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +123 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +48 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +728 -617
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +26 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +220 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +3 -5
- 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/privateEndpointConnections.d.ts +51 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +187 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +53 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/secrets.d.ts +72 -0
- package/dist-esm/src/operations/secrets.d.ts.map +1 -0
- package/dist-esm/src/operations/secrets.js +247 -0
- package/dist-esm/src/operations/secrets.js.map +1 -0
- package/dist-esm/src/operations/vaults.d.ts +166 -0
- package/dist-esm/src/operations/vaults.d.ts.map +1 -0
- package/dist-esm/src/operations/vaults.js +816 -0
- package/dist-esm/src/operations/vaults.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -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/privateEndpointConnections.d.ts +43 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/secrets.d.ts +45 -0
- package/dist-esm/src/operationsInterfaces/secrets.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/secrets.js +9 -0
- package/dist-esm/src/operationsInterfaces/secrets.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/vaults.d.ts +103 -0
- package/dist-esm/src/operationsInterfaces/vaults.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/vaults.js +9 -0
- package/dist-esm/src/operationsInterfaces/vaults.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +74 -22
- package/review/arm-keyvault-profile-2020-09-01-hybrid.api.md +876 -0
- package/rollup.config.js +115 -30
- package/src/index.ts +12 -0
- package/src/keyVaultManagementClient.ts +84 -39
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +849 -1276
- package/src/models/mappers.ts +730 -609
- package/src/models/parameters.ts +153 -76
- package/src/operations/index.ts +3 -5
- package/src/operations/operations.ts +87 -73
- package/src/operations/privateEndpointConnections.ts +174 -154
- package/src/operations/privateLinkResources.ts +39 -54
- package/src/operations/secrets.ts +215 -248
- package/src/operations/vaults.ts +731 -629
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +85 -0
- package/src/operationsInterfaces/privateLinkResources.ts +27 -0
- package/src/operationsInterfaces/secrets.ts +86 -0
- package/src/operationsInterfaces/vaults.ts +197 -0
- package/tsconfig.json +14 -6
- package/types/arm-keyvault-profile-2020-09-01-hybrid.d.ts +1360 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-keyvault-profile-2020-09-01-hybrid.js +0 -3048
- package/dist/arm-keyvault-profile-2020-09-01-hybrid.js.map +0 -1
- package/dist/arm-keyvault-profile-2020-09-01-hybrid.min.js +0 -1
- package/dist/arm-keyvault-profile-2020-09-01-hybrid.min.js.map +0 -1
- package/esm/keyVaultManagementClient.d.ts +0 -23
- package/esm/keyVaultManagementClient.d.ts.map +0 -1
- package/esm/keyVaultManagementClient.js +0 -38
- package/esm/keyVaultManagementClient.js.map +0 -1
- package/esm/keyVaultManagementClientContext.d.ts +0 -17
- package/esm/keyVaultManagementClientContext.d.ts.map +0 -1
- package/esm/keyVaultManagementClientContext.js +0 -57
- package/esm/keyVaultManagementClientContext.js.map +0 -1
- package/esm/models/index.d.ts +0 -1449
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -8
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -46
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -17
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -178
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
- package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.js +0 -9
- package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
- package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/privateLinkResourcesMappers.js +0 -9
- package/esm/models/privateLinkResourcesMappers.js.map +0 -1
- package/esm/models/secretsMappers.d.ts +0 -2
- package/esm/models/secretsMappers.d.ts.map +0 -1
- package/esm/models/secretsMappers.js +0 -9
- package/esm/models/secretsMappers.js.map +0 -1
- package/esm/models/vaultsMappers.d.ts +0 -2
- package/esm/models/vaultsMappers.d.ts.map +0 -1
- package/esm/models/vaultsMappers.js +0 -9
- package/esm/models/vaultsMappers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -77
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/privateEndpointConnections.d.ts +0 -91
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -164
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -34
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -58
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/esm/operations/secrets.d.ts +0 -139
- package/esm/operations/secrets.d.ts.map +0 -1
- package/esm/operations/secrets.js +0 -201
- package/esm/operations/secrets.js.map +0 -1
- package/esm/operations/vaults.d.ts +0 -317
- package/esm/operations/vaults.d.ts.map +0 -1
- package/esm/operations/vaults.js +0 -557
- package/esm/operations/vaults.js.map +0 -1
- package/src/keyVaultManagementClientContext.ts +0 -63
- package/src/models/operationsMappers.ts +0 -16
- package/src/models/privateEndpointConnectionsMappers.ts +0 -40
- package/src/models/privateLinkResourcesMappers.ts +0 -39
- package/src/models/secretsMappers.ts +0 -39
- package/src/models/vaultsMappers.ts +0 -45
package/rollup.config.js
CHANGED
|
@@ -1,37 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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";
|
|
3
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];
|
|
4
41
|
|
|
5
42
|
/**
|
|
6
|
-
*
|
|
43
|
+
* Construct a warning handler for the shared rollup configuration
|
|
44
|
+
* that ignores certain warnings that are not relevant to testing.
|
|
7
45
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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/**"]
|
|
22
62
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
35
92
|
};
|
|
36
93
|
|
|
37
|
-
export
|
|
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"));
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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 * from "./models";
|
|
11
|
+
export { KeyVaultManagementClient } from "./keyVaultManagementClient";
|
|
12
|
+
export * from "./operationsInterfaces";
|
|
@@ -1,51 +1,96 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* license information.
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
5
4
|
*
|
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreAuth from "@azure/core-auth";
|
|
11
|
+
import {
|
|
12
|
+
VaultsImpl,
|
|
13
|
+
PrivateEndpointConnectionsImpl,
|
|
14
|
+
PrivateLinkResourcesImpl,
|
|
15
|
+
OperationsImpl,
|
|
16
|
+
SecretsImpl
|
|
17
|
+
} from "./operations";
|
|
18
|
+
import {
|
|
19
|
+
Vaults,
|
|
20
|
+
PrivateEndpointConnections,
|
|
21
|
+
PrivateLinkResources,
|
|
22
|
+
Operations,
|
|
23
|
+
Secrets
|
|
24
|
+
} from "./operationsInterfaces";
|
|
25
|
+
import { KeyVaultManagementClientOptionalParams } from "./models";
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
privateEndpointConnections: operations.PrivateEndpointConnections;
|
|
22
|
-
privateLinkResources: operations.PrivateLinkResources;
|
|
23
|
-
operations: operations.Operations;
|
|
24
|
-
secrets: operations.Secrets;
|
|
27
|
+
export class KeyVaultManagementClient extends coreClient.ServiceClient {
|
|
28
|
+
$host: string;
|
|
29
|
+
apiVersion: string;
|
|
30
|
+
subscriptionId: string;
|
|
25
31
|
|
|
26
32
|
/**
|
|
27
33
|
* Initializes a new instance of the KeyVaultManagementClient class.
|
|
28
|
-
* @param credentials
|
|
29
|
-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure
|
|
30
|
-
*
|
|
31
|
-
* @param
|
|
34
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
35
|
+
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription.
|
|
36
|
+
* The subscription ID forms part of the URI for every service call.
|
|
37
|
+
* @param options The parameter options
|
|
32
38
|
*/
|
|
33
|
-
constructor(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
constructor(
|
|
40
|
+
credentials: coreAuth.TokenCredential,
|
|
41
|
+
subscriptionId: string,
|
|
42
|
+
options?: KeyVaultManagementClientOptionalParams
|
|
43
|
+
) {
|
|
44
|
+
if (credentials === undefined) {
|
|
45
|
+
throw new Error("'credentials' cannot be null");
|
|
46
|
+
}
|
|
47
|
+
if (subscriptionId === undefined) {
|
|
48
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Initializing default values for options
|
|
52
|
+
if (!options) {
|
|
53
|
+
options = {};
|
|
54
|
+
}
|
|
55
|
+
const defaults: KeyVaultManagementClientOptionalParams = {
|
|
56
|
+
requestContentType: "application/json; charset=utf-8",
|
|
57
|
+
credential: credentials
|
|
58
|
+
};
|
|
42
59
|
|
|
43
|
-
|
|
60
|
+
const packageDetails = `azsdk-js-arm-keyvault-profile-2020-09-01-hybrid/2.0.0`;
|
|
61
|
+
const userAgentPrefix =
|
|
62
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
63
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
64
|
+
: `${packageDetails}`;
|
|
44
65
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
66
|
+
if (!options.credentialScopes) {
|
|
67
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
68
|
+
}
|
|
69
|
+
const optionsWithDefaults = {
|
|
70
|
+
...defaults,
|
|
71
|
+
...options,
|
|
72
|
+
userAgentOptions: {
|
|
73
|
+
userAgentPrefix
|
|
74
|
+
},
|
|
75
|
+
baseUri: options.endpoint || "https://management.azure.com"
|
|
76
|
+
};
|
|
77
|
+
super(optionsWithDefaults);
|
|
78
|
+
// Parameter assignments
|
|
79
|
+
this.subscriptionId = subscriptionId;
|
|
80
|
+
|
|
81
|
+
// Assigning values to Constant parameters
|
|
82
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
83
|
+
this.apiVersion = options.apiVersion || "2019-09-01";
|
|
84
|
+
this.vaults = new VaultsImpl(this);
|
|
85
|
+
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
|
86
|
+
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
|
|
87
|
+
this.operations = new OperationsImpl(this);
|
|
88
|
+
this.secrets = new SecretsImpl(this);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
vaults: Vaults;
|
|
92
|
+
privateEndpointConnections: PrivateEndpointConnections;
|
|
93
|
+
privateLinkResources: PrivateLinkResources;
|
|
94
|
+
operations: Operations;
|
|
95
|
+
secrets: Secrets;
|
|
96
|
+
}
|
package/src/lroImpl.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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 { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
10
|
+
|
|
11
|
+
export class LroImpl<T> implements LongRunningOperation<T> {
|
|
12
|
+
constructor(
|
|
13
|
+
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
|
|
14
|
+
private args: Record<string, unknown>,
|
|
15
|
+
private spec: {
|
|
16
|
+
readonly requestBody?: unknown;
|
|
17
|
+
readonly path?: string;
|
|
18
|
+
readonly httpMethod: string;
|
|
19
|
+
} & Record<string, any>,
|
|
20
|
+
public requestPath: string = spec.path!,
|
|
21
|
+
public requestMethod: string = spec.httpMethod
|
|
22
|
+
) {}
|
|
23
|
+
public async sendInitialRequest(): Promise<LroResponse<T>> {
|
|
24
|
+
return this.sendOperationFn(this.args, this.spec);
|
|
25
|
+
}
|
|
26
|
+
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
|
|
27
|
+
const { requestBody, ...restSpec } = this.spec;
|
|
28
|
+
return this.sendOperationFn(this.args, {
|
|
29
|
+
...restSpec,
|
|
30
|
+
path,
|
|
31
|
+
httpMethod: "GET"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|