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
2 changes: 1 addition & 1 deletion sdk/hdinsight/arm-hdinsight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
},
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/hdinsight/arm-hdinsight",
"homepage": "https://github.com/azure/azure-sdk-for-js",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-js.git"
Expand Down
5 changes: 5 additions & 0 deletions sdk/hdinsight/arm-hdinsight/src/models/applicationsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export {
ApplicationGetHttpsEndpoint,
ApplicationListResult,
ApplicationProperties,
Autoscale,
AutoscaleCapacity,
AutoscaleRecurrence,
AutoscaleSchedule,
AutoscaleTimeAndCapacity,
BaseResource,
Cluster,
ClusterDefinition,
Expand Down
5 changes: 5 additions & 0 deletions sdk/hdinsight/arm-hdinsight/src/models/clustersMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export {
ApplicationGetEndpoint,
ApplicationGetHttpsEndpoint,
ApplicationProperties,
Autoscale,
AutoscaleCapacity,
AutoscaleRecurrence,
AutoscaleSchedule,
AutoscaleTimeAndCapacity,
BaseResource,
Cluster,
ClusterCreateParametersExtended,
Expand Down
88 changes: 88 additions & 0 deletions sdk/hdinsight/arm-hdinsight/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,81 @@ export interface SecurityProfile {
msiResourceId?: string;
}

/**
* Time and capacity request parameters
*/
export interface AutoscaleTimeAndCapacity {
/**
* 24-hour time in the form xx:xx
*/
time?: string;
/**
* The minimum instance count of the cluster
*/
minInstanceCount?: number;
/**
* The maximum instance count of the cluster
*/
maxInstanceCount?: number;
}

/**
* Parameters for a schedule-based autoscale rule, consisting of an array of days + a time and
* capacity
*/
export interface AutoscaleSchedule {
/**
* Days of the week for a schedule-based autoscale rule
*/
days?: DaysOfWeek[];
/**
* Time and capacity for a schedule-based autoscale rule
*/
timeAndCapacity?: AutoscaleTimeAndCapacity;
}

/**
* The load-based autoscale request parameters
*/
export interface AutoscaleCapacity {
/**
* The minimum instance count of the cluster
*/
minInstanceCount?: number;
/**
* The maximum instance count of the cluster
*/
maxInstanceCount?: number;
}

/**
* Schedule-based autoscale request parameters
*/
export interface AutoscaleRecurrence {
/**
* The time zone for the autoscale schedule times
*/
timeZone?: string;
/**
* Array of schedule-based autoscale rules
*/
schedule?: AutoscaleSchedule[];
}

/**
* The autoscale request parameters
*/
export interface Autoscale {
/**
* Parameters for load-based autoscale
*/
capacity?: AutoscaleCapacity;
/**
* Parameters for schedule-based autoscale
*/
recurrence?: AutoscaleRecurrence;
}

/**
* The hardware profile.
*/
Expand Down Expand Up @@ -202,6 +277,10 @@ export interface Role {
* The instance count of the cluster.
*/
targetInstanceCount?: number;
/**
* The autoscale configurations.
*/
autoscaleConfiguration?: Autoscale;
/**
* The hardware profile.
*/
Expand Down Expand Up @@ -1161,6 +1240,15 @@ export interface OperationListResult extends Array<Operation> {
*/
export type DirectoryType = 'ActiveDirectory';

/**
* Defines values for DaysOfWeek.
* Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday',
* 'Sunday'
* @readonly
* @enum {string}
*/
export type DaysOfWeek = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';

/**
* Defines values for OSType.
* Possible values include: 'Windows', 'Linux'
Expand Down
146 changes: 146 additions & 0 deletions sdk/hdinsight/arm-hdinsight/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,145 @@ export const SecurityProfile: msRest.CompositeMapper = {
}
};

export const AutoscaleTimeAndCapacity: msRest.CompositeMapper = {
serializedName: "AutoscaleTimeAndCapacity",
type: {
name: "Composite",
className: "AutoscaleTimeAndCapacity",
modelProperties: {
time: {
serializedName: "time",
type: {
name: "String"
}
},
minInstanceCount: {
serializedName: "minInstanceCount",
type: {
name: "Number"
}
},
maxInstanceCount: {
serializedName: "maxInstanceCount",
type: {
name: "Number"
}
}
}
}
};

export const AutoscaleSchedule: msRest.CompositeMapper = {
serializedName: "AutoscaleSchedule",
type: {
name: "Composite",
className: "AutoscaleSchedule",
modelProperties: {
days: {
serializedName: "days",
type: {
name: "Sequence",
element: {
type: {
name: "Enum",
allowedValues: [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
]
}
}
}
},
timeAndCapacity: {
serializedName: "timeAndCapacity",
type: {
name: "Composite",
className: "AutoscaleTimeAndCapacity"
}
}
}
}
};

export const AutoscaleCapacity: msRest.CompositeMapper = {
serializedName: "AutoscaleCapacity",
type: {
name: "Composite",
className: "AutoscaleCapacity",
modelProperties: {
minInstanceCount: {
serializedName: "minInstanceCount",
type: {
name: "Number"
}
},
maxInstanceCount: {
serializedName: "maxInstanceCount",
type: {
name: "Number"
}
}
}
}
};

export const AutoscaleRecurrence: msRest.CompositeMapper = {
serializedName: "AutoscaleRecurrence",
type: {
name: "Composite",
className: "AutoscaleRecurrence",
modelProperties: {
timeZone: {
serializedName: "timeZone",
type: {
name: "String"
}
},
schedule: {
serializedName: "schedule",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "AutoscaleSchedule"
}
}
}
}
}
}
};

export const Autoscale: msRest.CompositeMapper = {
serializedName: "Autoscale",
type: {
name: "Composite",
className: "Autoscale",
modelProperties: {
capacity: {
serializedName: "capacity",
type: {
name: "Composite",
className: "AutoscaleCapacity"
}
},
recurrence: {
serializedName: "recurrence",
type: {
name: "Composite",
className: "AutoscaleRecurrence"
}
}
}
}
};

export const HardwareProfile: msRest.CompositeMapper = {
serializedName: "HardwareProfile",
type: {
Expand Down Expand Up @@ -335,6 +474,13 @@ export const Role: msRest.CompositeMapper = {
name: "Number"
}
},
autoscaleConfiguration: {
serializedName: "autoscale",
type: {
name: "Composite",
className: "Autoscale"
}
},
hardwareProfile: {
serializedName: "hardwareProfile",
type: {
Expand Down