diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md index 7e2d43aea3f4..ab098a2f2c20 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md +++ b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 3.0.0 (2021-07-27) + +**Breaking changes** + + - Parameter dataset of model QueryDefinition is now required + - Parameter dataset of model ForecastDefinition is now required + ## 2.0.0 (2021-06-08) **Features** diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/_meta.json b/sdk/costmanagement/azure-mgmt-costmanagement/_meta.json index 03051a9b4540..8041e01d515b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/_meta.json +++ b/sdk/costmanagement/azure-mgmt-costmanagement/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.2", + "autorest": "3.4.5", "use": [ - "@autorest/python@5.8.0", + "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "67528b3e539b96ccaaf82c360f5715184e467e21", + "commit": "74efe54fbc55c91a1d9213afbb2723747acfddf9", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "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", + "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", "readme": "specification/cost-management/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py index 48944bf3938a..cac9f5d10f8b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "3.0.0" diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py index 16087446457c..eac0fd7748ff 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py @@ -185,6 +185,9 @@ class FunctionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The name of the aggregation function to use. """ + AVG = "Avg" + MAX = "Max" + MIN = "Min" SUM = "Sum" class GranularityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py index 2c2ba531e35b..ffd3292fd2df 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py @@ -1012,7 +1012,7 @@ class ForecastDefinition(msrest.serialization.Model): :type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType :param time_period: Has time period for pulling data for the forecast. :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod - :param dataset: Has definition for data in this forecast. + :param dataset: Required. Has definition for data in this forecast. :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset :param include_actual_cost: a boolean determining if actualCost will be included. :type include_actual_cost: bool @@ -1023,6 +1023,7 @@ class ForecastDefinition(msrest.serialization.Model): _validation = { 'type': {'required': True}, 'timeframe': {'required': True}, + 'dataset': {'required': True}, } _attribute_map = { @@ -1042,7 +1043,7 @@ def __init__( self.type = kwargs['type'] self.timeframe = kwargs['timeframe'] self.time_period = kwargs.get('time_period', None) - self.dataset = kwargs.get('dataset', None) + self.dataset = kwargs['dataset'] self.include_actual_cost = kwargs.get('include_actual_cost', None) self.include_fresh_partial_cost = kwargs.get('include_fresh_partial_cost', None) @@ -1267,7 +1268,7 @@ class QueryAggregation(msrest.serialization.Model): :param name: Required. The name of the column to aggregate. :type name: str :param function: Required. The name of the aggregation function to use. Possible values - include: "Sum". + include: "Avg", "Max", "Min", "Sum". :type function: str or ~azure.mgmt.costmanagement.models.FunctionType """ @@ -1364,7 +1365,8 @@ class QueryDataset(msrest.serialization.Model): :param grouping: Array of group by expression to use in the query. Query can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] - :param filter: Has filter expression to use in the query. + :param filter: The filter expression to use in the query. Please reference our Query API REST + documentation for how to properly format the filter. :type filter: ~azure.mgmt.costmanagement.models.QueryFilter """ @@ -1407,7 +1409,8 @@ class QueryDatasetAutoGenerated(msrest.serialization.Model): :param grouping: Array of group by expression to use in the query. Query can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] - :param filter: Has filter expression to use in the query. + :param filter: The filter expression to use in the query. Please reference our Query API REST + documentation for how to properly format the filter. :type filter: ~azure.mgmt.costmanagement.models.QueryFilterAutoGenerated """ @@ -1469,13 +1472,14 @@ class QueryDefinition(msrest.serialization.Model): :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType :param time_period: Has time period for pulling data for the query. :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod - :param dataset: Has definition for data in this query. + :param dataset: Required. Has definition for data in this query. :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset """ _validation = { 'type': {'required': True}, 'timeframe': {'required': True}, + 'dataset': {'required': True}, } _attribute_map = { @@ -1493,7 +1497,7 @@ def __init__( self.type = kwargs['type'] self.timeframe = kwargs['timeframe'] self.time_period = kwargs.get('time_period', None) - self.dataset = kwargs.get('dataset', None) + self.dataset = kwargs['dataset'] class QueryFilter(msrest.serialization.Model): @@ -1700,7 +1704,7 @@ class ReportConfigAggregation(msrest.serialization.Model): :param name: Required. The name of the column to aggregate. :type name: str :param function: Required. The name of the aggregation function to use. Possible values - include: "Sum". + include: "Avg", "Max", "Min", "Sum". :type function: str or ~azure.mgmt.costmanagement.models.FunctionType """ diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py index 699d4b63d817..e3f7e70197dd 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py @@ -1117,7 +1117,7 @@ class ForecastDefinition(msrest.serialization.Model): :type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType :param time_period: Has time period for pulling data for the forecast. :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod - :param dataset: Has definition for data in this forecast. + :param dataset: Required. Has definition for data in this forecast. :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset :param include_actual_cost: a boolean determining if actualCost will be included. :type include_actual_cost: bool @@ -1128,6 +1128,7 @@ class ForecastDefinition(msrest.serialization.Model): _validation = { 'type': {'required': True}, 'timeframe': {'required': True}, + 'dataset': {'required': True}, } _attribute_map = { @@ -1144,8 +1145,8 @@ def __init__( *, type: Union[str, "ForecastType"], timeframe: Union[str, "ForecastTimeframeType"], + dataset: "QueryDataset", time_period: Optional["QueryTimePeriod"] = None, - dataset: Optional["QueryDataset"] = None, include_actual_cost: Optional[bool] = None, include_fresh_partial_cost: Optional[bool] = None, **kwargs @@ -1392,7 +1393,7 @@ class QueryAggregation(msrest.serialization.Model): :param name: Required. The name of the column to aggregate. :type name: str :param function: Required. The name of the aggregation function to use. Possible values - include: "Sum". + include: "Avg", "Max", "Min", "Sum". :type function: str or ~azure.mgmt.costmanagement.models.FunctionType """ @@ -1499,7 +1500,8 @@ class QueryDataset(msrest.serialization.Model): :param grouping: Array of group by expression to use in the query. Query can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] - :param filter: Has filter expression to use in the query. + :param filter: The filter expression to use in the query. Please reference our Query API REST + documentation for how to properly format the filter. :type filter: ~azure.mgmt.costmanagement.models.QueryFilter """ @@ -1548,7 +1550,8 @@ class QueryDatasetAutoGenerated(msrest.serialization.Model): :param grouping: Array of group by expression to use in the query. Query can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] - :param filter: Has filter expression to use in the query. + :param filter: The filter expression to use in the query. Please reference our Query API REST + documentation for how to properly format the filter. :type filter: ~azure.mgmt.costmanagement.models.QueryFilterAutoGenerated """ @@ -1618,13 +1621,14 @@ class QueryDefinition(msrest.serialization.Model): :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType :param time_period: Has time period for pulling data for the query. :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod - :param dataset: Has definition for data in this query. + :param dataset: Required. Has definition for data in this query. :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset """ _validation = { 'type': {'required': True}, 'timeframe': {'required': True}, + 'dataset': {'required': True}, } _attribute_map = { @@ -1639,8 +1643,8 @@ def __init__( *, type: Union[str, "ExportType"], timeframe: Union[str, "TimeframeType"], + dataset: "QueryDataset", time_period: Optional["QueryTimePeriod"] = None, - dataset: Optional["QueryDataset"] = None, **kwargs ): super(QueryDefinition, self).__init__(**kwargs) @@ -1875,7 +1879,7 @@ class ReportConfigAggregation(msrest.serialization.Model): :param name: Required. The name of the column to aggregate. :type name: str :param function: Required. The name of the aggregation function to use. Possible values - include: "Sum". + include: "Avg", "Max", "Min", "Sum". :type function: str or ~azure.mgmt.costmanagement.models.FunctionType """