diff --git a/sdk/hanaonazure/arm-hanaonazure/README.md b/sdk/hanaonazure/arm-hanaonazure/README.md index d2724649ce49..47769ee07ac2 100644 --- a/sdk/hanaonazure/arm-hanaonazure/README.md +++ b/sdk/hanaonazure/arm-hanaonazure/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-hanaonazure ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - client creation and list operations as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { HanaManagementClient, HanaManagementModels, HanaManagementMappers } from "@azure/arm-hanaonazure"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { HanaManagementClient } = require("@azure/arm-hanaonazure"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/hanaonazure/arm-hanaonazure/rollup.config.js b/sdk/hanaonazure/arm-hanaonazure/rollup.config.js index 61733b1e9dc1..e73c09276c77 100644 --- a/sdk/hanaonazure/arm-hanaonazure/rollup.config.js +++ b/sdk/hanaonazure/arm-hanaonazure/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClient.ts b/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClient.ts index 29c571d53465..035519729a97 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClient.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -18,8 +17,8 @@ import { HanaManagementClientContext } from "./hanaManagementClientContext"; class HanaManagementClient extends HanaManagementClientContext { // Operation groups operations: operations.Operations; - hanaInstances: operations.HanaInstances; sapMonitors: operations.SapMonitors; + providerInstances: operations.ProviderInstances; /** * Initializes a new instance of the HanaManagementClient class. @@ -31,8 +30,8 @@ class HanaManagementClient extends HanaManagementClientContext { constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.HanaManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); - this.hanaInstances = new operations.HanaInstances(this); this.sapMonitors = new operations.SapMonitors(this); + this.providerInstances = new operations.ProviderInstances(this); } } diff --git a/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClientContext.ts b/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClientContext.ts index cc31e25717de..e1b49e4bbcaa 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClientContext.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -45,7 +44,7 @@ export class HanaManagementClientContext extends msRestAzure.AzureServiceClient super(credentials, options); - this.apiVersion = '2017-11-03-preview'; + this.apiVersion = '2020-02-07-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts index 131d2259292f..ab1cad1cb45d 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -11,193 +11,6 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; -/** - * The resource model definition. - */ -export interface Resource extends BaseResource { - /** - * Resource ID - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location - */ - location?: string; - /** - * Resource tags - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * Specifies the hardware settings for the HANA instance. - */ -export interface HardwareProfile { - /** - * Name of the hardware type (vendor and/or their product name). Possible values include: - * 'Cisco_UCS', 'HPE' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hardwareType?: HanaHardwareTypeNamesEnum; - /** - * Specifies the HANA instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144', - * 'S192', 'S192m', 'S192xm', 'S96', 'S112', 'S224', 'S224m', 'S224om', 'S224oo', 'S224oom', - * 'S224ooo', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', - * 'S960m' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hanaInstanceSize?: HanaInstanceSizeNamesEnum; -} - -/** - * Specifies the disk information fo the HANA instance - */ -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. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lun?: number; -} - -/** - * Specifies the storage settings for the HANA instance disks. - */ -export interface StorageProfile { - /** - * IP Address to connect to storage. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nfsIpAddress?: string; - /** - * Specifies information about the operating system disk used by the hana instance. - */ - osDisks?: Disk[]; -} - -/** - * Specifies the operating system settings for the HANA instance. - */ -export interface OSProfile { - /** - * Specifies the host OS name of the HANA instance. - */ - computerName?: string; - /** - * This property allows you to specify the type of the OS. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly osType?: string; - /** - * Specifies version of operating system. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly version?: string; - /** - * Specifies the SSH public key used to access the operating system. - */ - sshPublicKey?: string; -} - -/** - * Specifies the IP address of the network interface. - */ -export interface IpAddress { - /** - * Specifies the IP address of the network interface. - */ - ipAddress?: string; -} - -/** - * Specifies the network settings for the HANA instance disks. - */ -export interface NetworkProfile { - /** - * Specifies the network interfaces for the HANA instance. - */ - networkInterfaces?: IpAddress[]; - /** - * Specifies the circuit id for connecting to express route. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly circuitId?: string; -} - -/** - * HANA instance info on Azure (ARM properties and HANA properties) - */ -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. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hanaInstanceId?: string; - /** - * Resource power state. Possible values include: 'starting', 'started', 'stopping', 'stopped', - * 'restarting', 'unknown' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly powerState?: HanaInstancePowerStateEnum; - /** - * Resource proximity placement group - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly proximityPlacementGroup?: string; - /** - * Hardware revision of a HANA instance - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hwRevision?: string; - /** - * ARM ID of another HanaInstance that will share a network with this HanaInstance - */ - partnerNodeId?: string; - /** - * State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', - * 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: HanaProvisioningStatesEnum; -} - /** * Detailed HANA operation information */ @@ -268,86 +81,59 @@ export interface ErrorResponse { } /** - * Tags field of the HANA instance. + * Tags field of the resource. */ export interface Tags { /** - * Tags field of the HANA instance. + * Tags field of the resource. */ tags?: { [propertyName: string]: string }; } /** - * Details needed to monitor a Hana Instance + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource */ -export interface MonitoringDetails { - /** - * ARM ID of an Azure Subnet with access to the HANA instance. - */ - hanaSubnet?: string; +export interface Resource extends BaseResource { /** - * Hostname of the HANA Instance blade. + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - hanaHostname?: string; + readonly id?: string; /** - * Name of the database itself. + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - hanaDbName?: string; + readonly name?: string; /** - * The port number of the tenant DB. Used to connect to the DB. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - hanaDbSqlPort?: number; + readonly type?: string; +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource + */ +export interface TrackedResource extends Resource { /** - * Username for the HANA database to login to for monitoring + * Resource tags. */ - hanaDbUsername?: string; + tags?: { [propertyName: string]: string }; /** - * Password for the HANA database to login for monitoring + * The geo-location where the resource lives */ - hanaDbPassword?: string; + location: string; } /** * SAP monitor info on Azure (ARM properties and SAP monitor properties) */ -export interface SapMonitor extends Resource { - /** - * Specifies the SAP monitor unique ID. - */ - hanaSubnet?: string; - /** - * Hostname of the HANA instance. - */ - hanaHostname?: string; - /** - * Database name of the HANA instance. - */ - hanaDbName?: string; - /** - * Database port of the HANA instance. - */ - hanaDbSqlPort?: number; - /** - * Database username of the HANA instance. - */ - hanaDbUsername?: string; - /** - * Database password of the HANA instance. - */ - hanaDbPassword?: string; - /** - * KeyVault URL link to the password for the HANA database. - */ - hanaDbPasswordKeyVaultUrl?: string; - /** - * MSI ID passed by customer which has access to customer's KeyVault and to be assigned to the - * Collector VM. - */ - hanaDbCredentialsMsiId?: string; - /** - * Key Vault ID containing customer's HANA credentials. - */ - keyVaultId?: string; +export interface SapMonitor extends TrackedResource { /** * State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', * 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -375,6 +161,59 @@ export interface SapMonitor extends Resource { * The shared key of the log analytics workspace that is used for monitoring */ logAnalyticsWorkspaceSharedKey?: string; + /** + * The version of the payload running in the Collector VM + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sapMonitorCollectorVersion?: string; + /** + * The subnet which the SAP monitor will be deployed in + */ + monitorSubnet?: string; +} + +/** + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * A provider instance associated with a SAP monitor. + */ +export interface ProviderInstance extends ProxyResource { + /** + * The type of provider instance. + */ + providerInstanceType?: string; + /** + * A JSON string containing the properties of the provider instance. + */ + properties?: string; + /** + * A JSON string containing metadata of the provider instance. + */ + metadata?: string; + /** + * State of provisioning of the provider instance. Possible values include: 'Accepted', + * 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: HanaProvisioningStatesEnum; +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; } /** @@ -394,54 +233,28 @@ export interface OperationList extends Array { /** * @interface - * The response from the List HANA Instances operation. - * @extends Array + * The response from the List SAP monitors operation. + * @extends Array */ -export interface HanaInstancesListResult extends Array { +export interface SapMonitorListResult extends Array { /** - * The URL to get the next set of HANA instances. + * The URL to get the next set of SAP monitors. */ nextLink?: string; } /** * @interface - * The response from the List SAP monitors operation. - * @extends Array + * The response from the List provider instances operation. + * @extends Array */ -export interface SapMonitorListResult extends Array { +export interface ProviderInstanceListResult extends Array { /** - * The URL to get the next set of SAP monitors. + * The URL to get the next set of provider instances. */ nextLink?: string; } -/** - * Defines values for HanaHardwareTypeNamesEnum. - * Possible values include: 'Cisco_UCS', 'HPE' - * @readonly - * @enum {string} - */ -export type HanaHardwareTypeNamesEnum = 'Cisco_UCS' | 'HPE'; - -/** - * Defines values for HanaInstanceSizeNamesEnum. - * Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S96', - * 'S112', 'S224', 'S224m', 'S224om', 'S224oo', 'S224oom', 'S224ooo', 'S384', 'S384m', 'S384xm', - * 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m' - * @readonly - * @enum {string} - */ -export type HanaInstanceSizeNamesEnum = 'S72m' | 'S144m' | 'S72' | 'S144' | 'S192' | 'S192m' | 'S192xm' | 'S96' | 'S112' | 'S224' | 'S224m' | 'S224om' | 'S224oo' | 'S224oom' | 'S224ooo' | 'S384' | 'S384m' | 'S384xm' | 'S384xxm' | 'S576m' | 'S576xm' | 'S768' | 'S768m' | 'S768xm' | 'S960m'; - -/** - * Defines values for HanaInstancePowerStateEnum. - * Possible values include: 'starting', 'started', 'stopping', 'stopped', 'restarting', 'unknown' - * @readonly - * @enum {string} - */ -export type HanaInstancePowerStateEnum = 'starting' | 'started' | 'stopping' | 'stopped' | 'restarting' | 'unknown'; - /** * Defines values for HanaProvisioningStatesEnum. * Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', @@ -474,27 +287,7 @@ export type OperationsListResponse = OperationList & { /** * Contains response data for the list operation. */ -export type HanaInstancesListResponse = HanaInstancesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: HanaInstancesListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type HanaInstancesListByResourceGroupResponse = HanaInstancesListResult & { +export type SapMonitorsListResponse = SapMonitorListResult & { /** * The underlying HTTP response. */ @@ -507,14 +300,14 @@ export type HanaInstancesListByResourceGroupResponse = HanaInstancesListResult & /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstancesListResult; + parsedBody: SapMonitorListResult; }; }; /** * Contains response data for the get operation. */ -export type HanaInstancesGetResponse = HanaInstance & { +export type SapMonitorsGetResponse = SapMonitor & { /** * The underlying HTTP response. */ @@ -527,14 +320,14 @@ export type HanaInstancesGetResponse = HanaInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstance; + parsedBody: SapMonitor; }; }; /** * Contains response data for the create operation. */ -export type HanaInstancesCreateResponse = HanaInstance & { +export type SapMonitorsCreateResponse = SapMonitor & { /** * The underlying HTTP response. */ @@ -547,14 +340,14 @@ export type HanaInstancesCreateResponse = HanaInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstance; + parsedBody: SapMonitor; }; }; /** * Contains response data for the update operation. */ -export type HanaInstancesUpdateResponse = HanaInstance & { +export type SapMonitorsUpdateResponse = SapMonitor & { /** * The underlying HTTP response. */ @@ -567,14 +360,14 @@ export type HanaInstancesUpdateResponse = HanaInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstance; + parsedBody: SapMonitor; }; }; /** * Contains response data for the beginCreate operation. */ -export type HanaInstancesBeginCreateResponse = HanaInstance & { +export type SapMonitorsBeginCreateResponse = SapMonitor & { /** * The underlying HTTP response. */ @@ -587,34 +380,14 @@ export type HanaInstancesBeginCreateResponse = HanaInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstance; + parsedBody: SapMonitor; }; }; /** * Contains response data for the listNext operation. */ -export type HanaInstancesListNextResponse = HanaInstancesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: HanaInstancesListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type HanaInstancesListByResourceGroupNextResponse = HanaInstancesListResult & { +export type SapMonitorsListNextResponse = SapMonitorListResult & { /** * The underlying HTTP response. */ @@ -627,14 +400,14 @@ export type HanaInstancesListByResourceGroupNextResponse = HanaInstancesListResu /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstancesListResult; + parsedBody: SapMonitorListResult; }; }; /** * Contains response data for the list operation. */ -export type SapMonitorsListResponse = SapMonitorListResult & { +export type ProviderInstancesListResponse = ProviderInstanceListResult & { /** * The underlying HTTP response. */ @@ -647,14 +420,14 @@ export type SapMonitorsListResponse = SapMonitorListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitorListResult; + parsedBody: ProviderInstanceListResult; }; }; /** * Contains response data for the get operation. */ -export type SapMonitorsGetResponse = SapMonitor & { +export type ProviderInstancesGetResponse = ProviderInstance & { /** * The underlying HTTP response. */ @@ -667,34 +440,14 @@ export type SapMonitorsGetResponse = SapMonitor & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitor; + parsedBody: ProviderInstance; }; }; /** * Contains response data for the create operation. */ -export type SapMonitorsCreateResponse = SapMonitor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SapMonitor; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type SapMonitorsUpdateResponse = SapMonitor & { +export type ProviderInstancesCreateResponse = ProviderInstance & { /** * The underlying HTTP response. */ @@ -707,14 +460,14 @@ export type SapMonitorsUpdateResponse = SapMonitor & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitor; + parsedBody: ProviderInstance; }; }; /** * Contains response data for the beginCreate operation. */ -export type SapMonitorsBeginCreateResponse = SapMonitor & { +export type ProviderInstancesBeginCreateResponse = ProviderInstance & { /** * The underlying HTTP response. */ @@ -727,14 +480,14 @@ export type SapMonitorsBeginCreateResponse = SapMonitor & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitor; + parsedBody: ProviderInstance; }; }; /** * Contains response data for the listNext operation. */ -export type SapMonitorsListNextResponse = SapMonitorListResult & { +export type ProviderInstancesListNextResponse = ProviderInstanceListResult & { /** * The underlying HTTP response. */ @@ -747,6 +500,6 @@ export type SapMonitorsListNextResponse = SapMonitorListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitorListResult; + parsedBody: ProviderInstanceListResult; }; }; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts index bfbd9139fc79..a46049e0489f 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,298 +12,6 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const HardwareProfile: msRest.CompositeMapper = { - serializedName: "HardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile", - modelProperties: { - hardwareType: { - readOnly: true, - serializedName: "hardwareType", - type: { - name: "String" - } - }, - hanaInstanceSize: { - readOnly: true, - serializedName: "hanaInstanceSize", - type: { - name: "String" - } - } - } - } -}; - -export const Disk: msRest.CompositeMapper = { - serializedName: "Disk", - type: { - name: "Composite", - className: "Disk", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - diskSizeGB: { - serializedName: "diskSizeGB", - type: { - name: "Number" - } - }, - lun: { - readOnly: true, - serializedName: "lun", - type: { - name: "Number" - } - } - } - } -}; - -export const StorageProfile: msRest.CompositeMapper = { - serializedName: "StorageProfile", - type: { - name: "Composite", - className: "StorageProfile", - modelProperties: { - nfsIpAddress: { - readOnly: true, - serializedName: "nfsIpAddress", - type: { - name: "String" - } - }, - osDisks: { - serializedName: "osDisks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Disk" - } - } - } - } - } - } -}; - -export const OSProfile: msRest.CompositeMapper = { - serializedName: "OSProfile", - type: { - name: "Composite", - className: "OSProfile", - modelProperties: { - computerName: { - serializedName: "computerName", - type: { - name: "String" - } - }, - osType: { - readOnly: true, - serializedName: "osType", - type: { - name: "String" - } - }, - version: { - readOnly: true, - serializedName: "version", - type: { - name: "String" - } - }, - sshPublicKey: { - serializedName: "sshPublicKey", - type: { - name: "String" - } - } - } - } -}; - -export const IpAddress: msRest.CompositeMapper = { - serializedName: "IpAddress", - type: { - name: "Composite", - className: "IpAddress", - modelProperties: { - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String" - } - } - } - } -}; - -export const NetworkProfile: msRest.CompositeMapper = { - serializedName: "NetworkProfile", - type: { - name: "Composite", - className: "NetworkProfile", - modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpAddress" - } - } - } - }, - circuitId: { - readOnly: true, - serializedName: "circuitId", - type: { - name: "String" - } - } - } - } -}; - -export const HanaInstance: msRest.CompositeMapper = { - serializedName: "HanaInstance", - type: { - name: "Composite", - className: "HanaInstance", - modelProperties: { - ...Resource.type.modelProperties, - hardwareProfile: { - serializedName: "properties.hardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile" - } - }, - storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "StorageProfile" - } - }, - osProfile: { - serializedName: "properties.osProfile", - type: { - name: "Composite", - className: "OSProfile" - } - }, - networkProfile: { - serializedName: "properties.networkProfile", - type: { - name: "Composite", - className: "NetworkProfile" - } - }, - hanaInstanceId: { - readOnly: true, - serializedName: "properties.hanaInstanceId", - type: { - name: "String" - } - }, - powerState: { - readOnly: true, - serializedName: "properties.powerState", - type: { - name: "String" - } - }, - proximityPlacementGroup: { - readOnly: true, - serializedName: "properties.proximityPlacementGroup", - type: { - name: "String" - } - }, - hwRevision: { - readOnly: true, - serializedName: "properties.hwRevision", - type: { - name: "String" - } - }, - partnerNodeId: { - serializedName: "properties.partnerNodeId", - type: { - name: "String" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - } - } - } -}; - export const Display: msRest.CompositeMapper = { serializedName: "Display", type: { @@ -416,44 +124,58 @@ export const Tags: msRest.CompositeMapper = { } }; -export const MonitoringDetails: msRest.CompositeMapper = { - serializedName: "MonitoringDetails", +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", type: { name: "Composite", - className: "MonitoringDetails", + className: "Resource", modelProperties: { - hanaSubnet: { - serializedName: "hanaSubnet", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - hanaHostname: { - serializedName: "hanaHostname", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - hanaDbName: { - serializedName: "hanaDbName", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } - }, - hanaDbSqlPort: { - serializedName: "hanaDbSqlPort", - type: { - name: "Number" - } - }, - hanaDbUsername: { - serializedName: "hanaDbUsername", + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - hanaDbPassword: { - serializedName: "hanaDbPassword", + location: { + required: true, + serializedName: "location", type: { name: "String" } @@ -468,95 +190,119 @@ export const SapMonitor: msRest.CompositeMapper = { name: "Composite", className: "SapMonitor", modelProperties: { - ...Resource.type.modelProperties, - hanaSubnet: { - serializedName: "properties.hanaSubnet", + ...TrackedResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } }, - hanaHostname: { - serializedName: "properties.hanaHostname", + managedResourceGroupName: { + readOnly: true, + serializedName: "properties.managedResourceGroupName", type: { name: "String" } }, - hanaDbName: { - serializedName: "properties.hanaDbName", + logAnalyticsWorkspaceArmId: { + serializedName: "properties.logAnalyticsWorkspaceArmId", type: { name: "String" } }, - hanaDbSqlPort: { - serializedName: "properties.hanaDbSqlPort", - type: { - name: "Number" - } - }, - hanaDbUsername: { - serializedName: "properties.hanaDbUsername", + enableCustomerAnalytics: { + serializedName: "properties.enableCustomerAnalytics", type: { - name: "String" + name: "Boolean" } }, - hanaDbPassword: { - serializedName: "properties.hanaDbPassword", + logAnalyticsWorkspaceId: { + serializedName: "properties.logAnalyticsWorkspaceId", type: { name: "String" } }, - hanaDbPasswordKeyVaultUrl: { - serializedName: "properties.hanaDbPasswordKeyVaultUrl", + logAnalyticsWorkspaceSharedKey: { + serializedName: "properties.logAnalyticsWorkspaceSharedKey", type: { name: "String" } }, - hanaDbCredentialsMsiId: { - serializedName: "properties.hanaDbCredentialsMsiId", + sapMonitorCollectorVersion: { + readOnly: true, + serializedName: "properties.sapMonitorCollectorVersion", type: { name: "String" } }, - keyVaultId: { - serializedName: "properties.keyVaultId", + monitorSubnet: { + serializedName: "properties.monitorSubnet", type: { name: "String" } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const ProviderInstance: msRest.CompositeMapper = { + serializedName: "ProviderInstance", + type: { + name: "Composite", + className: "ProviderInstance", + modelProperties: { + ...ProxyResource.type.modelProperties, + providerInstanceType: { + serializedName: "properties.type", type: { name: "String" } }, - managedResourceGroupName: { - readOnly: true, - serializedName: "properties.managedResourceGroupName", + properties: { + serializedName: "properties.properties", type: { name: "String" } }, - logAnalyticsWorkspaceArmId: { - serializedName: "properties.logAnalyticsWorkspaceArmId", + metadata: { + serializedName: "properties.metadata", type: { name: "String" } }, - enableCustomerAnalytics: { - serializedName: "properties.enableCustomerAnalytics", - type: { - name: "Boolean" - } - }, - logAnalyticsWorkspaceId: { - serializedName: "properties.logAnalyticsWorkspaceId", + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } - }, - logAnalyticsWorkspaceSharedKey: { - serializedName: "properties.logAnalyticsWorkspaceSharedKey", + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", type: { name: "String" } @@ -587,11 +333,11 @@ export const OperationList: msRest.CompositeMapper = { } }; -export const HanaInstancesListResult: msRest.CompositeMapper = { - serializedName: "HanaInstancesListResult", +export const SapMonitorListResult: msRest.CompositeMapper = { + serializedName: "SapMonitorListResult", type: { name: "Composite", - className: "HanaInstancesListResult", + className: "SapMonitorListResult", modelProperties: { value: { serializedName: "", @@ -600,7 +346,7 @@ export const HanaInstancesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "HanaInstance" + className: "SapMonitor" } } } @@ -615,11 +361,11 @@ export const HanaInstancesListResult: msRest.CompositeMapper = { } }; -export const SapMonitorListResult: msRest.CompositeMapper = { - serializedName: "SapMonitorListResult", +export const ProviderInstanceListResult: msRest.CompositeMapper = { + serializedName: "ProviderInstanceListResult", type: { name: "Composite", - className: "SapMonitorListResult", + className: "ProviderInstanceListResult", modelProperties: { value: { serializedName: "", @@ -628,7 +374,7 @@ export const SapMonitorListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "SapMonitor" + className: "ProviderInstance" } } } diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/operationsMappers.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/operationsMappers.ts index a9be85e4bd23..9e926109d6d2 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/operationsMappers.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/parameters.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/parameters.ts index 3f362383f381..c0fe516f5a33 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/parameters.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -30,26 +29,26 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; -export const hanaInstanceName: msRest.OperationURLParameter = { - parameterPath: "hanaInstanceName", +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", mapper: { required: true, - serializedName: "hanaInstanceName", + serializedName: "nextLink", type: { name: "String" } - } + }, + skipEncoding: true }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", +export const providerInstanceName: msRest.OperationURLParameter = { + parameterPath: "providerInstanceName", mapper: { required: true, - serializedName: "nextLink", + serializedName: "providerInstanceName", type: { name: "String" } - }, - skipEncoding: true + } }; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/providerInstancesMappers.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/providerInstancesMappers.ts new file mode 100644 index 000000000000..354b75d1ca46 --- /dev/null +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/providerInstancesMappers.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + ErrorResponse, + ProviderInstance, + ProviderInstanceListResult, + ProxyResource, + Resource, + SapMonitor, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/sapMonitorsMappers.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/sapMonitorsMappers.ts index 9da8ccf84683..66324d28e8a3 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/sapMonitorsMappers.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/sapMonitorsMappers.ts @@ -1,23 +1,20 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + AzureEntityResource, BaseResource, - Disk, ErrorResponse, - HanaInstance, - HardwareProfile, - IpAddress, - NetworkProfile, - OSProfile, + ProviderInstance, + ProxyResource, Resource, SapMonitor, SapMonitorListResult, - StorageProfile, - Tags + Tags, + TrackedResource } from "../models/mappers"; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/operations/index.ts b/sdk/hanaonazure/arm-hanaonazure/src/operations/index.ts index 3d0d939c0761..c55e9133ecc3 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/operations/index.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,5 +8,5 @@ */ export * from "./operations"; -export * from "./hanaInstances"; export * from "./sapMonitors"; +export * from "./providerInstances"; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/operations/operations.ts b/sdk/hanaonazure/arm-hanaonazure/src/operations/operations.ts index 6f9d3634099a..5fc5673fdbfc 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/operations/operations.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/hanaonazure/arm-hanaonazure/src/operations/providerInstances.ts b/sdk/hanaonazure/arm-hanaonazure/src/operations/providerInstances.ts new file mode 100644 index 000000000000..ff76bd275398 --- /dev/null +++ b/sdk/hanaonazure/arm-hanaonazure/src/operations/providerInstances.ts @@ -0,0 +1,346 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/providerInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { HanaManagementClientContext } from "../hanaManagementClientContext"; + +/** Class representing a ProviderInstances. */ +export class ProviderInstances { + private readonly client: HanaManagementClientContext; + + /** + * Create a ProviderInstances. + * @param {HanaManagementClientContext} client Reference to the service client. + */ + constructor(client: HanaManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of provider instances in the specified SAP monitor. The operations returns various + * properties of each provider instances. + * @summary Gets a list of provider instances in the specified SAP monitor. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, sapMonitorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param callback The callback + */ + list(resourceGroupName: string, sapMonitorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, sapMonitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, sapMonitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sapMonitorName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets properties of a provider instance for the specified subscription, resource group, + * SapMonitor name, and resource name. + * @summary Gets properties of a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param callback The callback + */ + get(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sapMonitorName, + providerInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and + * resource name. + * @summary Creates a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param providerInstanceParameter Request body representing a provider instance + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, providerInstanceParameter: Models.ProviderInstance, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,sapMonitorName,providerInstanceName,providerInstanceParameter,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and + * resource name. + * @summary Deletes a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,sapMonitorName,providerInstanceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and + * resource name. + * @summary Creates a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param providerInstanceParameter Request body representing a provider instance + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, providerInstanceParameter: Models.ProviderInstance, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + sapMonitorName, + providerInstanceName, + providerInstanceParameter, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and + * resource name. + * @summary Deletes a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + sapMonitorName, + providerInstanceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of provider instances in the specified SAP monitor. The operations returns various + * properties of each provider instances. + * @summary Gets a list of provider instances in the specified SAP monitor. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapMonitorName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProviderInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapMonitorName, + Parameters.providerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProviderInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapMonitorName, + Parameters.providerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "providerInstanceParameter", + mapper: { + ...Mappers.ProviderInstance, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ProviderInstance + }, + 201: { + bodyMapper: Mappers.ProviderInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapMonitorName, + Parameters.providerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProviderInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/operations/sapMonitors.ts b/sdk/hanaonazure/arm-hanaonazure/src/operations/sapMonitors.ts index 7726f577bf80..29827c79fb57 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/operations/sapMonitors.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/operations/sapMonitors.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -372,6 +371,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ],