diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts index d6c4ade44350..fb404e26f09f 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts @@ -55,7 +55,7 @@ export interface HardwareProfile { /** * 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' + * 'S768', 'S768m', 'S768xm', 'S960m', 'S224o', 'S224m', 'S224om', 'S224oxm', 'S224oxxm' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly hanaInstanceSize?: HanaInstanceSizeNamesEnum; @@ -115,6 +115,11 @@ export interface OSProfile { * **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. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sshPublicKey?: string; } /** @@ -184,6 +189,17 @@ export interface HanaInstance extends Resource { * **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 + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly 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; } /** @@ -270,26 +286,21 @@ export interface Tags { */ export interface MonitoringDetails { /** - * ARM ID of an Azure Vnet with access to the HANA instance. + * ARM ID of an Azure Subnet with access to the HANA instance. */ - hanaVnet?: string; + hanaSubnet?: string; /** * Hostname of the HANA Instance blade. */ hanaHostname?: string; /** - * A number between 00 and 99, stored as a string to maintain leading zero. + * Name of the database itself. */ - hanaInstanceNum?: string; + hanaDbName?: string; /** - * Either single or multiple depending on the use of MDC(Multiple Database Containers). Possible - * values include: 'single', 'multiple'. Default value: 'single'. + * The port number of the tenant DB. Used to connect to the DB. */ - dbContainer?: HanaDatabaseContainersEnum; - /** - * Name of the database itself. It only needs to be specified if using MDC - */ - hanaDatabase?: string; + hanaDbSqlPort?: number; /** * Username for the HANA database to login to for monitoring */ @@ -338,11 +349,12 @@ export type HanaHardwareTypeNamesEnum = 'Cisco_UCS' | 'HPE'; /** * Defines values for HanaInstanceSizeNamesEnum. * Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S96', - * 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m' + * 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m', + * 'S224o', 'S224m', 'S224om', 'S224oxm', 'S224oxxm' * @readonly * @enum {string} */ -export type HanaInstanceSizeNamesEnum = 'S72m' | 'S144m' | 'S72' | 'S144' | 'S192' | 'S192m' | 'S192xm' | 'S96' | 'S384' | 'S384m' | 'S384xm' | 'S384xxm' | 'S576m' | 'S576xm' | 'S768' | 'S768m' | 'S768xm' | 'S960m'; +export type HanaInstanceSizeNamesEnum = 'S72m' | 'S144m' | 'S72' | 'S144' | 'S192' | 'S192m' | 'S192xm' | 'S96' | 'S384' | 'S384m' | 'S384xm' | 'S384xxm' | 'S576m' | 'S576xm' | 'S768' | 'S768m' | 'S768xm' | 'S960m' | 'S224o' | 'S224m' | 'S224om' | 'S224oxm' | 'S224oxxm'; /** * Defines values for HanaInstancePowerStateEnum. @@ -353,12 +365,13 @@ export type HanaInstanceSizeNamesEnum = 'S72m' | 'S144m' | 'S72' | 'S144' | 'S19 export type HanaInstancePowerStateEnum = 'starting' | 'started' | 'stopping' | 'stopped' | 'restarting' | 'unknown'; /** - * Defines values for HanaDatabaseContainersEnum. - * Possible values include: 'single', 'multiple' + * Defines values for HanaProvisioningStatesEnum. + * Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + * 'Migrating' * @readonly * @enum {string} */ -export type HanaDatabaseContainersEnum = 'single' | 'multiple'; +export type HanaProvisioningStatesEnum = 'Accepted' | 'Creating' | 'Updating' | 'Failed' | 'Succeeded' | 'Deleting' | 'Migrating'; /** * Contains response data for the list operation. @@ -440,6 +453,26 @@ export type HanaInstancesGetResponse = HanaInstance & { }; }; +/** + * Contains response data for the create operation. + */ +export type HanaInstancesCreateResponse = HanaInstance & { + /** + * 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: HanaInstance; + }; +}; + /** * Contains response data for the update operation. */ @@ -460,6 +493,26 @@ export type HanaInstancesUpdateResponse = HanaInstance & { }; }; +/** + * Contains response data for the beginCreate operation. + */ +export type HanaInstancesBeginCreateResponse = HanaInstance & { + /** + * 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: HanaInstance; + }; +}; + /** * Contains response data for the listNext operation. */ diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts index eb11261c1a5f..c74e28afe1c8 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts @@ -170,6 +170,13 @@ export const OSProfile: msRest.CompositeMapper = { type: { name: "String" } + }, + sshPublicKey: { + readOnly: true, + serializedName: "sshPublicKey", + type: { + name: "String" + } } } } @@ -283,6 +290,20 @@ export const HanaInstance: msRest.CompositeMapper = { type: { name: "String" } + }, + partnerNodeId: { + readOnly: true, + serializedName: "properties.partnerNodeId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } } } } @@ -406,8 +427,8 @@ export const MonitoringDetails: msRest.CompositeMapper = { name: "Composite", className: "MonitoringDetails", modelProperties: { - hanaVnet: { - serializedName: "hanaVnet", + hanaSubnet: { + serializedName: "hanaSubnet", type: { name: "String" } @@ -418,23 +439,16 @@ export const MonitoringDetails: msRest.CompositeMapper = { name: "String" } }, - hanaInstanceNum: { - serializedName: "hanaInstanceNum", - type: { - name: "String" - } - }, - dbContainer: { - serializedName: "dbContainer", - defaultValue: 'single', + hanaDbName: { + serializedName: "hanaDbName", type: { name: "String" } }, - hanaDatabase: { - serializedName: "hanaDatabase", + hanaDbSqlPort: { + serializedName: "hanaDbSqlPort", type: { - name: "String" + name: "Number" } }, hanaDbUsername: { diff --git a/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts b/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts index 9ed0944caab6..ab8209e1784b 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts @@ -117,6 +117,20 @@ export class HanaInstances { callback) as Promise; } + /** + * Creates a SAP HANA instance for the specified subscription, resource group, and instance name. + * @summary Creates a SAP HANA instance. + * @param resourceGroupName Name of the resource group. + * @param hanaInstanceName Name of the SAP HANA on Azure instance. + * @param hanaInstanceParameter Request body representing a HanaInstance + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, hanaInstanceName: string, hanaInstanceParameter: Models.HanaInstance, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,hanaInstanceName,hanaInstanceParameter,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, * and instance name. @@ -180,6 +194,27 @@ export class HanaInstances { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * Creates a SAP HANA instance for the specified subscription, resource group, and instance name. + * @summary Creates a SAP HANA instance. + * @param resourceGroupName Name of the resource group. + * @param hanaInstanceName Name of the SAP HANA on Azure instance. + * @param hanaInstanceParameter Request body representing a HanaInstance + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, hanaInstanceName: string, hanaInstanceParameter: Models.HanaInstance, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + hanaInstanceName, + hanaInstanceParameter, + options + }, + beginCreateOperationSpec, + options); + } + /** * The operation to restart a SAP HANA instance. * @param resourceGroupName Name of the resource group. @@ -385,6 +420,41 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hanaInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "hanaInstanceParameter", + mapper: { + ...Mappers.HanaInstance, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.HanaInstance + }, + 201: { + bodyMapper: Mappers.HanaInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const beginRestartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/restart",