Generate azure-arm-recoveryservices package (#5066)
* Generate azure-arm-recoveryservices package * Bump the version
This commit is contained in:
Родитель
1a02ecc8c9
Коммит
d74215c1b7
|
@ -0,0 +1,41 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for
|
||||
// license information.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
|
||||
const resetColor = "\x1b[0m";
|
||||
const brightColor = "\x1b[1m";
|
||||
const highlightColor = "\x1b[31m";
|
||||
|
||||
try {
|
||||
const invisibleCharactersLength = resetColor.length + brightColor.length + highlightColor.length;
|
||||
|
||||
const firstLine = `Active development of this SDK has been moved to ${highlightColor}@azure/arm-recoveryservices${resetColor}${brightColor} package.`;
|
||||
const secondLine = "This package is in maintenance mode and will be deprecated in July 2019.";
|
||||
const thirdLine = "Visit https://aka.ms/azure-sdk-for-js-migration for more information.";
|
||||
|
||||
const framePadding = 4;
|
||||
const adjustedFirstLineLength = firstLine.length - invisibleCharactersLength;
|
||||
const width = Math.max(adjustedFirstLineLength, secondLine.length, thirdLine.length) + framePadding;
|
||||
const getPaddingLength = (strLength) => width - strLength - framePadding;
|
||||
|
||||
const firstLinePaddingLength = getPaddingLength(adjustedFirstLineLength);
|
||||
const secondLinePaddingLength = getPaddingLength(secondLine.length);
|
||||
const thirdLinePaddingLength = getPaddingLength(thirdLine.length);
|
||||
const line = "#".repeat(width);
|
||||
|
||||
const formatTextLine = (text, padding) => `#${" ".repeat(Math.floor(padding / 2))} ${text} ${" ".repeat(Math.ceil(padding / 2))}#`;
|
||||
|
||||
console.log(brightColor);
|
||||
console.log("\n" + line);
|
||||
console.log(formatTextLine(firstLine, firstLinePaddingLength));
|
||||
console.log(formatTextLine(secondLine, secondLinePaddingLength));
|
||||
console.log(formatTextLine(thirdLine, thirdLinePaddingLength));
|
||||
console.log(line + "\n");
|
||||
console.log(resetColor);
|
||||
} catch (err) {
|
||||
// ignore
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Microsoft
|
||||
Copyright (c) 2019 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,40 +1,46 @@
|
|||
# Microsoft Azure SDK for Node.js - RecoveryServicesManagement
|
||||
---
|
||||
uid: azure-arm-recoveryservices
|
||||
summary: *content
|
||||
|
||||
This project provides a Node.js package that makes it easy to manage Microsoft Azure RecoveryServices.
|
||||
## API-Version: 2016-04-01
|
||||
## Minimum node.js version >= 6.x.x
|
||||
---
|
||||
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://www.npmjs.com/package/@azure/arm-recoveryservices) which works on Node.js and browsers.**
|
||||
**See https://aka.ms/azure-sdk-for-js-migration to learn more.**
|
||||
## Microsoft Azure SDK for Node.js - RecoveryServicesClient
|
||||
|
||||
## How to Install
|
||||
This project provides a Node.js package for accessing Azure. Right now it supports:
|
||||
- **Node.js version 6.x.x or higher**
|
||||
|
||||
### Features
|
||||
|
||||
|
||||
### How to Install
|
||||
|
||||
```bash
|
||||
npm install azure-arm-recoveryservices
|
||||
```
|
||||
|
||||
## How to Use
|
||||
### How to use
|
||||
|
||||
### Authentication, client creation and listing vaults as an example
|
||||
#### Authentication, client creation, and list replicationUsages as an example.
|
||||
|
||||
```javascript
|
||||
const msRestAzure = require('ms-rest-azure');
|
||||
const RecoveryServicesManagement = require("azure-arm-recoveryservices");
|
||||
```javascript
|
||||
const msRestAzure = require("ms-rest-azure");
|
||||
const RecoveryServicesClient = require("azure-arm-recoveryservices");
|
||||
msRestAzure.interactiveLogin().then((creds) => {
|
||||
const subscriptionId = "<Subscription_Id>";
|
||||
const client = new RecoveryServicesClient(creds, subscriptionId);
|
||||
const resourceGroupName = "testresourceGroupName";
|
||||
const vaultName = "testvaultName";
|
||||
|
||||
// Interactive Login
|
||||
// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful,
|
||||
// the user will get a DeviceTokenCredentials object.
|
||||
msRestAzure.interactiveLogin().then((credentials) => {
|
||||
let client = new RecoveryServicesManagement(credentials, 'your-subscription-id');
|
||||
return client.vaults.listByResourceGroup('testrg');
|
||||
}).then((vaults) => {
|
||||
console.log('List of vaults:');
|
||||
console.dir(vaults, {depth: null, colors: true});
|
||||
}).catch((err) => {
|
||||
console.log('An error ocurred');
|
||||
console.dir(err, {depth: null, colors: true});
|
||||
return client.replicationUsages.list(resourceGroupName, vaultName).then((result) => {
|
||||
console.log("The result is:");
|
||||
console.log(result);
|
||||
});
|
||||
}).catch((err) => {
|
||||
console.log('An error occurred:');
|
||||
console.dir(err, {depth: null, colors: true});
|
||||
});
|
||||
```
|
||||
|
||||
## Related projects
|
||||
### Related projects
|
||||
|
||||
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
|
||||
|
||||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-node%2Flib%2Fservices%2FrecoveryServicesManagement%2FREADME.png)
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Details of the certificate to be uploaded to the vault.
|
||||
*
|
||||
|
@ -19,11 +17,11 @@ const models = require('./index');
|
|||
class CertificateRequest {
|
||||
/**
|
||||
* Create a CertificateRequest.
|
||||
* @member {object} [properties]
|
||||
* @member {string} [properties.authType] Specifies the authentication type.
|
||||
* Possible values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService',
|
||||
* 'AzureActiveDirectory'
|
||||
* @member {buffer} [properties.certificate] The base64 encoded certificate
|
||||
* @property {object} [properties]
|
||||
* @property {string} [properties.authType] Specifies the authentication
|
||||
* type. Possible values include: 'Invalid', 'ACS', 'AAD',
|
||||
* 'AccessControlService', 'AzureActiveDirectory'
|
||||
* @property {buffer} [properties.certificate] The base64 encoded certificate
|
||||
* raw data string
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Resource Name availability input parameters - Resource type and resource
|
||||
* name
|
||||
*
|
||||
*/
|
||||
class CheckNameAvailabilityParameters {
|
||||
/**
|
||||
* Create a CheckNameAvailabilityParameters.
|
||||
* @property {string} [type] Describes the Resource type:
|
||||
* Microsoft.RecoveryServices/Vaults
|
||||
* @property {string} [name] Resource name for which availability needs to be
|
||||
* checked
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of CheckNameAvailabilityParameters
|
||||
*
|
||||
* @returns {object} metadata of CheckNameAvailabilityParameters
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'CheckNameAvailabilityParameters',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'CheckNameAvailabilityParameters',
|
||||
modelProperties: {
|
||||
type: {
|
||||
required: false,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CheckNameAvailabilityParameters;
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Response for check name availability API. Resource provider will set
|
||||
* availability as true | false.
|
||||
*
|
||||
*/
|
||||
class CheckNameAvailabilityResult {
|
||||
/**
|
||||
* Create a CheckNameAvailabilityResult.
|
||||
* @property {boolean} [nameAvailable]
|
||||
* @property {string} [reason]
|
||||
* @property {string} [message]
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of CheckNameAvailabilityResult
|
||||
*
|
||||
* @returns {object} metadata of CheckNameAvailabilityResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'CheckNameAvailabilityResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'CheckNameAvailabilityResult',
|
||||
modelProperties: {
|
||||
nameAvailable: {
|
||||
required: false,
|
||||
serializedName: 'nameAvailable',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
reason: {
|
||||
required: false,
|
||||
serializedName: 'reason',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
message: {
|
||||
required: false,
|
||||
serializedName: 'message',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CheckNameAvailabilityResult;
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Response for check name availability API. Resource provider will set
|
||||
* availability as true | false.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class CheckNameAvailabilityResultResource extends models['Resource'] {
|
||||
/**
|
||||
* Create a CheckNameAvailabilityResultResource.
|
||||
* @property {object} [properties] CheckNameAvailabilityResultResource
|
||||
* properties
|
||||
* @property {boolean} [properties.nameAvailable]
|
||||
* @property {string} [properties.reason]
|
||||
* @property {string} [properties.message]
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of CheckNameAvailabilityResultResource
|
||||
*
|
||||
* @returns {object} metadata of CheckNameAvailabilityResultResource
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'CheckNameAvailabilityResultResource',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'CheckNameAvailabilityResultResource',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
eTag: {
|
||||
required: false,
|
||||
serializedName: 'eTag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
properties: {
|
||||
required: false,
|
||||
serializedName: 'properties',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'CheckNameAvailabilityResult'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CheckNameAvailabilityResultResource;
|
|
@ -17,11 +17,12 @@
|
|||
class ClientDiscoveryDisplay {
|
||||
/**
|
||||
* Create a ClientDiscoveryDisplay.
|
||||
* @member {string} [provider] Name of the provider for display purposes
|
||||
* @member {string} [resource] Name of the resource type for display purposes
|
||||
* @member {string} [operation] Name of the operation for display purposes
|
||||
* @member {string} [description] Description of the operation for display
|
||||
* purposes
|
||||
* @property {string} [provider] Name of the provider for display purposes
|
||||
* @property {string} [resource] ResourceType for which this Operation can be
|
||||
* performed.
|
||||
* @property {string} [operation] Operations Name itself.
|
||||
* @property {string} [description] Description of the operation having
|
||||
* details of what operation is about.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
@ -42,28 +43,28 @@ class ClientDiscoveryDisplay {
|
|||
modelProperties: {
|
||||
provider: {
|
||||
required: false,
|
||||
serializedName: 'Provider',
|
||||
serializedName: 'provider',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resource: {
|
||||
required: false,
|
||||
serializedName: 'Resource',
|
||||
serializedName: 'resource',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
operation: {
|
||||
required: false,
|
||||
serializedName: 'Operation',
|
||||
serializedName: 'operation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
required: false,
|
||||
serializedName: 'Description',
|
||||
serializedName: 'description',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
class ClientDiscoveryForLogSpecification {
|
||||
/**
|
||||
* Create a ClientDiscoveryForLogSpecification.
|
||||
* @member {string} [name] Name of the log.
|
||||
* @member {string} [displayName] Localized display name
|
||||
* @member {string} [blobDuration] Blobs created in customer storage account
|
||||
* per hour
|
||||
* @property {string} [name] Name of the log.
|
||||
* @property {string} [displayName] Localized display name
|
||||
* @property {string} [blobDuration] Blobs created in customer storage
|
||||
* account per hour
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class to represent shoebox properties in json client discovery.
|
||||
*
|
||||
|
@ -19,8 +17,8 @@ const models = require('./index');
|
|||
class ClientDiscoveryForProperties {
|
||||
/**
|
||||
* Create a ClientDiscoveryForProperties.
|
||||
* @member {object} [serviceSpecification] Operation properties.
|
||||
* @member {array} [serviceSpecification.logSpecifications] List of log
|
||||
* @property {object} [serviceSpecification] Operation properties.
|
||||
* @property {array} [serviceSpecification.logSpecifications] List of log
|
||||
* specifications of this operation.
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class to represent shoebox service specification in json client discovery.
|
||||
*
|
||||
|
@ -19,7 +17,7 @@ const models = require('./index');
|
|||
class ClientDiscoveryForServiceSpecification {
|
||||
/**
|
||||
* Create a ClientDiscoveryForServiceSpecification.
|
||||
* @member {array} [logSpecifications] List of log specifications of this
|
||||
* @property {array} [logSpecifications] List of log specifications of this
|
||||
* operation.
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
class ClientDiscoveryResponse extends Array {
|
||||
/**
|
||||
* Create a ClientDiscoveryResponse.
|
||||
* @member {string} [nextLink] NextLink of the Response.
|
||||
* @property {string} [nextLink] Link to the next chunk of the response
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -38,7 +38,7 @@ class ClientDiscoveryResponse extends Array {
|
|||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'Value',
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
|
@ -53,7 +53,7 @@ class ClientDiscoveryResponse extends Array {
|
|||
},
|
||||
nextLink: {
|
||||
required: false,
|
||||
serializedName: 'NextLink',
|
||||
serializedName: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Available operation details.
|
||||
*
|
||||
|
@ -19,22 +17,22 @@ const models = require('./index');
|
|||
class ClientDiscoveryValueForSingleApi {
|
||||
/**
|
||||
* Create a ClientDiscoveryValueForSingleApi.
|
||||
* @member {string} [name] Name of the operation
|
||||
* @member {object} [display] Contains the localized display information for
|
||||
* this particular operation
|
||||
* @member {string} [display.provider] Name of the provider for display
|
||||
* @property {string} [name] Name of the Operation.
|
||||
* @property {object} [display] Contains the localized display information
|
||||
* for this particular operation
|
||||
* @property {string} [display.provider] Name of the provider for display
|
||||
* purposes
|
||||
* @member {string} [display.resource] Name of the resource type for display
|
||||
* purposes
|
||||
* @member {string} [display.operation] Name of the operation for display
|
||||
* purposes
|
||||
* @member {string} [display.description] Description of the operation for
|
||||
* display purposes
|
||||
* @member {string} [origin] The intended executor of the operation;governs
|
||||
* @property {string} [display.resource] ResourceType for which this
|
||||
* Operation can be performed.
|
||||
* @property {string} [display.operation] Operations Name itself.
|
||||
* @property {string} [display.description] Description of the operation
|
||||
* having details of what operation is about.
|
||||
* @property {string} [origin] The intended executor of the operation;governs
|
||||
* the display of the operation in the RBAC UX and the audit logs UX
|
||||
* @member {object} [properties] Properties
|
||||
* @member {object} [properties.serviceSpecification] Operation properties.
|
||||
* @member {array} [properties.serviceSpecification.logSpecifications] List
|
||||
* @property {object} [properties] ShoeBox properties for the given
|
||||
* operation.
|
||||
* @property {object} [properties.serviceSpecification] Operation properties.
|
||||
* @property {array} [properties.serviceSpecification.logSpecifications] List
|
||||
* of log specifications of this operation.
|
||||
*/
|
||||
constructor() {
|
||||
|
@ -56,14 +54,14 @@ class ClientDiscoveryValueForSingleApi {
|
|||
modelProperties: {
|
||||
name: {
|
||||
required: false,
|
||||
serializedName: 'Name',
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display: {
|
||||
required: false,
|
||||
serializedName: 'Display',
|
||||
serializedName: 'display',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ClientDiscoveryDisplay'
|
||||
|
@ -71,14 +69,14 @@ class ClientDiscoveryValueForSingleApi {
|
|||
},
|
||||
origin: {
|
||||
required: false,
|
||||
serializedName: 'Origin',
|
||||
serializedName: 'origin',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
properties: {
|
||||
required: false,
|
||||
serializedName: 'Properties',
|
||||
serializedName: 'properties',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ClientDiscoveryForProperties'
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -18,15 +18,6 @@ var msRestAzure = require('ms-rest-azure');
|
|||
|
||||
exports.BaseResource = msRestAzure.BaseResource;
|
||||
exports.CloudError = msRestAzure.CloudError;
|
||||
exports.Resource = require('./resource');
|
||||
exports.BackupStorageConfig = require('./backupStorageConfig');
|
||||
exports.BackupVaultConfig = require('./backupVaultConfig');
|
||||
exports.VaultExtendedInfoResource = require('./vaultExtendedInfoResource');
|
||||
exports.Sku = require('./sku');
|
||||
exports.UpgradeDetails = require('./upgradeDetails');
|
||||
exports.VaultProperties = require('./vaultProperties');
|
||||
exports.TrackedResource = require('./trackedResource');
|
||||
exports.Vault = require('./vault');
|
||||
exports.RawCertificateData = require('./rawCertificateData');
|
||||
exports.CertificateRequest = require('./certificateRequest');
|
||||
exports.ResourceCertificateDetails = require('./resourceCertificateDetails');
|
||||
|
@ -36,11 +27,23 @@ exports.VaultCertificateResponse = require('./vaultCertificateResponse');
|
|||
exports.JobsSummary = require('./jobsSummary');
|
||||
exports.MonitoringSummary = require('./monitoringSummary');
|
||||
exports.ReplicationUsage = require('./replicationUsage');
|
||||
exports.CheckNameAvailabilityParameters = require('./checkNameAvailabilityParameters');
|
||||
exports.CheckNameAvailabilityResult = require('./checkNameAvailabilityResult');
|
||||
exports.Resource = require('./resource');
|
||||
exports.CheckNameAvailabilityResultResource = require('./checkNameAvailabilityResultResource');
|
||||
exports.ClientDiscoveryDisplay = require('./clientDiscoveryDisplay');
|
||||
exports.ClientDiscoveryForLogSpecification = require('./clientDiscoveryForLogSpecification');
|
||||
exports.ClientDiscoveryForServiceSpecification = require('./clientDiscoveryForServiceSpecification');
|
||||
exports.ClientDiscoveryForProperties = require('./clientDiscoveryForProperties');
|
||||
exports.ClientDiscoveryValueForSingleApi = require('./clientDiscoveryValueForSingleApi');
|
||||
exports.Sku = require('./sku');
|
||||
exports.TrackedResource = require('./trackedResource');
|
||||
exports.PatchTrackedResource = require('./patchTrackedResource');
|
||||
exports.UpgradeDetails = require('./upgradeDetails');
|
||||
exports.VaultProperties = require('./vaultProperties');
|
||||
exports.Vault = require('./vault');
|
||||
exports.PatchVault = require('./patchVault');
|
||||
exports.VaultExtendedInfoResource = require('./vaultExtendedInfoResource');
|
||||
exports.NameInfo = require('./nameInfo');
|
||||
exports.VaultUsage = require('./vaultUsage');
|
||||
exports.ReplicationUsageList = require('./replicationUsageList');
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
class JobsSummary {
|
||||
/**
|
||||
* Create a JobsSummary.
|
||||
* @member {number} [failedJobs] Count of failed jobs.
|
||||
* @member {number} [suspendedJobs] Count of suspended jobs.
|
||||
* @member {number} [inProgressJobs] Count of in-progress jobs.
|
||||
* @property {number} [failedJobs] Count of failed jobs.
|
||||
* @property {number} [suspendedJobs] Count of suspended jobs.
|
||||
* @property {number} [inProgressJobs] Count of in-progress jobs.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
class MonitoringSummary {
|
||||
/**
|
||||
* Create a MonitoringSummary.
|
||||
* @member {number} [unHealthyVmCount] Count of unhealthy VMs.
|
||||
* @member {number} [unHealthyProviderCount] Count of unhealthy replication
|
||||
* @property {number} [unHealthyVmCount] Count of unhealthy VMs.
|
||||
* @property {number} [unHealthyProviderCount] Count of unhealthy replication
|
||||
* providers.
|
||||
* @member {number} [eventsCount] Count of all critical warnings.
|
||||
* @member {number} [deprecatedProviderCount] Count of all deprecated
|
||||
* @property {number} [eventsCount] Count of all critical warnings.
|
||||
* @property {number} [deprecatedProviderCount] Count of all deprecated
|
||||
* recovery service providers.
|
||||
* @member {number} [supportedProviderCount] Count of all the supported
|
||||
* @property {number} [supportedProviderCount] Count of all the supported
|
||||
* recovery service providers.
|
||||
* @member {number} [unsupportedProviderCount] Count of all the unsupported
|
||||
* @property {number} [unsupportedProviderCount] Count of all the unsupported
|
||||
* recovery service providers.
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
class NameInfo {
|
||||
/**
|
||||
* Create a NameInfo.
|
||||
* @member {string} [value] Value of usage.
|
||||
* @member {string} [localizedValue] Localized value of usage.
|
||||
* @property {string} [value] Value of usage.
|
||||
* @property {string} [localizedValue] Localized value of usage.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Tracked resource with location.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class PatchTrackedResource extends models['Resource'] {
|
||||
/**
|
||||
* Create a PatchTrackedResource.
|
||||
* @property {string} [location] Resource location.
|
||||
* @property {object} [tags] Resource tags.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of PatchTrackedResource
|
||||
*
|
||||
* @returns {object} metadata of PatchTrackedResource
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'PatchTrackedResource',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'PatchTrackedResource',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
eTag: {
|
||||
required: false,
|
||||
serializedName: 'eTag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: false,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = PatchTrackedResource;
|
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Patch Resource information, as returned by the resource provider.
|
||||
*
|
||||
* @extends models['PatchTrackedResource']
|
||||
*/
|
||||
class PatchVault extends models['PatchTrackedResource'] {
|
||||
/**
|
||||
* Create a PatchVault.
|
||||
* @property {object} [properties]
|
||||
* @property {string} [properties.provisioningState] Provisioning State.
|
||||
* @property {object} [properties.upgradeDetails]
|
||||
* @property {string} [properties.upgradeDetails.operationId] ID of the vault
|
||||
* upgrade operation.
|
||||
* @property {date} [properties.upgradeDetails.startTimeUtc] UTC time at
|
||||
* which the upgrade operation has started.
|
||||
* @property {date} [properties.upgradeDetails.lastUpdatedTimeUtc] UTC time
|
||||
* at which the upgrade operation status was last updated.
|
||||
* @property {date} [properties.upgradeDetails.endTimeUtc] UTC time at which
|
||||
* the upgrade operation has ended.
|
||||
* @property {string} [properties.upgradeDetails.status] Status of the vault
|
||||
* upgrade operation. Possible values include: 'Unknown', 'InProgress',
|
||||
* 'Upgraded', 'Failed'
|
||||
* @property {string} [properties.upgradeDetails.message] Message to the user
|
||||
* containing information about the upgrade operation.
|
||||
* @property {string} [properties.upgradeDetails.triggerType] The way the
|
||||
* vault upgrade was triggered. Possible values include: 'UserTriggered',
|
||||
* 'ForcedUpgrade'
|
||||
* @property {string} [properties.upgradeDetails.upgradedResourceId] Resource
|
||||
* ID of the upgraded vault.
|
||||
* @property {string} [properties.upgradeDetails.previousResourceId] Resource
|
||||
* ID of the vault before the upgrade.
|
||||
* @property {object} [sku]
|
||||
* @property {string} [sku.name] The Sku name. Possible values include:
|
||||
* 'Standard', 'RS0'
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of PatchVault
|
||||
*
|
||||
* @returns {object} metadata of PatchVault
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'PatchVault',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'PatchVault',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
eTag: {
|
||||
required: false,
|
||||
serializedName: 'eTag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: false,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
properties: {
|
||||
required: false,
|
||||
serializedName: 'properties',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'VaultProperties'
|
||||
}
|
||||
},
|
||||
sku: {
|
||||
required: false,
|
||||
serializedName: 'sku',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'Sku'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = PatchVault;
|
|
@ -17,10 +17,10 @@
|
|||
class RawCertificateData {
|
||||
/**
|
||||
* Create a RawCertificateData.
|
||||
* @member {string} [authType] Specifies the authentication type. Possible
|
||||
* @property {string} [authType] Specifies the authentication type. Possible
|
||||
* values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService',
|
||||
* 'AzureActiveDirectory'
|
||||
* @member {buffer} [certificate] The base64 encoded certificate raw data
|
||||
* @property {buffer} [certificate] The base64 encoded certificate raw data
|
||||
* string
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Replication usages of a vault.
|
||||
*
|
||||
|
@ -19,32 +17,32 @@ const models = require('./index');
|
|||
class ReplicationUsage {
|
||||
/**
|
||||
* Create a ReplicationUsage.
|
||||
* @member {object} [monitoringSummary] Summary of the replication monitoring
|
||||
* data for this vault.
|
||||
* @member {number} [monitoringSummary.unHealthyVmCount] Count of unhealthy
|
||||
* @property {object} [monitoringSummary] Summary of the replication
|
||||
* monitoring data for this vault.
|
||||
* @property {number} [monitoringSummary.unHealthyVmCount] Count of unhealthy
|
||||
* VMs.
|
||||
* @member {number} [monitoringSummary.unHealthyProviderCount] Count of
|
||||
* @property {number} [monitoringSummary.unHealthyProviderCount] Count of
|
||||
* unhealthy replication providers.
|
||||
* @member {number} [monitoringSummary.eventsCount] Count of all critical
|
||||
* @property {number} [monitoringSummary.eventsCount] Count of all critical
|
||||
* warnings.
|
||||
* @member {number} [monitoringSummary.deprecatedProviderCount] Count of all
|
||||
* deprecated recovery service providers.
|
||||
* @member {number} [monitoringSummary.supportedProviderCount] Count of all
|
||||
* @property {number} [monitoringSummary.deprecatedProviderCount] Count of
|
||||
* all deprecated recovery service providers.
|
||||
* @property {number} [monitoringSummary.supportedProviderCount] Count of all
|
||||
* the supported recovery service providers.
|
||||
* @member {number} [monitoringSummary.unsupportedProviderCount] Count of all
|
||||
* the unsupported recovery service providers.
|
||||
* @member {object} [jobsSummary] Summary of the replication jobs data for
|
||||
* @property {number} [monitoringSummary.unsupportedProviderCount] Count of
|
||||
* all the unsupported recovery service providers.
|
||||
* @property {object} [jobsSummary] Summary of the replication jobs data for
|
||||
* this vault.
|
||||
* @member {number} [jobsSummary.failedJobs] Count of failed jobs.
|
||||
* @member {number} [jobsSummary.suspendedJobs] Count of suspended jobs.
|
||||
* @member {number} [jobsSummary.inProgressJobs] Count of in-progress jobs.
|
||||
* @member {number} [protectedItemCount] Number of replication protected
|
||||
* @property {number} [jobsSummary.failedJobs] Count of failed jobs.
|
||||
* @property {number} [jobsSummary.suspendedJobs] Count of suspended jobs.
|
||||
* @property {number} [jobsSummary.inProgressJobs] Count of in-progress jobs.
|
||||
* @property {number} [protectedItemCount] Number of replication protected
|
||||
* items for this vault.
|
||||
* @member {number} [recoveryPlanCount] Number of replication recovery plans
|
||||
* for this vault.
|
||||
* @member {number} [registeredServersCount] Number of servers registered to
|
||||
* this vault.
|
||||
* @member {number} [recoveryServicesProviderAuthType] The authentication
|
||||
* @property {number} [recoveryPlanCount] Number of replication recovery
|
||||
* plans for this vault.
|
||||
* @property {number} [registeredServersCount] Number of servers registered
|
||||
* to this vault.
|
||||
* @property {number} [recoveryServicesProviderAuthType] The authentication
|
||||
* type of recovery service providers in the vault.
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -20,12 +20,12 @@ const models = require('./index');
|
|||
class Resource extends models['BaseResource'] {
|
||||
/**
|
||||
* Create a Resource.
|
||||
* @member {string} [id] Resource Id represents the complete path to the
|
||||
* @property {string} [id] Resource Id represents the complete path to the
|
||||
* resource.
|
||||
* @member {string} [name] Resource name associated with the resource.
|
||||
* @member {string} [type] Resource type represents the complete path of the
|
||||
* form Namespace/ResourceType/ResourceType/...
|
||||
* @member {string} [eTag] Optional ETag.
|
||||
* @property {string} [name] Resource name associated with the resource.
|
||||
* @property {string} [type] Resource type represents the complete path of
|
||||
* the form Namespace/ResourceType/ResourceType/...
|
||||
* @property {string} [eTag] Optional ETag.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
|
|
@ -20,12 +20,14 @@ const models = require('./index');
|
|||
class ResourceCertificateAndAadDetails extends models['ResourceCertificateDetails'] {
|
||||
/**
|
||||
* Create a ResourceCertificateAndAadDetails.
|
||||
* @member {string} aadAuthority AAD tenant authority.
|
||||
* @member {string} aadTenantId AAD tenant Id.
|
||||
* @member {string} servicePrincipalClientId AAD service principal clientId.
|
||||
* @member {string} servicePrincipalObjectId AAD service principal ObjectId.
|
||||
* @member {string} azureManagementEndpointAudience Azure Management Endpoint
|
||||
* Audience.
|
||||
* @property {string} aadAuthority AAD tenant authority.
|
||||
* @property {string} aadTenantId AAD tenant Id.
|
||||
* @property {string} servicePrincipalClientId AAD service principal
|
||||
* clientId.
|
||||
* @property {string} servicePrincipalObjectId AAD service principal
|
||||
* ObjectId.
|
||||
* @property {string} azureManagementEndpointAudience Azure Management
|
||||
* Endpoint Audience.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
|
|
@ -20,10 +20,10 @@ const models = require('./index');
|
|||
class ResourceCertificateAndAcsDetails extends models['ResourceCertificateDetails'] {
|
||||
/**
|
||||
* Create a ResourceCertificateAndAcsDetails.
|
||||
* @member {string} globalAcsNamespace ACS namespace name - tenant for our
|
||||
* @property {string} globalAcsNamespace ACS namespace name - tenant for our
|
||||
* service.
|
||||
* @member {string} globalAcsHostName Acs mgmt host name to connect to.
|
||||
* @member {string} globalAcsRPRealm Global ACS namespace RP realm.
|
||||
* @property {string} globalAcsHostName Acs mgmt host name to connect to.
|
||||
* @property {string} globalAcsRPRealm Global ACS namespace RP realm.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
|
|
@ -17,16 +17,16 @@
|
|||
class ResourceCertificateDetails {
|
||||
/**
|
||||
* Create a ResourceCertificateDetails.
|
||||
* @member {buffer} [certificate] The base64 encoded certificate raw data
|
||||
* @property {buffer} [certificate] The base64 encoded certificate raw data
|
||||
* string.
|
||||
* @member {string} [friendlyName] Certificate friendlyname.
|
||||
* @member {string} [issuer] Certificate issuer.
|
||||
* @member {number} [resourceId] Resource ID of the vault.
|
||||
* @member {string} [subject] Certificate Subject Name.
|
||||
* @member {string} [thumbprint] Certificate thumbprint.
|
||||
* @member {date} [validFrom] Certificate Validity start Date time.
|
||||
* @member {date} [validTo] Certificate Validity End Date time.
|
||||
* @member {string} authType Polymorphic Discriminator
|
||||
* @property {string} [friendlyName] Certificate friendly name.
|
||||
* @property {string} [issuer] Certificate issuer.
|
||||
* @property {number} [resourceId] Resource ID of the vault.
|
||||
* @property {string} [subject] Certificate Subject Name.
|
||||
* @property {string} [thumbprint] Certificate thumbprint.
|
||||
* @property {date} [validFrom] Certificate Validity start Date time.
|
||||
* @property {date} [validTo] Certificate Validity End Date time.
|
||||
* @property {string} authType Polymorphic Discriminator
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
class Sku {
|
||||
/**
|
||||
* Create a Sku.
|
||||
* @member {string} name The Sku name. Possible values include: 'Standard',
|
||||
* @property {string} name The Sku name. Possible values include: 'Standard',
|
||||
* 'RS0'
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -20,8 +20,8 @@ const models = require('./index');
|
|||
class TrackedResource extends models['Resource'] {
|
||||
/**
|
||||
* Create a TrackedResource.
|
||||
* @member {string} location Resource location.
|
||||
* @member {object} [tags] Resource tags.
|
||||
* @property {string} location Resource location.
|
||||
* @property {object} [tags] Resource tags.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
|
|
@ -17,22 +17,22 @@
|
|||
class UpgradeDetails {
|
||||
/**
|
||||
* Create a UpgradeDetails.
|
||||
* @member {string} [operationId] ID of the vault upgrade operation.
|
||||
* @member {date} [startTimeUtc] UTC time at which the upgrade operation has
|
||||
* started.
|
||||
* @member {date} [lastUpdatedTimeUtc] UTC time at which the upgrade
|
||||
* @property {string} [operationId] ID of the vault upgrade operation.
|
||||
* @property {date} [startTimeUtc] UTC time at which the upgrade operation
|
||||
* has started.
|
||||
* @property {date} [lastUpdatedTimeUtc] UTC time at which the upgrade
|
||||
* operation status was last updated.
|
||||
* @member {date} [endTimeUtc] UTC time at which the upgrade operation has
|
||||
* @property {date} [endTimeUtc] UTC time at which the upgrade operation has
|
||||
* ended.
|
||||
* @member {string} [status] Status of the vault upgrade operation. Possible
|
||||
* values include: 'Unknown', 'InProgress', 'Upgraded', 'Failed'
|
||||
* @member {string} [message] Message to the user containing information
|
||||
* @property {string} [status] Status of the vault upgrade operation.
|
||||
* Possible values include: 'Unknown', 'InProgress', 'Upgraded', 'Failed'
|
||||
* @property {string} [message] Message to the user containing information
|
||||
* about the upgrade operation.
|
||||
* @member {string} [triggerType] The way the vault upgradation was
|
||||
* triggered. Possible values include: 'UserTriggered', 'ForcedUpgrade'
|
||||
* @member {string} [upgradedResourceId] Resource ID of the upgraded vault.
|
||||
* @member {string} [previousResourceId] Resource ID of the vault before the
|
||||
* upgrade.
|
||||
* @property {string} [triggerType] The way the vault upgrade was triggered.
|
||||
* Possible values include: 'UserTriggered', 'ForcedUpgrade'
|
||||
* @property {string} [upgradedResourceId] Resource ID of the upgraded vault.
|
||||
* @property {string} [previousResourceId] Resource ID of the vault before
|
||||
* the upgrade.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
|
|
@ -20,31 +20,31 @@ const models = require('./index');
|
|||
class Vault extends models['TrackedResource'] {
|
||||
/**
|
||||
* Create a Vault.
|
||||
* @member {object} [properties]
|
||||
* @member {string} [properties.provisioningState] Provisioning State.
|
||||
* @member {object} [properties.upgradeDetails]
|
||||
* @member {string} [properties.upgradeDetails.operationId] ID of the vault
|
||||
* @property {object} [properties]
|
||||
* @property {string} [properties.provisioningState] Provisioning State.
|
||||
* @property {object} [properties.upgradeDetails]
|
||||
* @property {string} [properties.upgradeDetails.operationId] ID of the vault
|
||||
* upgrade operation.
|
||||
* @member {date} [properties.upgradeDetails.startTimeUtc] UTC time at which
|
||||
* the upgrade operation has started.
|
||||
* @member {date} [properties.upgradeDetails.lastUpdatedTimeUtc] UTC time at
|
||||
* which the upgrade operation status was last updated.
|
||||
* @member {date} [properties.upgradeDetails.endTimeUtc] UTC time at which
|
||||
* @property {date} [properties.upgradeDetails.startTimeUtc] UTC time at
|
||||
* which the upgrade operation has started.
|
||||
* @property {date} [properties.upgradeDetails.lastUpdatedTimeUtc] UTC time
|
||||
* at which the upgrade operation status was last updated.
|
||||
* @property {date} [properties.upgradeDetails.endTimeUtc] UTC time at which
|
||||
* the upgrade operation has ended.
|
||||
* @member {string} [properties.upgradeDetails.status] Status of the vault
|
||||
* @property {string} [properties.upgradeDetails.status] Status of the vault
|
||||
* upgrade operation. Possible values include: 'Unknown', 'InProgress',
|
||||
* 'Upgraded', 'Failed'
|
||||
* @member {string} [properties.upgradeDetails.message] Message to the user
|
||||
* @property {string} [properties.upgradeDetails.message] Message to the user
|
||||
* containing information about the upgrade operation.
|
||||
* @member {string} [properties.upgradeDetails.triggerType] The way the vault
|
||||
* upgradation was triggered. Possible values include: 'UserTriggered',
|
||||
* @property {string} [properties.upgradeDetails.triggerType] The way the
|
||||
* vault upgrade was triggered. Possible values include: 'UserTriggered',
|
||||
* 'ForcedUpgrade'
|
||||
* @member {string} [properties.upgradeDetails.upgradedResourceId] Resource
|
||||
* @property {string} [properties.upgradeDetails.upgradedResourceId] Resource
|
||||
* ID of the upgraded vault.
|
||||
* @member {string} [properties.upgradeDetails.previousResourceId] Resource
|
||||
* @property {string} [properties.upgradeDetails.previousResourceId] Resource
|
||||
* ID of the vault before the upgrade.
|
||||
* @member {object} [sku]
|
||||
* @member {string} [sku.name] The Sku name. Possible values include:
|
||||
* @property {object} [sku]
|
||||
* @property {string} [sku.name] The Sku name. Possible values include:
|
||||
* 'Standard', 'RS0'
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -16,27 +16,31 @@ const models = require('./index');
|
|||
* Certificate corresponding to a vault that can be used by clients to register
|
||||
* themselves with the vault.
|
||||
*
|
||||
* @extends models['BaseResource']
|
||||
*/
|
||||
class VaultCertificateResponse {
|
||||
class VaultCertificateResponse extends models['BaseResource'] {
|
||||
/**
|
||||
* Create a VaultCertificateResponse.
|
||||
* @member {string} [name]
|
||||
* @member {string} [type]
|
||||
* @member {string} [id]
|
||||
* @member {object} [properties]
|
||||
* @member {buffer} [properties.certificate] The base64 encoded certificate
|
||||
* @property {string} [name] Resource name associated with the resource.
|
||||
* @property {string} [type] Resource type represents the complete path of
|
||||
* the form Namespace/ResourceType/ResourceType/...
|
||||
* @property {string} [id] Resource Id represents the complete path to the
|
||||
* resource.
|
||||
* @property {object} [properties]
|
||||
* @property {buffer} [properties.certificate] The base64 encoded certificate
|
||||
* raw data string.
|
||||
* @member {string} [properties.friendlyName] Certificate friendlyname.
|
||||
* @member {string} [properties.issuer] Certificate issuer.
|
||||
* @member {number} [properties.resourceId] Resource ID of the vault.
|
||||
* @member {string} [properties.subject] Certificate Subject Name.
|
||||
* @member {string} [properties.thumbprint] Certificate thumbprint.
|
||||
* @member {date} [properties.validFrom] Certificate Validity start Date
|
||||
* @property {string} [properties.friendlyName] Certificate friendly name.
|
||||
* @property {string} [properties.issuer] Certificate issuer.
|
||||
* @property {number} [properties.resourceId] Resource ID of the vault.
|
||||
* @property {string} [properties.subject] Certificate Subject Name.
|
||||
* @property {string} [properties.thumbprint] Certificate thumbprint.
|
||||
* @property {date} [properties.validFrom] Certificate Validity start Date
|
||||
* time.
|
||||
* @member {date} [properties.validTo] Certificate Validity End Date time.
|
||||
* @member {string} [properties.authType] Polymorphic Discriminator
|
||||
* @property {date} [properties.validTo] Certificate Validity End Date time.
|
||||
* @property {string} [properties.authType] Polymorphic Discriminator
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,6 +59,7 @@ class VaultCertificateResponse {
|
|||
modelProperties: {
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
|
@ -62,6 +67,7 @@ class VaultCertificateResponse {
|
|||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
|
@ -69,6 +75,7 @@ class VaultCertificateResponse {
|
|||
},
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
|
|
|
@ -20,10 +20,10 @@ const models = require('./index');
|
|||
class VaultExtendedInfoResource extends models['Resource'] {
|
||||
/**
|
||||
* Create a VaultExtendedInfoResource.
|
||||
* @member {string} [integrityKey] Integrity key.
|
||||
* @member {string} [encryptionKey] Encryption key.
|
||||
* @member {string} [encryptionKeyThumbprint] Encryption key thumbprint.
|
||||
* @member {string} [algorithm] Algorithm.
|
||||
* @property {string} [integrityKey] Integrity key.
|
||||
* @property {string} [encryptionKey] Encryption key.
|
||||
* @property {string} [encryptionKeyThumbprint] Encryption key thumbprint.
|
||||
* @property {string} [algorithm] Algorithm for Vault ExtendedInfo
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
class VaultList extends Array {
|
||||
/**
|
||||
* Create a VaultList.
|
||||
* @member {string} [nextLink]
|
||||
* @property {string} [nextLink]
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -50,6 +50,14 @@ class VaultList extends Array {
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Properties of the vault.
|
||||
*
|
||||
|
@ -19,27 +17,26 @@ const models = require('./index');
|
|||
class VaultProperties {
|
||||
/**
|
||||
* Create a VaultProperties.
|
||||
* @member {string} [provisioningState] Provisioning State.
|
||||
* @member {object} [upgradeDetails]
|
||||
* @member {string} [upgradeDetails.operationId] ID of the vault upgrade
|
||||
* @property {string} [provisioningState] Provisioning State.
|
||||
* @property {object} [upgradeDetails]
|
||||
* @property {string} [upgradeDetails.operationId] ID of the vault upgrade
|
||||
* operation.
|
||||
* @member {date} [upgradeDetails.startTimeUtc] UTC time at which the upgrade
|
||||
* operation has started.
|
||||
* @member {date} [upgradeDetails.lastUpdatedTimeUtc] UTC time at which the
|
||||
* @property {date} [upgradeDetails.startTimeUtc] UTC time at which the
|
||||
* upgrade operation has started.
|
||||
* @property {date} [upgradeDetails.lastUpdatedTimeUtc] UTC time at which the
|
||||
* upgrade operation status was last updated.
|
||||
* @member {date} [upgradeDetails.endTimeUtc] UTC time at which the upgrade
|
||||
* @property {date} [upgradeDetails.endTimeUtc] UTC time at which the upgrade
|
||||
* operation has ended.
|
||||
* @member {string} [upgradeDetails.status] Status of the vault upgrade
|
||||
* @property {string} [upgradeDetails.status] Status of the vault upgrade
|
||||
* operation. Possible values include: 'Unknown', 'InProgress', 'Upgraded',
|
||||
* 'Failed'
|
||||
* @member {string} [upgradeDetails.message] Message to the user containing
|
||||
* @property {string} [upgradeDetails.message] Message to the user containing
|
||||
* information about the upgrade operation.
|
||||
* @member {string} [upgradeDetails.triggerType] The way the vault
|
||||
* upgradation was triggered. Possible values include: 'UserTriggered',
|
||||
* 'ForcedUpgrade'
|
||||
* @member {string} [upgradeDetails.upgradedResourceId] Resource ID of the
|
||||
* @property {string} [upgradeDetails.triggerType] The way the vault upgrade
|
||||
* was triggered. Possible values include: 'UserTriggered', 'ForcedUpgrade'
|
||||
* @property {string} [upgradeDetails.upgradedResourceId] Resource ID of the
|
||||
* upgraded vault.
|
||||
* @member {string} [upgradeDetails.previousResourceId] Resource ID of the
|
||||
* @property {string} [upgradeDetails.previousResourceId] Resource ID of the
|
||||
* vault before the upgrade.
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Usages of a vault.
|
||||
*
|
||||
|
@ -19,15 +17,15 @@ const models = require('./index');
|
|||
class VaultUsage {
|
||||
/**
|
||||
* Create a VaultUsage.
|
||||
* @member {string} [unit] Unit of the usage. Possible values include:
|
||||
* @property {string} [unit] Unit of the usage. Possible values include:
|
||||
* 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond'
|
||||
* @member {string} [quotaPeriod] Quota period of usage.
|
||||
* @member {date} [nextResetTime] Next reset time of usage.
|
||||
* @member {number} [currentValue] Current value of usage.
|
||||
* @member {number} [limit] Limit of usage.
|
||||
* @member {object} [name] Name of usage.
|
||||
* @member {string} [name.value] Value of usage.
|
||||
* @member {string} [name.localizedValue] Localized value of usage.
|
||||
* @property {string} [quotaPeriod] Quota period of usage.
|
||||
* @property {date} [nextResetTime] Next reset time of usage.
|
||||
* @property {number} [currentValue] Current value of usage.
|
||||
* @property {number} [limit] Limit of usage.
|
||||
* @property {object} [name] Name of usage.
|
||||
* @property {string} [name.value] Value of usage.
|
||||
* @property {string} [name.localizedValue] Localized value of usage.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
|
|
@ -12,323 +12,6 @@ import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationRes
|
|||
import * as models from '../models';
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
* BackupVaultConfigs
|
||||
* __NOTE__: An instance of this class is automatically created for an
|
||||
* instance of the RecoveryServicesClient.
|
||||
*/
|
||||
export interface BackupVaultConfigs {
|
||||
|
||||
|
||||
/**
|
||||
* Fetches vault config.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<BackupVaultConfig>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*/
|
||||
getWithHttpOperationResponse(resourceGroupName: string, vaultName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.BackupVaultConfig>>;
|
||||
|
||||
/**
|
||||
* Fetches vault config.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {ServiceCallback} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {ServiceCallback|Promise} If a callback was passed as the last
|
||||
* parameter then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned.
|
||||
*
|
||||
* @resolve {BackupVaultConfig} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*
|
||||
* {ServiceCallback} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {BackupVaultConfig} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link BackupVaultConfig} for more information.
|
||||
*
|
||||
* {WebResource} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
get(resourceGroupName: string, vaultName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.BackupVaultConfig>;
|
||||
get(resourceGroupName: string, vaultName: string, callback: ServiceCallback<models.BackupVaultConfig>): void;
|
||||
get(resourceGroupName: string, vaultName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.BackupVaultConfig>): void;
|
||||
|
||||
|
||||
/**
|
||||
* Updates vault config model type.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} backupVaultConfig Backup vault config.
|
||||
*
|
||||
* @param {string} [backupVaultConfig.storageType] Storage type. Possible
|
||||
* values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
|
||||
*
|
||||
* @param {string} [backupVaultConfig.storageTypeState] Locked or Unlocked.
|
||||
* Once a machine is registered against a resource, the storageTypeState is
|
||||
* always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked'
|
||||
*
|
||||
* @param {string} [backupVaultConfig.enhancedSecurityState] Enabled or
|
||||
* Disabled. Possible values include: 'Invalid', 'Enabled', 'Disabled'
|
||||
*
|
||||
* @param {string} [backupVaultConfig.eTag] Optional ETag.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<BackupVaultConfig>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*/
|
||||
updateWithHttpOperationResponse(resourceGroupName: string, vaultName: string, backupVaultConfig: models.BackupVaultConfig, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.BackupVaultConfig>>;
|
||||
|
||||
/**
|
||||
* Updates vault config model type.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} backupVaultConfig Backup vault config.
|
||||
*
|
||||
* @param {string} [backupVaultConfig.storageType] Storage type. Possible
|
||||
* values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
|
||||
*
|
||||
* @param {string} [backupVaultConfig.storageTypeState] Locked or Unlocked.
|
||||
* Once a machine is registered against a resource, the storageTypeState is
|
||||
* always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked'
|
||||
*
|
||||
* @param {string} [backupVaultConfig.enhancedSecurityState] Enabled or
|
||||
* Disabled. Possible values include: 'Invalid', 'Enabled', 'Disabled'
|
||||
*
|
||||
* @param {string} [backupVaultConfig.eTag] Optional ETag.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {ServiceCallback} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {ServiceCallback|Promise} If a callback was passed as the last
|
||||
* parameter then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned.
|
||||
*
|
||||
* @resolve {BackupVaultConfig} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*
|
||||
* {ServiceCallback} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {BackupVaultConfig} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link BackupVaultConfig} for more information.
|
||||
*
|
||||
* {WebResource} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
update(resourceGroupName: string, vaultName: string, backupVaultConfig: models.BackupVaultConfig, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.BackupVaultConfig>;
|
||||
update(resourceGroupName: string, vaultName: string, backupVaultConfig: models.BackupVaultConfig, callback: ServiceCallback<models.BackupVaultConfig>): void;
|
||||
update(resourceGroupName: string, vaultName: string, backupVaultConfig: models.BackupVaultConfig, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.BackupVaultConfig>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @class
|
||||
* BackupStorageConfigs
|
||||
* __NOTE__: An instance of this class is automatically created for an
|
||||
* instance of the RecoveryServicesClient.
|
||||
*/
|
||||
export interface BackupStorageConfigs {
|
||||
|
||||
|
||||
/**
|
||||
* Fetches resource storage config.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<BackupStorageConfig>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*/
|
||||
getWithHttpOperationResponse(resourceGroupName: string, vaultName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.BackupStorageConfig>>;
|
||||
|
||||
/**
|
||||
* Fetches resource storage config.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {ServiceCallback} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {ServiceCallback|Promise} If a callback was passed as the last
|
||||
* parameter then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned.
|
||||
*
|
||||
* @resolve {BackupStorageConfig} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*
|
||||
* {ServiceCallback} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {BackupStorageConfig} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link BackupStorageConfig} for more information.
|
||||
*
|
||||
* {WebResource} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
get(resourceGroupName: string, vaultName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.BackupStorageConfig>;
|
||||
get(resourceGroupName: string, vaultName: string, callback: ServiceCallback<models.BackupStorageConfig>): void;
|
||||
get(resourceGroupName: string, vaultName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.BackupStorageConfig>): void;
|
||||
|
||||
|
||||
/**
|
||||
* Updates vault storage model type.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} backupStorageConfig Backup storage config.
|
||||
*
|
||||
* @param {string} [backupStorageConfig.storageModelType] Storage model type.
|
||||
* Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
|
||||
*
|
||||
* @param {string} [backupStorageConfig.storageType] Storage type. Possible
|
||||
* values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
|
||||
*
|
||||
* @param {string} [backupStorageConfig.storageTypeState] Locked or Unlocked.
|
||||
* Once a machine is registered against a resource, the storageTypeState is
|
||||
* always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked'
|
||||
*
|
||||
* @param {string} [backupStorageConfig.eTag] Optional ETag.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<null>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*/
|
||||
updateWithHttpOperationResponse(resourceGroupName: string, vaultName: string, backupStorageConfig: models.BackupStorageConfig, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
|
||||
|
||||
/**
|
||||
* Updates vault storage model type.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} backupStorageConfig Backup storage config.
|
||||
*
|
||||
* @param {string} [backupStorageConfig.storageModelType] Storage model type.
|
||||
* Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
|
||||
*
|
||||
* @param {string} [backupStorageConfig.storageType] Storage type. Possible
|
||||
* values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
|
||||
*
|
||||
* @param {string} [backupStorageConfig.storageTypeState] Locked or Unlocked.
|
||||
* Once a machine is registered against a resource, the storageTypeState is
|
||||
* always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked'
|
||||
*
|
||||
* @param {string} [backupStorageConfig.eTag] Optional ETag.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {ServiceCallback} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {ServiceCallback|Promise} If a callback was passed as the last
|
||||
* parameter then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned.
|
||||
*
|
||||
* @resolve {null} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*
|
||||
* {ServiceCallback} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {null} [result] - The deserialized result object if an error did not occur.
|
||||
*
|
||||
* {WebResource} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
update(resourceGroupName: string, vaultName: string, backupStorageConfig: models.BackupStorageConfig, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
|
||||
update(resourceGroupName: string, vaultName: string, backupStorageConfig: models.BackupStorageConfig, callback: ServiceCallback<void>): void;
|
||||
update(resourceGroupName: string, vaultName: string, backupStorageConfig: models.BackupStorageConfig, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @class
|
||||
* VaultCertificates
|
||||
|
@ -339,7 +22,7 @@ export interface VaultCertificates {
|
|||
|
||||
|
||||
/**
|
||||
* Upload a certificate for a resource.
|
||||
* Uploads a certificate for a resource.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
|
@ -374,7 +57,7 @@ export interface VaultCertificates {
|
|||
createWithHttpOperationResponse(resourceGroupName: string, vaultName: string, certificateName: string, certificateRequest: models.CertificateRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.VaultCertificateResponse>>;
|
||||
|
||||
/**
|
||||
* Upload a certificate for a resource.
|
||||
* Uploads a certificate for a resource.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
|
@ -571,6 +254,103 @@ export interface ReplicationUsages {
|
|||
list(resourceGroupName: string, vaultName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ReplicationUsageList>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @class
|
||||
* RecoveryServices
|
||||
* __NOTE__: An instance of this class is automatically created for an
|
||||
* instance of the RecoveryServicesClient.
|
||||
*/
|
||||
export interface RecoveryServices {
|
||||
|
||||
|
||||
/**
|
||||
* @summary API to check for resource name availability.
|
||||
* A name is available if no other resource exists that has the same
|
||||
* SubscriptionId, Resource Name and Type
|
||||
* or if one or more such resources exist, each of these must be GC'd and their
|
||||
* time of deletion be more than 24 Hours Ago
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} location Location of the resource
|
||||
*
|
||||
* @param {object} input Contains information about Resource type and Resource
|
||||
* name
|
||||
*
|
||||
* @param {string} [input.type] Describes the Resource type:
|
||||
* Microsoft.RecoveryServices/Vaults
|
||||
*
|
||||
* @param {string} [input.name] Resource name for which availability needs to
|
||||
* be checked
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<CheckNameAvailabilityResultResource>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*/
|
||||
checkNameAvailabilityWithHttpOperationResponse(resourceGroupName: string, location: string, input: models.CheckNameAvailabilityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.CheckNameAvailabilityResultResource>>;
|
||||
|
||||
/**
|
||||
* @summary API to check for resource name availability.
|
||||
* A name is available if no other resource exists that has the same
|
||||
* SubscriptionId, Resource Name and Type
|
||||
* or if one or more such resources exist, each of these must be GC'd and their
|
||||
* time of deletion be more than 24 Hours Ago
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} location Location of the resource
|
||||
*
|
||||
* @param {object} input Contains information about Resource type and Resource
|
||||
* name
|
||||
*
|
||||
* @param {string} [input.type] Describes the Resource type:
|
||||
* Microsoft.RecoveryServices/Vaults
|
||||
*
|
||||
* @param {string} [input.name] Resource name for which availability needs to
|
||||
* be checked
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {ServiceCallback} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {ServiceCallback|Promise} If a callback was passed as the last
|
||||
* parameter then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned.
|
||||
*
|
||||
* @resolve {CheckNameAvailabilityResultResource} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*
|
||||
* {ServiceCallback} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {CheckNameAvailabilityResultResource} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link CheckNameAvailabilityResultResource} for
|
||||
* more information.
|
||||
*
|
||||
* {WebResource} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
checkNameAvailability(resourceGroupName: string, location: string, input: models.CheckNameAvailabilityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.CheckNameAvailabilityResultResource>;
|
||||
checkNameAvailability(resourceGroupName: string, location: string, input: models.CheckNameAvailabilityParameters, callback: ServiceCallback<models.CheckNameAvailabilityResultResource>): void;
|
||||
checkNameAvailability(resourceGroupName: string, location: string, input: models.CheckNameAvailabilityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CheckNameAvailabilityResultResource>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @class
|
||||
* Vaults
|
||||
|
@ -919,7 +699,7 @@ export interface Vaults {
|
|||
* @param {string} vault.sku.name The Sku name. Possible values include:
|
||||
* 'Standard', 'RS0'
|
||||
*
|
||||
* @param {string} vault.location Resource location.
|
||||
* @param {string} [vault.location] Resource location.
|
||||
*
|
||||
* @param {object} [vault.tags] Resource tags.
|
||||
*
|
||||
|
@ -934,7 +714,7 @@ export interface Vaults {
|
|||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*/
|
||||
updateWithHttpOperationResponse(resourceGroupName: string, vaultName: string, vault: models.Vault, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.Vault>>;
|
||||
updateWithHttpOperationResponse(resourceGroupName: string, vaultName: string, vault: models.PatchVault, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.Vault>>;
|
||||
|
||||
/**
|
||||
* Updates the vault.
|
||||
|
@ -955,7 +735,7 @@ export interface Vaults {
|
|||
* @param {string} vault.sku.name The Sku name. Possible values include:
|
||||
* 'Standard', 'RS0'
|
||||
*
|
||||
* @param {string} vault.location Resource location.
|
||||
* @param {string} [vault.location] Resource location.
|
||||
*
|
||||
* @param {object} [vault.tags] Resource tags.
|
||||
*
|
||||
|
@ -986,9 +766,123 @@ export interface Vaults {
|
|||
*
|
||||
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
update(resourceGroupName: string, vaultName: string, vault: models.Vault, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.Vault>;
|
||||
update(resourceGroupName: string, vaultName: string, vault: models.Vault, callback: ServiceCallback<models.Vault>): void;
|
||||
update(resourceGroupName: string, vaultName: string, vault: models.Vault, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Vault>): void;
|
||||
update(resourceGroupName: string, vaultName: string, vault: models.PatchVault, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.Vault>;
|
||||
update(resourceGroupName: string, vaultName: string, vault: models.PatchVault, callback: ServiceCallback<models.Vault>): void;
|
||||
update(resourceGroupName: string, vaultName: string, vault: models.PatchVault, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Vault>): void;
|
||||
|
||||
|
||||
/**
|
||||
* Fetches all the resources of the specified type in the subscription.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<VaultList>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*/
|
||||
listBySubscriptionIdNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.VaultList>>;
|
||||
|
||||
/**
|
||||
* Fetches all the resources of the specified type in the subscription.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {ServiceCallback} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {ServiceCallback|Promise} If a callback was passed as the last
|
||||
* parameter then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned.
|
||||
*
|
||||
* @resolve {VaultList} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*
|
||||
* {ServiceCallback} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {VaultList} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link VaultList} for more information.
|
||||
*
|
||||
* {WebResource} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listBySubscriptionIdNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.VaultList>;
|
||||
listBySubscriptionIdNext(nextPageLink: string, callback: ServiceCallback<models.VaultList>): void;
|
||||
listBySubscriptionIdNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.VaultList>): void;
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve a list of Vaults.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<VaultList>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*/
|
||||
listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.VaultList>>;
|
||||
|
||||
/**
|
||||
* Retrieve a list of Vaults.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {ServiceCallback} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {ServiceCallback|Promise} If a callback was passed as the last
|
||||
* parameter then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned.
|
||||
*
|
||||
* @resolve {VaultList} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error|ServiceError} - The error object.
|
||||
*
|
||||
* {ServiceCallback} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {VaultList} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link VaultList} for more information.
|
||||
*
|
||||
* {WebResource} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.VaultList>;
|
||||
listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback<models.VaultList>): void;
|
||||
listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.VaultList>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1189,8 +1083,8 @@ export interface VaultExtendedInfoOperations {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -1202,7 +1096,8 @@ export interface VaultExtendedInfoOperations {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
@ -1227,8 +1122,8 @@ export interface VaultExtendedInfoOperations {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -1240,7 +1135,8 @@ export interface VaultExtendedInfoOperations {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
@ -1285,8 +1181,8 @@ export interface VaultExtendedInfoOperations {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -1298,7 +1194,8 @@ export interface VaultExtendedInfoOperations {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
@ -1323,8 +1220,8 @@ export interface VaultExtendedInfoOperations {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -1336,7 +1233,8 @@ export interface VaultExtendedInfoOperations {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
exports.BackupVaultConfigs = require('./backupVaultConfigs');
|
||||
exports.BackupStorageConfigs = require('./backupStorageConfigs');
|
||||
exports.VaultCertificates = require('./vaultCertificates');
|
||||
exports.RegisteredIdentities = require('./registeredIdentities');
|
||||
exports.ReplicationUsages = require('./replicationUsages');
|
||||
exports.RecoveryServices = require('./recoveryServices');
|
||||
exports.Vaults = require('./vaults');
|
||||
exports.Operations = require('./operations');
|
||||
exports.VaultExtendedInfoOperations = require('./vaultExtendedInfoOperations');
|
||||
|
|
|
@ -46,9 +46,11 @@ function _list(options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
|
@ -60,7 +62,7 @@ function _list(options, callback) {
|
|||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'providers/Microsoft.RecoveryServices/operations';
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
|
|
@ -0,0 +1,322 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const msRest = require('ms-rest');
|
||||
const msRestAzure = require('ms-rest-azure');
|
||||
const WebResource = msRest.WebResource;
|
||||
|
||||
/**
|
||||
* @summary API to check for resource name availability.
|
||||
* A name is available if no other resource exists that has the same
|
||||
* SubscriptionId, Resource Name and Type
|
||||
* or if one or more such resources exist, each of these must be GC'd and their
|
||||
* time of deletion be more than 24 Hours Ago
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} location Location of the resource
|
||||
*
|
||||
* @param {object} input Contains information about Resource type and Resource
|
||||
* name
|
||||
*
|
||||
* @param {string} [input.type] Describes the Resource type:
|
||||
* Microsoft.RecoveryServices/Vaults
|
||||
*
|
||||
* @param {string} [input.name] Resource name for which availability needs to
|
||||
* be checked
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link CheckNameAvailabilityResultResource} for
|
||||
* more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _checkNameAvailability(resourceGroupName, location, input, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (location === null || location === undefined || typeof location.valueOf() !== 'string') {
|
||||
throw new Error('location cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (input === null || input === undefined) {
|
||||
throw new Error('input cannot be null or undefined.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/locations/{location}/checkNameAvailability';
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{location}', encodeURIComponent(location));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'POST';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Serialize Request
|
||||
let requestContent = null;
|
||||
let requestModel = null;
|
||||
try {
|
||||
if (input !== null && input !== undefined) {
|
||||
let requestModelMapper = new client.models['CheckNameAvailabilityParameters']().mapper();
|
||||
requestModel = client.serialize(requestModelMapper, input, 'input');
|
||||
requestContent = JSON.stringify(requestModel);
|
||||
}
|
||||
} catch (error) {
|
||||
let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
|
||||
`payload - ${JSON.stringify(input, null, 2)}.`);
|
||||
return callback(serializationError);
|
||||
}
|
||||
httpRequest.body = requestContent;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
|
||||
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
|
||||
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['CloudError']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['CheckNameAvailabilityResultResource']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/** Class representing a RecoveryServices. */
|
||||
class RecoveryServices {
|
||||
/**
|
||||
* Create a RecoveryServices.
|
||||
* @param {RecoveryServicesClient} client Reference to the service client.
|
||||
*/
|
||||
constructor(client) {
|
||||
this.client = client;
|
||||
this._checkNameAvailability = _checkNameAvailability;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary API to check for resource name availability.
|
||||
* A name is available if no other resource exists that has the same
|
||||
* SubscriptionId, Resource Name and Type
|
||||
* or if one or more such resources exist, each of these must be GC'd and their
|
||||
* time of deletion be more than 24 Hours Ago
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} location Location of the resource
|
||||
*
|
||||
* @param {object} input Contains information about Resource type and Resource
|
||||
* name
|
||||
*
|
||||
* @param {string} [input.type] Describes the Resource type:
|
||||
* Microsoft.RecoveryServices/Vaults
|
||||
*
|
||||
* @param {string} [input.name] Resource name for which availability needs to
|
||||
* be checked
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<CheckNameAvailabilityResultResource>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
checkNameAvailabilityWithHttpOperationResponse(resourceGroupName, location, input, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._checkNameAvailability(resourceGroupName, location, input, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary API to check for resource name availability.
|
||||
* A name is available if no other resource exists that has the same
|
||||
* SubscriptionId, Resource Name and Type
|
||||
* or if one or more such resources exist, each of these must be GC'd and their
|
||||
* time of deletion be more than 24 Hours Ago
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
*
|
||||
* @param {string} location Location of the resource
|
||||
*
|
||||
* @param {object} input Contains information about Resource type and Resource
|
||||
* name
|
||||
*
|
||||
* @param {string} [input.type] Describes the Resource type:
|
||||
* Microsoft.RecoveryServices/Vaults
|
||||
*
|
||||
* @param {string} [input.name] Resource name for which availability needs to
|
||||
* be checked
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {CheckNameAvailabilityResultResource} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link CheckNameAvailabilityResultResource} for
|
||||
* more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
checkNameAvailability(resourceGroupName, location, input, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._checkNameAvailability(resourceGroupName, location, input, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._checkNameAvailability(resourceGroupName, location, input, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = RecoveryServices;
|
|
@ -51,12 +51,14 @@ function _deleteMethod(resourceGroupName, vaultName, identityName, options, call
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -81,7 +83,7 @@ function _deleteMethod(resourceGroupName, vaultName, identityName, options, call
|
|||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
requestUrl = requestUrl.replace('{identityName}', encodeURIComponent(identityName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
|
|
@ -50,12 +50,14 @@ function _list(resourceGroupName, vaultName, options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -76,7 +78,7 @@ function _list(resourceGroupName, vaultName, options, callback) {
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
|
|
@ -50,12 +50,14 @@ function _listByVaults(resourceGroupName, vaultName, options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -76,7 +78,7 @@ function _listByVaults(resourceGroupName, vaultName, options, callback) {
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ const msRestAzure = require('ms-rest-azure');
|
|||
const WebResource = msRest.WebResource;
|
||||
|
||||
/**
|
||||
* Upload a certificate for a resource.
|
||||
* Uploads a certificate for a resource.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
|
@ -65,12 +65,14 @@ function _create(resourceGroupName, vaultName, certificateName, certificateReque
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -98,7 +100,7 @@ function _create(resourceGroupName, vaultName, certificateName, certificateReque
|
|||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -206,7 +208,7 @@ class VaultCertificates {
|
|||
}
|
||||
|
||||
/**
|
||||
* Upload a certificate for a resource.
|
||||
* Uploads a certificate for a resource.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
|
@ -253,7 +255,7 @@ class VaultCertificates {
|
|||
}
|
||||
|
||||
/**
|
||||
* Upload a certificate for a resource.
|
||||
* Uploads a certificate for a resource.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group where the
|
||||
* recovery services vault is present.
|
||||
|
|
|
@ -51,12 +51,14 @@ function _get(resourceGroupName, vaultName, options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -77,7 +79,7 @@ function _get(resourceGroupName, vaultName, options, callback) {
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -167,8 +169,8 @@ function _get(resourceGroupName, vaultName, options, callback) {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -180,7 +182,8 @@ function _get(resourceGroupName, vaultName, options, callback) {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
@ -213,7 +216,6 @@ function _createOrUpdate(resourceGroupName, vaultName, resourceResourceExtendedI
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
|
@ -225,6 +227,9 @@ function _createOrUpdate(resourceGroupName, vaultName, resourceResourceExtendedI
|
|||
if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') {
|
||||
throw new Error('vaultName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceResourceExtendedInfoDetails === null || resourceResourceExtendedInfoDetails === undefined) {
|
||||
throw new Error('resourceResourceExtendedInfoDetails cannot be null or undefined.');
|
||||
}
|
||||
|
@ -242,7 +247,7 @@ function _createOrUpdate(resourceGroupName, vaultName, resourceResourceExtendedI
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -346,8 +351,8 @@ function _createOrUpdate(resourceGroupName, vaultName, resourceResourceExtendedI
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -359,7 +364,8 @@ function _createOrUpdate(resourceGroupName, vaultName, resourceResourceExtendedI
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
@ -392,7 +398,6 @@ function _update(resourceGroupName, vaultName, resourceResourceExtendedInfoDetai
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
|
@ -404,6 +409,9 @@ function _update(resourceGroupName, vaultName, resourceResourceExtendedInfoDetai
|
|||
if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') {
|
||||
throw new Error('vaultName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceResourceExtendedInfoDetails === null || resourceResourceExtendedInfoDetails === undefined) {
|
||||
throw new Error('resourceResourceExtendedInfoDetails cannot be null or undefined.');
|
||||
}
|
||||
|
@ -421,7 +429,7 @@ function _update(resourceGroupName, vaultName, resourceResourceExtendedInfoDetai
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -627,8 +635,8 @@ class VaultExtendedInfoOperations {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -640,7 +648,8 @@ class VaultExtendedInfoOperations {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
@ -677,8 +686,8 @@ class VaultExtendedInfoOperations {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -690,7 +699,8 @@ class VaultExtendedInfoOperations {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
@ -750,8 +760,8 @@ class VaultExtendedInfoOperations {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -763,7 +773,8 @@ class VaultExtendedInfoOperations {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
@ -800,8 +811,8 @@ class VaultExtendedInfoOperations {
|
|||
*
|
||||
* @param {string} vaultName The name of the recovery services vault.
|
||||
*
|
||||
* @param {object} resourceResourceExtendedInfoDetails
|
||||
* resourceResourceExtendedInfoDetails
|
||||
* @param {object} resourceResourceExtendedInfoDetails Details of
|
||||
* ResourceExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.integrityKey] Integrity
|
||||
* key.
|
||||
|
@ -813,7 +824,8 @@ class VaultExtendedInfoOperations {
|
|||
* [resourceResourceExtendedInfoDetails.encryptionKeyThumbprint] Encryption key
|
||||
* thumbprint.
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm.
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.algorithm] Algorithm
|
||||
* for Vault ExtendedInfo
|
||||
*
|
||||
* @param {string} [resourceResourceExtendedInfoDetails.eTag] Optional ETag.
|
||||
*
|
||||
|
|
|
@ -45,12 +45,14 @@ function _listBySubscriptionId(options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
|
@ -63,7 +65,7 @@ function _listBySubscriptionId(options, callback) {
|
|||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults';
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -179,12 +181,14 @@ function _listByResourceGroup(resourceGroupName, options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -201,7 +205,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) {
|
|||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -319,12 +323,14 @@ function _get(resourceGroupName, vaultName, options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -345,7 +351,7 @@ function _get(resourceGroupName, vaultName, options, callback) {
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -478,12 +484,14 @@ function _createOrUpdate(resourceGroupName, vaultName, vault, options, callback)
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -507,7 +515,7 @@ function _createOrUpdate(resourceGroupName, vaultName, vault, options, callback)
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -655,12 +663,14 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -681,7 +691,7 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) {
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -765,7 +775,7 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) {
|
|||
* @param {string} vault.sku.name The Sku name. Possible values include:
|
||||
* 'Standard', 'RS0'
|
||||
*
|
||||
* @param {string} vault.location Resource location.
|
||||
* @param {string} [vault.location] Resource location.
|
||||
*
|
||||
* @param {object} [vault.tags] Resource tags.
|
||||
*
|
||||
|
@ -797,12 +807,14 @@ function _update(resourceGroupName, vaultName, vault, options, callback) {
|
|||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let apiVersion = '2016-06-01';
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -826,7 +838,7 @@ function _update(resourceGroupName, vaultName, vault, options, callback) {
|
|||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -856,7 +868,7 @@ function _update(resourceGroupName, vaultName, vault, options, callback) {
|
|||
let requestModel = null;
|
||||
try {
|
||||
if (vault !== null && vault !== undefined) {
|
||||
let requestModelMapper = new client.models['Vault']().mapper();
|
||||
let requestModelMapper = new client.models['PatchVault']().mapper();
|
||||
requestModel = client.serialize(requestModelMapper, vault, 'vault');
|
||||
requestContent = JSON.stringify(requestModel);
|
||||
}
|
||||
|
@ -939,6 +951,260 @@ function _update(resourceGroupName, vaultName, vault, options, callback) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches all the resources of the specified type in the subscription.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link VaultList} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listBySubscriptionIdNext(nextPageLink, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') {
|
||||
throw new Error('nextPageLink cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let requestUrl = '{nextLink}';
|
||||
requestUrl = requestUrl.replace('{nextLink}', nextPageLink);
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'GET';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
|
||||
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
|
||||
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['CloudError']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['VaultList']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a list of Vaults.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link VaultList} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listByResourceGroupNext(nextPageLink, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') {
|
||||
throw new Error('nextPageLink cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let requestUrl = '{nextLink}';
|
||||
requestUrl = requestUrl.replace('{nextLink}', nextPageLink);
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'GET';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
|
||||
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
|
||||
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['CloudError']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['VaultList']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/** Class representing a Vaults. */
|
||||
class Vaults {
|
||||
/**
|
||||
|
@ -953,6 +1219,8 @@ class Vaults {
|
|||
this._createOrUpdate = _createOrUpdate;
|
||||
this._deleteMethod = _deleteMethod;
|
||||
this._update = _update;
|
||||
this._listBySubscriptionIdNext = _listBySubscriptionIdNext;
|
||||
this._listByResourceGroupNext = _listByResourceGroupNext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1429,7 +1697,7 @@ class Vaults {
|
|||
* @param {string} vault.sku.name The Sku name. Possible values include:
|
||||
* 'Standard', 'RS0'
|
||||
*
|
||||
* @param {string} vault.location Resource location.
|
||||
* @param {string} [vault.location] Resource location.
|
||||
*
|
||||
* @param {object} [vault.tags] Resource tags.
|
||||
*
|
||||
|
@ -1477,7 +1745,7 @@ class Vaults {
|
|||
* @param {string} vault.sku.name The Sku name. Possible values include:
|
||||
* 'Standard', 'RS0'
|
||||
*
|
||||
* @param {string} vault.location Resource location.
|
||||
* @param {string} [vault.location] Resource location.
|
||||
*
|
||||
* @param {object} [vault.tags] Resource tags.
|
||||
*
|
||||
|
@ -1528,6 +1796,174 @@ class Vaults {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches all the resources of the specified type in the subscription.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<VaultList>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listBySubscriptionIdNextWithHttpOperationResponse(nextPageLink, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listBySubscriptionIdNext(nextPageLink, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches all the resources of the specified type in the subscription.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {VaultList} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link VaultList} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listBySubscriptionIdNext(nextPageLink, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listBySubscriptionIdNext(nextPageLink, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listBySubscriptionIdNext(nextPageLink, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a list of Vaults.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<VaultList>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a list of Vaults.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {VaultList} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link VaultList} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listByResourceGroupNext(nextPageLink, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listByResourceGroupNext(nextPageLink, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Vaults;
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
|
||||
import { ServiceClientCredentials } from 'ms-rest';
|
||||
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
|
||||
import * as models from "./models";
|
||||
import * as operations from "./operations";
|
||||
|
||||
declare class RecoveryServicesClient extends AzureServiceClient {
|
||||
export default class RecoveryServicesClient extends AzureServiceClient {
|
||||
/**
|
||||
* Initializes a new instance of the RecoveryServicesClient class.
|
||||
* @constructor
|
||||
|
@ -33,11 +34,11 @@ declare class RecoveryServicesClient extends AzureServiceClient {
|
|||
*
|
||||
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
|
||||
*
|
||||
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
|
||||
* @param {string} [options.acceptLanguage] - The preferred language for the response.
|
||||
*
|
||||
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
|
||||
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
|
||||
*
|
||||
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
|
||||
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
|
||||
*
|
||||
*/
|
||||
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);
|
||||
|
@ -46,6 +47,8 @@ declare class RecoveryServicesClient extends AzureServiceClient {
|
|||
|
||||
subscriptionId: string;
|
||||
|
||||
apiVersion: string;
|
||||
|
||||
acceptLanguage: string;
|
||||
|
||||
longRunningOperationRetryTimeout: number;
|
||||
|
@ -53,15 +56,14 @@ declare class RecoveryServicesClient extends AzureServiceClient {
|
|||
generateClientRequestId: boolean;
|
||||
|
||||
// Operation groups
|
||||
backupVaultConfigs: operations.BackupVaultConfigs;
|
||||
backupStorageConfigs: operations.BackupStorageConfigs;
|
||||
vaultCertificates: operations.VaultCertificates;
|
||||
registeredIdentities: operations.RegisteredIdentities;
|
||||
replicationUsages: operations.ReplicationUsages;
|
||||
recoveryServices: operations.RecoveryServices;
|
||||
vaults: operations.Vaults;
|
||||
operations: operations.Operations;
|
||||
vaultExtendedInfoOperations: operations.VaultExtendedInfoOperations;
|
||||
usages: operations.Usages;
|
||||
}
|
||||
|
||||
export = RecoveryServicesClient;
|
||||
export { RecoveryServicesClient, models as RecoveryServicesModels };
|
||||
|
|
|
@ -34,9 +34,9 @@ class RecoveryServicesClient extends ServiceClient {
|
|||
* @param {object} [options.requestOptions] - Options for the underlying request object
|
||||
* {@link https://github.com/request/request#requestoptions-callback Options doc}
|
||||
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
|
||||
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
|
||||
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
|
||||
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
|
||||
* @param {string} [options.acceptLanguage] - The preferred language for the response.
|
||||
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
|
||||
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
|
||||
*/
|
||||
constructor(credentials, subscriptionId, baseUri, options) {
|
||||
if (credentials === null || credentials === undefined) {
|
||||
|
@ -50,6 +50,7 @@ class RecoveryServicesClient extends ServiceClient {
|
|||
|
||||
super(credentials, options);
|
||||
|
||||
this.apiVersion = '2016-06-01';
|
||||
this.acceptLanguage = 'en-US';
|
||||
this.longRunningOperationRetryTimeout = 30;
|
||||
this.generateClientRequestId = true;
|
||||
|
@ -71,11 +72,10 @@ class RecoveryServicesClient extends ServiceClient {
|
|||
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
|
||||
this.generateClientRequestId = options.generateClientRequestId;
|
||||
}
|
||||
this.backupVaultConfigs = new operations.BackupVaultConfigs(this);
|
||||
this.backupStorageConfigs = new operations.BackupStorageConfigs(this);
|
||||
this.vaultCertificates = new operations.VaultCertificates(this);
|
||||
this.registeredIdentities = new operations.RegisteredIdentities(this);
|
||||
this.replicationUsages = new operations.ReplicationUsages(this);
|
||||
this.recoveryServices = new operations.RecoveryServices(this);
|
||||
this.vaults = new operations.Vaults(this);
|
||||
this.operations = new operations.Operations(this);
|
||||
this.vaultExtendedInfoOperations = new operations.VaultExtendedInfoOperations(this);
|
||||
|
@ -87,3 +87,6 @@ class RecoveryServicesClient extends ServiceClient {
|
|||
}
|
||||
|
||||
module.exports = RecoveryServicesClient;
|
||||
module.exports['default'] = RecoveryServicesClient;
|
||||
module.exports.RecoveryServicesClient = RecoveryServicesClient;
|
||||
module.exports.RecoveryServicesModels = models;
|
||||
|
|
|
@ -1,35 +1,28 @@
|
|||
{
|
||||
"name": "azure-arm-recoveryservices",
|
||||
"author": "Microsoft Corporation",
|
||||
"contributors": [
|
||||
"Bangari, Anudeep <anudeeb@microsoft.com>"
|
||||
],
|
||||
"version": "2.1.0-preview",
|
||||
"description": "Microsoft Azure RecoveryServices Management Client Library for node",
|
||||
"tags": [
|
||||
"azure",
|
||||
"sdk"
|
||||
],
|
||||
"description": "RecoveryServicesClient Library with typescript type definitions for node",
|
||||
"version": "3.0.0",
|
||||
"dependencies": {
|
||||
"ms-rest": "^2.5.0",
|
||||
"ms-rest-azure": "^2.5.5"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./lib/recoveryServicesClient.js",
|
||||
"types": "./lib/recoveryServicesClient.d.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms-rest": "^2.3.0",
|
||||
"ms-rest-azure": "^2.5.0"
|
||||
},
|
||||
"homepage": "http://github.com/Azure/azure-sdk-for-node",
|
||||
"homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/recoveryServicesManagement",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:Azure/azure-sdk-for-node.git"
|
||||
"url": "https://github.com/azure/azure-sdk-for-node.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "http://github.com/Azure/azure-sdk-for-node/issues"
|
||||
"url": "https://github.com/azure/azure-sdk-for-node/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm -s run-script jshint"
|
||||
"postinstall": "node .scripts/postinstall.js"
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче