@azure/arm-kubernetesconfiguration-extensions 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 +7 -0
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/dist/browser/extensionsClient.d.ts +21 -0
- package/dist/browser/extensionsClient.d.ts.map +1 -0
- package/dist/browser/extensionsClient.js +97 -0
- package/dist/browser/extensionsClient.js.map +1 -0
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +13 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/lroImpl.d.ts +11 -0
- package/dist/browser/lroImpl.d.ts.map +1 -0
- package/dist/browser/lroImpl.js +21 -0
- package/dist/browser/lroImpl.js.map +1 -0
- package/dist/browser/models/index.d.ts +398 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +46 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/mappers.d.ts +19 -0
- package/dist/browser/models/mappers.d.ts.map +1 -0
- package/dist/browser/models/mappers.js +612 -0
- package/dist/browser/models/mappers.js.map +1 -0
- package/dist/browser/models/parameters.d.ts +17 -0
- package/dist/browser/models/parameters.d.ts.map +1 -0
- package/dist/browser/models/parameters.js +164 -0
- package/dist/browser/models/parameters.js.map +1 -0
- package/dist/browser/operations/extensions.d.ts +141 -0
- package/dist/browser/operations/extensions.d.ts.map +1 -0
- package/dist/browser/operations/extensions.js +536 -0
- package/dist/browser/operations/extensions.js.map +1 -0
- package/dist/browser/operations/index.d.ts +3 -0
- package/dist/browser/operations/index.d.ts.map +1 -0
- package/dist/browser/operations/index.js +10 -0
- package/dist/browser/operations/index.js.map +1 -0
- package/dist/browser/operations/operationStatus.d.ts +26 -0
- package/dist/browser/operations/operationStatus.d.ts.map +1 -0
- package/dist/browser/operations/operationStatus.js +71 -0
- package/dist/browser/operations/operationStatus.js.map +1 -0
- package/dist/browser/operationsInterfaces/extensions.d.ts +108 -0
- package/dist/browser/operationsInterfaces/extensions.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/extensions.js +9 -0
- package/dist/browser/operationsInterfaces/extensions.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +3 -0
- package/dist/browser/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/index.js +10 -0
- package/dist/browser/operationsInterfaces/index.js.map +1 -0
- package/dist/browser/operationsInterfaces/operationStatus.d.ts +18 -0
- package/dist/browser/operationsInterfaces/operationStatus.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/operationStatus.js +9 -0
- package/dist/browser/operationsInterfaces/operationStatus.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/pagingHelper.d.ts +13 -0
- package/dist/browser/pagingHelper.d.ts.map +1 -0
- package/dist/browser/pagingHelper.js +32 -0
- package/dist/browser/pagingHelper.js.map +1 -0
- package/dist/commonjs/extensionsClient.d.ts +21 -0
- package/dist/commonjs/extensionsClient.d.ts.map +1 -0
- package/dist/commonjs/extensionsClient.js +102 -0
- package/dist/commonjs/extensionsClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lroImpl.d.ts +11 -0
- package/dist/commonjs/lroImpl.d.ts.map +1 -0
- package/dist/commonjs/lroImpl.js +24 -0
- package/dist/commonjs/lroImpl.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +398 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +49 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.d.ts +19 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/models/mappers.js +615 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.d.ts +17 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/models/parameters.js +167 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/dist/commonjs/operations/extensions.d.ts +141 -0
- package/dist/commonjs/operations/extensions.d.ts.map +1 -0
- package/dist/commonjs/operations/extensions.js +540 -0
- package/dist/commonjs/operations/extensions.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +3 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -0
- package/dist/commonjs/operations/index.js +13 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/dist/commonjs/operations/operationStatus.d.ts +26 -0
- package/dist/commonjs/operations/operationStatus.d.ts.map +1 -0
- package/dist/commonjs/operations/operationStatus.js +76 -0
- package/dist/commonjs/operations/operationStatus.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/extensions.d.ts +108 -0
- package/dist/commonjs/operationsInterfaces/extensions.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/extensions.js +10 -0
- package/dist/commonjs/operationsInterfaces/extensions.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.js +13 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/operationStatus.d.ts +18 -0
- package/dist/commonjs/operationsInterfaces/operationStatus.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/operationStatus.js +10 -0
- package/dist/commonjs/operationsInterfaces/operationStatus.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/pagingHelper.d.ts +13 -0
- package/dist/commonjs/pagingHelper.d.ts.map +1 -0
- package/dist/commonjs/pagingHelper.js +36 -0
- package/dist/commonjs/pagingHelper.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/extensionsClient.d.ts +21 -0
- package/dist/esm/extensionsClient.d.ts.map +1 -0
- package/dist/esm/extensionsClient.js +97 -0
- package/dist/esm/extensionsClient.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lroImpl.d.ts +11 -0
- package/dist/esm/lroImpl.d.ts.map +1 -0
- package/dist/esm/lroImpl.js +21 -0
- package/dist/esm/lroImpl.js.map +1 -0
- package/dist/esm/models/index.d.ts +398 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +46 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +19 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/dist/esm/models/mappers.js +612 -0
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +17 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/dist/esm/models/parameters.js +164 -0
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/extensions.d.ts +141 -0
- package/dist/esm/operations/extensions.d.ts.map +1 -0
- package/dist/esm/operations/extensions.js +536 -0
- package/dist/esm/operations/extensions.js.map +1 -0
- package/dist/esm/operations/index.d.ts +3 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/dist/esm/operations/index.js +10 -0
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/operationStatus.d.ts +26 -0
- package/dist/esm/operations/operationStatus.d.ts.map +1 -0
- package/dist/esm/operations/operationStatus.js +71 -0
- package/dist/esm/operations/operationStatus.js.map +1 -0
- package/dist/esm/operationsInterfaces/extensions.d.ts +108 -0
- package/dist/esm/operationsInterfaces/extensions.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/extensions.js +9 -0
- package/dist/esm/operationsInterfaces/extensions.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +3 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/index.js +10 -0
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/operationStatus.d.ts +18 -0
- package/dist/esm/operationsInterfaces/operationStatus.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/operationStatus.js +9 -0
- package/dist/esm/operationsInterfaces/operationStatus.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pagingHelper.d.ts +13 -0
- package/dist/esm/pagingHelper.d.ts.map +1 -0
- package/dist/esm/pagingHelper.js +32 -0
- package/dist/esm/pagingHelper.js.map +1 -0
- package/dist/react-native/extensionsClient.d.ts +21 -0
- package/dist/react-native/extensionsClient.d.ts.map +1 -0
- package/dist/react-native/extensionsClient.js +97 -0
- package/dist/react-native/extensionsClient.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +13 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/lroImpl.d.ts +11 -0
- package/dist/react-native/lroImpl.d.ts.map +1 -0
- package/dist/react-native/lroImpl.js +21 -0
- package/dist/react-native/lroImpl.js.map +1 -0
- package/dist/react-native/models/index.d.ts +398 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +46 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/mappers.d.ts +19 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -0
- package/dist/react-native/models/mappers.js +612 -0
- package/dist/react-native/models/mappers.js.map +1 -0
- package/dist/react-native/models/parameters.d.ts +17 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -0
- package/dist/react-native/models/parameters.js +164 -0
- package/dist/react-native/models/parameters.js.map +1 -0
- package/dist/react-native/operations/extensions.d.ts +141 -0
- package/dist/react-native/operations/extensions.d.ts.map +1 -0
- package/dist/react-native/operations/extensions.js +536 -0
- package/dist/react-native/operations/extensions.js.map +1 -0
- package/dist/react-native/operations/index.d.ts +3 -0
- package/dist/react-native/operations/index.d.ts.map +1 -0
- package/dist/react-native/operations/index.js +10 -0
- package/dist/react-native/operations/index.js.map +1 -0
- package/dist/react-native/operations/operationStatus.d.ts +26 -0
- package/dist/react-native/operations/operationStatus.d.ts.map +1 -0
- package/dist/react-native/operations/operationStatus.js +71 -0
- package/dist/react-native/operations/operationStatus.js.map +1 -0
- package/dist/react-native/operationsInterfaces/extensions.d.ts +108 -0
- package/dist/react-native/operationsInterfaces/extensions.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/extensions.js +9 -0
- package/dist/react-native/operationsInterfaces/extensions.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/index.js +10 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/operationsInterfaces/operationStatus.d.ts +18 -0
- package/dist/react-native/operationsInterfaces/operationStatus.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/operationStatus.js +9 -0
- package/dist/react-native/operationsInterfaces/operationStatus.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/pagingHelper.d.ts +13 -0
- package/dist/react-native/pagingHelper.d.ts.map +1 -0
- package/dist/react-native/pagingHelper.js +32 -0
- package/dist/react-native/pagingHelper.js.map +1 -0
- package/package.json +133 -0
- package/review/arm-kubernetesconfiguration-extensions.api.md +294 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Release History
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.1 (2025-05-19)
|
|
4
|
+
|
|
5
|
+
### Features Added
|
|
6
|
+
|
|
7
|
+
The package of @azure/arm-kubernetesconfiguration-extensions is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Copyright (c) Microsoft Corporation.
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Azure Extensions client library for JavaScript
|
|
2
|
+
|
|
3
|
+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Extensions client.
|
|
4
|
+
|
|
5
|
+
KubernetesConfiguration Extensions Client
|
|
6
|
+
|
|
7
|
+
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kubernetesconfiguration/arm-kubernetesconfiguration-extensions) |
|
|
8
|
+
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-kubernetesconfiguration-extensions) |
|
|
9
|
+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-kubernetesconfiguration-extensions?view=azure-node-preview) |
|
|
10
|
+
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
|
+
|
|
12
|
+
## Getting started
|
|
13
|
+
|
|
14
|
+
### Currently supported environments
|
|
15
|
+
|
|
16
|
+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
|
17
|
+
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
|
+
|
|
19
|
+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
|
20
|
+
|
|
21
|
+
### Prerequisites
|
|
22
|
+
|
|
23
|
+
- An [Azure subscription][azure_sub].
|
|
24
|
+
|
|
25
|
+
### Install the `@azure/arm-kubernetesconfiguration-extensions` package
|
|
26
|
+
|
|
27
|
+
Install the Azure Extensions client library for JavaScript with `npm`:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @azure/arm-kubernetesconfiguration-extensions
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Create and authenticate a `ExtensionsClient`
|
|
34
|
+
|
|
35
|
+
To create a client object to access the Azure Extensions API, you will need the `endpoint` of your Azure Extensions resource and a `credential`. The Azure Extensions client can use Azure Active Directory credentials to authenticate.
|
|
36
|
+
You can find the endpoint for your Azure Extensions resource in the [Azure Portal][azure_portal].
|
|
37
|
+
|
|
38
|
+
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
|
|
39
|
+
|
|
40
|
+
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install @azure/identity
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You will also need to **register a new AAD application and grant access to Azure Extensions** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
|
47
|
+
|
|
48
|
+
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
|
49
|
+
|
|
50
|
+
Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
|
|
51
|
+
|
|
52
|
+
```ts snippet:ReadmeSampleCreateClient_Node
|
|
53
|
+
import { ExtensionsClient } from "@azure/arm-kubernetesconfiguration-extensions";
|
|
54
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
55
|
+
|
|
56
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
57
|
+
const client = new ExtensionsClient(new DefaultAzureCredential(), subscriptionId);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
|
|
61
|
+
|
|
62
|
+
```ts snippet:ReadmeSampleCreateClient_Browser
|
|
63
|
+
import { InteractiveBrowserCredential } from "@azure/identity";
|
|
64
|
+
import { ExtensionsClient } from "@azure/arm-kubernetesconfiguration-extensions";
|
|
65
|
+
|
|
66
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
67
|
+
const credential = new InteractiveBrowserCredential({
|
|
68
|
+
tenantId: "<YOUR_TENANT_ID>",
|
|
69
|
+
clientId: "<YOUR_CLIENT_ID>",
|
|
70
|
+
});
|
|
71
|
+
const client = new ExtensionsClient(credential, subscriptionId);
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### JavaScript Bundle
|
|
75
|
+
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
|
|
76
|
+
|
|
77
|
+
## Key concepts
|
|
78
|
+
|
|
79
|
+
### ExtensionsClient
|
|
80
|
+
|
|
81
|
+
`ExtensionsClient` is the primary interface for developers using the Azure Extensions client library. Explore the methods on this client object to understand the different features of the Azure Extensions service that you can access.
|
|
82
|
+
|
|
83
|
+
## Troubleshooting
|
|
84
|
+
|
|
85
|
+
### Logging
|
|
86
|
+
|
|
87
|
+
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
88
|
+
|
|
89
|
+
```ts snippet:SetLogLevel
|
|
90
|
+
import { setLogLevel } from "@azure/logger";
|
|
91
|
+
|
|
92
|
+
setLogLevel("info");
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
|
|
96
|
+
|
|
97
|
+
## Next steps
|
|
98
|
+
|
|
99
|
+
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
|
|
100
|
+
|
|
101
|
+
## Contributing
|
|
102
|
+
|
|
103
|
+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
|
|
104
|
+
|
|
105
|
+
## Related projects
|
|
106
|
+
|
|
107
|
+
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
[azure_cli]: https://learn.microsoft.com/cli/azure
|
|
111
|
+
[azure_sub]: https://azure.microsoft.com/free/
|
|
112
|
+
[azure_sub]: https://azure.microsoft.com/free/
|
|
113
|
+
[azure_portal]: https://portal.azure.com
|
|
114
|
+
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
|
|
115
|
+
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as coreClient from "@azure/core-client";
|
|
2
|
+
import * as coreAuth from "@azure/core-auth";
|
|
3
|
+
import { Extensions, OperationStatus } from "./operationsInterfaces/index.js";
|
|
4
|
+
import { ExtensionsClientOptionalParams } from "./models/index.js";
|
|
5
|
+
export declare class ExtensionsClient extends coreClient.ServiceClient {
|
|
6
|
+
$host: string;
|
|
7
|
+
subscriptionId: string;
|
|
8
|
+
apiVersion: string;
|
|
9
|
+
/**
|
|
10
|
+
* Initializes a new instance of the ExtensionsClient class.
|
|
11
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
12
|
+
* @param subscriptionId The ID of the target subscription.
|
|
13
|
+
* @param options The parameter options
|
|
14
|
+
*/
|
|
15
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ExtensionsClientOptionalParams);
|
|
16
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
17
|
+
private addCustomApiVersionPolicy;
|
|
18
|
+
extensions: Extensions;
|
|
19
|
+
operationStatus: OperationStatus;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=extensionsClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensionsClient.d.ts","sourceRoot":"","sources":["../../src/extensionsClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnE,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,aAAa;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,8BAA8B;IA0E1C,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IAwBjC,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
import * as coreClient from "@azure/core-client";
|
|
9
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
|
+
import { ExtensionsImpl, OperationStatusImpl } from "./operations/index.js";
|
|
11
|
+
export class ExtensionsClient extends coreClient.ServiceClient {
|
|
12
|
+
/**
|
|
13
|
+
* Initializes a new instance of the ExtensionsClient class.
|
|
14
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
15
|
+
* @param subscriptionId The ID of the target subscription.
|
|
16
|
+
* @param options The parameter options
|
|
17
|
+
*/
|
|
18
|
+
constructor(credentials, subscriptionId, options) {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
if (credentials === undefined) {
|
|
21
|
+
throw new Error("'credentials' cannot be null");
|
|
22
|
+
}
|
|
23
|
+
if (subscriptionId === undefined) {
|
|
24
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
25
|
+
}
|
|
26
|
+
// Initializing default values for options
|
|
27
|
+
if (!options) {
|
|
28
|
+
options = {};
|
|
29
|
+
}
|
|
30
|
+
const defaults = {
|
|
31
|
+
requestContentType: "application/json; charset=utf-8",
|
|
32
|
+
credential: credentials,
|
|
33
|
+
};
|
|
34
|
+
const packageDetails = `azsdk-js-arm-kubernetesconfiguration-extensions/1.0.0-beta.1`;
|
|
35
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
|
+
: `${packageDetails}`;
|
|
38
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
39
|
+
userAgentPrefix,
|
|
40
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
41
|
+
super(optionsWithDefaults);
|
|
42
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
43
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
44
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
45
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
46
|
+
}
|
|
47
|
+
if (!options ||
|
|
48
|
+
!options.pipeline ||
|
|
49
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
50
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
51
|
+
this.pipeline.removePolicy({
|
|
52
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
53
|
+
});
|
|
54
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
55
|
+
credential: credentials,
|
|
56
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
57
|
+
challengeCallbacks: {
|
|
58
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
59
|
+
},
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
// Parameter assignments
|
|
63
|
+
this.subscriptionId = subscriptionId;
|
|
64
|
+
// Assigning values to Constant parameters
|
|
65
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
66
|
+
this.apiVersion = options.apiVersion || "2024-11-01";
|
|
67
|
+
this.extensions = new ExtensionsImpl(this);
|
|
68
|
+
this.operationStatus = new OperationStatusImpl(this);
|
|
69
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
70
|
+
}
|
|
71
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
72
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
73
|
+
if (!apiVersion) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const apiVersionPolicy = {
|
|
77
|
+
name: "CustomApiVersionPolicy",
|
|
78
|
+
async sendRequest(request, next) {
|
|
79
|
+
const param = request.url.split("?");
|
|
80
|
+
if (param.length > 1) {
|
|
81
|
+
const newParams = param[1].split("&").map((item) => {
|
|
82
|
+
if (item.indexOf("api-version") > -1) {
|
|
83
|
+
return "api-version=" + apiVersion;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return item;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
90
|
+
}
|
|
91
|
+
return next(request);
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=extensionsClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensionsClient.js","sourceRoot":"","sources":["../../src/extensionsClient.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { ExtensionsImpl, OperationStatusImpl } from \"./operations/index.js\";\nimport { Extensions, OperationStatus } from \"./operationsInterfaces/index.js\";\nimport { ExtensionsClientOptionalParams } from \"./models/index.js\";\n\nexport class ExtensionsClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the ExtensionsClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: ExtensionsClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: ExtensionsClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-kubernetesconfiguration-extensions/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-11-01\";\n this.extensions = new ExtensionsImpl(this);\n this.operationStatus = new OperationStatusImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n extensions: Extensions;\n operationStatus: OperationStatus;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
/// <reference lib="esnext.asynciterable" />
|
|
9
|
+
export { getContinuationToken } from "./pagingHelper.js";
|
|
10
|
+
export * from "./models/index.js";
|
|
11
|
+
export { ExtensionsClient } from "./extensionsClient.js";
|
|
12
|
+
export * from "./operationsInterfaces/index.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,cAAc,iCAAiC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { ExtensionsClient } from \"./extensionsClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
2
|
+
export declare function createLroSpec<T>(inputs: {
|
|
3
|
+
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
|
|
4
|
+
args: Record<string, unknown>;
|
|
5
|
+
spec: {
|
|
6
|
+
readonly requestBody?: unknown;
|
|
7
|
+
readonly path?: string;
|
|
8
|
+
readonly httpMethod: string;
|
|
9
|
+
} & Record<string, any>;
|
|
10
|
+
}): LongRunningOperation<T>;
|
|
11
|
+
//# sourceMappingURL=lroImpl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE;QACJ,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACzB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAgB1B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { __rest } from "tslib";
|
|
9
|
+
export function createLroSpec(inputs) {
|
|
10
|
+
const { args, spec, sendOperationFn } = inputs;
|
|
11
|
+
return {
|
|
12
|
+
requestMethod: spec.httpMethod,
|
|
13
|
+
requestPath: spec.path,
|
|
14
|
+
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
15
|
+
sendPollRequest: (path, options) => {
|
|
16
|
+
const { requestBody } = spec, restSpec = __rest(spec, ["requestBody"]);
|
|
17
|
+
return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=lroImpl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAKH,MAAM,UAAU,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CAAC,IAAY,EAAE,OAA2C,EAAE,EAAE;YAC7E,MAAM,EAAE,WAAW,KAAkB,IAAI,EAAjB,QAAQ,UAAK,IAAI,EAAnC,eAA4B,CAAO,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,kCACtB,QAAQ,KACX,UAAU,EAAE,KAAK,EACjB,IAAI,EACJ,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,IACjC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (path: string, options?: { abortSignal?: AbortSignalLike }) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}
|