Skip to content

Commit fd3d26d

Browse files
Azure CLI BotSDKAutoJorge Chavez Nieto
authored
[AutoRelease] t2-costmanagement-2021-07-27-84467 (Azure#19949)
* CodeGen from PR 15291 in Azure/azure-rest-api-specs Updating Query filter description (Azure#15291) Co-authored-by: Jorge Chavez Nieto <jochav@microsoft.com> * version,CHANGELOG Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: Jorge Chavez Nieto <jochav@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent 7e7f552 commit fd3d26d

File tree

6 files changed

+39
-21
lines changed

6 files changed

+39
-21
lines changed

sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 3.0.0 (2021-07-27)
4+
5+
**Breaking changes**
6+
7+
- Parameter dataset of model QueryDefinition is now required
8+
- Parameter dataset of model ForecastDefinition is now required
9+
310
## 2.0.0 (2021-06-08)
411

512
**Features**
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.4.5",
33
"use": [
4-
"@autorest/python@5.8.0",
4+
"@autorest/python@5.8.4",
55
"@autorest/modelerfour@4.19.2"
66
],
7-
"commit": "67528b3e539b96ccaaf82c360f5715184e467e21",
7+
"commit": "74efe54fbc55c91a1d9213afbb2723747acfddf9",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2",
9+
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
1010
"readme": "specification/cost-management/resource-manager/readme.md"
1111
}

sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "2.0.0"
9+
VERSION = "3.0.0"

sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ class FunctionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
185185
"""The name of the aggregation function to use.
186186
"""
187187

188+
AVG = "Avg"
189+
MAX = "Max"
190+
MIN = "Min"
188191
SUM = "Sum"
189192

190193
class GranularityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):

sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ class ForecastDefinition(msrest.serialization.Model):
10121012
:type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType
10131013
:param time_period: Has time period for pulling data for the forecast.
10141014
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
1015-
:param dataset: Has definition for data in this forecast.
1015+
:param dataset: Required. Has definition for data in this forecast.
10161016
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
10171017
:param include_actual_cost: a boolean determining if actualCost will be included.
10181018
:type include_actual_cost: bool
@@ -1023,6 +1023,7 @@ class ForecastDefinition(msrest.serialization.Model):
10231023
_validation = {
10241024
'type': {'required': True},
10251025
'timeframe': {'required': True},
1026+
'dataset': {'required': True},
10261027
}
10271028

10281029
_attribute_map = {
@@ -1042,7 +1043,7 @@ def __init__(
10421043
self.type = kwargs['type']
10431044
self.timeframe = kwargs['timeframe']
10441045
self.time_period = kwargs.get('time_period', None)
1045-
self.dataset = kwargs.get('dataset', None)
1046+
self.dataset = kwargs['dataset']
10461047
self.include_actual_cost = kwargs.get('include_actual_cost', None)
10471048
self.include_fresh_partial_cost = kwargs.get('include_fresh_partial_cost', None)
10481049

@@ -1267,7 +1268,7 @@ class QueryAggregation(msrest.serialization.Model):
12671268
:param name: Required. The name of the column to aggregate.
12681269
:type name: str
12691270
:param function: Required. The name of the aggregation function to use. Possible values
1270-
include: "Sum".
1271+
include: "Avg", "Max", "Min", "Sum".
12711272
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
12721273
"""
12731274

@@ -1364,7 +1365,8 @@ class QueryDataset(msrest.serialization.Model):
13641365
:param grouping: Array of group by expression to use in the query. Query can have up to 2 group
13651366
by clauses.
13661367
:type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping]
1367-
:param filter: Has filter expression to use in the query.
1368+
:param filter: The filter expression to use in the query. Please reference our Query API REST
1369+
documentation for how to properly format the filter.
13681370
:type filter: ~azure.mgmt.costmanagement.models.QueryFilter
13691371
"""
13701372

@@ -1407,7 +1409,8 @@ class QueryDatasetAutoGenerated(msrest.serialization.Model):
14071409
:param grouping: Array of group by expression to use in the query. Query can have up to 2 group
14081410
by clauses.
14091411
:type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping]
1410-
:param filter: Has filter expression to use in the query.
1412+
:param filter: The filter expression to use in the query. Please reference our Query API REST
1413+
documentation for how to properly format the filter.
14111414
:type filter: ~azure.mgmt.costmanagement.models.QueryFilterAutoGenerated
14121415
"""
14131416

@@ -1469,13 +1472,14 @@ class QueryDefinition(msrest.serialization.Model):
14691472
:type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType
14701473
:param time_period: Has time period for pulling data for the query.
14711474
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
1472-
:param dataset: Has definition for data in this query.
1475+
:param dataset: Required. Has definition for data in this query.
14731476
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
14741477
"""
14751478

14761479
_validation = {
14771480
'type': {'required': True},
14781481
'timeframe': {'required': True},
1482+
'dataset': {'required': True},
14791483
}
14801484

14811485
_attribute_map = {
@@ -1493,7 +1497,7 @@ def __init__(
14931497
self.type = kwargs['type']
14941498
self.timeframe = kwargs['timeframe']
14951499
self.time_period = kwargs.get('time_period', None)
1496-
self.dataset = kwargs.get('dataset', None)
1500+
self.dataset = kwargs['dataset']
14971501

14981502

14991503
class QueryFilter(msrest.serialization.Model):
@@ -1700,7 +1704,7 @@ class ReportConfigAggregation(msrest.serialization.Model):
17001704
:param name: Required. The name of the column to aggregate.
17011705
:type name: str
17021706
:param function: Required. The name of the aggregation function to use. Possible values
1703-
include: "Sum".
1707+
include: "Avg", "Max", "Min", "Sum".
17041708
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
17051709
"""
17061710

sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ class ForecastDefinition(msrest.serialization.Model):
11171117
:type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType
11181118
:param time_period: Has time period for pulling data for the forecast.
11191119
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
1120-
:param dataset: Has definition for data in this forecast.
1120+
:param dataset: Required. Has definition for data in this forecast.
11211121
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
11221122
:param include_actual_cost: a boolean determining if actualCost will be included.
11231123
:type include_actual_cost: bool
@@ -1128,6 +1128,7 @@ class ForecastDefinition(msrest.serialization.Model):
11281128
_validation = {
11291129
'type': {'required': True},
11301130
'timeframe': {'required': True},
1131+
'dataset': {'required': True},
11311132
}
11321133

11331134
_attribute_map = {
@@ -1144,8 +1145,8 @@ def __init__(
11441145
*,
11451146
type: Union[str, "ForecastType"],
11461147
timeframe: Union[str, "ForecastTimeframeType"],
1148+
dataset: "QueryDataset",
11471149
time_period: Optional["QueryTimePeriod"] = None,
1148-
dataset: Optional["QueryDataset"] = None,
11491150
include_actual_cost: Optional[bool] = None,
11501151
include_fresh_partial_cost: Optional[bool] = None,
11511152
**kwargs
@@ -1392,7 +1393,7 @@ class QueryAggregation(msrest.serialization.Model):
13921393
:param name: Required. The name of the column to aggregate.
13931394
:type name: str
13941395
:param function: Required. The name of the aggregation function to use. Possible values
1395-
include: "Sum".
1396+
include: "Avg", "Max", "Min", "Sum".
13961397
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
13971398
"""
13981399

@@ -1499,7 +1500,8 @@ class QueryDataset(msrest.serialization.Model):
14991500
:param grouping: Array of group by expression to use in the query. Query can have up to 2 group
15001501
by clauses.
15011502
:type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping]
1502-
:param filter: Has filter expression to use in the query.
1503+
:param filter: The filter expression to use in the query. Please reference our Query API REST
1504+
documentation for how to properly format the filter.
15031505
:type filter: ~azure.mgmt.costmanagement.models.QueryFilter
15041506
"""
15051507

@@ -1548,7 +1550,8 @@ class QueryDatasetAutoGenerated(msrest.serialization.Model):
15481550
:param grouping: Array of group by expression to use in the query. Query can have up to 2 group
15491551
by clauses.
15501552
:type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping]
1551-
:param filter: Has filter expression to use in the query.
1553+
:param filter: The filter expression to use in the query. Please reference our Query API REST
1554+
documentation for how to properly format the filter.
15521555
:type filter: ~azure.mgmt.costmanagement.models.QueryFilterAutoGenerated
15531556
"""
15541557

@@ -1618,13 +1621,14 @@ class QueryDefinition(msrest.serialization.Model):
16181621
:type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType
16191622
:param time_period: Has time period for pulling data for the query.
16201623
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
1621-
:param dataset: Has definition for data in this query.
1624+
:param dataset: Required. Has definition for data in this query.
16221625
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
16231626
"""
16241627

16251628
_validation = {
16261629
'type': {'required': True},
16271630
'timeframe': {'required': True},
1631+
'dataset': {'required': True},
16281632
}
16291633

16301634
_attribute_map = {
@@ -1639,8 +1643,8 @@ def __init__(
16391643
*,
16401644
type: Union[str, "ExportType"],
16411645
timeframe: Union[str, "TimeframeType"],
1646+
dataset: "QueryDataset",
16421647
time_period: Optional["QueryTimePeriod"] = None,
1643-
dataset: Optional["QueryDataset"] = None,
16441648
**kwargs
16451649
):
16461650
super(QueryDefinition, self).__init__(**kwargs)
@@ -1875,7 +1879,7 @@ class ReportConfigAggregation(msrest.serialization.Model):
18751879
:param name: Required. The name of the column to aggregate.
18761880
:type name: str
18771881
:param function: Required. The name of the aggregation function to use. Possible values
1878-
include: "Sum".
1882+
include: "Avg", "Max", "Min", "Sum".
18791883
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
18801884
"""
18811885

0 commit comments

Comments
 (0)