Generate azure-arm-hanaonazure package (#5071)

* Generate azure-arm-hanaonazure package

* Bump the version
This commit is contained in:
Kamil Pajdzik 2019-04-17 20:51:13 -07:00 коммит произвёл GitHub
Родитель d427e984b3
Коммит a5c755879d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
22 изменённых файлов: 1855 добавлений и 310 удалений

Просмотреть файл

@ -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-hanaonazure${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,21 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Просмотреть файл

@ -1,43 +1,44 @@
---
uid: azure-arm-hanaonazure
summary: *content
---
# Microsoft Azure SDK for Node.js - HanaManagementClient
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-hanaonazure
```
## How to use
### Authentication, client creation and list operations as an example.
```javascript
const msRestAzure = require("ms-rest-azure");
const HanaManagementClient = require("azure-arm-hanaonazure");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new HanaManagementClient(creds, subscriptionId);
return client.operations.list().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
- [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%2FhanaonazureManagement%2FREADME.png)
---
uid: azure-arm-hanaonazure
summary: *content
---
**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-hanaonazure) 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 - HanaManagementClient
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-hanaonazure
```
### How to use
#### Authentication, client creation, and list operations as an example.
```javascript
const msRestAzure = require("ms-rest-azure");
const HanaManagementClient = require("azure-arm-hanaonazure");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new HanaManagementClient(creds, subscriptionId);
return client.operations.list().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
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)

Просмотреть файл

@ -17,12 +17,12 @@
class Disk {
/**
* Create a Disk.
* @member {string} [name] The disk name.
* @member {number} [diskSizeGB] Specifies the size of an empty data disk in
* gigabytes.
* @member {number} [lun] Specifies the logical unit number of the data disk.
* This value is used to identify data disks within the VM and therefore must
* be unique for each data disk attached to a VM.
* @property {string} [name] The disk name.
* @property {number} [diskSizeGB] Specifies the size of an empty data disk
* in gigabytes.
* @property {number} [lun] Specifies the logical unit number of the data
* disk. This value is used to identify data disks within the VM and
* therefore must be unique for each data disk attached to a VM.
*/
constructor() {
}

Просмотреть файл

@ -17,24 +17,24 @@
class Display {
/**
* Create a Display.
* @member {string} [provider] The localized friendly form of the resource
* @property {string} [provider] The localized friendly form of the resource
* provider name. This form is also expected to include the publisher/company
* responsible. Use Title Casing. Begin with "Microsoft" for 1st party
* services.
* @member {string} [resource] The localized friendly form of the resource
* @property {string} [resource] The localized friendly form of the resource
* type related to this action/operation. This form should match the public
* documentation for the resource provider. Use Title Casing. For examples,
* refer to the name section.
* @member {string} [operation] The localized friendly name for the operation
* as shown to the user. This name should be concise (to fit in drop downs),
* but clear (self-documenting). Use Title Casing and include the
* entity/resource to which it applies.
* @member {string} [description] The localized friendly description for the
* operation as shown to the user. This description should be thorough, yet
* concise. It will be used in tool-tips and detailed views.
* @member {string} [origin] The intended executor of the operation; governs
* the display of the operation in the RBAC UX and the audit logs UX. Default
* value is 'user,system'
* @property {string} [operation] The localized friendly name for the
* operation as shown to the user. This name should be concise (to fit in
* drop downs), but clear (self-documenting). Use Title Casing and include
* the entity/resource to which it applies.
* @property {string} [description] The localized friendly description for
* the operation as shown to the user. This description should be thorough,
* yet concise. It will be used in tool-tips and detailed views.
* @property {string} [origin] The intended executor of the operation;
* governs the display of the operation in the RBAC UX and the audit logs UX.
* Default value is 'user,system'
*/
constructor() {
}

Просмотреть файл

@ -17,8 +17,8 @@
class ErrorResponse {
/**
* Create a ErrorResponse.
* @member {string} [code] Error code
* @member {string} [message] Error message indicating why the operation
* @property {string} [code] Error code
* @property {string} [message] Error message indicating why the operation
* failed.
*/
constructor() {

Просмотреть файл

@ -20,39 +20,42 @@ const models = require('./index');
class HanaInstance extends models['Resource'] {
/**
* Create a HanaInstance.
* @member {object} [hardwareProfile] Specifies the hardware settings for the
* HANA instance.
* @member {string} [hardwareProfile.hardwareType] Name of the hardware type
* (vendor and/or their product name). Possible values include: 'Cisco_UCS',
* 'HPE'
* @member {string} [hardwareProfile.hanaInstanceSize] Specifies the HANA
* @property {object} [hardwareProfile] Specifies the hardware settings for
* the HANA instance.
* @property {string} [hardwareProfile.hardwareType] Name of the hardware
* type (vendor and/or their product name). Possible values include:
* 'Cisco_UCS', 'HPE'
* @property {string} [hardwareProfile.hanaInstanceSize] Specifies the HANA
* instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144',
* 'S192', 'S192m', 'S192xm', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m',
* 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m'
* @member {object} [storageProfile] Specifies the storage settings for the
* 'S192', 'S192m', 'S192xm', 'S96', 'S384', 'S384m', 'S384xm', 'S384xxm',
* 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m'
* @property {object} [storageProfile] Specifies the storage settings for the
* HANA instance disks.
* @member {string} [storageProfile.nfsIpAddress] IP Address to connect to
* @property {string} [storageProfile.nfsIpAddress] IP Address to connect to
* storage.
* @member {array} [storageProfile.osDisks] Specifies information about the
* @property {array} [storageProfile.osDisks] Specifies information about the
* operating system disk used by the hana instance.
* @member {object} [osProfile] Specifies the operating system settings for
* @property {object} [osProfile] Specifies the operating system settings for
* the HANA instance.
* @member {string} [osProfile.computerName] Specifies the host OS name of
* @property {string} [osProfile.computerName] Specifies the host OS name of
* the HANA instance.
* @member {string} [osProfile.osType] This property allows you to specify
* @property {string} [osProfile.osType] This property allows you to specify
* the type of the OS.
* @member {string} [osProfile.version] Specifies version of operating
* @property {string} [osProfile.version] Specifies version of operating
* system.
* @member {object} [networkProfile] Specifies the network settings for the
* @property {object} [networkProfile] Specifies the network settings for the
* HANA instance.
* @member {array} [networkProfile.networkInterfaces] Specifies the network
* @property {array} [networkProfile.networkInterfaces] Specifies the network
* interfaces for the HANA instance.
* @member {string} [networkProfile.circuitId] Specifies the circuit id for
* @property {string} [networkProfile.circuitId] Specifies the circuit id for
* connecting to express route.
* @member {string} [hanaInstanceId] Specifies the HANA instance unique ID.
* @member {string} [powerState] Resource power state. Possible values
* @property {string} [hanaInstanceId] Specifies the HANA instance unique ID.
* @property {string} [powerState] Resource power state. Possible values
* include: 'starting', 'started', 'stopping', 'stopped', 'restarting',
* 'unknown'
* @property {string} [proximityPlacementGroup] Resource proximity placement
* group
* @property {string} [hwRevision] Hardware revision of a HANA instance
*/
constructor() {
super();
@ -166,6 +169,22 @@ class HanaInstance extends models['Resource'] {
type: {
name: 'String'
}
},
proximityPlacementGroup: {
required: false,
readOnly: true,
serializedName: 'properties.proximityPlacementGroup',
type: {
name: 'String'
}
},
hwRevision: {
required: false,
readOnly: true,
serializedName: 'properties.hwRevision',
type: {
name: 'String'
}
}
}
}

Просмотреть файл

@ -16,7 +16,8 @@
class HanaInstancesListResult extends Array {
/**
* Create a HanaInstancesListResult.
* @member {string} [nextLink] The URL to get the next set of HANA instances.
* @property {string} [nextLink] The URL to get the next set of HANA
* instances.
*/
constructor() {
super();

Просмотреть файл

@ -17,12 +17,12 @@
class HardwareProfile {
/**
* Create a HardwareProfile.
* @member {string} [hardwareType] Name of the hardware type (vendor and/or
* @property {string} [hardwareType] Name of the hardware type (vendor and/or
* their product name). Possible values include: 'Cisco_UCS', 'HPE'
* @member {string} [hanaInstanceSize] Specifies the HANA instance SKU.
* @property {string} [hanaInstanceSize] Specifies the HANA instance SKU.
* Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m',
* 'S192xm', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768',
* 'S768m', 'S768xm', 'S960m'
* 'S192xm', 'S96', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm',
* 'S768', 'S768m', 'S768xm', 'S960m'
*/
constructor() {
}

Просмотреть файл

@ -1,288 +1,297 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { BaseResource } from 'ms-rest-azure';
import { CloudError } from 'ms-rest-azure';
import * as moment from 'moment';
import { BaseResource, CloudError } from "ms-rest-azure";
import * as moment from "moment";
export { BaseResource } from 'ms-rest-azure';
export { CloudError } from 'ms-rest-azure';
export {
BaseResource,
CloudError
};
/**
* @class
* Initializes a new instance of the Resource class.
* @constructor
* The resource model definition.
*
* @member {string} [id] Resource ID
* @member {string} [name] Resource name
* @member {string} [type] Resource type
* @member {string} [location] Resource location
* @member {object} [tags] Resource tags
*/
export interface Resource extends BaseResource {
/**
* Resource ID
*/
readonly id?: string;
/**
* Resource name
*/
readonly name?: string;
/**
* Resource type
*/
readonly type?: string;
/**
* Resource location
*/
readonly location?: string;
/**
* Resource tags
*/
readonly tags?: { [propertyName: string]: string };
}
/**
* @class
* Initializes a new instance of the HardwareProfile class.
* @constructor
* Specifies the hardware settings for the HANA instance.
*
* @member {string} [hardwareType] Name of the hardware type (vendor and/or
* their product name). Possible values include: 'Cisco_UCS', 'HPE'
* @member {string} [hanaInstanceSize] Specifies the HANA instance SKU.
* Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m',
* 'S192xm', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768',
* 'S768m', 'S768xm', 'S960m'
*/
export interface HardwareProfile {
/**
* Name of the hardware type (vendor and/or their product name). Possible values include:
* 'Cisco_UCS', 'HPE'
*/
readonly hardwareType?: string;
/**
* Specifies the HANA instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144',
* 'S192', 'S192m', 'S192xm', 'S96', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm',
* 'S768', 'S768m', 'S768xm', 'S960m'
*/
readonly hanaInstanceSize?: string;
}
/**
* @class
* Initializes a new instance of the Disk class.
* @constructor
* Specifies the disk information fo the HANA instance
*
* @member {string} [name] The disk name.
* @member {number} [diskSizeGB] Specifies the size of an empty data disk in
* gigabytes.
* @member {number} [lun] Specifies the logical unit number of the data disk.
* This value is used to identify data disks within the VM and therefore must
* be unique for each data disk attached to a VM.
*/
export interface Disk {
/**
* The disk name.
*/
name?: string;
/**
* Specifies the size of an empty data disk in gigabytes.
*/
diskSizeGB?: number;
/**
* Specifies the logical unit number of the data disk. This value is used to identify data disks
* within the VM and therefore must be unique for each data disk attached to a VM.
*/
readonly lun?: number;
}
/**
* @class
* Initializes a new instance of the StorageProfile class.
* @constructor
* Specifies the storage settings for the HANA instance disks.
*
* @member {string} [nfsIpAddress] IP Address to connect to storage.
* @member {array} [osDisks] Specifies information about the operating system
* disk used by the hana instance.
*/
export interface StorageProfile {
/**
* IP Address to connect to storage.
*/
readonly nfsIpAddress?: string;
/**
* Specifies information about the operating system disk used by the hana instance.
*/
osDisks?: Disk[];
}
/**
* @class
* Initializes a new instance of the OSProfile class.
* @constructor
* Specifies the operating system settings for the HANA instance.
*
* @member {string} [computerName] Specifies the host OS name of the HANA
* instance.
* @member {string} [osType] This property allows you to specify the type of
* the OS.
* @member {string} [version] Specifies version of operating system.
*/
export interface OSProfile {
/**
* Specifies the host OS name of the HANA instance.
*/
readonly computerName?: string;
/**
* This property allows you to specify the type of the OS.
*/
readonly osType?: string;
/**
* Specifies version of operating system.
*/
readonly version?: string;
}
/**
* @class
* Initializes a new instance of the IpAddress class.
* @constructor
* Specifies the IP address of the network interaface.
*
* @member {string} [ipAddress] Specifies the IP address of the network
* interface.
* Specifies the IP address of the network interface.
*/
export interface IpAddress {
/**
* Specifies the IP address of the network interface.
*/
readonly ipAddress?: string;
}
/**
* @class
* Initializes a new instance of the NetworkProfile class.
* @constructor
* Specifies the network settings for the HANA instance disks.
*
* @member {array} [networkInterfaces] Specifies the network interfaces for the
* HANA instance.
* @member {string} [circuitId] Specifies the circuit id for connecting to
* express route.
*/
export interface NetworkProfile {
/**
* Specifies the network interfaces for the HANA instance.
*/
networkInterfaces?: IpAddress[];
/**
* Specifies the circuit id for connecting to express route.
*/
readonly circuitId?: string;
}
/**
* @class
* Initializes a new instance of the HanaInstance class.
* @constructor
* HANA instance info on Azure (ARM properties and HANA properties)
*
* @member {object} [hardwareProfile] Specifies the hardware settings for the
* HANA instance.
* @member {string} [hardwareProfile.hardwareType] Name of the hardware type
* (vendor and/or their product name). Possible values include: 'Cisco_UCS',
* 'HPE'
* @member {string} [hardwareProfile.hanaInstanceSize] Specifies the HANA
* instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144',
* 'S192', 'S192m', 'S192xm', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m',
* 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m'
* @member {object} [storageProfile] Specifies the storage settings for the
* HANA instance disks.
* @member {string} [storageProfile.nfsIpAddress] IP Address to connect to
* storage.
* @member {array} [storageProfile.osDisks] Specifies information about the
* operating system disk used by the hana instance.
* @member {object} [osProfile] Specifies the operating system settings for the
* HANA instance.
* @member {string} [osProfile.computerName] Specifies the host OS name of the
* HANA instance.
* @member {string} [osProfile.osType] This property allows you to specify the
* type of the OS.
* @member {string} [osProfile.version] Specifies version of operating system.
* @member {object} [networkProfile] Specifies the network settings for the
* HANA instance.
* @member {array} [networkProfile.networkInterfaces] Specifies the network
* interfaces for the HANA instance.
* @member {string} [networkProfile.circuitId] Specifies the circuit id for
* connecting to express route.
* @member {string} [hanaInstanceId] Specifies the HANA instance unique ID.
* @member {string} [powerState] Resource power state. Possible values include:
* 'starting', 'started', 'stopping', 'stopped', 'restarting', 'unknown'
*/
export interface HanaInstance extends Resource {
/**
* Specifies the hardware settings for the HANA instance.
*/
hardwareProfile?: HardwareProfile;
/**
* Specifies the storage settings for the HANA instance disks.
*/
storageProfile?: StorageProfile;
/**
* Specifies the operating system settings for the HANA instance.
*/
osProfile?: OSProfile;
/**
* Specifies the network settings for the HANA instance.
*/
networkProfile?: NetworkProfile;
/**
* Specifies the HANA instance unique ID.
*/
readonly hanaInstanceId?: string;
/**
* Resource power state. Possible values include: 'starting', 'started', 'stopping', 'stopped',
* 'restarting', 'unknown'
*/
readonly powerState?: string;
/**
* Resource proximity placement group
*/
readonly proximityPlacementGroup?: string;
/**
* Hardware revision of a HANA instance
*/
readonly hwRevision?: string;
}
/**
* @class
* Initializes a new instance of the Display class.
* @constructor
* Detailed HANA operation information
*
* @member {string} [provider] The localized friendly form of the resource
* provider name. This form is also expected to include the publisher/company
* responsible. Use Title Casing. Begin with "Microsoft" for 1st party
* services.
* @member {string} [resource] The localized friendly form of the resource type
* related to this action/operation. This form should match the public
* documentation for the resource provider. Use Title Casing. For examples,
* refer to the name section.
* @member {string} [operation] The localized friendly name for the operation
* as shown to the user. This name should be concise (to fit in drop downs),
* but clear (self-documenting). Use Title Casing and include the
* entity/resource to which it applies.
* @member {string} [description] The localized friendly description for the
* operation as shown to the user. This description should be thorough, yet
* concise. It will be used in tool-tips and detailed views.
* @member {string} [origin] The intended executor of the operation; governs
* the display of the operation in the RBAC UX and the audit logs UX. Default
* value is 'user,system'
*/
export interface Display {
/**
* The localized friendly form of the resource provider name. This form is also expected to
* include the publisher/company responsible. Use Title Casing. Begin with "Microsoft" for 1st
* party services.
*/
readonly provider?: string;
/**
* The localized friendly form of the resource type related to this action/operation. This form
* should match the public documentation for the resource provider. Use Title Casing. For
* examples, refer to the name section.
*/
readonly resource?: string;
/**
* The localized friendly name for the operation as shown to the user. This name should be
* concise (to fit in drop downs), but clear (self-documenting). Use Title Casing and include the
* entity/resource to which it applies.
*/
readonly operation?: string;
/**
* The localized friendly description for the operation as shown to the user. This description
* should be thorough, yet concise. It will be used in tool-tips and detailed views.
*/
readonly description?: string;
/**
* The intended executor of the operation; governs the display of the operation in the RBAC UX
* and the audit logs UX. Default value is 'user,system'
*/
readonly origin?: string;
}
/**
* @class
* Initializes a new instance of the Operation class.
* @constructor
* HANA operation information
*
* @member {string} [name] The name of the operation being performed on this
* particular object. This name should match the action name that appears in
* RBAC / the event service.
* @member {object} [display] Displayed HANA operation information
* @member {string} [display.provider] The localized friendly form of the
* resource provider name. This form is also expected to include the
* publisher/company responsible. Use Title Casing. Begin with "Microsoft" for
* 1st party services.
* @member {string} [display.resource] The localized friendly form of the
* resource type related to this action/operation. This form should match the
* public documentation for the resource provider. Use Title Casing. For
* examples, refer to the name section.
* @member {string} [display.operation] The localized friendly name for the
* operation as shown to the user. This name should be concise (to fit in drop
* downs), but clear (self-documenting). Use Title Casing and include the
* entity/resource to which it applies.
* @member {string} [display.description] The localized friendly description
* for the operation as shown to the user. This description should be thorough,
* yet concise. It will be used in tool-tips and detailed views.
* @member {string} [display.origin] The intended executor of the operation;
* governs the display of the operation in the RBAC UX and the audit logs UX.
* Default value is 'user,system'
*/
export interface Operation {
/**
* The name of the operation being performed on this particular object. This name should match
* the action name that appears in RBAC / the event service.
*/
readonly name?: string;
/**
* Displayed HANA operation information
*/
display?: Display;
}
/**
* @class
* Initializes a new instance of the ErrorResponse class.
* @constructor
* Describes the format of Error response.
*
* @member {string} [code] Error code
* @member {string} [message] Error message indicating why the operation
* failed.
*/
export interface ErrorResponse {
/**
* Error code
*/
code?: string;
/**
* Error message indicating why the operation failed.
*/
message?: string;
}
/**
* Tags field of the HANA instance.
*/
export interface Tags {
/**
* Tags field of the HANA instance.
*/
tags?: { [propertyName: string]: string };
}
/**
* Details needed to monitor a Hana Instance
*/
export interface MonitoringDetails {
/**
* ARM ID of an Azure Vnet with access to the HANA instance.
*/
hanaVnet?: string;
/**
* Hostname of the HANA Instance blade.
*/
hanaHostname?: string;
/**
* A number between 00 and 99, stored as a string to maintain leading zero.
*/
hanaInstanceNum?: string;
/**
* Either single or multiple depending on the use of MDC(Multiple Database Containers). Possible
* values include: 'single', 'multiple'
*/
dbContainer?: string;
/**
* Name of the database itself. It only needs to be specified if using MDC
*/
hanaDatabase?: string;
/**
* Username for the HANA database to login to for monitoring
*/
hanaDbUsername?: string;
/**
* Password for the HANA database to login for monitoring
*/
hanaDbPassword?: string;
}
/**
* @class
* Initializes a new instance of the OperationList class.
* @constructor
* List of HANA operations
*
*/
export interface OperationList extends Array<Operation> {
}
/**
* @class
* Initializes a new instance of the HanaInstancesListResult class.
* @constructor
* The response from the List HANA Instances operation.
*
* @member {string} [nextLink] The URL to get the next set of HANA instances.
*/
export interface HanaInstancesListResult extends Array<HanaInstance> {
/**
* The URL to get the next set of HANA instances.
*/
nextLink?: string;
}

Просмотреть файл

@ -29,5 +29,7 @@ exports.HanaInstance = require('./hanaInstance');
exports.Display = require('./display');
exports.Operation = require('./operation');
exports.ErrorResponse = require('./errorResponse');
exports.Tags = require('./tags');
exports.MonitoringDetails = require('./monitoringDetails');
exports.OperationList = require('./operationList');
exports.HanaInstancesListResult = require('./hanaInstancesListResult');

Просмотреть файл

@ -11,13 +11,13 @@
'use strict';
/**
* Specifies the IP address of the network interaface.
* Specifies the IP address of the network interface.
*
*/
class IpAddress {
/**
* Create a IpAddress.
* @member {string} [ipAddress] Specifies the IP address of the network
* @property {string} [ipAddress] Specifies the IP address of the network
* interface.
*/
constructor() {

Просмотреть файл

@ -0,0 +1,108 @@
/*
* 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';
/**
* Details needed to monitor a Hana Instance
*
*/
class MonitoringDetails {
/**
* Create a MonitoringDetails.
* @property {string} [hanaVnet] ARM ID of an Azure Vnet with access to the
* HANA instance.
* @property {string} [hanaHostname] Hostname of the HANA Instance blade.
* @property {string} [hanaInstanceNum] A number between 00 and 99, stored as
* a string to maintain leading zero.
* @property {string} [dbContainer] Either single or multiple depending on
* the use of MDC(Multiple Database Containers). Possible values include:
* 'single', 'multiple'. Default value: 'single' .
* @property {string} [hanaDatabase] Name of the database itself. It only
* needs to be specified if using MDC
* @property {string} [hanaDbUsername] Username for the HANA database to
* login to for monitoring
* @property {string} [hanaDbPassword] Password for the HANA database to
* login for monitoring
*/
constructor() {
}
/**
* Defines the metadata of MonitoringDetails
*
* @returns {object} metadata of MonitoringDetails
*
*/
mapper() {
return {
required: false,
serializedName: 'MonitoringDetails',
type: {
name: 'Composite',
className: 'MonitoringDetails',
modelProperties: {
hanaVnet: {
required: false,
serializedName: 'hanaVnet',
type: {
name: 'String'
}
},
hanaHostname: {
required: false,
serializedName: 'hanaHostname',
type: {
name: 'String'
}
},
hanaInstanceNum: {
required: false,
serializedName: 'hanaInstanceNum',
type: {
name: 'String'
}
},
dbContainer: {
required: false,
serializedName: 'dbContainer',
defaultValue: 'single',
type: {
name: 'String'
}
},
hanaDatabase: {
required: false,
serializedName: 'hanaDatabase',
type: {
name: 'String'
}
},
hanaDbUsername: {
required: false,
serializedName: 'hanaDbUsername',
type: {
name: 'String'
}
},
hanaDbPassword: {
required: false,
serializedName: 'hanaDbPassword',
type: {
name: 'String'
}
}
}
}
};
}
}
module.exports = MonitoringDetails;

Просмотреть файл

@ -17,9 +17,9 @@
class NetworkProfile {
/**
* Create a NetworkProfile.
* @member {array} [networkInterfaces] Specifies the network interfaces for
* @property {array} [networkInterfaces] Specifies the network interfaces for
* the HANA instance.
* @member {string} [circuitId] Specifies the circuit id for connecting to
* @property {string} [circuitId] Specifies the circuit id for connecting to
* express route.
*/
constructor() {

Просмотреть файл

@ -17,11 +17,11 @@
class OSProfile {
/**
* Create a OSProfile.
* @member {string} [computerName] Specifies the host OS name of the HANA
* @property {string} [computerName] Specifies the host OS name of the HANA
* instance.
* @member {string} [osType] This property allows you to specify the type of
* the OS.
* @member {string} [version] Specifies version of operating system.
* @property {string} [osType] This property allows you to specify the type
* of the OS.
* @property {string} [version] Specifies version of operating system.
*/
constructor() {
}

Просмотреть файл

@ -17,28 +17,29 @@
class Operation {
/**
* Create a Operation.
* @member {string} [name] The name of the operation being performed on this
* particular object. This name should match the action name that appears in
* RBAC / the event service.
* @member {object} [display] Displayed HANA operation information
* @member {string} [display.provider] The localized friendly form of the
* @property {string} [name] The name of the operation being performed on
* this particular object. This name should match the action name that
* appears in RBAC / the event service.
* @property {object} [display] Displayed HANA operation information
* @property {string} [display.provider] The localized friendly form of the
* resource provider name. This form is also expected to include the
* publisher/company responsible. Use Title Casing. Begin with "Microsoft"
* for 1st party services.
* @member {string} [display.resource] The localized friendly form of the
* @property {string} [display.resource] The localized friendly form of the
* resource type related to this action/operation. This form should match the
* public documentation for the resource provider. Use Title Casing. For
* examples, refer to the name section.
* @member {string} [display.operation] The localized friendly name for the
* @property {string} [display.operation] The localized friendly name for the
* operation as shown to the user. This name should be concise (to fit in
* drop downs), but clear (self-documenting). Use Title Casing and include
* the entity/resource to which it applies.
* @member {string} [display.description] The localized friendly description
* for the operation as shown to the user. This description should be
* thorough, yet concise. It will be used in tool-tips and detailed views.
* @member {string} [display.origin] The intended executor of the operation;
* governs the display of the operation in the RBAC UX and the audit logs UX.
* Default value is 'user,system'
* @property {string} [display.description] The localized friendly
* description for the operation as shown to the user. This description
* should be thorough, yet concise. It will be used in tool-tips and detailed
* views.
* @property {string} [display.origin] The intended executor of the
* operation; governs the display of the operation in the RBAC UX and the
* audit logs UX. Default value is 'user,system'
*/
constructor() {
}

Просмотреть файл

@ -20,11 +20,11 @@ const models = require('./index');
class Resource extends models['BaseResource'] {
/**
* Create a Resource.
* @member {string} [id] Resource ID
* @member {string} [name] Resource name
* @member {string} [type] Resource type
* @member {string} [location] Resource location
* @member {object} [tags] Resource tags
* @property {string} [id] Resource ID
* @property {string} [name] Resource name
* @property {string} [type] Resource type
* @property {string} [location] Resource location
* @property {object} [tags] Resource tags
*/
constructor() {
super();

Просмотреть файл

@ -17,9 +17,9 @@
class StorageProfile {
/**
* Create a StorageProfile.
* @member {string} [nfsIpAddress] IP Address to connect to storage.
* @member {array} [osDisks] Specifies information about the operating system
* disk used by the hana instance.
* @property {string} [nfsIpAddress] IP Address to connect to storage.
* @property {array} [osDisks] Specifies information about the operating
* system disk used by the hana instance.
*/
constructor() {
}

Просмотреть файл

@ -0,0 +1,59 @@
/*
* 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';
/**
* Tags field of the HANA instance.
*
*/
class Tags {
/**
* Create a Tags.
* @property {object} [tags] Tags field of the HANA instance.
*/
constructor() {
}
/**
* Defines the metadata of Tags
*
* @returns {object} metadata of Tags
*
*/
mapper() {
return {
required: false,
serializedName: 'Tags',
type: {
name: 'Composite',
className: 'Tags',
modelProperties: {
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
}
}
}
};
}
}
module.exports = Tags;

Просмотреть файл

@ -447,6 +447,178 @@ function _get(resourceGroupName, hanaInstanceName, options, callback) {
});
}
/**
* @summary Patches the Tags field of a SAP HANA instance.
*
* Patches the Tags field of a SAP HANA instance for the specified
* subscription, resource group, and instance name.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} tagsParameter Request body that only contains the new Tags
* field
*
* @param {object} [tagsParameter.tags] Tags field of the HANA instance.
*
* @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 HanaInstance} 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 _update(resourceGroupName, hanaInstanceName, tagsParameter, 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.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.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 (hanaInstanceName === null || hanaInstanceName === undefined || typeof hanaInstanceName.valueOf() !== 'string') {
throw new Error('hanaInstanceName cannot be null or undefined and it must be of type string.');
}
if (tagsParameter === null || tagsParameter === undefined) {
throw new Error('tagsParameter 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.HanaOnAzure/hanaInstances/{hanaInstanceName}';
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{hanaInstanceName}', encodeURIComponent(hanaInstanceName));
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 = 'PATCH';
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 (tagsParameter !== null && tagsParameter !== undefined) {
let requestModelMapper = new client.models['Tags']().mapper();
requestModel = client.serialize(requestModelMapper, tagsParameter, 'tagsParameter');
requestContent = JSON.stringify(requestModel);
}
} catch (error) {
let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
`payload - ${JSON.stringify(tagsParameter, 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) {
let internalError = null;
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
error.code = internalError ? internalError.code : parsedErrorResponse.code;
error.message = internalError ? internalError.message : parsedErrorResponse.message;
}
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
let resultMapper = new client.models['ErrorResponse']().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['HanaInstance']().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);
});
}
/**
* The operation to restart a SAP HANA instance.
*
@ -478,6 +650,156 @@ function _restart(resourceGroupName, hanaInstanceName, options, callback) {
callback = options;
options = null;
}
if (!callback) {
throw new Error('callback cannot be null.');
}
// Send request
this.beginRestart(resourceGroupName, hanaInstanceName, options, (err, parsedResult, httpRequest, response) => {
if (err) return callback(err);
let initialResult = new msRest.HttpOperationResponse();
initialResult.request = httpRequest;
initialResult.response = response;
initialResult.body = response.body;
client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
if (err) return callback(err);
// Create Result
let result = null;
httpRequest = pollingResult.request;
response = pollingResult.response;
let responseBody = pollingResult.body;
if (responseBody === '') responseBody = null;
// Deserialize Response
return callback(null, result, httpRequest, response);
});
});
}
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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.
*
* {null} [result] - The deserialized result object if an error did not occur.
*
* {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 _enableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, 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.');
}
// Send request
this.beginEnableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, options, (err, parsedResult, httpRequest, response) => {
if (err) return callback(err);
let initialResult = new msRest.HttpOperationResponse();
initialResult.request = httpRequest;
initialResult.response = response;
initialResult.body = response.body;
client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
if (err) return callback(err);
// Create Result
let result = null;
httpRequest = pollingResult.request;
response = pollingResult.response;
let responseBody = pollingResult.body;
if (responseBody === '') responseBody = null;
// Deserialize Response
return callback(null, result, httpRequest, response);
});
});
}
/**
* The operation to restart a SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @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.
*
* {null} [result] - The deserialized result object if an error did not occur.
*
* {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 _beginRestart(resourceGroupName, hanaInstanceName, 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.');
}
@ -541,7 +863,176 @@ function _restart(resourceGroupName, hanaInstanceName, options, callback) {
return callback(err);
}
let statusCode = response.statusCode;
if (statusCode !== 202) {
if (statusCode !== 200 && statusCode !== 202) {
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;
return callback(null, result, httpRequest, response);
});
}
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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.
*
* {null} [result] - The deserialized result object if an error did not occur.
*
* {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 _beginEnableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, 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.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.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 (hanaInstanceName === null || hanaInstanceName === undefined || typeof hanaInstanceName.valueOf() !== 'string') {
throw new Error('hanaInstanceName cannot be null or undefined and it must be of type string.');
}
if (monitoringParameter === null || monitoringParameter === undefined) {
throw new Error('monitoringParameter 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.HanaOnAzure/hanaInstances/{hanaInstanceName}/monitoring';
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{hanaInstanceName}', encodeURIComponent(hanaInstanceName));
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 (monitoringParameter !== null && monitoringParameter !== undefined) {
let requestModelMapper = new client.models['MonitoringDetails']().mapper();
requestModel = client.serialize(requestModelMapper, monitoringParameter, 'monitoringParameter');
requestContent = JSON.stringify(requestModel);
}
} catch (error) {
let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
`payload - ${JSON.stringify(monitoringParameter, 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 && statusCode !== 202) {
let error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
@ -851,7 +1342,11 @@ class HanaInstances {
this._list = _list;
this._listByResourceGroup = _listByResourceGroup;
this._get = _get;
this._update = _update;
this._restart = _restart;
this._enableMonitoring = _enableMonitoring;
this._beginRestart = _beginRestart;
this._beginEnableMonitoring = _beginEnableMonitoring;
this._listNext = _listNext;
this._listByResourceGroupNext = _listByResourceGroupNext;
}
@ -1126,6 +1621,108 @@ class HanaInstances {
}
}
/**
* @summary Patches the Tags field of a SAP HANA instance.
*
* Patches the Tags field of a SAP HANA instance for the specified
* subscription, resource group, and instance name.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} tagsParameter Request body that only contains the new Tags
* field
*
* @param {object} [tagsParameter.tags] Tags field of the HANA instance.
*
* @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<HanaInstance>} - The deserialized result object.
*
* @reject {Error} - The error object.
*/
updateWithHttpOperationResponse(resourceGroupName, hanaInstanceName, tagsParameter, options) {
let client = this.client;
let self = this;
return new Promise((resolve, reject) => {
self._update(resourceGroupName, hanaInstanceName, tagsParameter, options, (err, result, request, response) => {
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
httpOperationResponse.body = result;
if (err) { reject(err); }
else { resolve(httpOperationResponse); }
return;
});
});
}
/**
* @summary Patches the Tags field of a SAP HANA instance.
*
* Patches the Tags field of a SAP HANA instance for the specified
* subscription, resource group, and instance name.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} tagsParameter Request body that only contains the new Tags
* field
*
* @param {object} [tagsParameter.tags] Tags field of the HANA instance.
*
* @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 {HanaInstance} - 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 HanaInstance} 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.
*/
update(resourceGroupName, hanaInstanceName, tagsParameter, 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._update(resourceGroupName, hanaInstanceName, tagsParameter, options, (err, result, request, response) => {
if (err) { reject(err); }
else { resolve(result); }
return;
});
});
} else {
return self._update(resourceGroupName, hanaInstanceName, tagsParameter, options, optionalCallback);
}
}
/**
* The operation to restart a SAP HANA instance.
*
@ -1211,6 +1808,361 @@ class HanaInstances {
}
}
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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} - The error object.
*/
enableMonitoringWithHttpOperationResponse(resourceGroupName, hanaInstanceName, monitoringParameter, options) {
let client = this.client;
let self = this;
return new Promise((resolve, reject) => {
self._enableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, options, (err, result, request, response) => {
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
httpOperationResponse.body = result;
if (err) { reject(err); }
else { resolve(httpOperationResponse); }
return;
});
});
}
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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 {null} - 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.
*
* {null} [result] - The deserialized result object if an error did not occur.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
enableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, 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._enableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, options, (err, result, request, response) => {
if (err) { reject(err); }
else { resolve(result); }
return;
});
});
} else {
return self._enableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, options, optionalCallback);
}
}
/**
* The operation to restart a SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @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} - The error object.
*/
beginRestartWithHttpOperationResponse(resourceGroupName, hanaInstanceName, options) {
let client = this.client;
let self = this;
return new Promise((resolve, reject) => {
self._beginRestart(resourceGroupName, hanaInstanceName, options, (err, result, request, response) => {
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
httpOperationResponse.body = result;
if (err) { reject(err); }
else { resolve(httpOperationResponse); }
return;
});
});
}
/**
* The operation to restart a SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @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 {null} - 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.
*
* {null} [result] - The deserialized result object if an error did not occur.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
beginRestart(resourceGroupName, hanaInstanceName, 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._beginRestart(resourceGroupName, hanaInstanceName, options, (err, result, request, response) => {
if (err) { reject(err); }
else { resolve(result); }
return;
});
});
} else {
return self._beginRestart(resourceGroupName, hanaInstanceName, options, optionalCallback);
}
}
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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} - The error object.
*/
beginEnableMonitoringWithHttpOperationResponse(resourceGroupName, hanaInstanceName, monitoringParameter, options) {
let client = this.client;
let self = this;
return new Promise((resolve, reject) => {
self._beginEnableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, options, (err, result, request, response) => {
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
httpOperationResponse.body = result;
if (err) { reject(err); }
else { resolve(httpOperationResponse); }
return;
});
});
}
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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 {null} - 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.
*
* {null} [result] - The deserialized result object if an error did not occur.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
beginEnableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, 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._beginEnableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, options, (err, result, request, response) => {
if (err) { reject(err); }
else { resolve(result); }
return;
});
});
} else {
return self._beginEnableMonitoring(resourceGroupName, hanaInstanceName, monitoringParameter, options, optionalCallback);
}
}
/**
* @summary Gets a list of SAP HANA instances in the specified subscription.
*

Просмотреть файл

@ -270,6 +270,81 @@ export interface HanaInstances {
get(resourceGroupName: string, hanaInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.HanaInstance>): void;
/**
* @summary Patches the Tags field of a SAP HANA instance.
*
* Patches the Tags field of a SAP HANA instance for the specified
* subscription, resource group, and instance name.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} tagsParameter Request body that only contains the new Tags
* field
*
* @param {object} [tagsParameter.tags] Tags field of the HANA instance.
*
* @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<HanaInstance>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
updateWithHttpOperationResponse(resourceGroupName: string, hanaInstanceName: string, tagsParameter: models.Tags, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.HanaInstance>>;
/**
* @summary Patches the Tags field of a SAP HANA instance.
*
* Patches the Tags field of a SAP HANA instance for the specified
* subscription, resource group, and instance name.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} tagsParameter Request body that only contains the new Tags
* field
*
* @param {object} [tagsParameter.tags] Tags field of the HANA instance.
*
* @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 {HanaInstance} - 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.
*
* {HanaInstance} [result] - The deserialized result object if an error did not occur.
* See {@link HanaInstance} 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, hanaInstanceName: string, tagsParameter: models.Tags, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.HanaInstance>;
update(resourceGroupName: string, hanaInstanceName: string, tagsParameter: models.Tags, callback: ServiceCallback<models.HanaInstance>): void;
update(resourceGroupName: string, hanaInstanceName: string, tagsParameter: models.Tags, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.HanaInstance>): void;
/**
* The operation to restart a SAP HANA instance.
*
@ -328,6 +403,280 @@ export interface HanaInstances {
restart(resourceGroupName: string, hanaInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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.
*/
enableMonitoringWithHttpOperationResponse(resourceGroupName: string, hanaInstanceName: string, monitoringParameter: models.MonitoringDetails, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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.
*/
enableMonitoring(resourceGroupName: string, hanaInstanceName: string, monitoringParameter: models.MonitoringDetails, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
enableMonitoring(resourceGroupName: string, hanaInstanceName: string, monitoringParameter: models.MonitoringDetails, callback: ServiceCallback<void>): void;
enableMonitoring(resourceGroupName: string, hanaInstanceName: string, monitoringParameter: models.MonitoringDetails, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
/**
* The operation to restart a SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @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.
*/
beginRestartWithHttpOperationResponse(resourceGroupName: string, hanaInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
/**
* The operation to restart a SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @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.
*/
beginRestart(resourceGroupName: string, hanaInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
beginRestart(resourceGroupName: string, hanaInstanceName: string, callback: ServiceCallback<void>): void;
beginRestart(resourceGroupName: string, hanaInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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.
*/
beginEnableMonitoringWithHttpOperationResponse(resourceGroupName: string, hanaInstanceName: string, monitoringParameter: models.MonitoringDetails, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
/**
* The operation to add a monitor to an SAP HANA instance.
*
* @param {string} resourceGroupName Name of the resource group.
*
* @param {string} hanaInstanceName Name of the SAP HANA on Azure instance.
*
* @param {object} monitoringParameter Request body that only contains
* monitoring attributes
*
* @param {string} [monitoringParameter.hanaVnet] ARM ID of an Azure Vnet with
* access to the HANA instance.
*
* @param {string} [monitoringParameter.hanaHostname] Hostname of the HANA
* Instance blade.
*
* @param {string} [monitoringParameter.hanaInstanceNum] A number between 00
* and 99, stored as a string to maintain leading zero.
*
* @param {string} [monitoringParameter.dbContainer] Either single or multiple
* depending on the use of MDC(Multiple Database Containers). Possible values
* include: 'single', 'multiple'
*
* @param {string} [monitoringParameter.hanaDatabase] Name of the database
* itself. It only needs to be specified if using MDC
*
* @param {string} [monitoringParameter.hanaDbUsername] Username for the HANA
* database to login to for monitoring
*
* @param {string} [monitoringParameter.hanaDbPassword] Password for the HANA
* database to login for monitoring
*
* @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.
*/
beginEnableMonitoring(resourceGroupName: string, hanaInstanceName: string, monitoringParameter: models.MonitoringDetails, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
beginEnableMonitoring(resourceGroupName: string, hanaInstanceName: string, monitoringParameter: models.MonitoringDetails, callback: ServiceCallback<void>): void;
beginEnableMonitoring(resourceGroupName: string, hanaInstanceName: string, monitoringParameter: models.MonitoringDetails, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
/**
* @summary Gets a list of SAP HANA instances in the specified subscription.
*

Просмотреть файл

@ -2,9 +2,9 @@
"name": "azure-arm-hanaonazure",
"author": "Microsoft Corporation",
"description": "HanaManagementClient Library with typescript type definitions for node",
"version": "1.1.0-preview",
"version": "1.2.0",
"dependencies": {
"ms-rest": "^2.3.3",
"ms-rest": "^2.5.0",
"ms-rest-azure": "^2.5.5"
},
"keywords": [
@ -21,5 +21,8 @@
},
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-node/issues"
},
"scripts": {
"postinstall": "node .scripts/postinstall.js"
}
}
}