@azure/arm-elasticsan 1.2.0-alpha.20250422.1 → 1.2.0-alpha.20250424.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 +45 -9
- package/LICENSE +1 -1
- package/README.md +4 -5
- package/dist/browser/elasticSanManagement.d.ts +22 -1
- package/dist/browser/elasticSanManagement.d.ts.map +1 -1
- package/dist/browser/elasticSanManagement.js +103 -1
- package/dist/browser/elasticSanManagement.js.map +1 -1
- package/dist/browser/lroImpl.d.ts.map +1 -1
- package/dist/browser/lroImpl.js +7 -0
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/index.d.ts +130 -2
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js +28 -0
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/mappers.d.ts +7 -0
- package/dist/browser/models/mappers.d.ts.map +1 -1
- package/dist/browser/models/mappers.js +133 -0
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/models/parameters.d.ts +5 -1
- package/dist/browser/models/parameters.d.ts.map +1 -1
- package/dist/browser/models/parameters.js +29 -3
- package/dist/browser/models/parameters.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +1 -1
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/volumeGroups.js +8 -2
- package/dist/browser/operations/volumeGroups.js.map +1 -1
- package/dist/browser/operations/volumeSnapshots.js +1 -1
- package/dist/browser/operations/volumeSnapshots.js.map +1 -1
- package/dist/browser/operations/volumes.d.ts +43 -1
- package/dist/browser/operations/volumes.d.ts.map +1 -1
- package/dist/browser/operations/volumes.js +205 -3
- package/dist/browser/operations/volumes.js.map +1 -1
- package/dist/browser/operationsInterfaces/volumes.d.ts +43 -1
- package/dist/browser/operationsInterfaces/volumes.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/volumes.js.map +1 -1
- package/dist/commonjs/elasticSanManagement.d.ts +22 -1
- package/dist/commonjs/elasticSanManagement.d.ts.map +1 -1
- package/dist/commonjs/elasticSanManagement.js +103 -1
- package/dist/commonjs/elasticSanManagement.js.map +1 -1
- package/dist/commonjs/lroImpl.d.ts.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -0
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +130 -2
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +29 -1
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/mappers.d.ts +7 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/models/mappers.js +135 -2
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/models/parameters.d.ts +5 -1
- package/dist/commonjs/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/models/parameters.js +29 -3
- package/dist/commonjs/models/parameters.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/volumeGroups.js +8 -2
- package/dist/commonjs/operations/volumeGroups.js.map +1 -1
- package/dist/commonjs/operations/volumeSnapshots.js +1 -1
- package/dist/commonjs/operations/volumeSnapshots.js.map +1 -1
- package/dist/commonjs/operations/volumes.d.ts +43 -1
- package/dist/commonjs/operations/volumes.d.ts.map +1 -1
- package/dist/commonjs/operations/volumes.js +205 -3
- package/dist/commonjs/operations/volumes.js.map +1 -1
- package/dist/commonjs/operationsInterfaces/volumes.d.ts +43 -1
- package/dist/commonjs/operationsInterfaces/volumes.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/volumes.js.map +1 -1
- package/dist/esm/elasticSanManagement.d.ts +22 -1
- package/dist/esm/elasticSanManagement.d.ts.map +1 -1
- package/dist/esm/elasticSanManagement.js +103 -1
- package/dist/esm/elasticSanManagement.js.map +1 -1
- package/dist/esm/lroImpl.d.ts.map +1 -1
- package/dist/esm/lroImpl.js +7 -0
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/index.d.ts +130 -2
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +28 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/mappers.d.ts +7 -0
- package/dist/esm/models/mappers.d.ts.map +1 -1
- package/dist/esm/models/mappers.js +133 -0
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/models/parameters.d.ts +5 -1
- package/dist/esm/models/parameters.d.ts.map +1 -1
- package/dist/esm/models/parameters.js +29 -3
- package/dist/esm/models/parameters.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +1 -1
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/volumeGroups.js +8 -2
- package/dist/esm/operations/volumeGroups.js.map +1 -1
- package/dist/esm/operations/volumeSnapshots.js +1 -1
- package/dist/esm/operations/volumeSnapshots.js.map +1 -1
- package/dist/esm/operations/volumes.d.ts +43 -1
- package/dist/esm/operations/volumes.d.ts.map +1 -1
- package/dist/esm/operations/volumes.js +205 -3
- package/dist/esm/operations/volumes.js.map +1 -1
- package/dist/esm/operationsInterfaces/volumes.d.ts +43 -1
- package/dist/esm/operationsInterfaces/volumes.d.ts.map +1 -1
- package/dist/esm/operationsInterfaces/volumes.js.map +1 -1
- package/dist/react-native/elasticSanManagement.d.ts +22 -1
- package/dist/react-native/elasticSanManagement.d.ts.map +1 -1
- package/dist/react-native/elasticSanManagement.js +103 -1
- package/dist/react-native/elasticSanManagement.js.map +1 -1
- package/dist/react-native/lroImpl.d.ts.map +1 -1
- package/dist/react-native/lroImpl.js +7 -0
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/index.d.ts +130 -2
- package/dist/react-native/models/index.d.ts.map +1 -1
- package/dist/react-native/models/index.js +28 -0
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/mappers.d.ts +7 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -1
- package/dist/react-native/models/mappers.js +133 -0
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/models/parameters.d.ts +5 -1
- package/dist/react-native/models/parameters.d.ts.map +1 -1
- package/dist/react-native/models/parameters.js +29 -3
- package/dist/react-native/models/parameters.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/volumeGroups.js +8 -2
- package/dist/react-native/operations/volumeGroups.js.map +1 -1
- package/dist/react-native/operations/volumeSnapshots.js +1 -1
- package/dist/react-native/operations/volumeSnapshots.js.map +1 -1
- package/dist/react-native/operations/volumes.d.ts +43 -1
- package/dist/react-native/operations/volumes.d.ts.map +1 -1
- package/dist/react-native/operations/volumes.js +205 -3
- package/dist/react-native/operations/volumes.js.map +1 -1
- package/dist/react-native/operationsInterfaces/volumes.d.ts +43 -1
- package/dist/react-native/operationsInterfaces/volumes.d.ts.map +1 -1
- package/dist/react-native/operationsInterfaces/volumes.js.map +1 -1
- package/package.json +11 -9
- package/review/arm-elasticsan.api.md +109 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,51 @@
|
|
|
1
1
|
# Release History
|
|
2
|
-
|
|
3
|
-
## 1.2.0-beta.2 (
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
## 1.2.0-beta.2 (2025-04-18)
|
|
4
|
+
Compared with version 1.1.0
|
|
5
|
+
|
|
5
6
|
### Features Added
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
- Added operation Volumes.beginPreBackup
|
|
9
|
+
- Added operation Volumes.beginPreBackupAndWait
|
|
10
|
+
- Added operation Volumes.beginPreRestore
|
|
11
|
+
- Added operation Volumes.beginPreRestoreAndWait
|
|
12
|
+
- Added Interface AutoScaleProperties
|
|
13
|
+
- Added Interface DeleteRetentionPolicy
|
|
14
|
+
- Added Interface DiskSnapshotList
|
|
15
|
+
- Added Interface ElasticSanManagementRestoreVolumeHeaders
|
|
16
|
+
- Added Interface PreValidationResponse
|
|
17
|
+
- Added Interface RestoreVolumeOptionalParams
|
|
18
|
+
- Added Interface ScaleUpProperties
|
|
19
|
+
- Added Interface VolumeNameList
|
|
20
|
+
- Added Interface VolumesPreBackupHeaders
|
|
21
|
+
- Added Interface VolumesPreBackupOptionalParams
|
|
22
|
+
- Added Interface VolumesPreRestoreHeaders
|
|
23
|
+
- Added Interface VolumesPreRestoreOptionalParams
|
|
24
|
+
- Added Type Alias AutoScalePolicyEnforcement
|
|
25
|
+
- Added Type Alias DeleteType
|
|
26
|
+
- Added Type Alias PolicyState
|
|
27
|
+
- Added Type Alias RestoreVolumeResponse
|
|
28
|
+
- Added Type Alias VolumesPreBackupResponse
|
|
29
|
+
- Added Type Alias VolumesPreRestoreResponse
|
|
30
|
+
- Added Type Alias XMsAccessSoftDeletedResources
|
|
31
|
+
- Interface ElasticSanProperties has a new optional parameter autoScaleProperties
|
|
32
|
+
- Interface ElasticSanUpdateProperties has a new optional parameter autoScaleProperties
|
|
33
|
+
- Interface VolumeGroupProperties has a new optional parameter deleteRetentionPolicy
|
|
34
|
+
- Interface VolumeGroupsListByElasticSanNextOptionalParams has a new optional parameter xMsAccessSoftDeletedResources
|
|
35
|
+
- Interface VolumeGroupsListByElasticSanOptionalParams has a new optional parameter xMsAccessSoftDeletedResources
|
|
36
|
+
- Interface VolumeGroupUpdateProperties has a new optional parameter deleteRetentionPolicy
|
|
37
|
+
- Interface VolumesDeleteOptionalParams has a new optional parameter deleteType
|
|
38
|
+
- Interface VolumesListByVolumeGroupNextOptionalParams has a new optional parameter xMsAccessSoftDeletedResources
|
|
39
|
+
- Interface VolumesListByVolumeGroupOptionalParams has a new optional parameter xMsAccessSoftDeletedResources
|
|
40
|
+
- Added Enum KnownAutoScalePolicyEnforcement
|
|
41
|
+
- Added Enum KnownDeleteType
|
|
42
|
+
- Added Enum KnownPolicyState
|
|
43
|
+
- Added Enum KnownXMsAccessSoftDeletedResources
|
|
44
|
+
- Enum KnownProvisioningStates has a new value Deleted
|
|
45
|
+
- Enum KnownProvisioningStates has a new value Restoring
|
|
46
|
+
- Enum KnownProvisioningStates has a new value SoftDeleting
|
|
47
|
+
|
|
48
|
+
|
|
13
49
|
## 1.2.0-beta.1 (2024-10-18)
|
|
14
50
|
Compared with version 1.1.0
|
|
15
51
|
|
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,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ElasticSanManagement client.
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
|
|
5
7
|
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan) |
|
|
6
8
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-elasticsan) |
|
|
7
9
|
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-elasticsan?view=azure-node-preview) |
|
|
@@ -42,7 +44,6 @@ npm install @azure/identity
|
|
|
42
44
|
```
|
|
43
45
|
|
|
44
46
|
You will also need to **register a new AAD application and grant access to Azure ElasticSanManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
|
45
|
-
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`.
|
|
46
47
|
|
|
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).
|
|
48
49
|
|
|
@@ -65,13 +66,12 @@ import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
|
|
65
66
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
66
67
|
const credential = new InteractiveBrowserCredential({
|
|
67
68
|
tenantId: "<YOUR_TENANT_ID>",
|
|
68
|
-
clientId: "<YOUR_CLIENT_ID>"
|
|
69
|
-
});
|
|
69
|
+
clientId: "<YOUR_CLIENT_ID>"
|
|
70
|
+
});
|
|
70
71
|
const client = new ElasticSanManagement(credential, subscriptionId);
|
|
71
72
|
```
|
|
72
73
|
|
|
73
74
|
### JavaScript Bundle
|
|
74
|
-
|
|
75
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
76
|
|
|
77
77
|
## Key concepts
|
|
@@ -107,7 +107,6 @@ If you'd like to contribute to this library, please read the [contributing guide
|
|
|
107
107
|
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
|
|
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,7 +1,8 @@
|
|
|
1
1
|
import * as coreClient from "@azure/core-client";
|
|
2
2
|
import * as coreAuth from "@azure/core-auth";
|
|
3
|
+
import { SimplePollerLike, OperationState } from "@azure/core-lro";
|
|
3
4
|
import { Operations, Skus, ElasticSans, VolumeGroups, Volumes, PrivateEndpointConnections, PrivateLinkResources, VolumeSnapshots } from "./operationsInterfaces/index.js";
|
|
4
|
-
import { ElasticSanManagementOptionalParams } from "./models/index.js";
|
|
5
|
+
import { ElasticSanManagementOptionalParams, RestoreVolumeOptionalParams, RestoreVolumeResponse } from "./models/index.js";
|
|
5
6
|
export declare class ElasticSanManagement extends coreClient.ServiceClient {
|
|
6
7
|
$host: string;
|
|
7
8
|
apiVersion: string;
|
|
@@ -15,6 +16,26 @@ export declare class ElasticSanManagement extends coreClient.ServiceClient {
|
|
|
15
16
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ElasticSanManagementOptionalParams);
|
|
16
17
|
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
17
18
|
private addCustomApiVersionPolicy;
|
|
19
|
+
/**
|
|
20
|
+
* Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted
|
|
21
|
+
* volumes by volume group
|
|
22
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
23
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
24
|
+
* @param volumeGroupName The name of the VolumeGroup.
|
|
25
|
+
* @param volumeName The name of the Volume.
|
|
26
|
+
* @param options The options parameters.
|
|
27
|
+
*/
|
|
28
|
+
beginRestoreVolume(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, options?: RestoreVolumeOptionalParams): Promise<SimplePollerLike<OperationState<RestoreVolumeResponse>, RestoreVolumeResponse>>;
|
|
29
|
+
/**
|
|
30
|
+
* Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted
|
|
31
|
+
* volumes by volume group
|
|
32
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
33
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
34
|
+
* @param volumeGroupName The name of the VolumeGroup.
|
|
35
|
+
* @param volumeName The name of the Volume.
|
|
36
|
+
* @param options The options parameters.
|
|
37
|
+
*/
|
|
38
|
+
beginRestoreVolumeAndWait(resourceGroupName: string, elasticSanName: string, volumeGroupName: string, volumeName: string, options?: RestoreVolumeOptionalParams): Promise<RestoreVolumeResponse>;
|
|
18
39
|
operations: Operations;
|
|
19
40
|
skus: Skus;
|
|
20
41
|
elasticSans: ElasticSans;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elasticSanManagement.d.ts","sourceRoot":"","sources":["../../src/elasticSanManagement.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"elasticSanManagement.d.ts","sourceRoot":"","sources":["../../src/elasticSanManagement.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,cAAc,EAEf,MAAM,iBAAiB,CAAC;AAYzB,OAAO,EACL,UAAU,EACV,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,OAAO,EACP,0BAA0B,EAC1B,oBAAoB,EACpB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EACL,kCAAkC,EAClC,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,oBAAqB,SAAQ,UAAU,CAAC,aAAa;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,kCAAkC;IAoF9C,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC;;;;;;;;OAQG;IACG,kBAAkB,CACtB,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CACR,gBAAgB,CACd,cAAc,CAAC,qBAAqB,CAAC,EACrC,qBAAqB,CACtB,CACF;IA8DD;;;;;;;;OAQG;IACG,yBAAyB,CAC7B,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CAAC,qBAAqB,CAAC;IAWjC,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as coreClient from "@azure/core-client";
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
|
+
import { createHttpPoller, } from "@azure/core-lro";
|
|
11
|
+
import { createLroSpec } from "./lroImpl.js";
|
|
10
12
|
import { OperationsImpl, SkusImpl, ElasticSansImpl, VolumeGroupsImpl, VolumesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, VolumeSnapshotsImpl, } from "./operations/index.js";
|
|
13
|
+
import * as Parameters from "./models/parameters.js";
|
|
14
|
+
import * as Mappers from "./models/mappers.js";
|
|
11
15
|
export class ElasticSanManagement extends coreClient.ServiceClient {
|
|
12
16
|
/**
|
|
13
17
|
* Initializes a new instance of the ElasticSanManagement class.
|
|
@@ -64,7 +68,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
|
|
|
64
68
|
this.subscriptionId = subscriptionId;
|
|
65
69
|
// Assigning values to Constant parameters
|
|
66
70
|
this.$host = options.$host || "https://management.azure.com";
|
|
67
|
-
this.apiVersion = options.apiVersion || "2024-
|
|
71
|
+
this.apiVersion = options.apiVersion || "2024-07-01-preview";
|
|
68
72
|
this.operations = new OperationsImpl(this);
|
|
69
73
|
this.skus = new SkusImpl(this);
|
|
70
74
|
this.elasticSans = new ElasticSansImpl(this);
|
|
@@ -100,5 +104,103 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
|
|
|
100
104
|
};
|
|
101
105
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
102
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted
|
|
109
|
+
* volumes by volume group
|
|
110
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
111
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
112
|
+
* @param volumeGroupName The name of the VolumeGroup.
|
|
113
|
+
* @param volumeName The name of the Volume.
|
|
114
|
+
* @param options The options parameters.
|
|
115
|
+
*/
|
|
116
|
+
async beginRestoreVolume(resourceGroupName, elasticSanName, volumeGroupName, volumeName, options) {
|
|
117
|
+
const directSendOperation = async (args, spec) => {
|
|
118
|
+
return this.sendOperationRequest(args, spec);
|
|
119
|
+
};
|
|
120
|
+
const sendOperationFn = async (args, spec) => {
|
|
121
|
+
var _a;
|
|
122
|
+
let currentRawResponse = undefined;
|
|
123
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
124
|
+
const callback = (rawResponse, flatResponse) => {
|
|
125
|
+
currentRawResponse = rawResponse;
|
|
126
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
127
|
+
};
|
|
128
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
129
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
130
|
+
return {
|
|
131
|
+
flatResponse,
|
|
132
|
+
rawResponse: {
|
|
133
|
+
statusCode: currentRawResponse.status,
|
|
134
|
+
body: currentRawResponse.parsedBody,
|
|
135
|
+
headers: currentRawResponse.headers.toJSON(),
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
const lro = createLroSpec({
|
|
140
|
+
sendOperationFn,
|
|
141
|
+
args: {
|
|
142
|
+
resourceGroupName,
|
|
143
|
+
elasticSanName,
|
|
144
|
+
volumeGroupName,
|
|
145
|
+
volumeName,
|
|
146
|
+
options,
|
|
147
|
+
},
|
|
148
|
+
spec: restoreVolumeOperationSpec,
|
|
149
|
+
});
|
|
150
|
+
const poller = await createHttpPoller(lro, {
|
|
151
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
152
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
153
|
+
resourceLocationConfig: "location",
|
|
154
|
+
});
|
|
155
|
+
await poller.poll();
|
|
156
|
+
return poller;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted
|
|
160
|
+
* volumes by volume group
|
|
161
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
162
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
163
|
+
* @param volumeGroupName The name of the VolumeGroup.
|
|
164
|
+
* @param volumeName The name of the Volume.
|
|
165
|
+
* @param options The options parameters.
|
|
166
|
+
*/
|
|
167
|
+
async beginRestoreVolumeAndWait(resourceGroupName, elasticSanName, volumeGroupName, volumeName, options) {
|
|
168
|
+
const poller = await this.beginRestoreVolume(resourceGroupName, elasticSanName, volumeGroupName, volumeName, options);
|
|
169
|
+
return poller.pollUntilDone();
|
|
170
|
+
}
|
|
103
171
|
}
|
|
172
|
+
// Operation Specifications
|
|
173
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
174
|
+
const restoreVolumeOperationSpec = {
|
|
175
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}/restore",
|
|
176
|
+
httpMethod: "POST",
|
|
177
|
+
responses: {
|
|
178
|
+
200: {
|
|
179
|
+
bodyMapper: Mappers.Volume,
|
|
180
|
+
},
|
|
181
|
+
201: {
|
|
182
|
+
bodyMapper: Mappers.Volume,
|
|
183
|
+
},
|
|
184
|
+
202: {
|
|
185
|
+
bodyMapper: Mappers.Volume,
|
|
186
|
+
},
|
|
187
|
+
204: {
|
|
188
|
+
bodyMapper: Mappers.Volume,
|
|
189
|
+
},
|
|
190
|
+
default: {
|
|
191
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
queryParameters: [Parameters.apiVersion],
|
|
195
|
+
urlParameters: [
|
|
196
|
+
Parameters.$host,
|
|
197
|
+
Parameters.subscriptionId,
|
|
198
|
+
Parameters.resourceGroupName,
|
|
199
|
+
Parameters.elasticSanName,
|
|
200
|
+
Parameters.volumeGroupName,
|
|
201
|
+
Parameters.volumeName,
|
|
202
|
+
],
|
|
203
|
+
headerParameters: [Parameters.accept],
|
|
204
|
+
serializer,
|
|
205
|
+
};
|
|
104
206
|
//# sourceMappingURL=elasticSanManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elasticSanManagement.js","sourceRoot":"","sources":["../../src/elasticSanManagement.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAa/B,MAAM,OAAO,oBAAqB,SAAQ,UAAU,CAAC,aAAa;IAKhE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA4C;;QAE5C,IAAI,WA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wB,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAUF","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 {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n OperationsImpl,\n SkusImpl,\n ElasticSansImpl,\n VolumeGroupsImpl,\n VolumesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkResourcesImpl,\n VolumeSnapshotsImpl,\n} from \"./operations/index.js\";\nimport {\n Operations,\n Skus,\n ElasticSans,\n VolumeGroups,\n Volumes,\n PrivateEndpointConnections,\n PrivateLinkResources,\n VolumeSnapshots,\n} from \"./operationsInterfaces/index.js\";\nimport { ElasticSanManagementOptionalParams } from \"./models/index.js\";\n\nexport class ElasticSanManagement extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the ElasticSanManagement 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?: ElasticSanManagementOptionalParams,\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: ElasticSanManagementOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-elasticsan/1.2.0-beta.2`;\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:\n 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 ===\n 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 ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n 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-06-01-preview\";\n this.operations = new OperationsImpl(this);\n this.skus = new SkusImpl(this);\n this.elasticSans = new ElasticSansImpl(this);\n this.volumeGroups = new VolumeGroupsImpl(this);\n this.volumes = new VolumesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.volumeSnapshots = new VolumeSnapshotsImpl(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(\n request: PipelineRequest,\n next: SendRequest,\n ): 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 operations: Operations;\n skus: Skus;\n elasticSans: ElasticSans;\n volumeGroups: VolumeGroups;\n volumes: Volumes;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkResources: PrivateLinkResources;\n volumeSnapshots: VolumeSnapshots;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"elasticSanManagement.js","sourceRoot":"","sources":["../../src/elasticSanManagement.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,cAAc,EACd,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAW/B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAO/C,MAAM,OAAO,oBAAqB,SAAQ,UAAU,CAAC,aAAa;IAKhE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA4C;;QAE5C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,O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,cAAsB,EACtB,eAAuB,EACvB,UAAkB,EAClB,OAAqC;QAErC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAC1C,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,UAAU,EACV,OAAO,CACR,CAAC;QACF,OAAO,MAAM,CAAC,aAAa,EAAE,CAAC;IAChC,CAAC;CAUF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,4LAA4L;IAClM,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,MAAM;SAC3B;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,MAAM;SAC3B;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,MAAM;SAC3B;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,MAAM;SAC3B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,eAAe;QAC1B,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"./lroImpl.js\";\nimport {\n OperationsImpl,\n SkusImpl,\n ElasticSansImpl,\n VolumeGroupsImpl,\n VolumesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkResourcesImpl,\n VolumeSnapshotsImpl,\n} from \"./operations/index.js\";\nimport {\n Operations,\n Skus,\n ElasticSans,\n VolumeGroups,\n Volumes,\n PrivateEndpointConnections,\n PrivateLinkResources,\n VolumeSnapshots,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n ElasticSanManagementOptionalParams,\n RestoreVolumeOptionalParams,\n RestoreVolumeResponse,\n} from \"./models/index.js\";\n\nexport class ElasticSanManagement extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the ElasticSanManagement 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?: ElasticSanManagementOptionalParams,\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: ElasticSanManagementOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-elasticsan/1.2.0-beta.2`;\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:\n 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 ===\n 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 ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n 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-07-01-preview\";\n this.operations = new OperationsImpl(this);\n this.skus = new SkusImpl(this);\n this.elasticSans = new ElasticSansImpl(this);\n this.volumeGroups = new VolumeGroupsImpl(this);\n this.volumes = new VolumesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.volumeSnapshots = new VolumeSnapshotsImpl(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(\n request: PipelineRequest,\n next: SendRequest,\n ): 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 /**\n * Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted\n * volumes by volume group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param elasticSanName The name of the ElasticSan.\n * @param volumeGroupName The name of the VolumeGroup.\n * @param volumeName The name of the Volume.\n * @param options The options parameters.\n */\n async beginRestoreVolume(\n resourceGroupName: string,\n elasticSanName: string,\n volumeGroupName: string,\n volumeName: string,\n options?: RestoreVolumeOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<RestoreVolumeResponse>,\n RestoreVolumeResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<RestoreVolumeResponse> => {\n return this.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n elasticSanName,\n volumeGroupName,\n volumeName,\n options,\n },\n spec: restoreVolumeOperationSpec,\n });\n const poller = await createHttpPoller<\n RestoreVolumeResponse,\n OperationState<RestoreVolumeResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted\n * volumes by volume group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param elasticSanName The name of the ElasticSan.\n * @param volumeGroupName The name of the VolumeGroup.\n * @param volumeName The name of the Volume.\n * @param options The options parameters.\n */\n async beginRestoreVolumeAndWait(\n resourceGroupName: string,\n elasticSanName: string,\n volumeGroupName: string,\n volumeName: string,\n options?: RestoreVolumeOptionalParams,\n ): Promise<RestoreVolumeResponse> {\n const poller = await this.beginRestoreVolume(\n resourceGroupName,\n elasticSanName,\n volumeGroupName,\n volumeName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n operations: Operations;\n skus: Skus;\n elasticSans: ElasticSans;\n volumeGroups: VolumeGroups;\n volumes: Volumes;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkResources: PrivateLinkResources;\n volumeSnapshots: VolumeSnapshots;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst restoreVolumeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}/restore\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.Volume,\n },\n 201: {\n bodyMapper: Mappers.Volume,\n },\n 202: {\n bodyMapper: Mappers.Volume,\n },\n 204: {\n bodyMapper: Mappers.Volume,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.elasticSanName,\n Parameters.volumeGroupName,\n Parameters.volumeName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -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":"AAYA,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,CAmB1B"}
|
package/dist/browser/lroImpl.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
*/
|
|
1
8
|
import { __rest } from "tslib";
|
|
2
9
|
export function createLroSpec(inputs) {
|
|
3
10
|
const { args, spec, sendOperationFn } = inputs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAQH,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,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,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\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\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: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\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"]}
|
|
@@ -408,6 +408,8 @@ export interface VolumeGroupProperties {
|
|
|
408
408
|
readonly privateEndpointConnections?: PrivateEndpointConnection[];
|
|
409
409
|
/** A boolean indicating whether or not Data Integrity Check is enabled */
|
|
410
410
|
enforceDataIntegrityCheckForIscsi?: boolean;
|
|
411
|
+
/** The retention policy for the soft deleted volume group and its associated resources. */
|
|
412
|
+
deleteRetentionPolicy?: DeleteRetentionPolicy;
|
|
411
413
|
}
|
|
412
414
|
/** The encryption settings on the volume group. */
|
|
413
415
|
export interface EncryptionProperties {
|
|
@@ -457,6 +459,12 @@ export interface VirtualNetworkRule {
|
|
|
457
459
|
/** The action of virtual network rule. */
|
|
458
460
|
action?: Action;
|
|
459
461
|
}
|
|
462
|
+
/** Response for Delete Retention Policy object */
|
|
463
|
+
export interface DeleteRetentionPolicy {
|
|
464
|
+
policyState?: PolicyState;
|
|
465
|
+
/** The number of days to retain the resources after deletion. */
|
|
466
|
+
retentionPeriodDays?: number;
|
|
467
|
+
}
|
|
460
468
|
/** Volume Group request. */
|
|
461
469
|
export interface VolumeGroupUpdate {
|
|
462
470
|
/** The identity of the resource. */
|
|
@@ -476,6 +484,8 @@ export interface VolumeGroupUpdateProperties {
|
|
|
476
484
|
networkAcls?: NetworkRuleSet;
|
|
477
485
|
/** A boolean indicating whether or not Data Integrity Check is enabled */
|
|
478
486
|
enforceDataIntegrityCheckForIscsi?: boolean;
|
|
487
|
+
/** The retention policy for the soft deleted volume group and its associated resources */
|
|
488
|
+
deleteRetentionPolicy?: DeleteRetentionPolicy;
|
|
479
489
|
}
|
|
480
490
|
/** Volume response properties. */
|
|
481
491
|
export interface VolumeProperties {
|
|
@@ -630,6 +640,21 @@ export interface SnapshotCreationData {
|
|
|
630
640
|
/** Fully qualified resource ID of the volume. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}" */
|
|
631
641
|
sourceId: string;
|
|
632
642
|
}
|
|
643
|
+
/** object to hold array of volume names */
|
|
644
|
+
export interface VolumeNameList {
|
|
645
|
+
/** array of volume names */
|
|
646
|
+
volumeNames: string[];
|
|
647
|
+
}
|
|
648
|
+
/** response object for pre validation api */
|
|
649
|
+
export interface PreValidationResponse {
|
|
650
|
+
/** a status value indicating success or failure of validation */
|
|
651
|
+
validationStatus?: string;
|
|
652
|
+
}
|
|
653
|
+
/** object to hold array of Disk Snapshot ARM IDs */
|
|
654
|
+
export interface DiskSnapshotList {
|
|
655
|
+
/** array of DiskSnapshot ARM IDs */
|
|
656
|
+
diskSnapshotIds: string[];
|
|
657
|
+
}
|
|
633
658
|
/** Response for PrivateEndpoint Connection object */
|
|
634
659
|
export interface PrivateEndpointConnection extends Resource {
|
|
635
660
|
/** Private Endpoint Connection Properties. */
|
|
@@ -698,6 +723,18 @@ export interface VolumesUpdateHeaders {
|
|
|
698
723
|
export interface VolumesDeleteHeaders {
|
|
699
724
|
location?: string;
|
|
700
725
|
}
|
|
726
|
+
/** Defines headers for Volumes_preBackup operation. */
|
|
727
|
+
export interface VolumesPreBackupHeaders {
|
|
728
|
+
location?: string;
|
|
729
|
+
}
|
|
730
|
+
/** Defines headers for Volumes_preRestore operation. */
|
|
731
|
+
export interface VolumesPreRestoreHeaders {
|
|
732
|
+
location?: string;
|
|
733
|
+
}
|
|
734
|
+
/** Defines headers for ElasticSanManagement_restoreVolume operation. */
|
|
735
|
+
export interface ElasticSanManagementRestoreVolumeHeaders {
|
|
736
|
+
location?: string;
|
|
737
|
+
}
|
|
701
738
|
/** Defines headers for PrivateEndpointConnections_delete operation. */
|
|
702
739
|
export interface PrivateEndpointConnectionsDeleteHeaders {
|
|
703
740
|
location?: string;
|
|
@@ -784,7 +821,13 @@ export declare enum KnownProvisioningStates {
|
|
|
784
821
|
/** Updating */
|
|
785
822
|
Updating = "Updating",
|
|
786
823
|
/** Deleting */
|
|
787
|
-
Deleting = "Deleting"
|
|
824
|
+
Deleting = "Deleting",
|
|
825
|
+
/** Deleted */
|
|
826
|
+
Deleted = "Deleted",
|
|
827
|
+
/** Restoring */
|
|
828
|
+
Restoring = "Restoring",
|
|
829
|
+
/** SoftDeleting */
|
|
830
|
+
SoftDeleting = "SoftDeleting"
|
|
788
831
|
}
|
|
789
832
|
/**
|
|
790
833
|
* Defines values for ProvisioningStates. \
|
|
@@ -798,7 +841,10 @@ export declare enum KnownProvisioningStates {
|
|
|
798
841
|
* **Pending** \
|
|
799
842
|
* **Creating** \
|
|
800
843
|
* **Updating** \
|
|
801
|
-
* **Deleting**
|
|
844
|
+
* **Deleting** \
|
|
845
|
+
* **Deleted** \
|
|
846
|
+
* **Restoring** \
|
|
847
|
+
* **SoftDeleting**
|
|
802
848
|
*/
|
|
803
849
|
export type ProvisioningStates = string;
|
|
804
850
|
/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
|
|
@@ -880,6 +926,22 @@ export declare enum KnownAutoScalePolicyEnforcement {
|
|
|
880
926
|
* **Disabled**
|
|
881
927
|
*/
|
|
882
928
|
export type AutoScalePolicyEnforcement = string;
|
|
929
|
+
/** Known values of {@link XMsAccessSoftDeletedResources} that the service accepts. */
|
|
930
|
+
export declare enum KnownXMsAccessSoftDeletedResources {
|
|
931
|
+
/** True */
|
|
932
|
+
True = "true",
|
|
933
|
+
/** False */
|
|
934
|
+
False = "false"
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Defines values for XMsAccessSoftDeletedResources. \
|
|
938
|
+
* {@link KnownXMsAccessSoftDeletedResources} can be used interchangeably with XMsAccessSoftDeletedResources,
|
|
939
|
+
* this enum contains the known values that the service supports.
|
|
940
|
+
* ### Known values supported by the service
|
|
941
|
+
* **true** \
|
|
942
|
+
* **false**
|
|
943
|
+
*/
|
|
944
|
+
export type XMsAccessSoftDeletedResources = string;
|
|
883
945
|
/** Known values of {@link IdentityType} that the service accepts. */
|
|
884
946
|
export declare enum KnownIdentityType {
|
|
885
947
|
/** None */
|
|
@@ -944,6 +1006,22 @@ export declare enum KnownAction {
|
|
|
944
1006
|
* **Allow**
|
|
945
1007
|
*/
|
|
946
1008
|
export type Action = string;
|
|
1009
|
+
/** Known values of {@link PolicyState} that the service accepts. */
|
|
1010
|
+
export declare enum KnownPolicyState {
|
|
1011
|
+
/** Enabled */
|
|
1012
|
+
Enabled = "Enabled",
|
|
1013
|
+
/** Disabled */
|
|
1014
|
+
Disabled = "Disabled"
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Defines values for PolicyState. \
|
|
1018
|
+
* {@link KnownPolicyState} can be used interchangeably with PolicyState,
|
|
1019
|
+
* this enum contains the known values that the service supports.
|
|
1020
|
+
* ### Known values supported by the service
|
|
1021
|
+
* **Enabled** \
|
|
1022
|
+
* **Disabled**
|
|
1023
|
+
*/
|
|
1024
|
+
export type PolicyState = string;
|
|
947
1025
|
/** Known values of {@link VolumeCreateOption} that the service accepts. */
|
|
948
1026
|
export declare enum KnownVolumeCreateOption {
|
|
949
1027
|
/** None */
|
|
@@ -1035,6 +1113,19 @@ export declare enum KnownXMsForceDelete {
|
|
|
1035
1113
|
* **false**
|
|
1036
1114
|
*/
|
|
1037
1115
|
export type XMsForceDelete = string;
|
|
1116
|
+
/** Known values of {@link DeleteType} that the service accepts. */
|
|
1117
|
+
export declare enum KnownDeleteType {
|
|
1118
|
+
/** Permanent */
|
|
1119
|
+
Permanent = "permanent"
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* Defines values for DeleteType. \
|
|
1123
|
+
* {@link KnownDeleteType} can be used interchangeably with DeleteType,
|
|
1124
|
+
* this enum contains the known values that the service supports.
|
|
1125
|
+
* ### Known values supported by the service
|
|
1126
|
+
* **permanent**
|
|
1127
|
+
*/
|
|
1128
|
+
export type DeleteType = string;
|
|
1038
1129
|
/** Optional parameters. */
|
|
1039
1130
|
export interface OperationsListOptionalParams extends coreClient.OperationOptions {
|
|
1040
1131
|
}
|
|
@@ -1099,6 +1190,8 @@ export interface ElasticSansListByResourceGroupNextOptionalParams extends coreCl
|
|
|
1099
1190
|
export type ElasticSansListByResourceGroupNextResponse = ElasticSanList;
|
|
1100
1191
|
/** Optional parameters. */
|
|
1101
1192
|
export interface VolumeGroupsListByElasticSanOptionalParams extends coreClient.OperationOptions {
|
|
1193
|
+
/** Optional, returns only soft deleted volume groups if set to true. If set to false or if not specified, returns only active volume groups. */
|
|
1194
|
+
xMsAccessSoftDeletedResources?: XMsAccessSoftDeletedResources;
|
|
1102
1195
|
}
|
|
1103
1196
|
/** Contains response data for the listByElasticSan operation. */
|
|
1104
1197
|
export type VolumeGroupsListByElasticSanResponse = VolumeGroupList;
|
|
@@ -1134,6 +1227,8 @@ export interface VolumeGroupsGetOptionalParams extends coreClient.OperationOptio
|
|
|
1134
1227
|
export type VolumeGroupsGetResponse = VolumeGroup;
|
|
1135
1228
|
/** Optional parameters. */
|
|
1136
1229
|
export interface VolumeGroupsListByElasticSanNextOptionalParams extends coreClient.OperationOptions {
|
|
1230
|
+
/** Optional, returns only soft deleted volume groups if set to true. If set to false or if not specified, returns only active volume groups. */
|
|
1231
|
+
xMsAccessSoftDeletedResources?: XMsAccessSoftDeletedResources;
|
|
1137
1232
|
}
|
|
1138
1233
|
/** Contains response data for the listByElasticSanNext operation. */
|
|
1139
1234
|
export type VolumeGroupsListByElasticSanNextResponse = VolumeGroupList;
|
|
@@ -1161,6 +1256,8 @@ export interface VolumesDeleteOptionalParams extends coreClient.OperationOptions
|
|
|
1161
1256
|
xMsDeleteSnapshots?: XMsDeleteSnapshots;
|
|
1162
1257
|
/** Optional, used to delete volume if active sessions present. Allowed value are only true or false. Default value is false. */
|
|
1163
1258
|
xMsForceDelete?: XMsForceDelete;
|
|
1259
|
+
/** Optional. Specifies that the delete operation should be a permanent delete for the soft deleted volume. The value of deleteType can only be 'permanent'. */
|
|
1260
|
+
deleteType?: DeleteType;
|
|
1164
1261
|
/** Delay to wait until next poll, in milliseconds. */
|
|
1165
1262
|
updateIntervalInMs?: number;
|
|
1166
1263
|
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
|
@@ -1173,15 +1270,46 @@ export interface VolumesGetOptionalParams extends coreClient.OperationOptions {
|
|
|
1173
1270
|
export type VolumesGetResponse = Volume;
|
|
1174
1271
|
/** Optional parameters. */
|
|
1175
1272
|
export interface VolumesListByVolumeGroupOptionalParams extends coreClient.OperationOptions {
|
|
1273
|
+
/** Optional, returns only soft deleted volumes if set to true. If set to false or if not specified, returns only active volumes. */
|
|
1274
|
+
xMsAccessSoftDeletedResources?: XMsAccessSoftDeletedResources;
|
|
1176
1275
|
}
|
|
1177
1276
|
/** Contains response data for the listByVolumeGroup operation. */
|
|
1178
1277
|
export type VolumesListByVolumeGroupResponse = VolumeList;
|
|
1179
1278
|
/** Optional parameters. */
|
|
1279
|
+
export interface VolumesPreBackupOptionalParams extends coreClient.OperationOptions {
|
|
1280
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
1281
|
+
updateIntervalInMs?: number;
|
|
1282
|
+
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
|
1283
|
+
resumeFrom?: string;
|
|
1284
|
+
}
|
|
1285
|
+
/** Contains response data for the preBackup operation. */
|
|
1286
|
+
export type VolumesPreBackupResponse = PreValidationResponse;
|
|
1287
|
+
/** Optional parameters. */
|
|
1288
|
+
export interface VolumesPreRestoreOptionalParams extends coreClient.OperationOptions {
|
|
1289
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
1290
|
+
updateIntervalInMs?: number;
|
|
1291
|
+
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
|
1292
|
+
resumeFrom?: string;
|
|
1293
|
+
}
|
|
1294
|
+
/** Contains response data for the preRestore operation. */
|
|
1295
|
+
export type VolumesPreRestoreResponse = PreValidationResponse;
|
|
1296
|
+
/** Optional parameters. */
|
|
1180
1297
|
export interface VolumesListByVolumeGroupNextOptionalParams extends coreClient.OperationOptions {
|
|
1298
|
+
/** Optional, returns only soft deleted volumes if set to true. If set to false or if not specified, returns only active volumes. */
|
|
1299
|
+
xMsAccessSoftDeletedResources?: XMsAccessSoftDeletedResources;
|
|
1181
1300
|
}
|
|
1182
1301
|
/** Contains response data for the listByVolumeGroupNext operation. */
|
|
1183
1302
|
export type VolumesListByVolumeGroupNextResponse = VolumeList;
|
|
1184
1303
|
/** Optional parameters. */
|
|
1304
|
+
export interface RestoreVolumeOptionalParams extends coreClient.OperationOptions {
|
|
1305
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
1306
|
+
updateIntervalInMs?: number;
|
|
1307
|
+
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
|
1308
|
+
resumeFrom?: string;
|
|
1309
|
+
}
|
|
1310
|
+
/** Contains response data for the restoreVolume operation. */
|
|
1311
|
+
export type RestoreVolumeResponse = Volume;
|
|
1312
|
+
/** Optional parameters. */
|
|
1185
1313
|
export interface PrivateEndpointConnectionsCreateOptionalParams extends coreClient.OperationOptions {
|
|
1186
1314
|
/** Delay to wait until next poll, in milliseconds. */
|
|
1187
1315
|
updateIntervalInMs?: number;
|