@azure/arm-hybridkubernetes 2.1.1-alpha.20250326.1 → 3.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 +52 -8
- package/LICENSE +1 -1
- package/README.md +6 -7
- package/dist/browser/connectedKubernetesClient.d.ts +5 -4
- package/dist/browser/connectedKubernetesClient.d.ts.map +1 -1
- package/dist/browser/connectedKubernetesClient.js +16 -19
- package/dist/browser/connectedKubernetesClient.js.map +1 -1
- package/dist/browser/lroImpl.d.ts +7 -12
- package/dist/browser/lroImpl.d.ts.map +1 -1
- package/dist/browser/lroImpl.js +11 -15
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/index.d.ts +282 -57
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js +36 -0
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/mappers.d.ts +12 -1
- package/dist/browser/models/mappers.d.ts.map +1 -1
- package/dist/browser/models/mappers.js +631 -221
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/models/parameters.d.ts +1 -1
- package/dist/browser/models/parameters.d.ts.map +1 -1
- package/dist/browser/models/parameters.js +31 -31
- package/dist/browser/models/parameters.js.map +1 -1
- package/dist/browser/operations/connectedClusterOperations.d.ts +12 -12
- package/dist/browser/operations/connectedClusterOperations.d.ts.map +1 -1
- package/dist/browser/operations/connectedClusterOperations.js +80 -82
- package/dist/browser/operations/connectedClusterOperations.js.map +1 -1
- package/dist/browser/operations/operations.d.ts +4 -4
- package/dist/browser/operations/operations.d.ts.map +1 -1
- package/dist/browser/operations/operations.js +9 -10
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operationsInterfaces/connectedClusterOperations.d.ts +10 -10
- package/dist/browser/operationsInterfaces/connectedClusterOperations.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/connectedClusterOperations.js.map +1 -1
- package/dist/browser/operationsInterfaces/operations.d.ts +2 -2
- package/dist/browser/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/operations.js.map +1 -1
- package/dist/browser/pagingHelper.d.ts +4 -4
- package/dist/browser/pagingHelper.d.ts.map +1 -1
- package/dist/browser/pagingHelper.js +4 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/connectedKubernetesClient.d.ts +5 -4
- package/dist/commonjs/connectedKubernetesClient.d.ts.map +1 -1
- package/dist/commonjs/connectedKubernetesClient.js +16 -19
- package/dist/commonjs/connectedKubernetesClient.js.map +1 -1
- package/dist/commonjs/lroImpl.d.ts +7 -12
- package/dist/commonjs/lroImpl.d.ts.map +1 -1
- package/dist/commonjs/lroImpl.js +12 -17
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +282 -57
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +37 -1
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/mappers.d.ts +12 -1
- package/dist/commonjs/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/models/mappers.js +632 -222
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/models/parameters.d.ts +1 -1
- package/dist/commonjs/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/models/parameters.js +30 -30
- package/dist/commonjs/models/parameters.js.map +1 -1
- package/dist/commonjs/operations/connectedClusterOperations.d.ts +12 -12
- package/dist/commonjs/operations/connectedClusterOperations.d.ts.map +1 -1
- package/dist/commonjs/operations/connectedClusterOperations.js +78 -80
- package/dist/commonjs/operations/connectedClusterOperations.js.map +1 -1
- package/dist/commonjs/operations/operations.d.ts +4 -4
- package/dist/commonjs/operations/operations.d.ts.map +1 -1
- package/dist/commonjs/operations/operations.js +9 -10
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operationsInterfaces/connectedClusterOperations.d.ts +10 -10
- package/dist/commonjs/operationsInterfaces/connectedClusterOperations.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/connectedClusterOperations.js.map +1 -1
- package/dist/commonjs/operationsInterfaces/operations.d.ts +2 -2
- package/dist/commonjs/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/operations.js.map +1 -1
- package/dist/commonjs/pagingHelper.d.ts +4 -4
- package/dist/commonjs/pagingHelper.d.ts.map +1 -1
- package/dist/commonjs/pagingHelper.js +4 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/connectedKubernetesClient.d.ts +5 -4
- package/dist/esm/connectedKubernetesClient.d.ts.map +1 -1
- package/dist/esm/connectedKubernetesClient.js +16 -19
- package/dist/esm/connectedKubernetesClient.js.map +1 -1
- package/dist/esm/lroImpl.d.ts +7 -12
- package/dist/esm/lroImpl.d.ts.map +1 -1
- package/dist/esm/lroImpl.js +11 -15
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/index.d.ts +282 -57
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +36 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/mappers.d.ts +12 -1
- package/dist/esm/models/mappers.d.ts.map +1 -1
- package/dist/esm/models/mappers.js +631 -221
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/models/parameters.d.ts +1 -1
- package/dist/esm/models/parameters.d.ts.map +1 -1
- package/dist/esm/models/parameters.js +31 -31
- package/dist/esm/models/parameters.js.map +1 -1
- package/dist/esm/operations/connectedClusterOperations.d.ts +12 -12
- package/dist/esm/operations/connectedClusterOperations.d.ts.map +1 -1
- package/dist/esm/operations/connectedClusterOperations.js +80 -82
- package/dist/esm/operations/connectedClusterOperations.js.map +1 -1
- package/dist/esm/operations/operations.d.ts +4 -4
- package/dist/esm/operations/operations.d.ts.map +1 -1
- package/dist/esm/operations/operations.js +9 -10
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operationsInterfaces/connectedClusterOperations.d.ts +10 -10
- package/dist/esm/operationsInterfaces/connectedClusterOperations.d.ts.map +1 -1
- package/dist/esm/operationsInterfaces/connectedClusterOperations.js.map +1 -1
- package/dist/esm/operationsInterfaces/operations.d.ts +2 -2
- package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/esm/operationsInterfaces/operations.js.map +1 -1
- package/dist/esm/pagingHelper.d.ts +4 -4
- package/dist/esm/pagingHelper.d.ts.map +1 -1
- package/dist/esm/pagingHelper.js +4 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/connectedKubernetesClient.d.ts +5 -4
- package/dist/react-native/connectedKubernetesClient.d.ts.map +1 -1
- package/dist/react-native/connectedKubernetesClient.js +16 -19
- package/dist/react-native/connectedKubernetesClient.js.map +1 -1
- package/dist/react-native/lroImpl.d.ts +7 -12
- package/dist/react-native/lroImpl.d.ts.map +1 -1
- package/dist/react-native/lroImpl.js +11 -15
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/index.d.ts +282 -57
- package/dist/react-native/models/index.d.ts.map +1 -1
- package/dist/react-native/models/index.js +36 -0
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/mappers.d.ts +12 -1
- package/dist/react-native/models/mappers.d.ts.map +1 -1
- package/dist/react-native/models/mappers.js +631 -221
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/models/parameters.d.ts +1 -1
- package/dist/react-native/models/parameters.d.ts.map +1 -1
- package/dist/react-native/models/parameters.js +31 -31
- package/dist/react-native/models/parameters.js.map +1 -1
- package/dist/react-native/operations/connectedClusterOperations.d.ts +12 -12
- package/dist/react-native/operations/connectedClusterOperations.d.ts.map +1 -1
- package/dist/react-native/operations/connectedClusterOperations.js +80 -82
- package/dist/react-native/operations/connectedClusterOperations.js.map +1 -1
- package/dist/react-native/operations/operations.d.ts +4 -4
- package/dist/react-native/operations/operations.d.ts.map +1 -1
- package/dist/react-native/operations/operations.js +9 -10
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operationsInterfaces/connectedClusterOperations.d.ts +10 -10
- package/dist/react-native/operationsInterfaces/connectedClusterOperations.d.ts.map +1 -1
- package/dist/react-native/operationsInterfaces/connectedClusterOperations.js.map +1 -1
- package/dist/react-native/operationsInterfaces/operations.d.ts +2 -2
- package/dist/react-native/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/react-native/operationsInterfaces/operations.js.map +1 -1
- package/dist/react-native/pagingHelper.d.ts +4 -4
- package/dist/react-native/pagingHelper.d.ts.map +1 -1
- package/dist/react-native/pagingHelper.js +4 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +35 -34
- package/review/arm-hybridkubernetes.api.md +156 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,59 @@
|
|
|
1
1
|
# Release History
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
## 3.0.0-beta.1 (2025-03-28)
|
|
4
|
+
Compared with version 2.1.0
|
|
5
|
+
|
|
5
6
|
### Features Added
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
- Added operation ConnectedClusterOperations.beginCreateOrReplace
|
|
9
|
+
- Added operation ConnectedClusterOperations.beginCreateOrReplaceAndWait
|
|
10
|
+
- Added Interface AadProfile
|
|
11
|
+
- Added Interface AgentError
|
|
12
|
+
- Added Interface ArcAgentProfile
|
|
13
|
+
- Added Interface ArcAgentryConfigurations
|
|
14
|
+
- Added Interface ConnectedClusterCreateOrReplaceOptionalParams
|
|
15
|
+
- Added Interface ConnectedClusterPatchProperties
|
|
16
|
+
- Added Interface ConnectedClusterProperties
|
|
17
|
+
- Added Interface Gateway
|
|
18
|
+
- Added Interface OidcIssuerProfile
|
|
19
|
+
- Added Interface SecurityProfile
|
|
20
|
+
- Added Interface SecurityProfileWorkloadIdentity
|
|
21
|
+
- Added Interface SystemComponent
|
|
22
|
+
- Added Type Alias AutoUpgradeOptions
|
|
23
|
+
- Added Type Alias AzureHybridBenefit
|
|
24
|
+
- Added Type Alias ConnectedClusterCreateOrReplaceResponse
|
|
25
|
+
- Added Type Alias ConnectedClusterKind
|
|
26
|
+
- Added Type Alias PrivateLinkState
|
|
27
|
+
- Interface ConnectedCluster has a new optional parameter kind
|
|
28
|
+
- Interface HybridConnectionConfig has a new optional parameter relayTid
|
|
29
|
+
- Interface HybridConnectionConfig has a new optional parameter relayType
|
|
30
|
+
- Added Enum KnownAutoUpgradeOptions
|
|
31
|
+
- Added Enum KnownAzureHybridBenefit
|
|
32
|
+
- Added Enum KnownConnectedClusterKind
|
|
33
|
+
- Added Enum KnownPrivateLinkState
|
|
34
|
+
- Enum KnownConnectivityStatus has a new value AgentNotInstalled
|
|
8
35
|
|
|
9
|
-
###
|
|
10
|
-
|
|
11
|
-
### Other Changes
|
|
36
|
+
### Breaking Changes
|
|
12
37
|
|
|
38
|
+
- Removed operation ConnectedClusterOperations.beginCreate
|
|
39
|
+
- Removed operation ConnectedClusterOperations.beginCreateAndWait
|
|
40
|
+
- Class ConnectedKubernetesClient has a new signature
|
|
41
|
+
- Interface ConnectedCluster no longer has parameter agentPublicKeyCertificate
|
|
42
|
+
- Interface ConnectedCluster no longer has parameter agentVersion
|
|
43
|
+
- Interface ConnectedCluster no longer has parameter connectivityStatus
|
|
44
|
+
- Interface ConnectedCluster no longer has parameter distribution
|
|
45
|
+
- Interface ConnectedCluster no longer has parameter infrastructure
|
|
46
|
+
- Interface ConnectedCluster no longer has parameter kubernetesVersion
|
|
47
|
+
- Interface ConnectedCluster no longer has parameter lastConnectivityTime
|
|
48
|
+
- Interface ConnectedCluster no longer has parameter managedIdentityCertificateExpirationTime
|
|
49
|
+
- Interface ConnectedCluster no longer has parameter offering
|
|
50
|
+
- Interface ConnectedCluster no longer has parameter provisioningState
|
|
51
|
+
- Interface ConnectedCluster no longer has parameter totalCoreCount
|
|
52
|
+
- Interface ConnectedCluster no longer has parameter totalNodeCount
|
|
53
|
+
- Interface ConnectedCluster has a new required parameter properties
|
|
54
|
+
- Type of parameter properties of interface ConnectedClusterPatch is changed from Record<string, unknown> to ConnectedClusterPatchProperties
|
|
55
|
+
|
|
56
|
+
|
|
13
57
|
## 2.1.0 (2022-11-25)
|
|
14
58
|
|
|
15
59
|
### Features Added
|
|
@@ -31,4 +75,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka.
|
|
|
31
75
|
|
|
32
76
|
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
|
|
33
77
|
|
|
34
|
-
To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart
|
|
78
|
+
To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
|
package/LICENSE
CHANGED
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ConnectedKubernetes client.
|
|
4
4
|
|
|
5
|
-
Azure Connected Cluster Resource Provider API for
|
|
5
|
+
Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc
|
|
6
6
|
|
|
7
7
|
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridkubernetes/arm-hybridkubernetes) |
|
|
8
8
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-hybridkubernetes) |
|
|
9
|
-
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-hybridkubernetes) |
|
|
9
|
+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-hybridkubernetes?view=azure-node-preview) |
|
|
10
10
|
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
11
|
|
|
12
12
|
## Getting started
|
|
@@ -44,7 +44,6 @@ npm install @azure/identity
|
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
You will also need to **register a new AAD application and grant access to Azure ConnectedKubernetes** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
|
47
|
-
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
|
|
48
47
|
|
|
49
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).
|
|
50
49
|
|
|
@@ -64,16 +63,15 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
|
|
|
64
63
|
import { InteractiveBrowserCredential } from "@azure/identity";
|
|
65
64
|
import { ConnectedKubernetesClient } from "@azure/arm-hybridkubernetes";
|
|
66
65
|
|
|
67
|
-
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
68
66
|
const credential = new InteractiveBrowserCredential({
|
|
69
67
|
tenantId: "<YOUR_TENANT_ID>",
|
|
70
|
-
clientId: "<YOUR_CLIENT_ID>"
|
|
71
|
-
});
|
|
68
|
+
clientId: "<YOUR_CLIENT_ID>"
|
|
69
|
+
});
|
|
70
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
72
71
|
const client = new ConnectedKubernetesClient(credential, subscriptionId);
|
|
73
72
|
```
|
|
74
73
|
|
|
75
74
|
### JavaScript Bundle
|
|
76
|
-
|
|
77
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).
|
|
78
76
|
|
|
79
77
|
## Key concepts
|
|
@@ -108,6 +106,7 @@ If you'd like to contribute to this library, please read the [contributing guide
|
|
|
108
106
|
|
|
109
107
|
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
|
|
110
108
|
|
|
109
|
+
|
|
111
110
|
[azure_cli]: https://learn.microsoft.com/cli/azure
|
|
112
111
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
113
112
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as coreClient from "@azure/core-client";
|
|
2
|
-
import * as coreAuth from "@azure/core-auth";
|
|
3
|
-
import { ConnectedClusterOperations, Operations } from "./operationsInterfaces/index.js";
|
|
4
|
-
import { ConnectedKubernetesClientOptionalParams } from "./models/index.js";
|
|
2
|
+
import type * as coreAuth from "@azure/core-auth";
|
|
3
|
+
import type { ConnectedClusterOperations, Operations } from "./operationsInterfaces/index.js";
|
|
4
|
+
import type { ConnectedKubernetesClientOptionalParams } from "./models/index.js";
|
|
5
5
|
export declare class ConnectedKubernetesClient extends coreClient.ServiceClient {
|
|
6
6
|
$host: string;
|
|
7
7
|
apiVersion: string;
|
|
8
|
-
subscriptionId
|
|
8
|
+
subscriptionId?: string;
|
|
9
9
|
/**
|
|
10
10
|
* Initializes a new instance of the ConnectedKubernetesClient class.
|
|
11
11
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -13,6 +13,7 @@ export declare class ConnectedKubernetesClient extends coreClient.ServiceClient
|
|
|
13
13
|
* @param options The parameter options
|
|
14
14
|
*/
|
|
15
15
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConnectedKubernetesClientOptionalParams);
|
|
16
|
+
constructor(credentials: coreAuth.TokenCredential, options?: ConnectedKubernetesClientOptionalParams);
|
|
16
17
|
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
17
18
|
private addCustomApiVersionPolicy;
|
|
18
19
|
connectedClusterOperations: ConnectedClusterOperations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectedKubernetesClient.d.ts","sourceRoot":"","sources":["../../src/connectedKubernetesClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"connectedKubernetesClient.d.ts","sourceRoot":"","sources":["../../src/connectedKubernetesClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,OAAO,KAAK,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,mBAAmB,CAAC;AAEjF,qBAAa,yBAA0B,SAAQ,UAAU,CAAC,aAAa;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,uCAAuC;gBAGjD,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,OAAO,CAAC,EAAE,uCAAuC;IAoFnD,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IAwBjC,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,UAAU,EAAE,UAAU,CAAC;CACxB"}
|
|
@@ -9,19 +9,17 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { ConnectedClusterOperationsImpl, OperationsImpl } from "./operations/index.js";
|
|
11
11
|
export class ConnectedKubernetesClient extends coreClient.ServiceClient {
|
|
12
|
-
|
|
13
|
-
* Initializes a new instance of the ConnectedKubernetesClient 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) {
|
|
12
|
+
constructor(credentials, subscriptionIdOrOptions, options) {
|
|
19
13
|
var _a, _b, _c;
|
|
20
14
|
if (credentials === undefined) {
|
|
21
15
|
throw new Error("'credentials' cannot be null");
|
|
22
16
|
}
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
let subscriptionId;
|
|
18
|
+
if (typeof subscriptionIdOrOptions === "string") {
|
|
19
|
+
subscriptionId = subscriptionIdOrOptions;
|
|
20
|
+
}
|
|
21
|
+
else if (typeof subscriptionIdOrOptions === "object") {
|
|
22
|
+
options = subscriptionIdOrOptions;
|
|
25
23
|
}
|
|
26
24
|
// Initializing default values for options
|
|
27
25
|
if (!options) {
|
|
@@ -29,42 +27,41 @@ export class ConnectedKubernetesClient extends coreClient.ServiceClient {
|
|
|
29
27
|
}
|
|
30
28
|
const defaults = {
|
|
31
29
|
requestContentType: "application/json; charset=utf-8",
|
|
32
|
-
credential: credentials
|
|
30
|
+
credential: credentials,
|
|
33
31
|
};
|
|
34
|
-
const packageDetails = `azsdk-js-arm-hybridkubernetes/
|
|
32
|
+
const packageDetails = `azsdk-js-arm-hybridkubernetes/3.0.0-beta.1`;
|
|
35
33
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
34
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
35
|
: `${packageDetails}`;
|
|
38
36
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
39
|
-
userAgentPrefix
|
|
37
|
+
userAgentPrefix,
|
|
40
38
|
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
41
39
|
super(optionsWithDefaults);
|
|
42
40
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
43
41
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
44
42
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
45
|
-
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
46
|
-
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
43
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
47
44
|
}
|
|
48
45
|
if (!options ||
|
|
49
46
|
!options.pipeline ||
|
|
50
47
|
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
51
48
|
!bearerTokenAuthenticationPolicyFound) {
|
|
52
49
|
this.pipeline.removePolicy({
|
|
53
|
-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
50
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
54
51
|
});
|
|
55
52
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
56
53
|
credential: credentials,
|
|
57
54
|
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
58
55
|
challengeCallbacks: {
|
|
59
|
-
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
60
|
-
}
|
|
56
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
57
|
+
},
|
|
61
58
|
}));
|
|
62
59
|
}
|
|
63
60
|
// Parameter assignments
|
|
64
61
|
this.subscriptionId = subscriptionId;
|
|
65
62
|
// Assigning values to Constant parameters
|
|
66
63
|
this.$host = options.$host || "https://management.azure.com";
|
|
67
|
-
this.apiVersion = options.apiVersion || "
|
|
64
|
+
this.apiVersion = options.apiVersion || "2024-12-01-preview";
|
|
68
65
|
this.connectedClusterOperations = new ConnectedClusterOperationsImpl(this);
|
|
69
66
|
this.operations = new OperationsImpl(this);
|
|
70
67
|
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
@@ -90,7 +87,7 @@ export class ConnectedKubernetesClient extends coreClient.ServiceClient {
|
|
|
90
87
|
request.url = param[0] + "?" + newParams.join("&");
|
|
91
88
|
}
|
|
92
89
|
return next(request);
|
|
93
|
-
}
|
|
90
|
+
},
|
|
94
91
|
};
|
|
95
92
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
96
93
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectedKubernetesClient.js","sourceRoot":"","sources":["../../src/connectedKubernetesClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"connectedKubernetesClient.js","sourceRoot":"","sources":["../../src/connectedKubernetesClient.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 type { PipelineRequest, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport type * as coreAuth from \"@azure/core-auth\";\nimport { ConnectedClusterOperationsImpl, OperationsImpl } from \"./operations/index.js\";\nimport type { ConnectedClusterOperations, Operations } from \"./operationsInterfaces/index.js\";\nimport type { ConnectedKubernetesClientOptionalParams } from \"./models/index.js\";\n\nexport class ConnectedKubernetesClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the ConnectedKubernetesClient 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?: ConnectedKubernetesClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: ConnectedKubernetesClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: ConnectedKubernetesClientOptionalParams | string,\n options?: ConnectedKubernetesClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: ConnectedKubernetesClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-hybridkubernetes/3.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-12-01-preview\";\n this.connectedClusterOperations = new ConnectedClusterOperationsImpl(this);\n this.operations = new OperationsImpl(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 connectedClusterOperations: ConnectedClusterOperations;\n operations: Operations;\n}\n"]}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
requestPath: string;
|
|
7
|
-
requestMethod: string;
|
|
8
|
-
constructor(sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>, args: Record<string, unknown>, spec: {
|
|
1
|
+
import type { 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: {
|
|
9
6
|
readonly requestBody?: unknown;
|
|
10
7
|
readonly path?: string;
|
|
11
8
|
readonly httpMethod: string;
|
|
12
|
-
} & Record<string, any
|
|
13
|
-
|
|
14
|
-
sendPollRequest(path: string): Promise<LroResponse<T>>;
|
|
15
|
-
}
|
|
9
|
+
} & Record<string, any>;
|
|
10
|
+
}): LongRunningOperation<T>;
|
|
16
11
|
//# sourceMappingURL=lroImpl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzE,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"}
|
package/dist/browser/lroImpl.js
CHANGED
|
@@ -6,20 +6,16 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
import { __rest } from "tslib";
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
async sendPollRequest(path) {
|
|
21
|
-
const _a = this.spec, { requestBody } = _a, restSpec = __rest(_a, ["requestBody"]);
|
|
22
|
-
return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
|
|
23
|
-
}
|
|
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
|
+
};
|
|
24
20
|
}
|
|
25
21
|
//# sourceMappingURL=lroImpl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;
|
|
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 type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { 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"]}
|