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
87 changes: 70 additions & 17 deletions sdk/hanaonazure/arm-hanaonazure/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down 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.
* 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
*/
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
*/
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
70 changes: 70 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,20 @@ 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 hanaInstanceParameter Request body representing a HanaInstance
* @param [options] The optional parameters
* @returns Promise<Models.HanaInstancesCreateResponse>
*/
create(resourceGroupName: string, hanaInstanceName: string, hanaInstanceParameter: Models.HanaInstance, options?: msRest.RequestOptionsBase): Promise<Models.HanaInstancesCreateResponse> {
return this.beginCreate(resourceGroupName,hanaInstanceName,hanaInstanceParameter,options)
.then(lroPoller => lroPoller.pollUntilFinished()) 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 @@ -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<msRestAzure.LROPoller>
*/
beginCreate(resourceGroupName: string, hanaInstanceName: string, hanaInstanceParameter: Models.HanaInstance, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
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.
Expand Down Expand Up @@ -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",
Expand Down