@azure/arm-hardwaresecuritymodules 2.0.0-beta.1 → 2.0.0-beta.2
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 +146 -2
- package/dist/index.js +2121 -1216
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/cloudHsmClusterBackupStatusGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/cloudHsmClusterBackupStatusGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClusterBackupStatusGetSample.js +40 -0
- package/dist-esm/samples-dev/cloudHsmClusterBackupStatusGetSample.js.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.js +4 -4
- package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.js +1 -1
- package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.js +20 -4
- package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudHsmClusterRestoreStatusGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/cloudHsmClusterRestoreStatusGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClusterRestoreStatusGetSample.js +40 -0
- package/dist-esm/samples-dev/cloudHsmClusterRestoreStatusGetSample.js.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClustersBackupSample.d.ts +2 -0
- package/dist-esm/samples-dev/cloudHsmClustersBackupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClustersBackupSample.js +39 -0
- package/dist-esm/samples-dev/cloudHsmClustersBackupSample.js.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.js +6 -6
- package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.js +1 -1
- package/dist-esm/samples-dev/cloudHsmClustersGetSample.js +1 -1
- package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.js +2 -2
- package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.js +2 -2
- package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudHsmClustersRestoreSample.d.ts +2 -0
- package/dist-esm/samples-dev/cloudHsmClustersRestoreSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClustersRestoreSample.js +43 -0
- package/dist-esm/samples-dev/cloudHsmClustersRestoreSample.js.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.js +4 -4
- package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudHsmClustersValidateBackupPropertiesSample.d.ts +2 -0
- package/dist-esm/samples-dev/cloudHsmClustersValidateBackupPropertiesSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClustersValidateBackupPropertiesSample.js +39 -0
- package/dist-esm/samples-dev/cloudHsmClustersValidateBackupPropertiesSample.js.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClustersValidateRestorePropertiesSample.d.ts +2 -0
- package/dist-esm/samples-dev/cloudHsmClustersValidateRestorePropertiesSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cloudHsmClustersValidateRestorePropertiesSample.js +46 -0
- package/dist-esm/samples-dev/cloudHsmClustersValidateRestorePropertiesSample.js.map +1 -0
- package/dist-esm/samples-dev/dedicatedHsmCreateOrUpdateSample.js +15 -15
- package/dist-esm/samples-dev/dedicatedHsmCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/dedicatedHsmDeleteSample.js +1 -1
- package/dist-esm/samples-dev/dedicatedHsmGetSample.js +3 -3
- package/dist-esm/samples-dev/dedicatedHsmListByResourceGroupSample.js +4 -4
- package/dist-esm/samples-dev/dedicatedHsmListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/dedicatedHsmListBySubscriptionSample.js +4 -4
- package/dist-esm/samples-dev/dedicatedHsmListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/dedicatedHsmListOutboundNetworkDependenciesEndpointsSample.js +2 -2
- package/dist-esm/samples-dev/dedicatedHsmListOutboundNetworkDependenciesEndpointsSample.js.map +1 -1
- package/dist-esm/samples-dev/dedicatedHsmUpdateSample.js +3 -3
- package/dist-esm/samples-dev/dedicatedHsmUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +8 -8
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.js +2 -2
- package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.js.map +1 -1
- package/dist-esm/src/azureHSMResourceProvider.d.ts +7 -2
- package/dist-esm/src/azureHSMResourceProvider.d.ts.map +1 -1
- package/dist-esm/src/azureHSMResourceProvider.js +44 -10
- package/dist-esm/src/azureHSMResourceProvider.js.map +1 -1
- package/dist-esm/src/index.d.ts +0 -1
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +543 -263
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +109 -49
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +28 -16
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +832 -637
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +5 -12
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +76 -117
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/cloudHsmClusterBackupStatus.d.ts +22 -0
- package/dist-esm/src/operations/cloudHsmClusterBackupStatus.d.ts.map +1 -0
- package/dist-esm/src/operations/cloudHsmClusterBackupStatus.js +61 -0
- package/dist-esm/src/operations/cloudHsmClusterBackupStatus.js.map +1 -0
- package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.d.ts +7 -7
- package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.js +37 -29
- package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.d.ts +23 -3
- package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.d.ts.map +1 -1
- package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.js +105 -6
- package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.js.map +1 -1
- package/dist-esm/src/operations/cloudHsmClusterRestoreStatus.d.ts +22 -0
- package/dist-esm/src/operations/cloudHsmClusterRestoreStatus.d.ts.map +1 -0
- package/dist-esm/src/operations/cloudHsmClusterRestoreStatus.js +61 -0
- package/dist-esm/src/operations/cloudHsmClusterRestoreStatus.js.map +1 -0
- package/dist-esm/src/operations/cloudHsmClusters.d.ts +78 -10
- package/dist-esm/src/operations/cloudHsmClusters.d.ts.map +1 -1
- package/dist-esm/src/operations/cloudHsmClusters.js +467 -82
- package/dist-esm/src/operations/cloudHsmClusters.js.map +1 -1
- package/dist-esm/src/operations/dedicatedHsmOperations.d.ts +24 -24
- package/dist-esm/src/operations/dedicatedHsmOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/dedicatedHsmOperations.js +117 -109
- package/dist-esm/src/operations/dedicatedHsmOperations.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +3 -1
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +3 -1
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts +4 -4
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +8 -8
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +3 -3
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +14 -14
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterBackupStatus.d.ts +14 -0
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterBackupStatus.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterBackupStatus.js +9 -0
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterBackupStatus.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.d.ts +7 -7
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.d.ts +4 -3
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterRestoreStatus.d.ts +14 -0
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterRestoreStatus.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterRestoreStatus.js +9 -0
- package/dist-esm/src/operationsInterfaces/cloudHsmClusterRestoreStatus.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/cloudHsmClusters.d.ts +78 -10
- package/dist-esm/src/operationsInterfaces/cloudHsmClusters.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/dedicatedHsmOperations.d.ts +18 -18
- package/dist-esm/src/operationsInterfaces/dedicatedHsmOperations.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +3 -1
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/operations.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +1 -1
- package/dist-esm/src/pagingHelper.js.map +1 -1
- package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.d.ts.map +1 -1
- package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.js +6 -2
- package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.js.map +1 -1
- package/package.json +14 -15
- package/review/arm-hardwaresecuritymodules.api.md +298 -93
- package/src/azureHSMResourceProvider.ts +67 -20
- package/src/lroImpl.ts +4 -4
- package/src/models/index.ts +633 -284
- package/src/models/mappers.ts +898 -675
- package/src/models/parameters.ts +82 -128
- package/src/operations/cloudHsmClusterBackupStatus.ts +82 -0
- package/src/operations/cloudHsmClusterPrivateEndpointConnections.ts +74 -56
- package/src/operations/cloudHsmClusterPrivateLinkResources.ts +145 -13
- package/src/operations/cloudHsmClusterRestoreStatus.ts +82 -0
- package/src/operations/cloudHsmClusters.ts +684 -151
- package/src/operations/dedicatedHsmOperations.ts +224 -215
- package/src/operations/index.ts +3 -1
- package/src/operations/operations.ts +17 -17
- package/src/operations/privateEndpointConnections.ts +30 -30
- package/src/operationsInterfaces/cloudHsmClusterBackupStatus.ts +30 -0
- package/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.ts +17 -11
- package/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.ts +6 -4
- package/src/operationsInterfaces/cloudHsmClusterRestoreStatus.ts +30 -0
- package/src/operationsInterfaces/cloudHsmClusters.ts +156 -19
- package/src/operationsInterfaces/dedicatedHsmOperations.ts +34 -28
- package/src/operationsInterfaces/index.ts +3 -1
- package/src/operationsInterfaces/operations.ts +4 -4
- package/src/operationsInterfaces/privateEndpointConnections.ts +3 -3
- package/src/pagingHelper.ts +1 -1
- package/types/arm-hardwaresecuritymodules.d.ts +625 -205
- package/types/tsdoc-metadata.json +1 -1
|
@@ -8,28 +8,38 @@
|
|
|
8
8
|
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
|
10
10
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
11
|
+
import {
|
|
12
|
+
PipelineRequest,
|
|
13
|
+
PipelineResponse,
|
|
14
|
+
SendRequest,
|
|
15
|
+
} from "@azure/core-rest-pipeline";
|
|
11
16
|
import * as coreAuth from "@azure/core-auth";
|
|
12
17
|
import {
|
|
13
18
|
CloudHsmClustersImpl,
|
|
14
19
|
CloudHsmClusterPrivateLinkResourcesImpl,
|
|
15
20
|
CloudHsmClusterPrivateEndpointConnectionsImpl,
|
|
16
21
|
PrivateEndpointConnectionsImpl,
|
|
22
|
+
CloudHsmClusterBackupStatusImpl,
|
|
23
|
+
CloudHsmClusterRestoreStatusImpl,
|
|
24
|
+
DedicatedHsmOperationsImpl,
|
|
17
25
|
OperationsImpl,
|
|
18
|
-
DedicatedHsmOperationsImpl
|
|
19
26
|
} from "./operations";
|
|
20
27
|
import {
|
|
21
28
|
CloudHsmClusters,
|
|
22
29
|
CloudHsmClusterPrivateLinkResources,
|
|
23
30
|
CloudHsmClusterPrivateEndpointConnections,
|
|
24
31
|
PrivateEndpointConnections,
|
|
32
|
+
CloudHsmClusterBackupStatus,
|
|
33
|
+
CloudHsmClusterRestoreStatus,
|
|
34
|
+
DedicatedHsmOperations,
|
|
25
35
|
Operations,
|
|
26
|
-
DedicatedHsmOperations
|
|
27
36
|
} from "./operationsInterfaces";
|
|
28
37
|
import { AzureHSMResourceProviderOptionalParams } from "./models";
|
|
29
38
|
|
|
30
39
|
export class AzureHSMResourceProvider extends coreClient.ServiceClient {
|
|
31
40
|
$host: string;
|
|
32
41
|
subscriptionId: string;
|
|
42
|
+
apiVersion: string;
|
|
33
43
|
|
|
34
44
|
/**
|
|
35
45
|
* Initializes a new instance of the AzureHSMResourceProvider class.
|
|
@@ -40,7 +50,7 @@ export class AzureHSMResourceProvider extends coreClient.ServiceClient {
|
|
|
40
50
|
constructor(
|
|
41
51
|
credentials: coreAuth.TokenCredential,
|
|
42
52
|
subscriptionId: string,
|
|
43
|
-
options?: AzureHSMResourceProviderOptionalParams
|
|
53
|
+
options?: AzureHSMResourceProviderOptionalParams,
|
|
44
54
|
) {
|
|
45
55
|
if (credentials === undefined) {
|
|
46
56
|
throw new Error("'credentials' cannot be null");
|
|
@@ -55,10 +65,10 @@ export class AzureHSMResourceProvider extends coreClient.ServiceClient {
|
|
|
55
65
|
}
|
|
56
66
|
const defaults: AzureHSMResourceProviderOptionalParams = {
|
|
57
67
|
requestContentType: "application/json; charset=utf-8",
|
|
58
|
-
credential: credentials
|
|
68
|
+
credential: credentials,
|
|
59
69
|
};
|
|
60
70
|
|
|
61
|
-
const packageDetails = `azsdk-js-arm-hardwaresecuritymodules/2.0.0-beta.
|
|
71
|
+
const packageDetails = `azsdk-js-arm-hardwaresecuritymodules/2.0.0-beta.2`;
|
|
62
72
|
const userAgentPrefix =
|
|
63
73
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
64
74
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
@@ -68,20 +78,21 @@ export class AzureHSMResourceProvider extends coreClient.ServiceClient {
|
|
|
68
78
|
...defaults,
|
|
69
79
|
...options,
|
|
70
80
|
userAgentOptions: {
|
|
71
|
-
userAgentPrefix
|
|
81
|
+
userAgentPrefix,
|
|
72
82
|
},
|
|
73
83
|
endpoint:
|
|
74
|
-
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
84
|
+
options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
75
85
|
};
|
|
76
86
|
super(optionsWithDefaults);
|
|
77
87
|
|
|
78
88
|
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
|
79
89
|
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
80
|
-
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =
|
|
90
|
+
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =
|
|
91
|
+
options.pipeline.getOrderedPolicies();
|
|
81
92
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
82
93
|
(pipelinePolicy) =>
|
|
83
94
|
pipelinePolicy.name ===
|
|
84
|
-
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
95
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
85
96
|
);
|
|
86
97
|
}
|
|
87
98
|
if (
|
|
@@ -91,7 +102,7 @@ export class AzureHSMResourceProvider extends coreClient.ServiceClient {
|
|
|
91
102
|
!bearerTokenAuthenticationPolicyFound
|
|
92
103
|
) {
|
|
93
104
|
this.pipeline.removePolicy({
|
|
94
|
-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
105
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
95
106
|
});
|
|
96
107
|
this.pipeline.addPolicy(
|
|
97
108
|
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
@@ -101,9 +112,9 @@ export class AzureHSMResourceProvider extends coreClient.ServiceClient {
|
|
|
101
112
|
`${optionsWithDefaults.endpoint}/.default`,
|
|
102
113
|
challengeCallbacks: {
|
|
103
114
|
authorizeRequestOnChallenge:
|
|
104
|
-
coreClient.authorizeRequestOnClaimChallenge
|
|
105
|
-
}
|
|
106
|
-
})
|
|
115
|
+
coreClient.authorizeRequestOnClaimChallenge,
|
|
116
|
+
},
|
|
117
|
+
}),
|
|
107
118
|
);
|
|
108
119
|
}
|
|
109
120
|
// Parameter assignments
|
|
@@ -111,22 +122,58 @@ export class AzureHSMResourceProvider extends coreClient.ServiceClient {
|
|
|
111
122
|
|
|
112
123
|
// Assigning values to Constant parameters
|
|
113
124
|
this.$host = options.$host || "https://management.azure.com";
|
|
125
|
+
this.apiVersion = options.apiVersion || "2024-06-30-preview";
|
|
114
126
|
this.cloudHsmClusters = new CloudHsmClustersImpl(this);
|
|
115
|
-
this.cloudHsmClusterPrivateLinkResources =
|
|
116
|
-
this
|
|
127
|
+
this.cloudHsmClusterPrivateLinkResources =
|
|
128
|
+
new CloudHsmClusterPrivateLinkResourcesImpl(this);
|
|
129
|
+
this.cloudHsmClusterPrivateEndpointConnections =
|
|
130
|
+
new CloudHsmClusterPrivateEndpointConnectionsImpl(this);
|
|
131
|
+
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
|
132
|
+
this.cloudHsmClusterBackupStatus = new CloudHsmClusterBackupStatusImpl(
|
|
133
|
+
this,
|
|
117
134
|
);
|
|
118
|
-
this.
|
|
119
|
-
this
|
|
135
|
+
this.cloudHsmClusterRestoreStatus = new CloudHsmClusterRestoreStatusImpl(
|
|
136
|
+
this,
|
|
120
137
|
);
|
|
121
|
-
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
|
122
|
-
this.operations = new OperationsImpl(this);
|
|
123
138
|
this.dedicatedHsmOperations = new DedicatedHsmOperationsImpl(this);
|
|
139
|
+
this.operations = new OperationsImpl(this);
|
|
140
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
144
|
+
private addCustomApiVersionPolicy(apiVersion?: string) {
|
|
145
|
+
if (!apiVersion) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const apiVersionPolicy = {
|
|
149
|
+
name: "CustomApiVersionPolicy",
|
|
150
|
+
async sendRequest(
|
|
151
|
+
request: PipelineRequest,
|
|
152
|
+
next: SendRequest,
|
|
153
|
+
): Promise<PipelineResponse> {
|
|
154
|
+
const param = request.url.split("?");
|
|
155
|
+
if (param.length > 1) {
|
|
156
|
+
const newParams = param[1].split("&").map((item) => {
|
|
157
|
+
if (item.indexOf("api-version") > -1) {
|
|
158
|
+
return "api-version=" + apiVersion;
|
|
159
|
+
} else {
|
|
160
|
+
return item;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
164
|
+
}
|
|
165
|
+
return next(request);
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
124
169
|
}
|
|
125
170
|
|
|
126
171
|
cloudHsmClusters: CloudHsmClusters;
|
|
127
172
|
cloudHsmClusterPrivateLinkResources: CloudHsmClusterPrivateLinkResources;
|
|
128
173
|
cloudHsmClusterPrivateEndpointConnections: CloudHsmClusterPrivateEndpointConnections;
|
|
129
174
|
privateEndpointConnections: PrivateEndpointConnections;
|
|
130
|
-
|
|
175
|
+
cloudHsmClusterBackupStatus: CloudHsmClusterBackupStatus;
|
|
176
|
+
cloudHsmClusterRestoreStatus: CloudHsmClusterRestoreStatus;
|
|
131
177
|
dedicatedHsmOperations: DedicatedHsmOperations;
|
|
178
|
+
operations: Operations;
|
|
132
179
|
}
|
package/src/lroImpl.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
// Copyright (c) Microsoft Corporation.
|
|
10
|
-
// Licensed under the MIT
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
11
|
|
|
12
12
|
import { AbortSignalLike } from "@azure/abort-controller";
|
|
13
13
|
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
@@ -28,15 +28,15 @@ export function createLroSpec<T>(inputs: {
|
|
|
28
28
|
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
29
29
|
sendPollRequest: (
|
|
30
30
|
path: string,
|
|
31
|
-
options?: { abortSignal?: AbortSignalLike }
|
|
31
|
+
options?: { abortSignal?: AbortSignalLike },
|
|
32
32
|
) => {
|
|
33
33
|
const { requestBody, ...restSpec } = spec;
|
|
34
34
|
return sendOperationFn(args, {
|
|
35
35
|
...restSpec,
|
|
36
36
|
httpMethod: "GET",
|
|
37
37
|
path,
|
|
38
|
-
abortSignal: options?.abortSignal
|
|
38
|
+
abortSignal: options?.abortSignal,
|
|
39
39
|
});
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
41
|
};
|
|
42
42
|
}
|