diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts index d6c4ade44350..16e50f5df39b 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts @@ -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. - */ - hanaInstanceNum?: string; - /** - * Either single or multiple depending on the use of MDC(Multiple Database Containers). Possible - * values include: 'single', 'multiple'. Default value: 'single'. + * Name of the database itself. */ - dbContainer?: HanaDatabaseContainersEnum; + hanaDbName?: string; /** - * Name of the database itself. It only needs to be specified if using MDC + * The port number of the tenant DB. Used to connect to the DB. */ - hanaDatabase?: string; + hanaDbSqlPort?: number; /** * Username for the HANA database to login to for monitoring */ @@ -353,12 +364,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 +452,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. */ 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..63fa0e76db75 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts @@ -117,6 +117,39 @@ 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 [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group. + * @param hanaInstanceName Name of the SAP HANA on Azure instance. + * @param callback The callback + */ + create(resourceGroupName: string, hanaInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group. + * @param hanaInstanceName Name of the SAP HANA on Azure instance. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, hanaInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hanaInstanceName, + options + }, + createOperationSpec, + callback) as Promise; + } + /** * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, * and instance name. @@ -353,6 +386,31 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; +const createOperationSpec: 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 + ], + responses: { + 201: { + bodyMapper: Mappers.HanaInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}",