Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR hdinsight/resource-manager] [HDInsight] Add ListBillingSpecs API to HDInsight's stable and preview version #3839

Closed
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
132 changes: 132 additions & 0 deletions sdk/hdinsight/arm-hdinsight/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,118 @@ export interface UsagesListResult {
value?: Usage[];
}

/**
* This class represent a single filter object that defines a multidimensional set. The dimensions
* of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should be
* defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect
* of exclusion/inclusion) and the ordering of the Filters. Later filters override previous
* settings if conflicted.
*/
export interface VmSizeCompatibilityFilterV2 {
/**
* The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular
* set.
*/
filterMode?: string;
/**
* The list of regions under the effect of the filter.
*/
regions?: string[];
/**
* The list of cluster flavors under the effect of the filter.
*/
clusterFlavors?: string[];
/**
* The list of node types affected by the filter.
*/
nodeTypes?: string[];
/**
* The list of cluster versions affected in Major.Minor format.
*/
clusterVersions?: string[];
/**
* The OSType affected, Windows or Linux.
*/
osType?: string[];
/**
* The list of virtual machine sizes to include or exclude.
*/
vmSizes?: string[];
}

/**
* The billing meters.
*/
export interface BillingMeters {
/**
* The virtual machine sizes.
*/
meterParameter?: string;
/**
* The HDInsight meter guid.
*/
meter?: string;
/**
* The unit of meter, VMHours or CoreHours.
*/
unit?: string;
}

/**
* The disk billing meters.
*/
export interface DiskBillingMeters {
/**
* The managed disk meter guid.
*/
diskRpMeter?: string;
/**
* The managed disk billing sku, P30 or S30.
*/
sku?: string;
/**
* The managed disk billing tier, Standard or Premium.
*/
tier?: string;
}

/**
* The billing resources.
*/
export interface BillingResources {
/**
* The region or location.
*/
region?: string;
/**
* The billing meter information.
*/
billingMeters?: BillingMeters[];
/**
* The managed disk billing information.
*/
diskBillingMeters?: DiskBillingMeters[];
}

/**
* The response for the operation to get regional billingSpecs for a subscription.
*/
export interface BillingResponseListResult {
/**
* The virtual machine sizes to include or exclude.
*/
vmSizes?: string[];
/**
* The virtual machine filtering mode. Effectively this can enabling or disabling the virtual
* machine sizes in a particular set.
*/
vmSizeFilters?: VmSizeCompatibilityFilterV2[];
/**
* The billing and managed disk billing resources for a region.
*/
billingResources?: BillingResources[];
}

/**
* The configuration object for the specified cluster.
*/
Expand Down Expand Up @@ -1518,6 +1630,26 @@ export type LocationsListUsagesResponse = UsagesListResult & {
};
};

/**
* Contains response data for the listBillingSpecs operation.
*/
export type LocationsListBillingSpecsResponse = BillingResponseListResult & {
/**
* 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: BillingResponseListResult;
};
};

/**
* Contains response data for the list operation.
*/
Expand Down
7 changes: 6 additions & 1 deletion sdk/hdinsight/arm-hdinsight/src/models/locationsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
*/

export {
BillingMeters,
BillingResources,
BillingResponseListResult,
DiskBillingMeters,
ErrorResponse,
LocalizedName,
Usage,
UsagesListResult
UsagesListResult,
VmSizeCompatibilityFilterV2
} from "../models/mappers";
223 changes: 223 additions & 0 deletions sdk/hdinsight/arm-hdinsight/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,229 @@ export const UsagesListResult: msRest.CompositeMapper = {
}
};

export const VmSizeCompatibilityFilterV2: msRest.CompositeMapper = {
serializedName: "VmSizeCompatibilityFilterV2",
type: {
name: "Composite",
className: "VmSizeCompatibilityFilterV2",
modelProperties: {
filterMode: {
serializedName: "filterMode",
type: {
name: "String"
}
},
regions: {
serializedName: "regions",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
},
clusterFlavors: {
serializedName: "clusterFlavors",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
},
nodeTypes: {
serializedName: "nodeTypes",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
},
clusterVersions: {
serializedName: "clusterVersions",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
},
osType: {
serializedName: "osType",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
},
vmSizes: {
serializedName: "vmSizes",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
}
}
}
};

export const BillingMeters: msRest.CompositeMapper = {
serializedName: "BillingMeters",
type: {
name: "Composite",
className: "BillingMeters",
modelProperties: {
meterParameter: {
serializedName: "meterParameter",
type: {
name: "String"
}
},
meter: {
serializedName: "meter",
type: {
name: "String"
}
},
unit: {
serializedName: "unit",
type: {
name: "String"
}
}
}
}
};

export const DiskBillingMeters: msRest.CompositeMapper = {
serializedName: "DiskBillingMeters",
type: {
name: "Composite",
className: "DiskBillingMeters",
modelProperties: {
diskRpMeter: {
serializedName: "diskRpMeter",
type: {
name: "String"
}
},
sku: {
serializedName: "sku",
type: {
name: "String"
}
},
tier: {
serializedName: "tier",
type: {
name: "String"
}
}
}
}
};

export const BillingResources: msRest.CompositeMapper = {
serializedName: "BillingResources",
type: {
name: "Composite",
className: "BillingResources",
modelProperties: {
region: {
serializedName: "region",
type: {
name: "String"
}
},
billingMeters: {
serializedName: "billingMeters",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "BillingMeters"
}
}
}
},
diskBillingMeters: {
serializedName: "diskBillingMeters",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "DiskBillingMeters"
}
}
}
}
}
}
};

export const BillingResponseListResult: msRest.CompositeMapper = {
serializedName: "BillingResponseListResult",
type: {
name: "Composite",
className: "BillingResponseListResult",
modelProperties: {
vmSizes: {
serializedName: "vmSizes",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
},
vmSizeFilters: {
serializedName: "vmSizeFilters",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "VmSizeCompatibilityFilterV2"
}
}
}
},
billingResources: {
serializedName: "billingResources",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "BillingResources"
}
}
}
}
}
}
};

export const ClusterConfigurations: msRest.CompositeMapper = {
serializedName: "ClusterConfigurations",
type: {
Expand Down
Loading