Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 46 additions & 14 deletions sdk/hanaonazure/arm-hanaonazure/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down
42 changes: 28 additions & 14 deletions sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ export const OSProfile: msRest.CompositeMapper = {
type: {
name: "String"
}
},
sshPublicKey: {
readOnly: true,
serializedName: "sshPublicKey",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -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"
}
}
}
}
Expand Down Expand Up @@ -406,8 +427,8 @@ export const MonitoringDetails: msRest.CompositeMapper = {
name: "Composite",
className: "MonitoringDetails",
modelProperties: {
hanaVnet: {
serializedName: "hanaVnet",
hanaSubnet: {
serializedName: "hanaSubnet",
type: {
name: "String"
}
Expand All @@ -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: {
Expand Down
58 changes: 58 additions & 0 deletions sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,39 @@ export class HanaInstances {
callback) as Promise<Models.HanaInstancesGetResponse>;
}

/**
* 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<Models.HanaInstancesCreateResponse>
*/
create(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise<Models.HanaInstancesCreateResponse>;
/**
* @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<Models.HanaInstance>): 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<Models.HanaInstance>): void;
create(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.HanaInstance>, callback?: msRest.ServiceCallback<Models.HanaInstance>): Promise<Models.HanaInstancesCreateResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
hanaInstanceName,
options
},
createOperationSpec,
callback) as Promise<Models.HanaInstancesCreateResponse>;
}

/**
* Patches the Tags field of a SAP HANA instance for the specified subscription, resource group,
* and instance name.
Expand Down Expand Up @@ -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}",
Expand Down