diff --git a/src/costmanagement/azext_costmanagement/__init__.py b/src/costmanagement/azext_costmanagement/__init__.py index 0dea69d2cb9..c502c01141c 100644 --- a/src/costmanagement/azext_costmanagement/__init__.py +++ b/src/costmanagement/azext_costmanagement/__init__.py @@ -20,8 +20,8 @@ def __init__(self, cli_ctx=None): costmanagement_custom = CliCommandType( operations_tmpl='azext_costmanagement.custom#{}', client_factory=cf_costmanagement) - super(CostManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=costmanagement_custom) + parent = super(CostManagementClientCommandsLoader, self) + parent.__init__(cli_ctx=cli_ctx, custom_command_type=costmanagement_custom) def load_command_table(self, args): from azext_costmanagement.generated.commands import load_command_table diff --git a/src/costmanagement/azext_costmanagement/generated/_help.py b/src/costmanagement/azext_costmanagement/generated/_help.py index c075b0fca29..9a8227126e5 100644 --- a/src/costmanagement/azext_costmanagement/generated/_help.py +++ b/src/costmanagement/azext_costmanagement/generated/_help.py @@ -31,16 +31,42 @@ type: command short-summary: Gets the view by view name. examples: - - name: ResourceGroupView + - name: PrivateView text: |- - az costmanagement view show --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/M\ -YDEVTESTRG" --view-name "swaggerExample" + az costmanagement view show --name "swaggerExample" """ helps['costmanagement view create'] = """ type: command short-summary: The operation to create or update a view. Update operation requires latest eTag to be set in the req\ uest. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. + parameters: + - name: --kpis + short-summary: List of KPIs to show in Cost Analysis UI. + long-summary: | + Usage: --kpis type=XX id=XX enabled=XX + + type: KPI type (Forecast, Budget). + id: ID of resource related to metric (budget). + enabled: show the KPI in the UI? + + Multiple actions can be specified by using more than one --kpis argument. + - name: --pivots + short-summary: Configuration of 3 sub-views in the Cost Analysis UI. + long-summary: | + Usage: --pivots type=XX name=XX + + type: Data type to show in view. + name: Data field to show in view. + + Multiple actions can be specified by using more than one --pivots argument. + - name: --query-time-period + short-summary: Has time period for pulling data for the report. + long-summary: | + Usage: --query-time-period from=XX to=XX + + from: Required. The start date to pull data from. + to: Required. The end date to pull data to. examples: - name: ResourceGroupCreateOrUpdateView text: |- @@ -51,7 +77,7 @@ -pivots name="swaggerTagKey" type="TagKey" --query-dataset "{\\"aggregation\\":{\\"totalCost\\":{\\"name\\":\\"PreTaxCo\ st\\",\\"function\\":\\"Sum\\"}},\\"granularity\\":\\"Daily\\",\\"grouping\\":[],\\"sorting\\":[{\\"name\\":\\"UsageDat\ e\\",\\"direction\\":\\"Ascending\\"}]}" --query-timeframe "MonthToDate" --properties-scope "subscriptions/00000000-000\ -0-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" --view-name "swaggerExample" +0-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" --name "swaggerExample" """ helps['costmanagement view delete'] = """ @@ -61,7 +87,17 @@ - name: ResourceGroupDeleteView text: |- az costmanagement view delete --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups\ -/MYDEVTESTRG" --view-name "TestView" +/MYDEVTESTRG" --name "TestView" +""" + +helps['costmanagement view get-by-scope'] = """ + type: command + short-summary: Gets the view for the defined scope by view name. + examples: + - name: ResourceGroupView + text: |- + az costmanagement view get-by-scope --scope "subscriptions/00000000-0000-0000-0000-000000000000/resource\ +Groups/MYDEVTESTRG" --name "swaggerExample" """ helps['costmanagement alert'] = """ @@ -118,6 +154,15 @@ helps['costmanagement alert dismiss'] = """ type: command short-summary: Dismisses the specified alert + parameters: + - name: --definition + short-summary: defines the type of alert + long-summary: | + Usage: --definition type=XX category=XX criteria=XX + + type: type of alert + category: Alert category + criteria: Criteria that triggered alert examples: - name: ResourceGroupAlerts text: |- @@ -151,6 +196,31 @@ helps['costmanagement forecast external-cloud-provider-usage'] = """ type: command short-summary: Lists the forecast charges for external cloud provider type defined. + parameters: + - name: --time-period + short-summary: Has time period for pulling data for the forecast. + long-summary: | + Usage: --time-period from=XX to=XX + + from: Required. The start date to pull data from. + to: Required. The end date to pull data to. + - name: --dataset-configuration + short-summary: Has configuration information for the data in the export. The configuration will be ignored if a\ +ggregation and grouping are provided. + long-summary: | + Usage: --dataset-configuration columns=XX + + columns: Array of column names to be included in the query. Any valid query column name is allowed. If not \ +provided, then query includes all columns. + - name: --dataset-grouping + short-summary: Array of group by expression to use in the query. Query can have up to 2 group by clauses. + long-summary: | + Usage: --dataset-grouping type=XX name=XX + + type: Required. Has type of the column to group. + name: Required. The name of the column to group. + + Multiple actions can be specified by using more than one --dataset-grouping argument. examples: - name: ExternalBillingAccountForecast text: |- @@ -171,6 +241,31 @@ helps['costmanagement forecast usage'] = """ type: command short-summary: Lists the forecast charges for scope defined. + parameters: + - name: --time-period + short-summary: Has time period for pulling data for the forecast. + long-summary: | + Usage: --time-period from=XX to=XX + + from: Required. The start date to pull data from. + to: Required. The end date to pull data to. + - name: --dataset-configuration + short-summary: Has configuration information for the data in the export. The configuration will be ignored if a\ +ggregation and grouping are provided. + long-summary: | + Usage: --dataset-configuration columns=XX + + columns: Array of column names to be included in the query. Any valid query column name is allowed. If not \ +provided, then query includes all columns. + - name: --dataset-grouping + short-summary: Array of group by expression to use in the query. Query can have up to 2 group by clauses. + long-summary: | + Usage: --dataset-grouping type=XX name=XX + + type: Required. Has type of the column to group. + name: Required. The name of the column to group. + + Multiple actions can be specified by using more than one --dataset-grouping argument. examples: - name: BillingAccountForecast text: |- @@ -363,6 +458,31 @@ helps['costmanagement query usage'] = """ type: command short-summary: Query the usage data for scope defined. + parameters: + - name: --time-period + short-summary: Has time period for pulling data for the query. + long-summary: | + Usage: --time-period from=XX to=XX + + from: Required. The start date to pull data from. + to: Required. The end date to pull data to. + - name: --dataset-configuration + short-summary: Has configuration information for the data in the export. The configuration will be ignored if a\ +ggregation and grouping are provided. + long-summary: | + Usage: --dataset-configuration columns=XX + + columns: Array of column names to be included in the query. Any valid query column name is allowed. If not \ +provided, then query includes all columns. + - name: --dataset-grouping + short-summary: Array of group by expression to use in the query. Query can have up to 2 group by clauses. + long-summary: | + Usage: --dataset-grouping type=XX name=XX + + type: Required. Has type of the column to group. + name: Required. The name of the column to group. + + Multiple actions can be specified by using more than one --dataset-grouping argument. examples: - name: BillingAccountQuery-Legacy text: |- @@ -489,6 +609,31 @@ helps['costmanagement query usage-by-external-cloud-provider-type'] = """ type: command short-summary: Query the usage data for external cloud provider type defined. + parameters: + - name: --time-period + short-summary: Has time period for pulling data for the query. + long-summary: | + Usage: --time-period from=XX to=XX + + from: Required. The start date to pull data from. + to: Required. The end date to pull data to. + - name: --dataset-configuration + short-summary: Has configuration information for the data in the export. The configuration will be ignored if a\ +ggregation and grouping are provided. + long-summary: | + Usage: --dataset-configuration columns=XX + + columns: Array of column names to be included in the query. Any valid query column name is allowed. If not \ +provided, then query includes all columns. + - name: --dataset-grouping + short-summary: Array of group by expression to use in the query. Query can have up to 2 group by clauses. + long-summary: | + Usage: --dataset-grouping type=XX name=XX + + type: Required. Has type of the column to group. + name: Required. The name of the column to group. + + Multiple actions can be specified by using more than one --dataset-grouping argument. examples: - name: ExternalBillingAccountQueryList text: |- @@ -539,214 +684,296 @@ helps['costmanagement export show'] = """ type: command - short-summary: The operation to get the execution history of an export for the defined scope by export name. + short-summary: The operation to get the export for the defined scope by export name. examples: - name: BillingAccountExport text: |- - az costmanagement export show --export-name "TestExport" --scope "providers/Microsoft.Billing/billingAcc\ -ounts/123456" + az costmanagement export show --name "TestExport" --scope "providers/Microsoft.Billing/billingAccounts/1\ +23456" - name: DepartmentExport text: |- - az costmanagement export show --export-name "TestExport" --scope "providers/Microsoft.Billing/billingAcc\ -ounts/12/departments/1234" + az costmanagement export show --name "TestExport" --scope "providers/Microsoft.Billing/billingAccounts/1\ +2/departments/1234" - name: EnrollmentAccountExport text: |- - az costmanagement export show --export-name "TestExport" --scope "providers/Microsoft.Billing/billingAcc\ -ounts/100/enrollmentAccounts/456" + az costmanagement export show --name "TestExport" --scope "providers/Microsoft.Billing/billingAccounts/1\ +00/enrollmentAccounts/456" - name: ManagementGroupExport text: |- - az costmanagement export show --export-name "TestExport" --scope "providers/Microsoft.Management/managem\ -entGroups/TestMG" + az costmanagement export show --name "TestExport" --scope "providers/Microsoft.Management/managementGrou\ +ps/TestMG" - name: ResourceGroupExport text: |- - az costmanagement export show --export-name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-\ -000000000000/resourceGroups/MYDEVTESTRG" + az costmanagement export show --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-0000000\ +00000/resourceGroups/MYDEVTESTRG" - name: SubscriptionExport text: |- - az costmanagement export show --export-name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-\ -000000000000" + az costmanagement export show --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-0000000\ +00000" """ helps['costmanagement export create'] = """ type: command short-summary: The operation to create or update a export. Update operation requires latest eTag to be set in the r\ equest. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. + parameters: + - name: --definition-time-period + short-summary: Has time period for pulling data for the query. + long-summary: | + Usage: --definition-time-period from=XX to=XX + + from: Required. The start date to pull data from. + to: Required. The end date to pull data to. + - name: --definition-dataset-configuration + short-summary: Has configuration information for the data in the export. The configuration will be ignored if a\ +ggregation and grouping are provided. + long-summary: | + Usage: --definition-dataset-configuration columns=XX + + columns: Array of column names to be included in the query. Any valid query column name is allowed. If not \ +provided, then query includes all columns. + - name: --definition-dataset-grouping + short-summary: Array of group by expression to use in the query. Query can have up to 2 group by clauses. + long-summary: | + Usage: --definition-dataset-grouping type=XX name=XX + + type: Required. Has type of the column to group. + name: Required. The name of the column to group. + + Multiple actions can be specified by using more than one --definition-dataset-grouping argument. + - name: --delivery-info-destination + short-summary: Has destination for the export being delivered. + long-summary: | + Usage: --delivery-info-destination resource-id=XX container=XX root-folder-path=XX + + resource-id: Required. The resource id of the storage account where exports will be delivered. + container: Required. The name of the container where exports will be uploaded. + root-folder-path: The name of the directory where exports will be uploaded. + - name: --schedule-recurrence-period + short-summary: Has start and end date of the recurrence. The start date must be in future. If present, the end \ +date must be greater than start date. + long-summary: | + Usage: --schedule-recurrence-period from=XX to=XX + + from: Required. The start date of recurrence. + to: The end date of recurrence. examples: - name: BillingAccountCreateOrUpdateExport text: |- - az costmanagement export create --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billi\ -ngAccounts/123456" + az costmanagement export create --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billingAccount\ +s/123456" - name: DepartmentCreateOrUpdateExport text: |- - az costmanagement export create --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billi\ -ngAccounts/12/departments/1234" + az costmanagement export create --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billingAccount\ +s/12/departments/1234" - name: EnrollmentAccountCreateOrUpdateExport text: |- - az costmanagement export create --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billi\ -ngAccounts/100/enrollmentAccounts/456" + az costmanagement export create --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billingAccount\ +s/100/enrollmentAccounts/456" - name: ManagementGroupCreateOrUpdateExport text: |- - az costmanagement export create --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Management/ma\ -nagementGroups/TestMG" + az costmanagement export create --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Management/managementG\ +roups/TestMG" - name: ResourceGroupCreateOrUpdateExport text: |- - az costmanagement export create --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-\ -0000-000000000000/resourceGroups/MYDEVTESTRG" + az costmanagement export create --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-0000-0000\ +00000000/resourceGroups/MYDEVTESTRG" - name: SubscriptionCreateOrUpdateExport text: |- - az costmanagement export create --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-\ -0000-000000000000" + az costmanagement export create --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-0000-0000\ +00000000" """ helps['costmanagement export update'] = """ type: command short-summary: The operation to create or update a export. Update operation requires latest eTag to be set in the r\ equest. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. + parameters: + - name: --definition-time-period + short-summary: Has time period for pulling data for the query. + long-summary: | + Usage: --definition-time-period from=XX to=XX + + from: Required. The start date to pull data from. + to: Required. The end date to pull data to. + - name: --definition-dataset-configuration + short-summary: Has configuration information for the data in the export. The configuration will be ignored if a\ +ggregation and grouping are provided. + long-summary: | + Usage: --definition-dataset-configuration columns=XX + + columns: Array of column names to be included in the query. Any valid query column name is allowed. If not \ +provided, then query includes all columns. + - name: --definition-dataset-grouping + short-summary: Array of group by expression to use in the query. Query can have up to 2 group by clauses. + long-summary: | + Usage: --definition-dataset-grouping type=XX name=XX + + type: Required. Has type of the column to group. + name: Required. The name of the column to group. + + Multiple actions can be specified by using more than one --definition-dataset-grouping argument. + - name: --delivery-info-destination + short-summary: Has destination for the export being delivered. + long-summary: | + Usage: --delivery-info-destination resource-id=XX container=XX root-folder-path=XX + + resource-id: Required. The resource id of the storage account where exports will be delivered. + container: Required. The name of the container where exports will be uploaded. + root-folder-path: The name of the directory where exports will be uploaded. + - name: --schedule-recurrence-period + short-summary: Has start and end date of the recurrence. The start date must be in future. If present, the end \ +date must be greater than start date. + long-summary: | + Usage: --schedule-recurrence-period from=XX to=XX + + from: Required. The start date of recurrence. + to: The end date of recurrence. examples: - name: BillingAccountCreateOrUpdateExport text: |- - az costmanagement export update --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billi\ -ngAccounts/123456" + az costmanagement export update --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billingAccount\ +s/123456" - name: DepartmentCreateOrUpdateExport text: |- - az costmanagement export update --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billi\ -ngAccounts/12/departments/1234" + az costmanagement export update --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billingAccount\ +s/12/departments/1234" - name: EnrollmentAccountCreateOrUpdateExport text: |- - az costmanagement export update --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billi\ -ngAccounts/100/enrollmentAccounts/456" + az costmanagement export update --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Billing/billingAccount\ +s/100/enrollmentAccounts/456" - name: ManagementGroupCreateOrUpdateExport text: |- - az costmanagement export update --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Management/ma\ -nagementGroups/TestMG" + az costmanagement export update --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Management/managementG\ +roups/TestMG" - name: ResourceGroupCreateOrUpdateExport text: |- - az costmanagement export update --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-\ -0000-000000000000/resourceGroups/MYDEVTESTRG" + az costmanagement export update --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-0000-0000\ +00000000/resourceGroups/MYDEVTESTRG" - name: SubscriptionCreateOrUpdateExport text: |- - az costmanagement export update --export-name "TestExport" --definition-type "Usage" --definition-datase\ -t-aggregation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configurati\ -on columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-d\ -ataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"va\ -lues\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\ -\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\ -\\"API\\"]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping na\ -me="Environment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resour\ -ce-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/stora\ -geAccounts/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from\ -="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-\ -0000-000000000000" + az costmanagement export update --name "TestExport" --definition-type "Usage" --definition-dataset-aggre\ +gation "{\\"costSum\\":{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}" --definition-dataset-configuration colu\ +mns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --definition-dataset-\ +filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\"\ +:[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"\ +UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"\ +]}}]}" --definition-dataset-grouping name="SubscriptionName" type="Dimension" --definition-dataset-grouping name="Envir\ +onment" type="Tag" --definition-timeframe "MonthToDate" --delivery-info-destination container="exports" resource-id="/s\ +ubscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccount\ +s/ccmeastusdiag182" root-folder-path="ad-hoc" --schedule-recurrence "Weekly" --schedule-recurrence-period from="2018-06\ +-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-0000-0000\ +00000000" """ helps['costmanagement export delete'] = """ @@ -755,28 +982,28 @@ examples: - name: BillingAccountDeleteExport text: |- - az costmanagement export delete --export-name "TestExport" --scope "providers/Microsoft.Billing/billingA\ -ccounts/123456" + az costmanagement export delete --name "TestExport" --scope "providers/Microsoft.Billing/billingAccounts\ +/123456" - name: DepartmentDeleteExport text: |- - az costmanagement export delete --export-name "TestExport" --scope "providers/Microsoft.Billing/billingA\ -ccounts/12/departments/1234" + az costmanagement export delete --name "TestExport" --scope "providers/Microsoft.Billing/billingAccounts\ +/12/departments/1234" - name: EnrollmentAccountDeleteExport text: |- - az costmanagement export delete --export-name "TestExport" --scope "providers/Microsoft.Billing/billingA\ -ccounts/100/enrollmentAccounts/456" + az costmanagement export delete --name "TestExport" --scope "providers/Microsoft.Billing/billingAccounts\ +/100/enrollmentAccounts/456" - name: ManagementGroupDeleteExport text: |- - az costmanagement export delete --export-name "TestExport" --scope "providers/Microsoft.Management/manag\ -ementGroups/TestMG" + az costmanagement export delete --name "TestExport" --scope "providers/Microsoft.Management/managementGr\ +oups/TestMG" - name: ResourceGroupDeleteExport text: |- - az costmanagement export delete --export-name "TestExport" --scope "subscriptions/00000000-0000-0000-000\ -0-000000000000/resourceGroups/MYDEVTESTRG" + az costmanagement export delete --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-00000\ +0000000/resourceGroups/MYDEVTESTRG" - name: SubscriptionDeleteExport text: |- - az costmanagement export delete --export-name "TestExport" --scope "subscriptions/00000000-0000-0000-000\ -0-000000000000" + az costmanagement export delete --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-00000\ +0000000" """ helps['costmanagement export execute'] = """ @@ -785,26 +1012,56 @@ examples: - name: BillingAccountExecuteExport text: |- - az costmanagement export execute --export-name "TestExport" --scope "providers/Microsoft.Billing/billing\ -Accounts/123456" + az costmanagement export execute --name "TestExport" --scope "providers/Microsoft.Billing/billingAccount\ +s/123456" - name: DepartmentExecuteExport text: |- - az costmanagement export execute --export-name "TestExport" --scope "providers/Microsoft.Billing/billing\ -Accounts/12/departments/1234" + az costmanagement export execute --name "TestExport" --scope "providers/Microsoft.Billing/billingAccount\ +s/12/departments/1234" - name: EnrollmentAccountExecuteExport text: |- - az costmanagement export execute --export-name "TestExport" --scope "providers/Microsoft.Billing/billing\ -Accounts/100/enrollmentAccounts/456" + az costmanagement export execute --name "TestExport" --scope "providers/Microsoft.Billing/billingAccount\ +s/100/enrollmentAccounts/456" - name: ManagementGroupExecuteExport text: |- - az costmanagement export execute --export-name "TestExport" --scope "providers/Microsoft.Management/mana\ -gementGroups/TestMG" + az costmanagement export execute --name "TestExport" --scope "providers/Microsoft.Management/managementG\ +roups/TestMG" - name: ResourceGroupExecuteExport text: |- - az costmanagement export execute --export-name "TestExport" --scope "subscriptions/00000000-0000-0000-00\ -00-000000000000/resourceGroups/MYDEVTESTRG" + az costmanagement export execute --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-0000\ +00000000/resourceGroups/MYDEVTESTRG" - name: SubscriptionExecuteExport text: |- - az costmanagement export execute --export-name "TestExport" --scope "subscriptions/00000000-0000-0000-00\ -00-000000000000" + az costmanagement export execute --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-0000\ +00000000" +""" + +helps['costmanagement export get-execution-history'] = """ + type: command + short-summary: The operation to get the execution history of an export for the defined scope by export name. + examples: + - name: BillingAccountExecutionHistoryExport + text: |- + az costmanagement export get-execution-history --name "TestExport" --scope "providers/Microsoft.Billing/\ +billingAccounts/123456" + - name: DepartmentExecutionHistoryExport + text: |- + az costmanagement export get-execution-history --name "TestExport" --scope "providers/Microsoft.Billing/\ +billingAccounts/12/departments/1234" + - name: EnrollmentAccountExecutionHistoryExport + text: |- + az costmanagement export get-execution-history --name "TestExport" --scope "providers/Microsoft.Billing/\ +billingAccounts/100/enrollmentAccounts/456" + - name: ManagementGroupExecutionHistoryExport + text: |- + az costmanagement export get-execution-history --name "TestExport" --scope "providers/Microsoft.Manageme\ +nt/managementGroups/TestMG" + - name: ResourceGroupExecutionHistoryExport + text: |- + az costmanagement export get-execution-history --name "TestExport" --scope "subscriptions/00000000-0000-\ +0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + - name: SubscriptionExecutionHistoryExport + text: |- + az costmanagement export get-execution-history --name "TestExport" --scope "subscriptions/00000000-0000-\ +0000-0000-000000000000" """ diff --git a/src/costmanagement/azext_costmanagement/generated/_params.py b/src/costmanagement/azext_costmanagement/generated/_params.py index 8a72b4a19e6..fcb3c415f2e 100644 --- a/src/costmanagement/azext_costmanagement/generated/_params.py +++ b/src/costmanagement/azext_costmanagement/generated/_params.py @@ -45,19 +45,7 @@ def load_arguments(self, _): 'agement/externalSubscriptions/{externalSubscriptionName}\' for External Subscription scope.') with self.argument_context('costmanagement view show') as c: - c.argument('scope', help='The scope associated with view operations. This includes \'subscriptions/{subscriptio' - 'nId}\' for subscription scope, \'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - '\' for resourceGroup scope, \'providers/Microsoft.Billing/billingAccounts/{billingAccountId}\' for ' - 'Billing Account scope, \'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments' - '/{departmentId}\' for Department scope, \'providers/Microsoft.Billing/billingAccounts/{billingAccou' - 'ntId}/enrollmentAccounts/{enrollmentAccountId}\' for EnrollmentAccount scope, \'providers/Microsoft' - '.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}\' for BillingProfile' - ' scope, \'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSe' - 'ctionId}\' for InvoiceSection scope, \'providers/Microsoft.Management/managementGroups/{managementG' - 'roupId}\' for Management Group scope, \'providers/Microsoft.CostManagement/externalBillingAccounts/' - '{externalBillingAccountName}\' for External Billing Account scope and \'providers/Microsoft.CostMan' - 'agement/externalSubscriptions/{externalSubscriptionName}\' for External Subscription scope.') - c.argument('view_name', help='View name') + c.argument('view_name', options_list=['--name', '-n'], help='View name') with self.argument_context('costmanagement view create') as c: c.argument('scope', help='The scope associated with view operations. This includes \'subscriptions/{subscriptio' @@ -72,7 +60,7 @@ def load_arguments(self, _): 'roupId}\' for Management Group scope, \'providers/Microsoft.CostManagement/externalBillingAccounts/' '{externalBillingAccountName}\' for External Billing Account scope and \'providers/Microsoft.CostMan' 'agement/externalSubscriptions/{externalSubscriptionName}\' for External Subscription scope.') - c.argument('view_name', help='View name') + c.argument('view_name', options_list=['--name', '-n'], help='View name') c.argument('e_tag', help='eTag of the resource. To handle concurrent update scenario, this field will be used t' 'o determine whether the user is updating the latest version or not.') c.argument('display_name', help='User input name of the view. Required.') @@ -94,15 +82,14 @@ def load_arguments(self, _): c.argument('accumulated', arg_type=get_enum_type(['true', 'false']), help='Show costs accumulated over time.') c.argument('metric', arg_type=get_enum_type(['ActualCost', 'AmortizedCost', 'AHUB']), help='Metric to use when ' 'displaying costs.') - c.argument('kpis', action=AddKpis, nargs='+', help='List of KPIs to show in Cost Analysis UI. Expect value: KEY' - '1=VALUE1 KEY2=VALUE2 ... , available KEYs are: type, id, enabled.') - c.argument('pivots', action=AddPivots, nargs='+', help='Configuration of 3 sub-views in the Cost Analysis UI. E' - 'xpect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: type, name.') + c.argument('kpis', action=AddKpis, nargs='+', help='List of KPIs to show in Cost Analysis UI.') + c.argument('pivots', action=AddPivots, nargs='+', + help='Configuration of 3 sub-views in the Cost Analysis UI.') c.argument('query_timeframe', arg_type=get_enum_type(['WeekToDate', 'MonthToDate', 'YearToDate', 'Custom']), help='The time frame for pulling data for the report. If custom, then a specific time period must be' ' provided.') c.argument('query_time_period', action=AddQueryTimePeriod, nargs='+', help='Has time period for pulling data fo' - 'r the report. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + 'r the report.') c.argument('query_dataset', arg_type=CLIArgumentType(options_list=['--query-dataset'], help='Has definition for' ' data in this report config. Expected value: json-string/@json-file.')) @@ -119,7 +106,22 @@ def load_arguments(self, _): 'roupId}\' for Management Group scope, \'providers/Microsoft.CostManagement/externalBillingAccounts/' '{externalBillingAccountName}\' for External Billing Account scope and \'providers/Microsoft.CostMan' 'agement/externalSubscriptions/{externalSubscriptionName}\' for External Subscription scope.') - c.argument('view_name', help='View name') + c.argument('view_name', options_list=['--name', '-n'], help='View name') + + with self.argument_context('costmanagement view get-by-scope') as c: + c.argument('scope', help='The scope associated with view operations. This includes \'subscriptions/{subscriptio' + 'nId}\' for subscription scope, \'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + '\' for resourceGroup scope, \'providers/Microsoft.Billing/billingAccounts/{billingAccountId}\' for ' + 'Billing Account scope, \'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments' + '/{departmentId}\' for Department scope, \'providers/Microsoft.Billing/billingAccounts/{billingAccou' + 'ntId}/enrollmentAccounts/{enrollmentAccountId}\' for EnrollmentAccount scope, \'providers/Microsoft' + '.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}\' for BillingProfile' + ' scope, \'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSe' + 'ctionId}\' for InvoiceSection scope, \'providers/Microsoft.Management/managementGroups/{managementG' + 'roupId}\' for Management Group scope, \'providers/Microsoft.CostManagement/externalBillingAccounts/' + '{externalBillingAccountName}\' for External Billing Account scope and \'providers/Microsoft.CostMan' + 'agement/externalSubscriptions/{externalSubscriptionName}\' for External Subscription scope.') + c.argument('view_name', options_list=['--name', '-n'], help='View name') with self.argument_context('costmanagement alert list') as c: c.argument('scope', help='The scope associated with alerts operations. This includes \'/subscriptions/{subscrip' @@ -164,8 +166,7 @@ def load_arguments(self, _): 's/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}\' specific for partne' 'rs.') c.argument('alert_id', help='Alert ID') - c.argument('definition', action=AddDefinition, nargs='+', help='defines the type of alert Expect value: KEY1=VA' - 'LUE1 KEY2=VALUE2 ... , available KEYs are: type, category, criteria.') + c.argument('definition', action=AddDefinition, nargs='+', help='defines the type of alert') c.argument('description', help='Alert description') c.argument('source', arg_type=get_enum_type(['Preset', 'User']), help='Source of alert') c.argument('cost_entity_id', help='related budget') @@ -196,12 +197,9 @@ def load_arguments(self, _): c.argument('details_amount', help='budget threshold amount') c.argument('details_unit', help='unit of currency being used') c.argument('details_current_spend', help='current spend') - c.argument('details_contact_emails', nargs='+', help='list of emails to contact Expected value: json-string/@js' - 'on-file.') - c.argument('details_contact_groups', nargs='+', help='list of action groups to broadcast to Expected value: jso' - 'n-string/@json-file.') - c.argument('details_contact_roles', nargs='+', help='list of contact roles Expected value: json-string/@json-fi' - 'le.') + c.argument('details_contact_emails', nargs='+', help='list of emails to contact') + c.argument('details_contact_groups', nargs='+', help='list of action groups to broadcast to') + c.argument('details_contact_roles', nargs='+', help='list of contact roles') c.argument('details_overriding_alert', help='overriding alert') with self.argument_context('costmanagement alert list-external') as c: @@ -228,21 +226,20 @@ def load_arguments(self, _): 'llingMonth', 'WeekToDate', 'Custom']), help='The time frame for pulling data for the forecast. If c' 'ustom, then a specific time period must be provided.') c.argument('time_period', action=AddTimePeriod, nargs='+', help='Has time period for pulling data for the forec' - 'ast. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + 'ast.') c.argument('include_actual_cost', arg_type=get_three_state_flag(), help='a boolean determining if actualCost wi' 'll be included') c.argument('include_fresh_partial_cost', arg_type=get_three_state_flag(), help='a boolean determining if FreshP' 'artialCost will be included') c.argument('dataset_configuration', action=AddDatasetConfiguration, nargs='+', help='Has configuration informat' 'ion for the data in the export. The configuration will be ignored if aggregation and grouping are p' - 'rovided. Expect value: columns=xx.') + 'rovided.') c.argument('dataset_aggregation', arg_type=CLIArgumentType(options_list=['--dataset-aggregation'], help='Dictio' 'nary of aggregation expression to use in the query. The key of each item in the dictionary is the a' 'lias for the aggregated column. Query can have up to 2 aggregation clauses. Expected value: json-st' 'ring/@json-file.')) c.argument('dataset_grouping', action=AddDatasetGrouping, nargs='+', help='Array of group by expression to use ' - 'in the query. Query can have up to 2 group by clauses. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , ' - 'available KEYs are: type, name.') + 'in the query. Query can have up to 2 group by clauses.') c.argument('dataset_filter', arg_type=CLIArgumentType(options_list=['--dataset-filter'], help='Has filter expre' 'ssion to use in the query. Expected value: json-string/@json-file.')) @@ -268,21 +265,20 @@ def load_arguments(self, _): 'llingMonth', 'WeekToDate', 'Custom']), help='The time frame for pulling data for the forecast. If c' 'ustom, then a specific time period must be provided.') c.argument('time_period', action=AddTimePeriod, nargs='+', help='Has time period for pulling data for the forec' - 'ast. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + 'ast.') c.argument('include_actual_cost', arg_type=get_three_state_flag(), help='a boolean determining if actualCost wi' 'll be included') c.argument('include_fresh_partial_cost', arg_type=get_three_state_flag(), help='a boolean determining if FreshP' 'artialCost will be included') c.argument('dataset_configuration', action=AddDatasetConfiguration, nargs='+', help='Has configuration informat' 'ion for the data in the export. The configuration will be ignored if aggregation and grouping are p' - 'rovided. Expect value: columns=xx.') + 'rovided.') c.argument('dataset_aggregation', arg_type=CLIArgumentType(options_list=['--dataset-aggregation'], help='Dictio' 'nary of aggregation expression to use in the query. The key of each item in the dictionary is the a' 'lias for the aggregated column. Query can have up to 2 aggregation clauses. Expected value: json-st' 'ring/@json-file.')) c.argument('dataset_grouping', action=AddDatasetGrouping, nargs='+', help='Array of group by expression to use ' - 'in the query. Query can have up to 2 group by clauses. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , ' - 'available KEYs are: type, name.') + 'in the query. Query can have up to 2 group by clauses.') c.argument('dataset_filter', arg_type=CLIArgumentType(options_list=['--dataset-filter'], help='Has filter expre' 'ssion to use in the query. Expected value: json-string/@json-file.')) @@ -343,17 +339,16 @@ def load_arguments(self, _): 'llingMonth', 'WeekToDate', 'Custom']), help='The time frame for pulling data for the query. If cust' 'om, then a specific time period must be provided.') c.argument('time_period', action=AddTimePeriod, nargs='+', help='Has time period for pulling data for the query' - '. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + '.') c.argument('dataset_configuration', action=AddDatasetConfiguration, nargs='+', help='Has configuration informat' 'ion for the data in the export. The configuration will be ignored if aggregation and grouping are p' - 'rovided. Expect value: columns=xx.') + 'rovided.') c.argument('dataset_aggregation', arg_type=CLIArgumentType(options_list=['--dataset-aggregation'], help='Dictio' 'nary of aggregation expression to use in the query. The key of each item in the dictionary is the a' 'lias for the aggregated column. Query can have up to 2 aggregation clauses. Expected value: json-st' 'ring/@json-file.')) c.argument('dataset_grouping', action=AddDatasetGrouping, nargs='+', help='Array of group by expression to use ' - 'in the query. Query can have up to 2 group by clauses. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , ' - 'available KEYs are: type, name.') + 'in the query. Query can have up to 2 group by clauses.') c.argument('dataset_filter', arg_type=CLIArgumentType(options_list=['--dataset-filter'], help='Has filter expre' 'ssion to use in the query. Expected value: json-string/@json-file.')) @@ -370,17 +365,16 @@ def load_arguments(self, _): 'llingMonth', 'WeekToDate', 'Custom']), help='The time frame for pulling data for the query. If cust' 'om, then a specific time period must be provided.') c.argument('time_period', action=AddTimePeriod, nargs='+', help='Has time period for pulling data for the query' - '. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + '.') c.argument('dataset_configuration', action=AddDatasetConfiguration, nargs='+', help='Has configuration informat' 'ion for the data in the export. The configuration will be ignored if aggregation and grouping are p' - 'rovided. Expect value: columns=xx.') + 'rovided.') c.argument('dataset_aggregation', arg_type=CLIArgumentType(options_list=['--dataset-aggregation'], help='Dictio' 'nary of aggregation expression to use in the query. The key of each item in the dictionary is the a' 'lias for the aggregated column. Query can have up to 2 aggregation clauses. Expected value: json-st' 'ring/@json-file.')) c.argument('dataset_grouping', action=AddDatasetGrouping, nargs='+', help='Array of group by expression to use ' - 'in the query. Query can have up to 2 group by clauses. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , ' - 'available KEYs are: type, name.') + 'in the query. Query can have up to 2 group by clauses.') c.argument('dataset_filter', arg_type=CLIArgumentType(options_list=['--dataset-filter'], help='Has filter expre' 'ssion to use in the query. Expected value: json-string/@json-file.')) @@ -411,7 +405,7 @@ def load_arguments(self, _): 'lingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}\' for invoiceSection scope, and ' '\'/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}\' specific' ' for partners.') - c.argument('export_name', help='Export Name.') + c.argument('export_name', options_list=['--name', '-n'], help='Export Name.') with self.argument_context('costmanagement export create') as c: c.argument('scope', help='The scope associated with query and export operations. This includes \'/subscriptions' @@ -426,36 +420,34 @@ def load_arguments(self, _): 'lingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}\' for invoiceSection scope, and ' '\'/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}\' specific' ' for partners.') - c.argument('export_name', help='Export Name.') + c.argument('export_name', options_list=['--name', '-n'], help='Export Name.') c.argument('definition_type', arg_type=get_enum_type(['Usage', 'ActualCost', 'AmortizedCost']), help='The type ' 'of the query.') c.argument('definition_timeframe', arg_type=get_enum_type(['MonthToDate', 'BillingMonthToDate', 'TheLastMonth', 'TheLastBillingMonth', 'WeekToDate', 'Custom']), help='The time frame for pulling data for the quer' 'y. If custom, then a specific time period must be provided.') c.argument('definition_time_period', action=AddTimePeriod, nargs='+', help='Has time period for pulling data fo' - 'r the query. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + 'r the query.') c.argument('definition_dataset_configuration', action=AddDatasetConfiguration, nargs='+', help='Has configurati' 'on information for the data in the export. The configuration will be ignored if aggregation and gro' - 'uping are provided. Expect value: columns=xx.') + 'uping are provided.') c.argument('definition_dataset_aggregation', arg_type=CLIArgumentType(options_list=['--definition-dataset-aggre' 'gation'], help='Dictionary of aggregation expression to use in the query. The key of each item in t' 'he dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. E' 'xpected value: json-string/@json-file.')) c.argument('definition_dataset_grouping', action=AddDatasetGrouping, nargs='+', help='Array of group by express' - 'ion to use in the query. Query can have up to 2 group by clauses. Expect value: KEY1=VALUE1 KEY2=VA' - 'LUE2 ... , available KEYs are: type, name.') + 'ion to use in the query. Query can have up to 2 group by clauses.') c.argument('definition_dataset_filter', arg_type=CLIArgumentType(options_list=['--definition-dataset-filter'], help='Has filter expression to use in the query. Expected value: json-string/@json-file.')) c.argument('delivery_info_destination', action=AddDeliveryInfoDestination, nargs='+', help='Has destination for' - ' the export being delivered. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: resour' - 'ce-id, container, root-folder-path.') + ' the export being delivered.') c.argument('schedule_status', arg_type=get_enum_type(['Active', 'Inactive']), help='The status of the schedule.' ' Whether active or not. If inactive, the export\'s scheduled execution is paused.') c.argument('schedule_recurrence', arg_type=get_enum_type(['Daily', 'Weekly', 'Monthly', 'Annually']), help='The' ' schedule recurrence.') c.argument('schedule_recurrence_period', action=AddScheduleRecurrencePeriod, nargs='+', help='Has start and end' ' date of the recurrence. The start date must be in future. If present, the end date must be greater' - ' than start date. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + ' than start date.') with self.argument_context('costmanagement export update') as c: c.argument('scope', help='The scope associated with query and export operations. This includes \'/subscriptions' @@ -470,36 +462,34 @@ def load_arguments(self, _): 'lingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}\' for invoiceSection scope, and ' '\'/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}\' specific' ' for partners.') - c.argument('export_name', help='Export Name.') + c.argument('export_name', options_list=['--name', '-n'], help='Export Name.') c.argument('definition_type', arg_type=get_enum_type(['Usage', 'ActualCost', 'AmortizedCost']), help='The type ' 'of the query.') c.argument('definition_timeframe', arg_type=get_enum_type(['MonthToDate', 'BillingMonthToDate', 'TheLastMonth', 'TheLastBillingMonth', 'WeekToDate', 'Custom']), help='The time frame for pulling data for the quer' 'y. If custom, then a specific time period must be provided.') c.argument('definition_time_period', action=AddTimePeriod, nargs='+', help='Has time period for pulling data fo' - 'r the query. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + 'r the query.') c.argument('definition_dataset_configuration', action=AddDatasetConfiguration, nargs='+', help='Has configurati' 'on information for the data in the export. The configuration will be ignored if aggregation and gro' - 'uping are provided. Expect value: columns=xx.') + 'uping are provided.') c.argument('definition_dataset_aggregation', arg_type=CLIArgumentType(options_list=['--definition-dataset-aggre' 'gation'], help='Dictionary of aggregation expression to use in the query. The key of each item in t' 'he dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. E' 'xpected value: json-string/@json-file.')) c.argument('definition_dataset_grouping', action=AddDatasetGrouping, nargs='+', help='Array of group by express' - 'ion to use in the query. Query can have up to 2 group by clauses. Expect value: KEY1=VALUE1 KEY2=VA' - 'LUE2 ... , available KEYs are: type, name.') + 'ion to use in the query. Query can have up to 2 group by clauses.') c.argument('definition_dataset_filter', arg_type=CLIArgumentType(options_list=['--definition-dataset-filter'], help='Has filter expression to use in the query. Expected value: json-string/@json-file.')) c.argument('delivery_info_destination', action=AddDeliveryInfoDestination, nargs='+', help='Has destination for' - ' the export being delivered. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: resour' - 'ce-id, container, root-folder-path.') + ' the export being delivered.') c.argument('schedule_status', arg_type=get_enum_type(['Active', 'Inactive']), help='The status of the schedule.' ' Whether active or not. If inactive, the export\'s scheduled execution is paused.') c.argument('schedule_recurrence', arg_type=get_enum_type(['Daily', 'Weekly', 'Monthly', 'Annually']), help='The' ' schedule recurrence.') c.argument('schedule_recurrence_period', action=AddScheduleRecurrencePeriod, nargs='+', help='Has start and end' ' date of the recurrence. The start date must be in future. If present, the end date must be greater' - ' than start date. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: from, to.') + ' than start date.') with self.argument_context('costmanagement export delete') as c: c.argument('scope', help='The scope associated with query and export operations. This includes \'/subscriptions' @@ -514,7 +504,7 @@ def load_arguments(self, _): 'lingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}\' for invoiceSection scope, and ' '\'/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}\' specific' ' for partners.') - c.argument('export_name', help='Export Name.') + c.argument('export_name', options_list=['--name', '-n'], help='Export Name.') with self.argument_context('costmanagement export execute') as c: c.argument('scope', help='The scope associated with query and export operations. This includes \'/subscriptions' @@ -529,4 +519,19 @@ def load_arguments(self, _): 'lingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}\' for invoiceSection scope, and ' '\'/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}\' specific' ' for partners.') - c.argument('export_name', help='Export Name.') + c.argument('export_name', options_list=['--name', '-n'], help='Export Name.') + + with self.argument_context('costmanagement export get-execution-history') as c: + c.argument('scope', help='The scope associated with query and export operations. This includes \'/subscriptions' + '/{subscriptionId}/\' for subscription scope, \'/subscriptions/{subscriptionId}/resourceGroups/{reso' + 'urceGroupName}\' for resourceGroup scope, \'/providers/Microsoft.Billing/billingAccounts/{billingAc' + 'countId}\' for Billing Account scope and \'/providers/Microsoft.Billing/billingAccounts/{billingAcc' + 'ountId}/departments/{departmentId}\' for Department scope, \'/providers/Microsoft.Billing/billingAc' + 'counts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}\' for EnrollmentAccount scope, ' + '\'/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, ' + '\'/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId' + '}\' for billingProfile scope, \'/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/bil' + 'lingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}\' for invoiceSection scope, and ' + '\'/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}\' specific' + ' for partners.') + c.argument('export_name', options_list=['--name', '-n'], help='Export Name.') diff --git a/src/costmanagement/azext_costmanagement/generated/_validators.py b/src/costmanagement/azext_costmanagement/generated/_validators.py index 7536d0531ea..e5ac7838677 100644 --- a/src/costmanagement/azext_costmanagement/generated/_validators.py +++ b/src/costmanagement/azext_costmanagement/generated/_validators.py @@ -7,17 +7,3 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- - - -def example_name_or_id_validator(cmd, namespace): - from azure.cli.core.commands.client_factory import get_subscription_id - from msrestazure.tools import is_valid_resource_id, resource_id - if namespace.storage_account: - if not is_valid_resource_id(namespace.RESOURCE): - namespace.storage_account = resource_id( - subscription=get_subscription_id(cmd.cli_ctx), - resource_group=namespace.resource_group_name, - namespace='Microsoft.Storage', - type='storageAccounts', - name=namespace.storage_account - ) diff --git a/src/costmanagement/azext_costmanagement/generated/action.py b/src/costmanagement/azext_costmanagement/generated/action.py index 9f192ea56bb..67e40bd5741 100644 --- a/src/costmanagement/azext_costmanagement/generated/action.py +++ b/src/costmanagement/azext_costmanagement/generated/action.py @@ -19,7 +19,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) super(AddKpis, self).__call__(parser, namespace, action, option_string) - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) @@ -46,7 +45,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) super(AddPivots, self).__call__(parser, namespace, action, option_string) - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) @@ -71,7 +69,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.query_time_period = action - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) @@ -96,7 +93,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.definition = action - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) @@ -123,7 +119,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.time_period = action - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) @@ -148,7 +143,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.dataset_configuration = action - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) @@ -171,7 +165,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) super(AddDatasetGrouping, self).__call__(parser, namespace, action, option_string) - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) @@ -196,7 +189,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.delivery_info_destination = action - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) @@ -223,7 +215,6 @@ def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.schedule_recurrence_period = action - def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) diff --git a/src/costmanagement/azext_costmanagement/generated/commands.py b/src/costmanagement/azext_costmanagement/generated/commands.py index 945071c3a13..da8275a8731 100644 --- a/src/costmanagement/azext_costmanagement/generated/commands.py +++ b/src/costmanagement/azext_costmanagement/generated/commands.py @@ -24,6 +24,7 @@ def load_command_table(self, _): g.custom_show_command('show', 'costmanagement_view_show') g.custom_command('create', 'costmanagement_view_create') g.custom_command('delete', 'costmanagement_view_delete') + g.custom_command('get-by-scope', 'costmanagement_view_get_by_scope') from azext_costmanagement.generated._client_factory import cf_alert costmanagement_alert = CliCommandType( @@ -82,3 +83,4 @@ def load_command_table(self, _): g.custom_command('update', 'costmanagement_export_update') g.custom_command('delete', 'costmanagement_export_delete') g.custom_command('execute', 'costmanagement_export_execute') + g.custom_command('get-execution-history', 'costmanagement_export_get_execution_history') diff --git a/src/costmanagement/azext_costmanagement/generated/custom.py b/src/costmanagement/azext_costmanagement/generated/custom.py index 8874dd9bc02..22fcd7bd392 100644 --- a/src/costmanagement/azext_costmanagement/generated/custom.py +++ b/src/costmanagement/azext_costmanagement/generated/custom.py @@ -12,23 +12,19 @@ import json -def costmanagement_view_list(cmd, client, +def costmanagement_view_list(client, scope=None): if scope is not None: return client.list_by_scope(scope=scope) return client.list() -def costmanagement_view_show(cmd, client, - view_name, - scope=None): - if scope is not None and view_name is not None: - return client.get_by_scope(scope=scope, - view_name=view_name) +def costmanagement_view_show(client, + view_name): return client.get(view_name=view_name) -def costmanagement_view_create(cmd, client, +def costmanagement_view_create(client, view_name, scope=None, e_tag=None, @@ -44,7 +40,9 @@ def costmanagement_view_create(cmd, client, query_dataset=None): if isinstance(query_dataset, str): query_dataset = json.loads(query_dataset) - if scope is not None and view_name is not None and _parameters is not None: + if isinstance(query_dataset, str): + query_dataset = json.loads(query_dataset) + if scope is not None and view_name is not None: return client.create_or_update_by_scope(scope=scope, view_name=view_name, e_tag=e_tag, @@ -72,7 +70,7 @@ def costmanagement_view_create(cmd, client, dataset=query_dataset) -def costmanagement_view_delete(cmd, client, +def costmanagement_view_delete(client, view_name, scope=None): if scope is not None and view_name is not None: @@ -81,19 +79,26 @@ def costmanagement_view_delete(cmd, client, return client.delete(view_name=view_name) -def costmanagement_alert_list(cmd, client, +def costmanagement_view_get_by_scope(client, + scope, + view_name): + return client.get_by_scope(scope=scope, + view_name=view_name) + + +def costmanagement_alert_list(client, scope): return client.list(scope=scope) -def costmanagement_alert_show(cmd, client, +def costmanagement_alert_show(client, scope, alert_id): return client.get(scope=scope, alert_id=alert_id) -def costmanagement_alert_dismiss(cmd, client, +def costmanagement_alert_dismiss(client, scope, alert_id, definition=None, @@ -130,12 +135,6 @@ def costmanagement_alert_dismiss(cmd, client, details_meter_filter = json.loads(details_meter_filter) if isinstance(details_tag_filter, str): details_tag_filter = json.loads(details_tag_filter) - if isinstance(details_contact_emails, str): - details_contact_emails = json.loads(details_contact_emails) - if isinstance(details_contact_groups, str): - details_contact_groups = json.loads(details_contact_groups) - if isinstance(details_contact_roles, str): - details_contact_roles = json.loads(details_contact_roles) return client.dismiss(scope=scope, alert_id=alert_id, definition=definition, @@ -166,14 +165,14 @@ def costmanagement_alert_dismiss(cmd, client, overriding_alert=details_overriding_alert) -def costmanagement_alert_list_external(cmd, client, +def costmanagement_alert_list_external(client, external_cloud_provider_type, external_cloud_provider_id): return client.list_external(external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id) -def costmanagement_forecast_external_cloud_provider_usage(cmd, client, +def costmanagement_forecast_external_cloud_provider_usage(client, external_cloud_provider_type, external_cloud_provider_id, type_, @@ -204,7 +203,7 @@ def costmanagement_forecast_external_cloud_provider_usage(cmd, client, query_filter=dataset_filter) -def costmanagement_forecast_usage(cmd, client, +def costmanagement_forecast_usage(client, scope, type_, timeframe, @@ -233,7 +232,7 @@ def costmanagement_forecast_usage(cmd, client, query_filter=dataset_filter) -def costmanagement_dimension_list(cmd, client, +def costmanagement_dimension_list(client, scope, filter=None, expand=None, @@ -246,7 +245,7 @@ def costmanagement_dimension_list(cmd, client, top=top) -def costmanagement_dimension_by_external_cloud_provider_type(cmd, client, +def costmanagement_dimension_by_external_cloud_provider_type(client, external_cloud_provider_type, external_cloud_provider_id, filter=None, @@ -261,7 +260,7 @@ def costmanagement_dimension_by_external_cloud_provider_type(cmd, client, top=top) -def costmanagement_query_usage(cmd, client, +def costmanagement_query_usage(client, scope, type_, timeframe, @@ -284,7 +283,7 @@ def costmanagement_query_usage(cmd, client, filter=dataset_filter) -def costmanagement_query_usage_by_external_cloud_provider_type(cmd, client, +def costmanagement_query_usage_by_external_cloud_provider_type(client, external_cloud_provider_type, external_cloud_provider_id, type_, @@ -309,22 +308,19 @@ def costmanagement_query_usage_by_external_cloud_provider_type(cmd, client, filter=dataset_filter) -def costmanagement_export_list(cmd, client, +def costmanagement_export_list(client, scope): return client.list(scope=scope) -def costmanagement_export_show(cmd, client, +def costmanagement_export_show(client, scope, export_name): - if scope is not None and export_name is not None: - return client.get(scope=scope, - export_name=export_name) - return client.get_execution_history(scope=scope, - export_name=export_name) + return client.get(scope=scope, + export_name=export_name) -def costmanagement_export_create(cmd, client, +def costmanagement_export_create(client, scope, export_name, definition_type=None, @@ -357,7 +353,7 @@ def costmanagement_export_create(cmd, client, recurrence_period=schedule_recurrence_period) -def costmanagement_export_update(cmd, client, +def costmanagement_export_update(client, scope, export_name, definition_type=None, @@ -390,15 +386,22 @@ def costmanagement_export_update(cmd, client, recurrence_period=schedule_recurrence_period) -def costmanagement_export_delete(cmd, client, +def costmanagement_export_delete(client, scope, export_name): return client.delete(scope=scope, export_name=export_name) -def costmanagement_export_execute(cmd, client, +def costmanagement_export_execute(client, scope, export_name): return client.execute(scope=scope, export_name=export_name) + + +def costmanagement_export_get_execution_history(client, + scope, + export_name): + return client.get_execution_history(scope=scope, + export_name=export_name) diff --git a/src/costmanagement/azext_costmanagement/manual/_help.py b/src/costmanagement/azext_costmanagement/manual/_help.py new file mode 100644 index 00000000000..4fea63ba728 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/manual/_help.py @@ -0,0 +1,218 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.help_files import helps + + +helps['costmanagement'] = """ + type: group + short-summary: Manage cost and billing in Azure +""" + +# override from generated._help +helps['costmanagement query'] = """ + type: command + short-summary: Query the usage data for scope defined. + examples: + - name: Query in ManagementGroup scope + text: |- + az costmanagement query --type "Usage" --dataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\ +\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\ +\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\ +\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}]}" --timeframe "MonthToDate" --scope "provid\ +ers/Microsoft.Management/managementGroups/MyMgId" + - name: Query in ManagementGroupQuery scope via grouping + text: |- + az costmanagement query --type "Usage" --dataset-aggregation "{\\"totalCost\\":{\\"name\\":\\"PreT\ +axCost\\",\\"function\\":\\"Sum\\"}}" --dataset-grouping name="ResourceGroup" type="Dimension" --timeframe "TheLastMont\ +h" --scope "providers/Microsoft.Management/managementGroups/MyMgId" + - name: Query in a ResourceGroup scope + text: |- + az costmanagement query --type "Usage" --dataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\ +\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\ +\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\ +\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}]}" --timeframe "MonthToDate" --scope "subscr\ +iptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer" + - name: Query in a ResourceGroupQuery scope via grouping + text: |- + az costmanagement query --type "Usage" --dataset-aggregation "{\\"totalCost\\":{\\"name\\":\\"PreT\ +axCost\\",\\"function\\":\\"Sum\\"}}" --dataset-grouping name="ResourceType" type="Dimension" --timeframe "TheLastMonth\ +" --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer" + - name: Query in a Subscription scope + text: |- + az costmanagement query --type "Usage" --dataset-filter "{\\"and\\":[{\\"or\\":[{\\"dimension\\":{\ +\\"name\\":\\"ResourceLocation\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}},{\\"tag\\":{\ +\\"name\\":\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}]},{\\"dimension\\":{\\"name\ +\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}]}" --timeframe "MonthToDate" --scope "subscr\ +iptions/00000000-0000-0000-0000-000000000000" + - name: Query in a Subscription scope via grouping + text: |- + az costmanagement query --type "Usage" --dataset-aggregation "{\\"totalCost\\":{\\"name\\":\\"PreT\ +axCost\\",\\"function\\":\\"Sum\\"}}" --dataset-grouping name="ResourceGroup" type="Dimension" --timeframe "TheLastMont\ +h" --scope "subscriptions/00000000-0000-0000-0000-000000000000" +""" + + +helps['costmanagement export'] = """ + type: group + short-summary: costmanagement export +""" + +helps['costmanagement export list'] = """ + type: command + short-summary: The operation to list all exports at the given scope. + examples: + - name: list exports in a ManagementGroup scope + text: |- + az costmanagement export list --scope "providers/Microsoft.Management/managementGroups/TestMG" + - name: list exports in a ResourceGroup scope + text: |- + az costmanagement export list --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups\ +/MYDEVTESTRG" + - name: list exports in a Subscription scope + text: |- + az costmanagement export list --scope "subscriptions/00000000-0000-0000-0000-000000000000" +""" + +helps['costmanagement export show'] = """ + type: command + short-summary: The operation to get the execution history of an export for the defined scope by export name. + examples: + - name: Show an export in a ManagementGroup scope + text: |- + az costmanagement export show --name "TestExport" --scope "providers/Microsoft.Management/managem\ +entGroups/TestMG" + - name: Show an export in a ResourceGroup scope + text: |- + az costmanagement export show --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-\ +000000000000/resourceGroups/MYDEVTESTRG" + - name: Show an export in a Subscription scope + text: |- + az costmanagement export show --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-\ +000000000000" +""" + +helps['costmanagement export create'] = """ + type: command + short-summary: The operation to create an export. + examples: + - name: Create an export for ManagementGroup scope + text: > + az costmanagement export create + --name "TestExport" + --type "Usage" + --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" + --dataset-grouping name="SubscriptionName" type="Dimension" + --dataset-grouping name="Environment" type="Tag" + --timeframe "MonthToDate" + --storage-container="exports" + --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" + --storage-directory="ad-hoc" + --recurrence "Weekly" + --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" + --schedule-status "Active" + --scope "providers/Microsoft.Management/managementGroups/TestMG" + - name: Create an export for ResourceGroup scope + text: > + az costmanagement export create + --name "TestExport" + --type "Usage" + --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" + --dataset-grouping name="SubscriptionName" type="Dimension" + --dataset-grouping name="Environment" type="Tag" + --timeframe "MonthToDate" + --storage-container="exports" + --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" + --storage-directory="ad-hoc" + --recurrence "Weekly" + --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" + --schedule-status "Active" + --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + - name: Create an export for Subscription scope + text: > + az costmanagement export create + --name "TestExport" + --type "Usage" + --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" + --dataset-grouping name="SubscriptionName" type="Dimension" + --dataset-grouping name="Environment" type="Tag" + --timeframe "MonthToDate" + --storage-container="exports" + --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" + --storage-directory="ad-hoc" + --recurrence "Weekly" + --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" + --schedule-status "Active" + --scope "subscriptions/00000000-0000-0000-0000-000000000000" +""" + +helps['costmanagement export update'] = """ + type: command + short-summary: The operation to update an export. + examples: + - name: Update an export in a ManagementGroup scope + text: > + az costmanagement export update + --name "TestExport" + --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" + --dataset-grouping name="SubscriptionName" type="Dimension" + --dataset-grouping name="Environment" type="Tag" + --timeframe "MonthToDate" + --storage-container="exports" + --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" + --storage-directory="ad-hoc" + --recurrence "Weekly" + --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" + --schedule-status "Active" + --scope "providers/Microsoft.Management/managementGroups/TestMG" + - name: Update an export in a ResourceGroup scope + text: > + az costmanagement export update + --name "TestExport" + --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" + --dataset-grouping name="SubscriptionName" type="Dimension" + --dataset-grouping name="Environment" type="Tag" + --timeframe "MonthToDate" + --storage-container="exports" + --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" + --storage-directory="ad-hoc" + --recurrence "Weekly" + --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" + --schedule-status "Active" + --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + - name: Update an export in a Subscription scope + text: > + az costmanagement export update + --name "TestExport" + --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" + --dataset-grouping name="SubscriptionName" type="Dimension" + --dataset-grouping name="Environment" type="Tag" + --timeframe "MonthToDate" + --storage-container="exports" + --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" + --storage-directory="ad-hoc" + --recurrence "Weekly" + --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" + --schedule-status "Active" + --scope "subscriptions/00000000-0000-0000-0000-000000000000" +""" + +helps['costmanagement export delete'] = """ + type: command + short-summary: The operation to delete an export. + examples: + - name: delete an export for a ManagementGroup scope + text: |- + az costmanagement export delete --name "TestExport" --scope "providers/Microsoft.Management/manag\ +ementGroups/TestMG" + - name: delete an export for ResourceGroup scope + text: |- + az costmanagement export delete --name "TestExport" --scope "subscriptions/00000000-0000-0000-000\ +0-000000000000/resourceGroups/MYDEVTESTRG" + - name: delete an export for Subscription scope + text: |- + az costmanagement export delete --name "TestExport" --scope "subscriptions/00000000-0000-0000-000\ +0-000000000000" +""" diff --git a/src/costmanagement/azext_costmanagement/manual/_params.py b/src/costmanagement/azext_costmanagement/manual/_params.py new file mode 100644 index 00000000000..a1f73db42c9 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/manual/_params.py @@ -0,0 +1,138 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.arguments import CLIArgumentType +from azure.cli.core.commands.parameters import ( + get_three_state_flag, + get_enum_type +) +from azext_costmanagement.action import ( + AddTimePeriod, + AddDatasetConfiguration, + AddDatasetGrouping, + AddDeliveryInfoDestination, + AddScheduleRecurrencePeriod +) + + +def load_arguments(self, _): + with self.argument_context('costmanagement query') as c: + c.argument('scope', + help='The scope associated with query and export operations. ' + 'This includes "/subscriptions/{subscriptionId}/" for subscription scope, ' + '"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}" ' + 'for resourceGroup scope, ' + '"/providers/Microsoft.Management/managementGroups/{managementGroupId}" ' + 'for Management Group scope. ') + c.argument('type_', + options_list=['--type'], + arg_type=get_enum_type(['Usage', 'ActualCost', 'AmortizedCost']), + help='The type of the query.') + c.argument('timeframe', + arg_type=get_enum_type(['MonthToDate', 'BillingMonthToDate', 'TheLastMonth', + 'TheLastBillingMonth', 'WeekToDate', 'Custom']), + help='The time frame for pulling data for the query.' + 'If custom, then a specific time period must be provided.') + c.argument('time_period', + action=AddTimePeriod, + nargs='+', + help='Has time period for pulling data for the query. ' + 'Expect value: from=TIMESTAMP1 to=TIMESTAMP2. ' + 'The timestamp format is like 2020-05-01T00:00:00.') + c.argument('dataset_configuration', + action=AddDatasetConfiguration, nargs='+', + help='Has configuration information for the data in the export. ' + 'The configuration will be ignored if aggregation and grouping are provided. ' + 'Expect value: columns=xx.') + c.argument('dataset_aggregation', + arg_type=CLIArgumentType(options_list=['--dataset-aggregation'], + help='Dictionary of aggregation expression to use in the query. ' + 'The key of each item in the dictionary is the alias' + 'for the aggregated column. ' + 'Query can have up to 2 aggregation clauses. ' + 'Expected value: json-string/@json-file.')) + c.argument('dataset_grouping', + action=AddDatasetGrouping, nargs='+', + help='Array of group by expression to use in the query. ' + 'Query can have up to 2 group by clauses.' + 'Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: type, name.') + c.argument('dataset_filter', + arg_type=CLIArgumentType(options_list=['--dataset-filter'], + help='Has filter expression to use in the query. ' + 'Expected value: json-string/@json-file.')) + + # region: costmanagement export + with self.argument_context('costmanagement export') as c: + c.argument('scope', + help='The scope associated with query and export operations. This includes ' + '\'/subscriptions/{subscriptionId}/\' for subscription scope, ' + '\'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}\' for resourceGroup scope, ' + '\'/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope.') + c.argument('export_name', help='Export Name.', options_list='--name') + + with self.argument_context('costmanagement export', arg_group='Export Definition') as c: + c.argument('definition_type', + options_list='--type', + arg_type=get_enum_type(['Usage', 'ActualCost', 'AmortizedCost']), + help='The type of the query.') + c.argument('definition_timeframe', + options_list='--timeframe', + arg_type=get_enum_type(['MonthToDate', 'BillingMonthToDate', 'TheLastMonth', + 'TheLastBillingMonth', 'WeekToDate', 'Custom']), + help='The time frame for pulling data for the query. ' + 'If custom, then a specific time period must be provided.') + c.argument('definition_time_period', + action=AddTimePeriod, + options_list='--time-period', + nargs='+', + help='Has time period for pulling data for the query. ' + 'Expect value: from=TIMESTAMP1 to=TIMESTAMP2. ' + 'The timestamp format is like 2020-05-01T00:00:00.' + 'The TIMESTAMP1 must in the future and TIMESTAMP2 must be greater than TIMESTAMP1') + c.argument('definition_dataset_configuration', + action=AddDatasetConfiguration, + options_list='--dataset-configuration', + nargs='+', + help='Has configuration information for the data in the export. ' + 'The configuration will be ignored if aggregation and grouping are provided. ' + 'Expect value: columns=xx.') + c.argument('definition_dataset_grouping', + action=AddDatasetGrouping, + options_list='--dataset-grouping', + nargs='+', + help='Array of group by expression to use in the query. ' + 'Query can have up to 2 group by clauses. ' + 'Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: type, name.') + + with self.argument_context('costmanagement export', arg_group='Delivery Destination Info') as c: + c.argument('delivery_storage_account_id', + options_list='--storage-account-id', + help='The ID of the storage account to store exports') + c.argument('delivery_storage_container', + options_list='--storage-container', + help='The storage container to deliver exports') + c.argument('delivery_directory', + options_list='--storage-directory', + help='The root directory in the storage container to store exports') + + with self.argument_context('costmanagement export', arg_group='Schedule Info') as c: + c.argument('schedule_status', + arg_type=get_enum_type(['Active', 'Inactive']), + help='The status of the schedule.Whether active or not. ' + 'If inactive, the export\'s scheduled execution is paused.') + c.argument('schedule_recurrence', + options_list='--recurrence', + arg_type=get_enum_type(['Daily', 'Weekly', 'Monthly', 'Annually']), + help='The schedule recurrence.') + c.argument('schedule_recurrence_period', + options_list='--recurrence-period', + action=AddScheduleRecurrencePeriod, + nargs='+', + help='Has start and end date of the recurrence. ' + 'The start date must be in future. ' + 'If present, the end date must be greater than start date. ' + 'Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , ' + 'available KEYs are: from, to. The time format is like 2020-05-01T00:00:00.') + # region end: costmanagement export diff --git a/src/costmanagement/azext_costmanagement/manual/commands.py b/src/costmanagement/azext_costmanagement/manual/commands.py new file mode 100644 index 00000000000..67ac4919945 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/manual/commands.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): + + from azext_costmanagement.generated._client_factory import cf_query + costmanagement_query = CliCommandType( + operations_tmpl='azext_costmanagement.vendored_sdks.costmanagement.operations.' + '_query_operations#QueryOperations.{}', + client_factory=cf_query) + with self.command_group('costmanagement', costmanagement_query, + client_factory=cf_query, is_experimental=True) as g: + g.custom_command('query', 'costmanagement_query') + + from azext_costmanagement.generated._client_factory import cf_export + costmanagement_export = CliCommandType( + operations_tmpl='azext_costmanagement.vendored_sdks.costmanagement.operations._export_operations#ExportOperatio' + 'ns.{}', + client_factory=cf_export) + with self.command_group('costmanagement export', costmanagement_export, client_factory=cf_export, + is_experimental=True) as g: + g.custom_command('list', 'costmanagement_export_list') + g.custom_show_command('show', 'costmanagement_export_show') + g.custom_command('create', 'costmanagement_export_create') + g.custom_command('update', 'costmanagement_export_update') + g.custom_command('delete', 'costmanagement_export_delete', confirmation=True) diff --git a/src/costmanagement/azext_costmanagement/manual/custom.py b/src/costmanagement/azext_costmanagement/manual/custom.py new file mode 100644 index 00000000000..8cd4839798e --- /dev/null +++ b/src/costmanagement/azext_costmanagement/manual/custom.py @@ -0,0 +1,137 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import json + + +def costmanagement_query(cmd, + client, + scope, + type_, + timeframe, + time_period=None, + dataset_configuration=None, + dataset_aggregation=None, + dataset_grouping=None, + dataset_filter=None): + from azext_costmanagement.generated.custom import costmanagement_query_usage + + # for now, query is for Azure cloud only, not for external cloud + return costmanagement_query_usage(cmd, + client, + scope, + type_, + timeframe, + time_period, + dataset_configuration, + dataset_aggregation, + dataset_grouping, + dataset_filter) + + +def costmanagement_export_create(cmd, + client, + scope, + export_name, + delivery_storage_container, + delivery_storage_account_id, + definition_timeframe, + delivery_directory=None, + definition_type=None, + definition_time_period=None, + definition_dataset_configuration=None, + definition_dataset_grouping=None, + schedule_status=None, + schedule_recurrence=None, + schedule_recurrence_period=None): + + delivery_info_destination = { + 'resource_id': delivery_storage_account_id, + 'container': delivery_storage_container, + 'root_folder_path': delivery_directory, + } + + return client.create_or_update(scope=scope, + export_name=export_name, + type=definition_type, + timeframe=definition_timeframe, + time_period=definition_time_period, + configuration=definition_dataset_configuration, + grouping=definition_dataset_grouping, + destination=delivery_info_destination, + status=schedule_status, + recurrence=schedule_recurrence, + recurrence_period=schedule_recurrence_period) + + +def costmanagement_export_update(cmd, + client, + scope, + export_name, + delivery_storage_container=None, + delivery_storage_account_id=None, + delivery_directory=None, + definition_timeframe=None, + definition_time_period=None, + definition_dataset_configuration=None, + definition_dataset_grouping=None, + schedule_status=None, + schedule_recurrence=None, + schedule_recurrence_period=None): + + export_instance = client.get(scope=scope, export_name=export_name) + + delivery_info_destination = { + 'resource_id': delivery_storage_account_id or export_instance.destination.resource_id, + 'container': delivery_storage_container or export_instance.destination.container, + 'root_folder_path': delivery_directory or export_instance.destination.root_folder_path, + } + + with cmd.update_context(export_instance) as c: + # update export schedule configuration + c.set_param('status', schedule_status) + c.set_param('recurrence', schedule_recurrence) + c.set_param('recurrence_period', schedule_recurrence_period) + + # update delivery info + c.set_param('destination', delivery_info_destination) + + # update export definition + c.set_param('timeframe', definition_timeframe) + c.set_param('time_period', definition_time_period) + c.set_param('configuration', definition_dataset_configuration) + c.set_param('grouping', definition_dataset_grouping) + + return client.create_or_update(scope=scope, + export_name=export_name, + type=export_instance.type_properties_definition_type, + timeframe=export_instance.timeframe, + time_period=export_instance.time_period, + configuration=export_instance.configuration, + aggregation=export_instance.aggregation, + grouping=export_instance.grouping, + filter=export_instance.filter, + destination=export_instance.destination, + status=export_instance.status, + recurrence=export_instance.recurrence, + recurrence_period=export_instance.recurrence_period, + e_tag=export_instance.e_tag) + + +def costmanagement_export_list(cmd, client, scope): + return client.list(scope=scope).value # value exist even the result is empty + + +def costmanagement_export_show(cmd, client, + scope, + export_name): + return client.get(scope=scope, export_name=export_name) + + +def costmanagement_export_delete(cmd, client, + scope, + export_name): + return client.delete(scope=scope, + export_name=export_name) diff --git a/src/costmanagement/azext_costmanagement/tests/__init__.py b/src/costmanagement/azext_costmanagement/tests/__init__.py index fe1bd438b46..5f8f1fd97ad 100644 --- a/src/costmanagement/azext_costmanagement/tests/__init__.py +++ b/src/costmanagement/azext_costmanagement/tests/__init__.py @@ -10,9 +10,14 @@ # -------------------------------------------------------------------------- import inspect import os +import sys +import traceback +from azure.core.exceptions import AzureError +from azure.cli.testsdk.exceptions import CliTestError, CliExecutionError, JMESPathCheckAssertionError __path__ = __import__('pkgutil').extend_path(__path__, __name__) +exceptions = [] def try_manual(func): @@ -34,6 +39,7 @@ def get_func_to_call(): func_to_call = func try: func_to_call = import_manual_function(func) + print("Found manual override for {}(...)".format(func.__name__)) except (ImportError, AttributeError): pass return func_to_call @@ -41,9 +47,25 @@ def get_func_to_call(): def wrapper(*args, **kwargs): func_to_call = get_func_to_call() print("running {}()...".format(func.__name__)) - return func_to_call(*args, **kwargs) + try: + return func_to_call(*args, **kwargs) + except (AssertionError, AzureError, CliTestError, CliExecutionError, JMESPathCheckAssertionError) as e: + print("--------------------------------------") + print("step exception: ", e) + print("--------------------------------------", file=sys.stderr) + print("step exception in {}: {}".format(func.__name__, e), file=sys.stderr) + traceback.print_exc() + exceptions.append((func.__name__, sys.exc_info())) if inspect.isclass(func): return get_func_to_call() - else: - return wrapper + return wrapper + + +def raise_if(): + if exceptions: + if len(exceptions) <= 1: + raise exceptions[0][1][1] + message = "{}\nFollowed with exceptions in other steps:\n".format(str(exceptions[0][1][1])) + message += "\n".join(["{}: {}".format(h[0], h[1][1]) for h in exceptions[1:]]) + raise exceptions[0][1][0](message).with_traceback(exceptions[0][1][2]) diff --git a/src/costmanagement/azext_costmanagement/tests/latest/preparers.py b/src/costmanagement/azext_costmanagement/tests/latest/preparers.py index 3d6672de64f..4702355b2bd 100644 --- a/src/costmanagement/azext_costmanagement/tests/latest/preparers.py +++ b/src/costmanagement/azext_costmanagement/tests/latest/preparers.py @@ -10,8 +10,8 @@ import os from datetime import datetime -from azure.cli.testsdk.preparers import NoTrafficRecordingPreparer from azure_devtools.scenario_tests import SingleValueReplacer +from azure.cli.testsdk.preparers import NoTrafficRecordingPreparer from azure.cli.testsdk.exceptions import CliTestError from azure.cli.testsdk.reverse_dependency import get_dummy_cli @@ -19,6 +19,7 @@ KEY_RESOURCE_GROUP = 'rg' KEY_VIRTUAL_NETWORK = 'vnet' KEY_VNET_SUBNET = 'subnet' +KEY_VNET_NIC = 'nic' class VirtualNetworkPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): @@ -40,7 +41,7 @@ def __init__(self, name_prefix='clitest.vn', self.resource_group_key = resource_group_key self.dev_setting_name = os.environ.get(dev_setting_name, None) - def create_resource(self, name, **kwargs): + def create_resource(self, name, **_): if self.dev_setting_name: return {self.parameter_name: self.dev_setting_name, } @@ -56,61 +57,103 @@ def create_resource(self, name, **kwargs): tags['job'] = os.environ['ENV_JOB_NAME'] tags = ' '.join(['{}={}'.format(key, value) for key, value in tags.items()]) - template = 'az network vnet create --resource-group {} --name {} --tag ' + tags + template = 'az network vnet create --resource-group {} --name {} --subnet-name default --tag ' + tags self.live_only_execute(self.cli_ctx, template.format( self.resource_group_name, name)) self.test_class_instance.kwargs[self.key] = name return {self.parameter_name: name} - def remove_resource(self, name, **kwargs): + def remove_resource(self, name, **_): # delete vnet if test is being recorded and if the vnet is not a dev rg if not self.dev_setting_name: self.live_only_execute( - self.cli_ctx, 'az network vnet delete --name {} --resource-group {}'.format(name, self.resource_group_name)) + self.cli_ctx, + 'az network vnet delete --name {} --resource-group {}'.format(name, self.resource_group_name)) class VnetSubnetPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): def __init__(self, name_prefix='clitest.vn', parameter_name='subnet', - resource_group_name=None, resource_group_key=KEY_RESOURCE_GROUP, - vnet_name=None, vnet_key=KEY_VIRTUAL_NETWORK, address_prefixes="11.0.0.0/24", dev_setting_name='AZURE_CLI_TEST_DEV_VNET_SUBNET_NAME', - random_name_length=24, key=KEY_VNET_SUBNET): + key=KEY_VNET_SUBNET): if ' ' in name_prefix: raise CliTestError( 'Error: Space character in name prefix \'%s\'' % name_prefix) - super(VnetSubnetPreparer, self).__init__( - name_prefix, random_name_length) + super(VnetSubnetPreparer, self).__init__(name_prefix, 15) self.cli_ctx = get_dummy_cli() self.parameter_name = parameter_name self.key = key - self.resource_group_name = resource_group_name - self.resource_group_key = resource_group_key - self.vnet_name = vnet_name - self.vnet_key = vnet_key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] self.address_prefixes = address_prefixes self.dev_setting_name = os.environ.get(dev_setting_name, None) - def create_resource(self, name, **kwargs): + def create_resource(self, name, **_): if self.dev_setting_name: return {self.parameter_name: self.dev_setting_name, } - if not self.resource_group_name: - self.resource_group_name = self.test_class_instance.kwargs.get( - self.resource_group_key) - if not self.resource_group_name: + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: raise CliTestError("Error: No resource group configured!") - if not self.vnet_name: - self.vnet_name = self.test_class_instance.kwargs.get(self.vnet_key) - if not self.vnet_name: + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: raise CliTestError("Error: No vnet configured!") self.test_class_instance.kwargs[self.key] = 'default' return {self.parameter_name: name} - def remove_resource(self, name, **kwargs): + def remove_resource(self, name, **_): pass + + +class VnetNicPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.nic', + parameter_name='subnet', + resource_group_key=KEY_RESOURCE_GROUP, + vnet_key=KEY_VIRTUAL_NETWORK, + dev_setting_name='AZURE_CLI_TEST_DEV_VNET_NIC_NAME', + key=KEY_VNET_NIC): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VnetNicPreparer, self).__init__(name_prefix, 15) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: + raise CliTestError("Error: No resource group configured!") + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: + raise CliTestError("Error: No vnet configured!") + + template = 'az network nic create --resource-group {} --name {} --vnet-name {} --subnet default ' + self.live_only_execute(self.cli_ctx, template.format( + self.resource_group[1], name, self.vnet[1])) + + self.test_class_instance.kwargs[self.key] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + if not self.dev_setting_name: + self.live_only_execute( + self.cli_ctx, + 'az network nic delete --name {} --resource-group {}'.format(name, self.resource_group[1])) diff --git a/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_cm_query_in_subscription_scope.yaml b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_cm_query_in_subscription_scope.yaml new file mode 100644 index 00000000000..ccf905be419 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_cm_query_in_subscription_scope.yaml @@ -0,0 +1,917 @@ +interactions: +- request: + body: '{"type": "ActualCost", "timeframe": "BillingMonthToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '94' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/f2f83e84-0030-482d-b03c-5e7d05bc4cb2","name":"f2f83e84-0030-482d-b03c-5e7d05bc4cb2","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200501,"USD"],[20200502,"USD"],[20200503,"USD"],[20200504,"USD"],[20200505,"USD"],[20200506,"USD"],[20200507,"USD"],[20200508,"USD"],[20200509,"USD"],[20200510,"USD"],[20200511,"USD"],[20200512,"USD"],[20200513,"USD"],[20200514,"USD"],[20200515,"USD"],[20200516,"USD"],[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '778' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:30 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 7dc397f6-eb86-4f22-9fe0-28af95f06abd + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '29' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '199' + status: + code: 200 + message: OK +- request: + body: '{"type": "ActualCost", "timeframe": "MonthToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '87' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/ffa52968-a782-43f0-a1e0-cd01fef363aa","name":"ffa52968-a782-43f0-a1e0-cd01fef363aa","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200501,"USD"],[20200502,"USD"],[20200503,"USD"],[20200504,"USD"],[20200505,"USD"],[20200506,"USD"],[20200507,"USD"],[20200508,"USD"],[20200509,"USD"],[20200510,"USD"],[20200511,"USD"],[20200512,"USD"],[20200513,"USD"],[20200514,"USD"],[20200515,"USD"],[20200516,"USD"],[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '778' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:34 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - e68eb5b7-9eeb-4509-870f-8ee38e1af92f + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '29' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '199' + status: + code: 200 + message: OK +- request: + body: '{"type": "ActualCost", "timeframe": "TheLastBillingMonth", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '95' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/bd33b066-1fdc-4374-b06f-9fff04d7ebe3","name":"bd33b066-1fdc-4374-b06f-9fff04d7ebe3","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200401,"USD"],[20200402,"USD"],[20200403,"USD"],[20200404,"USD"],[20200405,"USD"],[20200406,"USD"],[20200407,"USD"],[20200408,"USD"],[20200409,"USD"],[20200410,"USD"],[20200411,"USD"],[20200412,"USD"],[20200413,"USD"],[20200414,"USD"],[20200415,"USD"],[20200416,"USD"],[20200417,"USD"],[20200418,"USD"],[20200419,"USD"],[20200420,"USD"],[20200421,"USD"],[20200422,"USD"],[20200423,"USD"],[20200424,"USD"],[20200425,"USD"],[20200426,"USD"],[20200427,"USD"],[20200428,"USD"],[20200429,"USD"],[20200430,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '897' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:37 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 9b9ebd49-a217-4137-968a-5fc4af4af96f + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '29' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '199' + status: + code: 200 + message: OK +- request: + body: '{"type": "ActualCost", "timeframe": "TheLastMonth", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '88' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/1bd9241c-07c4-4231-8f26-6b6a7c8f7e17","name":"1bd9241c-07c4-4231-8f26-6b6a7c8f7e17","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200401,"USD"],[20200402,"USD"],[20200403,"USD"],[20200404,"USD"],[20200405,"USD"],[20200406,"USD"],[20200407,"USD"],[20200408,"USD"],[20200409,"USD"],[20200410,"USD"],[20200411,"USD"],[20200412,"USD"],[20200413,"USD"],[20200414,"USD"],[20200415,"USD"],[20200416,"USD"],[20200417,"USD"],[20200418,"USD"],[20200419,"USD"],[20200420,"USD"],[20200421,"USD"],[20200422,"USD"],[20200423,"USD"],[20200424,"USD"],[20200425,"USD"],[20200426,"USD"],[20200427,"USD"],[20200428,"USD"],[20200429,"USD"],[20200430,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '897' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:39 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - dd081615-59b1-493a-92fe-1f307d3dcaa7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '28' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '198' + status: + code: 200 + message: OK +- request: + body: '{"type": "ActualCost", "timeframe": "WeekToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '86' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/f85d230d-d9f3-4bd5-8823-c16cadc700c3","name":"f85d230d-d9f3-4bd5-8823-c16cadc700c3","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '506' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:43 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - e446c36e-0704-4bd4-bbcd-78e94912b838 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '28' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '198' + status: + code: 200 + message: OK +- request: + body: '{"type": "AmortizedCost", "timeframe": "BillingMonthToDate", "dataset": + {"granularity": "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/d34ced7b-1c13-4576-a40a-425d008354fc","name":"d34ced7b-1c13-4576-a40a-425d008354fc","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200501,"USD"],[20200502,"USD"],[20200503,"USD"],[20200504,"USD"],[20200505,"USD"],[20200506,"USD"],[20200507,"USD"],[20200508,"USD"],[20200509,"USD"],[20200510,"USD"],[20200511,"USD"],[20200512,"USD"],[20200513,"USD"],[20200514,"USD"],[20200515,"USD"],[20200516,"USD"],[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '778' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:45 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 631b36ce-cdd3-4848-8e48-fd9e9ddd4ad3 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '28' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '198' + status: + code: 200 + message: OK +- request: + body: '{"type": "AmortizedCost", "timeframe": "MonthToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '90' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/c65a5149-244e-46fa-936a-03dea70cd92c","name":"c65a5149-244e-46fa-936a-03dea70cd92c","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200501,"USD"],[20200502,"USD"],[20200503,"USD"],[20200504,"USD"],[20200505,"USD"],[20200506,"USD"],[20200507,"USD"],[20200508,"USD"],[20200509,"USD"],[20200510,"USD"],[20200511,"USD"],[20200512,"USD"],[20200513,"USD"],[20200514,"USD"],[20200515,"USD"],[20200516,"USD"],[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '778' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:47 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - e33e8170-61ae-4495-8dcd-6287fb8fe751 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '27' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '197' + status: + code: 200 + message: OK +- request: + body: '{"type": "AmortizedCost", "timeframe": "TheLastBillingMonth", "dataset": + {"granularity": "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '98' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/59599c13-8311-4c4d-941e-6cf74c129a4b","name":"59599c13-8311-4c4d-941e-6cf74c129a4b","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200401,"USD"],[20200402,"USD"],[20200403,"USD"],[20200404,"USD"],[20200405,"USD"],[20200406,"USD"],[20200407,"USD"],[20200408,"USD"],[20200409,"USD"],[20200410,"USD"],[20200411,"USD"],[20200412,"USD"],[20200413,"USD"],[20200414,"USD"],[20200415,"USD"],[20200416,"USD"],[20200417,"USD"],[20200418,"USD"],[20200419,"USD"],[20200420,"USD"],[20200421,"USD"],[20200422,"USD"],[20200423,"USD"],[20200424,"USD"],[20200425,"USD"],[20200426,"USD"],[20200427,"USD"],[20200428,"USD"],[20200429,"USD"],[20200430,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '897' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:49 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 4cdaae3e-c0d4-483d-ae2d-ad582ce29b9c + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '26' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '196' + status: + code: 200 + message: OK +- request: + body: '{"type": "AmortizedCost", "timeframe": "TheLastMonth", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '91' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/a9bb3ab9-fae3-4498-8c4a-e4374e2237db","name":"a9bb3ab9-fae3-4498-8c4a-e4374e2237db","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200401,"USD"],[20200402,"USD"],[20200403,"USD"],[20200404,"USD"],[20200405,"USD"],[20200406,"USD"],[20200407,"USD"],[20200408,"USD"],[20200409,"USD"],[20200410,"USD"],[20200411,"USD"],[20200412,"USD"],[20200413,"USD"],[20200414,"USD"],[20200415,"USD"],[20200416,"USD"],[20200417,"USD"],[20200418,"USD"],[20200419,"USD"],[20200420,"USD"],[20200421,"USD"],[20200422,"USD"],[20200423,"USD"],[20200424,"USD"],[20200425,"USD"],[20200426,"USD"],[20200427,"USD"],[20200428,"USD"],[20200429,"USD"],[20200430,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '897' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:53 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 4a6640c2-c6db-4dd2-bfd5-64d013eb84f9 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '29' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '199' + status: + code: 200 + message: OK +- request: + body: '{"type": "AmortizedCost", "timeframe": "WeekToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '89' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/970b5077-b60b-4dfd-9e2f-ea5a5db0397e","name":"970b5077-b60b-4dfd-9e2f-ea5a5db0397e","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '506' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:55 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 4ab6bc88-3174-4ede-8399-9d0465366e2a + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '27' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '197' + status: + code: 200 + message: OK +- request: + body: '{"type": "Usage", "timeframe": "BillingMonthToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '89' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/b1697fdb-b663-45ca-b5cb-56d7482b0c22","name":"b1697fdb-b663-45ca-b5cb-56d7482b0c22","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200501,"USD"],[20200502,"USD"],[20200503,"USD"],[20200504,"USD"],[20200505,"USD"],[20200506,"USD"],[20200507,"USD"],[20200508,"USD"],[20200509,"USD"],[20200510,"USD"],[20200511,"USD"],[20200512,"USD"],[20200513,"USD"],[20200514,"USD"],[20200515,"USD"],[20200516,"USD"],[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '778' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:39:58 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 24d65f17-5073-4563-9dd5-0b75bde02d5e + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '25' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '195' + status: + code: 200 + message: OK +- request: + body: '{"type": "Usage", "timeframe": "MonthToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '82' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/0a1f9c5b-d1e5-4cba-bf1e-c5e1ebdf99cf","name":"0a1f9c5b-d1e5-4cba-bf1e-c5e1ebdf99cf","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200501,"USD"],[20200502,"USD"],[20200503,"USD"],[20200504,"USD"],[20200505,"USD"],[20200506,"USD"],[20200507,"USD"],[20200508,"USD"],[20200509,"USD"],[20200510,"USD"],[20200511,"USD"],[20200512,"USD"],[20200513,"USD"],[20200514,"USD"],[20200515,"USD"],[20200516,"USD"],[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '778' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:40:01 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 22e5e4b6-8c33-4f63-9892-20a6a17f7b35 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '27' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '197' + status: + code: 200 + message: OK +- request: + body: '{"type": "Usage", "timeframe": "TheLastBillingMonth", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '90' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/a416d550-7de0-49c9-8020-c1e632cfb4c8","name":"a416d550-7de0-49c9-8020-c1e632cfb4c8","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200401,"USD"],[20200402,"USD"],[20200403,"USD"],[20200404,"USD"],[20200405,"USD"],[20200406,"USD"],[20200407,"USD"],[20200408,"USD"],[20200409,"USD"],[20200410,"USD"],[20200411,"USD"],[20200412,"USD"],[20200413,"USD"],[20200414,"USD"],[20200415,"USD"],[20200416,"USD"],[20200417,"USD"],[20200418,"USD"],[20200419,"USD"],[20200420,"USD"],[20200421,"USD"],[20200422,"USD"],[20200423,"USD"],[20200424,"USD"],[20200425,"USD"],[20200426,"USD"],[20200427,"USD"],[20200428,"USD"],[20200429,"USD"],[20200430,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '897' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:40:03 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 5b30dcdd-389d-4597-8a5d-cf3825a7fd66 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '26' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '196' + status: + code: 200 + message: OK +- request: + body: '{"type": "Usage", "timeframe": "TheLastMonth", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '83' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/1e35a9c6-74d7-4c28-bc6d-bec77a897418","name":"1e35a9c6-74d7-4c28-bc6d-bec77a897418","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200401,"USD"],[20200402,"USD"],[20200403,"USD"],[20200404,"USD"],[20200405,"USD"],[20200406,"USD"],[20200407,"USD"],[20200408,"USD"],[20200409,"USD"],[20200410,"USD"],[20200411,"USD"],[20200412,"USD"],[20200413,"USD"],[20200414,"USD"],[20200415,"USD"],[20200416,"USD"],[20200417,"USD"],[20200418,"USD"],[20200419,"USD"],[20200420,"USD"],[20200421,"USD"],[20200422,"USD"],[20200423,"USD"],[20200424,"USD"],[20200425,"USD"],[20200426,"USD"],[20200427,"USD"],[20200428,"USD"],[20200429,"USD"],[20200430,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '897' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:40:06 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 553eba7f-00b6-40f7-946e-fd134692dd60 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '24' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '194' + status: + code: 200 + message: OK +- request: + body: '{"type": "Usage", "timeframe": "WeekToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '81' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/7aa9da0a-6be7-4f3a-a98c-0ff4a76f0868","name":"7aa9da0a-6be7-4f3a-a98c-0ff4a76f0868","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"],[20200522,"USD"],[20200523,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '506' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 05:40:09 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 351b8150-9cc9-4a64-bc37-e3e3aef4ea83 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '28' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '198' + status: + code: 200 + message: OK +version: 1 diff --git a/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_cm_query_subscription_scope.yaml b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_cm_query_subscription_scope.yaml new file mode 100644 index 00000000000..77bb5b0d816 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_cm_query_subscription_scope.yaml @@ -0,0 +1,63 @@ +interactions: +- request: + body: '{"type": "Usage", "timeframe": "MonthToDate", "dataset": {"granularity": + "Daily"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '82' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/d8a992d8-44df-4bab-8c7b-5be82b0cafde","name":"d8a992d8-44df-4bab-8c7b-5be82b0cafde","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[20200501,"USD"],[20200502,"USD"],[20200503,"USD"],[20200504,"USD"],[20200505,"USD"],[20200506,"USD"],[20200507,"USD"],[20200508,"USD"],[20200509,"USD"],[20200510,"USD"],[20200511,"USD"],[20200512,"USD"],[20200513,"USD"],[20200514,"USD"],[20200515,"USD"],[20200516,"USD"],[20200517,"USD"],[20200518,"USD"],[20200519,"USD"],[20200520,"USD"],[20200521,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '744' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 May 2020 08:16:11 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 7d206f82-91ff-4e16-aca8-2924bdf85a78 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '29' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '199' + status: + code: 200 + message: OK +version: 1 diff --git a/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_aggregation_in_subscription_scope.yaml b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_aggregation_in_subscription_scope.yaml new file mode 100644 index 00000000000..9798ba146f7 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_aggregation_in_subscription_scope.yaml @@ -0,0 +1,63 @@ +interactions: +- request: + body: '{"type": "ActualCost", "timeframe": "TheLastMonth", "dataset": {"granularity": + "Daily", "aggregation": {"totalCost": {"name": "PreTaxCost", "function": "Sum"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '161' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope --dataset-aggregation + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/6ded9eae-7dcf-4adf-80c1-8525927fc7db","name":"6ded9eae-7dcf-4adf-80c1-8525927fc7db","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"PreTaxCost","type":"Number"},{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[416.613981,20200401,"USD"],[408.468119,20200402,"USD"],[456.219457,20200403,"USD"],[438.307939,20200404,"USD"],[426.956897,20200405,"USD"],[425.69036,20200406,"USD"],[518.270865,20200407,"USD"],[357.930806,20200408,"USD"],[428.149184,20200409,"USD"],[537.673011,20200410,"USD"],[492.206168,20200411,"USD"],[523.479139,20200412,"USD"],[505.556428,20200413,"USD"],[483.03273,20200414,"USD"],[480.243421,20200415,"USD"],[483.139806,20200416,"USD"],[485.523736,20200417,"USD"],[483.687605,20200418,"USD"],[484.006764,20200419,"USD"],[484.891544,20200420,"USD"],[484.316853,20200421,"USD"],[466.370659,20200422,"USD"],[480.70762,20200423,"USD"],[477.721725,20200424,"USD"],[689.082173,20200425,"USD"],[626.994474,20200426,"USD"],[412.660238,20200427,"USD"],[314.921493,20200428,"USD"],[309.928617,20200429,"USD"],[304.582833,20200430,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1262' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 06:28:26 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - fe1a4581-7ff6-48f9-b4ce-733b73b405fb + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '29' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '199' + status: + code: 200 + message: OK +version: 1 diff --git a/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_aggregation_in_subscription_scope_custome_timeframe.yaml b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_aggregation_in_subscription_scope_custome_timeframe.yaml new file mode 100644 index 00000000000..8c491b1ff52 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_aggregation_in_subscription_scope_custome_timeframe.yaml @@ -0,0 +1,64 @@ +interactions: +- request: + body: '{"type": "ActualCost", "timeframe": "Custom", "timePeriod": {"from": "2020-03-01T00:00:00.000Z", + "to": "2020-05-09T00:00:00.000Z"}, "dataset": {"granularity": "Daily", "aggregation": + {"totalCost": {"name": "PreTaxCost", "function": "Sum"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '241' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --time-period --scope --dataset-aggregation + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/e0231aea-cf7c-45dd-a1fb-944e3ab0bbb9","name":"e0231aea-cf7c-45dd-a1fb-944e3ab0bbb9","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":null,"columns":[{"name":"PreTaxCost","type":"Number"},{"name":"UsageDate","type":"Number"},{"name":"Currency","type":"String"}],"rows":[[186.758302,20200301,"USD"],[158.349446,20200302,"USD"],[155.97897,20200303,"USD"],[162.358037,20200304,"USD"],[211.443682,20200305,"USD"],[262.572605,20200306,"USD"],[237.858197,20200307,"USD"],[215.20761,20200308,"USD"],[321.937396,20200309,"USD"],[377.267038,20200310,"USD"],[269.002744,20200311,"USD"],[251.907123,20200312,"USD"],[241.57893,20200313,"USD"],[212.738854,20200314,"USD"],[193.864972,20200315,"USD"],[275.1352,20200316,"USD"],[408.350175,20200317,"USD"],[422.827042,20200318,"USD"],[499.081824,20200319,"USD"],[476.498051,20200320,"USD"],[448.647256,20200321,"USD"],[437.914351,20200322,"USD"],[433.324812,20200323,"USD"],[483.099996,20200324,"USD"],[1016.342711,20200325,"USD"],[425.789266,20200326,"USD"],[415.357552,20200327,"USD"],[413.462403,20200328,"USD"],[413.006505,20200329,"USD"],[419.924044,20200330,"USD"],[419.592932,20200331,"USD"],[416.613981,20200401,"USD"],[408.468119,20200402,"USD"],[456.219457,20200403,"USD"],[438.307939,20200404,"USD"],[426.956897,20200405,"USD"],[425.69036,20200406,"USD"],[518.270865,20200407,"USD"],[357.930806,20200408,"USD"],[428.149184,20200409,"USD"],[537.673011,20200410,"USD"],[492.206168,20200411,"USD"],[523.479139,20200412,"USD"],[505.556428,20200413,"USD"],[483.03273,20200414,"USD"],[480.243421,20200415,"USD"],[483.139806,20200416,"USD"],[485.523736,20200417,"USD"],[483.687605,20200418,"USD"],[484.006764,20200419,"USD"],[484.891544,20200420,"USD"],[484.316853,20200421,"USD"],[466.370659,20200422,"USD"],[480.70762,20200423,"USD"],[477.721725,20200424,"USD"],[689.082173,20200425,"USD"],[626.994474,20200426,"USD"],[412.660238,20200427,"USD"],[314.921493,20200428,"USD"],[309.928617,20200429,"USD"],[304.582833,20200430,"USD"],[312.176616,20200501,"USD"],[476.132826,20200502,"USD"],[352.051959,20200503,"USD"],[352.041194,20200504,"USD"],[352.060008,20200505,"USD"],[353.0323,20200506,"USD"],[352.617402,20200507,"USD"],[353.018637,20200508,"USD"],[502.775801,20200509,"USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '2376' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 06:53:26 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 0082d861-7d65-412d-a921-9a9fe5d2fff7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '29' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '199' + status: + code: 200 + message: OK +version: 1 diff --git a/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_grouping_in_subscription_scopde.yaml b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_grouping_in_subscription_scopde.yaml new file mode 100644 index 00000000000..3667aa68c83 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_data_grouping_in_subscription_scopde.yaml @@ -0,0 +1,64 @@ +interactions: +- request: + body: '{"type": "ActualCost", "timeframe": "TheLastMonth", "dataset": {"granularity": + "Daily", "aggregation": {"totalCost": {"name": "PreTaxCost", "function": "Sum"}}, + "grouping": [{"type": "Dimension", "name": "ResourceGroup"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement query + Connection: + - keep-alive + Content-Length: + - '223' + Content-Type: + - application/json + ParameterSetName: + - --type --timeframe --scope --dataset-aggregation --dataset-grouping + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/query/784acf99-3e6e-495d-8197-974d2fd603e2","name":"784acf99-3e6e-495d-8197-974d2fd603e2","type":"Microsoft.CostManagement/query","location":null,"sku":null,"eTag":null,"properties":{"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query?api-version=2019-11-01&$skiptoken=AQAAAA%3D%3D","columns":[{"name":"PreTaxCost","type":"Number"},{"name":"UsageDate","type":"Number"},{"name":"ResourceGroup","type":"String"},{"name":"Currency","type":"String"}],"rows":[[5.08032,20200401,"azure_search_cli_testdu4gt4d2qasm4rribpmq7k4p5k3ooewzex5lpfpmtei3nhmuajat43","USD"],[10.16064,20200401,"azure_search_cli_testh6w6rnsdqz2m7c3gkuohyf6xuojyor3ck6f5azrmc55o5fu26seizr","USD"],[5.08032,20200401,"azure_search_cli_testkutpdg5rerx5fc5ficub65iaph3ksnb6wp4qstd73rukb5ijewtsrc","USD"],[10.16064,20200401,"azure_search_cli_testoeuyti5jqqlaunupbhpnfnhfdkjamnaej4glqkdy66fufyan2y3zm6","USD"],[5.08032,20200401,"azure_search_cli_testrw7hdqfh5svtz52326ewkagn2fuqt54udftyqa7jwh6b6dyeeiosne","USD"],[5.08032,20200401,"azure_search_cli_testtjjvfawgr4d453ylkbz7vjlshkytobkqpyswvq744ujs2xehbqaskh","USD"],[10.16064,20200401,"azure_search_cli_testudvlgq7mimi6y2dcvfqjs32lqxdh4twqewzy3s23gtedyg5le2girc","USD"],[5.08032,20200401,"azure_search_cli_testy24raerip4gad6kudhxho32gijmv2rnfkgzfsopme77bjdwh3u4vcf","USD"],[0.00032,20200401,"azure-cli-test-rg","USD"],[0.005452,20200401,"azure-core-poc","USD"],[0.007597,20200401,"azuresdktest_reserved","USD"],[0.434243,20200401,"bim_pl_test_rg","USD"],[1.176201,20200401,"bim-rg","USD"],[1.5E-05,20200401,"cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn","USD"],[7E-06,20200401,"cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk","USD"],[7E-06,20200401,"cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y","USD"],[7E-06,20200401,"cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2","USD"],[7E-06,20200401,"cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3","USD"],[8E-06,20200401,"cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme","USD"],[7E-06,20200401,"cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p","USD"],[1.5E-05,20200401,"cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi","USD"],[7E-06,20200401,"cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw","USD"],[7E-06,20200401,"cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa","USD"],[7E-06,20200401,"cli_test_eh_aliasdrj6y3jjzz2b5gjynzeg3hlvh4vbevx6axtox4ijutmqpe3uhr2f6zjcvp","USD"],[7E-06,20200401,"cli_test_eh_aliasfaxwrtp645isrxreqi6kj6gtvb4j3lh23klbxtfz7d67cc276s43xrosgp","USD"],[7E-06,20200401,"cli_test_eh_aliasr6icm7ctnbnlupvodhdxfvgm7ukjbnbzw3w6543qcf232tden7ulag356e","USD"],[4E-06,20200401,"cli_test_keyvault_cert_importfqcupgikl3loq5xwnwxwre2spyxhihfme66stqtb4umykq","USD"],[6.8E-05,20200401,"cli_test_keyvault_certlqoezklz34pzmvczugl2filqojiwdewux5mm65coaugglqkmrvn5c","USD"],[7.560108,20200401,"cli_test_keyvault_keyf73i64pcrt4z6ylyblhrn4ie5hmvyarsbyqzckpkjzkympebyeva6p","USD"],[3.4E-05,20200401,"cli_test_keyvault_sd7h25bsrca52faywyufzv7wd3pspvdkajyz4kzfmrnuyjzlacqliaguz","USD"],[4E-06,20200401,"cli_test_keyvault_sdlu3oj34p6gpiyb3diqgaxwj63c32uhmwnrch5keluoywaky2b36ymcs","USD"],[6E-06,20200401,"cli_test_keyvault_secret_soft_deletebeesrb7crc4uqtzdqh7gsa7lpy6yepgsx6wgzvu","USD"],[6E-06,20200401,"cli_test_keyvault_secret_soft_deletebk3eyutp56wz6icx3wnioab5yd3cdazpfcwoxao","USD"],[6E-06,20200401,"cli_test_keyvault_secret_soft_deletebqtna7kmjdakuoteuydgj7vn7lrwpeo5dc5npi5","USD"],[6E-06,20200401,"cli_test_keyvault_secret_soft_deletecire6cpladtmnf55uhcmts5a7s53n2fodz5aadl","USD"],[1.1E-05,20200401,"cli_test_keyvault_secret_soft_deletejj75davl5pc34jwgmtq5e4usaoff7ot67dcd6oy","USD"],[6E-06,20200401,"cli_test_keyvault_secret_soft_deletevsvwzo22tftmill5xfas66mdpycaguiel2pzy3r","USD"],[6E-06,20200401,"cli_test_keyvault_secret_soft_deleteyuiuq2tmxlyzvvbzt4wbbmndctomx6poqkt47yr","USD"],[5.7E-05,20200401,"cli_test_keyvault_secretjeub7sau2ygomj5bu32p57zrcp3u7crekk6t6ewphttqnkvdmsa","USD"],[1.7E-05,20200401,"cli_test_kv_cert_contactsztn4s63fnfzatdrc7bwu6vmexm63jdmwrdgsx4t7thzvn32zqt","USD"],[8E-06,20200401,"cli_test_kv_cert_download2ppagwj744htqrprzwdggy7tcn3au4mtiszsb7ynraiw44jmie","USD"],[3.4E-05,20200401,"cli_test_kv_cert_issuerl4vsobg4wrgwzxy4tjtjvf4hwhoz566ypug4w5ezxp6bs554zhvs","USD"],[1.9E-05,20200401,"cli_test_kv_cert_pendingqq4aih4ooyypa4nn7spe67d6exr6oceupu73no7n5gfwbr7gq2j","USD"],[0.000176,20200401,"cli_test_kv_key_downloadwleqezndwny455pfhew74an344xdmzrt7luzwdxfhr7wj527f53","USD"],[28.0476,20200401,"cli_test_sb_aliasjvmz65dvg7inej34lr2j6ymns5ewjlrnrp4z6ylhegesgpf6io57pmksme","USD"],[28.0476,20200401,"cli_test_sb_aliaszm3yvalycherhh6usqybb4tp3eqbckvxbdrujxlfo2b2kgt74tb645a4r5","USD"],[0.119226,20200401,"clitest.rg2qgvxjxy46scnjuh6q5gtypebpi5oeuajfgxb7yrrsggnqxrij6pnc3d7ybz2chih","USD"],[0.119463,20200401,"clitest.rg35pihforqftkb5qllg3t75zoxlztjwsmuftgdsphbiy2r3adx3t3spnkzzs2c5c4s","USD"],[0.120262,20200401,"clitest.rg3s3h2izedr4olwdk4jqjhltn4lkukfixgfalhtfjmiy6u3xndqvdkrr4j4jqhx6hu","USD"],[9E-06,20200401,"clitest.rg6i4hl6iakg","USD"],[0.120385,20200401,"clitest.rg6mxjzuorkskzxoisjj4q7leopfu5mge2nncxfuw33pn7w5rzgt6nqhx3f2koq427p","USD"],[1E-06,20200401,"clitest.rgdd3pvc445vb7vkctepirlk7u7ehgatpxqkt7etu7jzzxnby36lhts5532grmo4xqt","USD"],[0.120236,20200401,"clitest.rgduxuhyeqzrek7s3jfr776qvugv4qtmrxnlqcwiodxu2wihvqvuajr5bvtbfw2c74d","USD"],[0.120278,20200401,"clitest.rgdzk3w2kpwtbjaippkz6nrab53pinz3nbdcoxurf2fm477d5j2qa43kpmvlh34nudn","USD"],[2E-06,20200401,"clitest.rgevikb7u3cnppphnlo3ci7rgwuxfuvv66yickp7hu46sxaowssgbwp24t7hytzmmqk","USD"],[0.0,20200401,"clitest.rggqe5qp2g4ikjuk4quunjltoatlnnfvg4jy6lw5mup4qcbrvofg4uioaohki5xkfem","USD"],[0.120152,20200401,"clitest.rgib3viqdhrawwnaopavpcsc2u3psfod7wlami5tg57borlex2io2b7nolpz4qxhm5p","USD"],[0.0,20200401,"clitest.rgkjk5zpf6vpm4eazar7zv554ytwslfx3wfo6vpev4ypj3664cr3nnzzrhgiio2hvab","USD"],[0.0,20200401,"clitest.rgof3oy22ihkrkvxmos32f4x7rg662il55cz42puy634klszugqsoj3kafahile6edj","USD"],[0.120245,20200401,"clitest.rgp535jz2dxemblsqlvzwsk4ehth7eprd5yny22fi5rppnick62nncsonvlutvmvbje","USD"],[0.0,20200401,"clitest.rgqzxdc4qlur4ldpzn5ysrsgw3iq7ot2pjm2twuh5h7mydbhfromknwnwmbcte2jnf6","USD"],[0.11925,20200401,"clitest.rgr5sog7j3q3a5o2vy3r4gpl3ylcovxfcbkttkotqe653iz4mlsrbjns76tv4v4lbqq","USD"],[0.0,20200401,"clitest.rgrsyxntxfpaaox5qm77j37jgojydhj6vgwpffnchul5hhnd2txbb2upcw5lpcrayhz","USD"],[0.119262,20200401,"clitest.rguk5hr7imq2zbvjzaogkt7gke2onbbn6sr3ux5rfdiqufofpfrmblbmbzrtd663lkn","USD"],[0.119247,20200401,"clitest.rgyreu2qkpgqyrm56i4cocrrcf5xb2uzmvlm2lau226cqk6zetyu5olii7figpx2mix","USD"],[0.122006,20200401,"clitest.rgzj3xc6lmggzuorcimokxvkq7lrrxtcty3dilmrxzwdjcq35dqahmc7e7snha4milh","USD"],[1E-06,20200401,"databricks-rg-my-standard-space-fez3hbt1bsvmr","USD"],[1.536172,20200401,"emerald-city-bookstore","USD"],[6.308817,20200401,"fanqiu-vm","USD"],[7.428543,20200401,"feng-cli-rg","USD"],[0.055444,20200401,"fytest","USD"],[0.459355,20200401,"fytest2","USD"],[0.000133,20200401,"harold","USD"],[0.0,20200401,"harold-test-rsg","USD"],[4E-06,20200401,"javacsmrg46947","USD"],[2E-06,20200401,"jlrg","USD"],[0.008688,20200401,"jlrg1","USD"],[0.885074,20200401,"jlvm2rg","USD"],[0.54432,20200401,"microsoft.default","USD"],[1.52712,20200401,"new-experiences","USD"],[244.018672,20200401,"qianwens","USD"],[5.348657,20200401,"storage-v2rt-repro","USD"],[0.671185,20200401,"xiaojianxu","USD"],[2.641935,20200401,"xplattestgexpressroute8595","USD"],[9.2E-05,20200401,"yeming","USD"],[0.000131,20200401,"yu-test-rg-westus","USD"],[15.657044,20200401,"zhoxing-test","USD"],[6.768747,20200401,"zuh","USD"],[0.150604,20200401,"zuhcentral","USD"],[0.002268,20200402,"","USD"],[4.1E-05,20200402,"20200402","USD"],[5.08032,20200402,"azure_search_cli_testdu4gt4d2qasm4rribpmq7k4p5k3ooewzex5lpfpmtei3nhmuajat43","USD"],[10.16064,20200402,"azure_search_cli_testh6w6rnsdqz2m7c3gkuohyf6xuojyor3ck6f5azrmc55o5fu26seizr","USD"],[5.08032,20200402,"azure_search_cli_testkutpdg5rerx5fc5ficub65iaph3ksnb6wp4qstd73rukb5ijewtsrc","USD"],[10.16064,20200402,"azure_search_cli_testoeuyti5jqqlaunupbhpnfnhfdkjamnaej4glqkdy66fufyan2y3zm6","USD"],[5.08032,20200402,"azure_search_cli_testrw7hdqfh5svtz52326ewkagn2fuqt54udftyqa7jwh6b6dyeeiosne","USD"],[5.08032,20200402,"azure_search_cli_testtjjvfawgr4d453ylkbz7vjlshkytobkqpyswvq744ujs2xehbqaskh","USD"],[10.16064,20200402,"azure_search_cli_testudvlgq7mimi6y2dcvfqjs32lqxdh4twqewzy3s23gtedyg5le2girc","USD"],[5.08032,20200402,"azure_search_cli_testy24raerip4gad6kudhxho32gijmv2rnfkgzfsopme77bjdwh3u4vcf","USD"],[0.000169,20200402,"azure-cli-test-rg","USD"],[0.005451,20200402,"azure-core-poc","USD"],[0.008712,20200402,"azuresdktest_reserved","USD"],[0.001152,20200402,"bedf00a1-f0f2-4b90-ba6d-27ef773a5b2b","USD"],[0.256884,20200402,"bim_pl_test_rg","USD"],[0.735171,20200402,"bim-rg","USD"],[0.180075,20200402,"cli_test_active_active_cross_premise_connectionjkpsjftkzzahnms4ynlyhjivlepg","USD"],[0.025725,20200402,"cli_test_active_active_vnet_vnet_connectionxzbexbzbyqhuwuir3dvy2u4bdqfinn6i","USD"],[0.085882,20200402,"cli_test_ag_basic_with_waf_v2_skujzgtgy365ckm7ta2djeoea56jldr2ekiolou45skvo","USD"],[0.020912,20200402,"cli_test_ag_basic3be6y3hnckisotzr2zxms2kdumbyuhif3n44txwbfksnhymobmf3imhlmn","USD"],[0.019773,20200402,"cli_test_ag_basickweuyhwie6mjcwfqden27w2wsttmbsnbjohps4zwczega2zc7x2gqhoapu","USD"],[0.0206,20200402,"cli_test_ag_existing_subnetugosp6vzq5rtjkkgmy6bljafvfu52swudzofuzazsfjw3434","USD"],[0.01895,20200402,"cli_test_ag_frontend_ip_private4ccdddxo4jiohbmiai7eq27jessl5hlaz3bv7bhnhvoq","USD"],[0.037889,20200402,"cli_test_ag_frontend_ip_public3zujpvdzuxvaewrr5avaiyl4zazvgcgyse23srhb6hwzk","USD"],[0.139703,20200402,"cli_test_ag_http_listenerco2wzpl2dzrj7h4ygnk42onexueaxsxdgqpei2gjqreypk5pjy","USD"],[0.071936,20200402,"cli_test_ag_identityky25djttvbsvnh67dzv25ivfc3h23whbplo72bg63qdclp6b2ge7qgp","USD"],[0.018111,20200402,"cli_test_ag_no_wait23pucxw33up7s3doey5zwvf5tjwyg74qvhnsjre4iy7j4vazyosp7fn3","USD"],[0.058473,20200402,"cli_test_ag_private_ipw3xj4oq2tellanploqitcrynlbrqpc45vhrfogzhrq2rlghjdwseb","USD"],[0.191656,20200402,"cli_test_ag_probehmucpai5xw4iiz6hncjoq43tt732a4q3bmklbf4vz2qjk6n6krmxjfffbk","USD"],[0.073761,20200402,"cli_test_ag_rewrite_rulesetshl45mwrgn6vunjxqcehgeahw4aqba75x7ama6oo32qlaxyf","USD"],[0.037308,20200402,"cli_test_ag_root_certj5coffmm7gka2elv6xq67wuyxoksxgwbtxmgtdcbofeauazyb7poeg","USD"],[0.056548,20200402,"cli_test_ag_rulej45faatapg4zi6mxfb7tz7h422ebsx3d2tpzmmasfa5dncdz2yy5exn2rlk","USD"],[0.067192,20200402,"cli_test_ag_url_path_mapwoylr2cazwrczp6xq4t3phwazqkw4wvafyzuun4sij6r64d23ys","USD"],[0.03402,20200402,"cli_test_ag_zonenaw2cfdfhdetgu7gtfh54jfr6awhn2tbbidmnalkdtjmsfeicqrun6alu4w","USD"],[0.190624,20200402,"cli_test_app_gateway_waf_policy_de2xelb5nr74hqdjdo64z6kopithvgj3w3sv2j2aqng","USD"],[0.148386,20200402,"cli_test_app_gateway_waf_v2_config2a4ttwedbhu7nods7cmw3pwluacgusdaujbk2mvx3","USD"],[1.5E-05,20200402,"cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn","USD"],[8E-06,20200402,"cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk","USD"],[7E-06,20200402,"cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y","USD"],[7E-06,20200402,"cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2","USD"],[7E-06,20200402,"cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3","USD"],[7E-06,20200402,"cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme","USD"],[7E-06,20200402,"cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p","USD"],[1.5E-05,20200402,"cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi","USD"],[7E-06,20200402,"cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw","USD"],[7E-06,20200402,"cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa","USD"],[1.5E-05,20200402,"cli_test_disk_encryption_set_snapshot_bt2jyt5ooiaqyreiau2z324ekfvjoes2cdsge","USD"],[1.5E-05,20200402,"cli_test_disk_encryption_set_snapshot_q7rpmdf4h2ipyhgduit3t6tjhkl4zsty7yuui","USD"],[7E-06,20200402,"cli_test_eh_aliasdrj6y3jjzz2b5gjynzeg3hlvh4vbevx6axtox4ijutmqpe3uhr2f6zjcvp","USD"],[7E-06,20200402,"cli_test_eh_aliasfaxwrtp645isrxreqi6kj6gtvb4j3lh23klbxtfz7d67cc276s43xrosgp","USD"],[7E-06,20200402,"cli_test_eh_aliasr6icm7ctnbnlupvodhdxfvgm7ukjbnbzw3w6543qcf232tden7ulag356e","USD"],[1.2E-05,20200402,"cli_test_gallery_specialized_4qwpszyi264pi33uc7cfjnmuikizfojqeq5sacityhk3og","USD"],[0.006313,20200402,"cli_test_gallery_specialized_xhwbwr74v4xaaw5rphoivs4z73a3chmmv3vlyxd6a37oao","USD"],[0.00063,20200402,"cli_test_keyvault_pecsm7kkkcumdqgfb5cyedggrk34eh4274va5jncdvhlfmadfxzacatmb","USD"],[0.000315,20200402,"cli_test_lb_probesqrrkgfro6ku7i2vy73eni3wqi6igmmfmpvgxvtn3heer4dthacla6gxrc","USD"],[0.000227,20200402,"cli_test_load_balancer34sn5vqqbzknhjd5f5buhsw7v3rsj3n3xaggmimjui7gjanremggz","USD"],[0.008065,20200402,"cli_test_managed_diskbrpt6wwucc5hjkazd3srcazjwfjzt7clwt2uzx5aiheholhnj7g3jo","USD"],[0.011528,20200402,"cli_test_managed_diskwby63u4dictptyngiapaq64gukrf33cstxvhzadxsfyqdopehgtzyd","USD"],[0.000315,20200402,"cli_test_network_lb_skukpjyv2ujoegtuj4h2g5tt367nklbnjqvlmj4m5as2znsinal663h","USD"],[0.000315,20200402,"cli_test_network_private_endpointsegjxaq6kkj54x7q5zwmzy3rq3j6tojcj54rouiehy","USD"],[0.000315,20200402,"cli_test_network_private_link_service5axfr4sk2dhbmfklge4euvzrwh46yhopvxfpxk","USD"],[0.00378,20200402,"cli_test_network_public_ip_prefix24mgqduampi7ulnd6twrv6hftsxv2aj6222is4cz5u","USD"],[0.026343,20200402,"cli_test_nic_ag_address_poolsaa2h6bs7vm7txnlfvnhitrqiuz5mvm76m2zdxagb33xubq","USD"],[0.026359,20200402,"cli_test_nic_app_gatewayukl2exxd6mdj6jrp4ateiq4gvifv3qv7wgsza7cajd2rdrg4til","USD"],[0.001893,20200402,"cli_test_nw_troubleshootingm7cg7bztfzihz7xvk7wsiuhmv5soc4h6sdv25xzq4a76zl3m","USD"],[0.000454,20200402,"cli_test_public_ipuutdgeg5za4zr5y6hgdrptaq7zjhmvyx4siirvn37n33ajkmcpf65y2n6","USD"],[28.0476,20200402,"cli_test_sb_aliasjvmz65dvg7inej34lr2j6ymns5ewjlrnrp4z6ylhegesgpf6io57pmksme","USD"],[28.0476,20200402,"cli_test_sb_aliaszm3yvalycherhh6usqybb4tp3eqbckvxbdrujxlfo2b2kgt74tb645a4r5","USD"],[0.011838,20200402,"cli_test_vm_disk_max_shares_etc_hg4nc45dftzazwzd3lmf7q3scdd3rddx4j5c23lsod5","USD"],[0.002659,20200402,"cli_test_vm_disk_max_shares_etc_lndwqzmvreghikqj6ejite6blszewfhsur5bix4ganv","USD"],[0.025725,20200402,"cli_test_vnet_gateway_ipsecs6iawtcvjxog4lw2xfxrjwz4gpvr54wpgel5ozhebfslfmir","USD"],[0.009975,20200402,"cli_test_vpn_connection_ipsecbj4sq7exptvt62chvhv6wtgenflis4pz2dr4ikqdmpkmvv","USD"],[0.009975,20200402,"cli_test_vpn_gateway_aad_75npbwe3ipsk4lrgjxibb2gx3wzbxkosu46si5oyscgtygm3tb","USD"],[0.13755,20200402,"cli_test_vpn_gateway46tsqpw2jrzsr5j4vettz6ofzitpfnn2evejnrmus2qoh572ghft3vf","USD"],[0.119226,20200402,"clitest.rg2qgvxjxy46scnjuh6q5gtypebpi5oeuajfgxb7yrrsggnqxrij6pnc3d7ybz2chih","USD"],[0.119463,20200402,"clitest.rg35pihforqftkb5qllg3t75zoxlztjwsmuftgdsphbiy2r3adx3t3spnkzzs2c5c4s","USD"],[0.120262,20200402,"clitest.rg3s3h2izedr4olwdk4jqjhltn4lkukfixgfalhtfjmiy6u3xndqvdkrr4j4jqhx6hu","USD"],[8E-06,20200402,"clitest.rg6i4hl6iakg","USD"],[0.120385,20200402,"clitest.rg6mxjzuorkskzxoisjj4q7leopfu5mge2nncxfuw33pn7w5rzgt6nqhx3f2koq427p","USD"],[1E-06,20200402,"clitest.rgdd3pvc445vb7vkctepirlk7u7ehgatpxqkt7etu7jzzxnby36lhts5532grmo4xqt","USD"],[0.120236,20200402,"clitest.rgduxuhyeqzrek7s3jfr776qvugv4qtmrxnlqcwiodxu2wihvqvuajr5bvtbfw2c74d","USD"],[0.120278,20200402,"clitest.rgdzk3w2kpwtbjaippkz6nrab53pinz3nbdcoxurf2fm477d5j2qa43kpmvlh34nudn","USD"],[0.0,20200402,"clitest.rggqe5qp2g4ikjuk4quunjltoatlnnfvg4jy6lw5mup4qcbrvofg4uioaohki5xkfem","USD"],[0.120152,20200402,"clitest.rgib3viqdhrawwnaopavpcsc2u3psfod7wlami5tg57borlex2io2b7nolpz4qxhm5p","USD"],[0.0,20200402,"clitest.rgkjk5zpf6vpm4eazar7zv554ytwslfx3wfo6vpev4ypj3664cr3nnzzrhgiio2hvab","USD"],[0.0,20200402,"clitest.rgm7jtdrndgi5guu7dremapb2yx5sf73jpaxtfhe7s7pkfcbq36tgasgrmbokregry5","USD"],[0.0,20200402,"clitest.rgof3oy22ihkrkvxmos32f4x7rg662il55cz42puy634klszugqsoj3kafahile6edj","USD"],[0.120245,20200402,"clitest.rgp535jz2dxemblsqlvzwsk4ehth7eprd5yny22fi5rppnick62nncsonvlutvmvbje","USD"],[0.0,20200402,"clitest.rgqzxdc4qlur4ldpzn5ysrsgw3iq7ot2pjm2twuh5h7mydbhfromknwnwmbcte2jnf6","USD"],[0.11925,20200402,"clitest.rgr5sog7j3q3a5o2vy3r4gpl3ylcovxfcbkttkotqe653iz4mlsrbjns76tv4v4lbqq","USD"],[0.0,20200402,"clitest.rgrsyxntxfpaaox5qm77j37jgojydhj6vgwpffnchul5hhnd2txbb2upcw5lpcrayhz","USD"],[0.000504,20200402,"clitest.rgs55mdfq2am5f4lwd4odjj5e5galu7hd7g7ngewygbnts6ihjnt5yxiw4qqvaybyh3","USD"],[0.119262,20200402,"clitest.rguk5hr7imq2zbvjzaogkt7gke2onbbn6sr3ux5rfdiqufofpfrmblbmbzrtd663lkn","USD"],[0.00753,20200402,"clitest.rguzg36yvtg4lez727etrct3bjjzezc3mqhlrcn5wmscsmipzlx2qybvj6zkdklkkt7","USD"],[0.119247,20200402,"clitest.rgyreu2qkpgqyrm56i4cocrrcf5xb2uzmvlm2lau226cqk6zetyu5olii7figpx2mix","USD"],[0.122006,20200402,"clitest.rgzj3xc6lmggzuorcimokxvkq7lrrxtcty3dilmrxzwdjcq35dqahmc7e7snha4milh","USD"],[1E-06,20200402,"databricks-rg-my-standard-space-fez3hbt1bsvmr","USD"],[1.53618,20200402,"emerald-city-bookstore","USD"],[6.306235,20200402,"fanqiu-vm","USD"],[7.425387,20200402,"feng-cli-rg","USD"],[0.055444,20200402,"fytest","USD"],[4E-05,20200402,"harold","USD"],[0.0,20200402,"harold-test-rsg","USD"],[4E-06,20200402,"javacsmrg46947","USD"],[0.009286,20200402,"jlrg1","USD"],[0.15897,20200402,"jlvm2rg","USD"],[0.54432,20200402,"microsoft.default","USD"],[7E-06,20200402,"myresourcegroup","USD"],[0.00063,20200402,"networkwatcherrg","USD"],[1.52712,20200402,"new-experiences","USD"],[243.841782,20200402,"qianwens","USD"],[5.348629,20200402,"storage-v2rt-repro","USD"],[0.003402,20200402,"test_network_lb_outbound_rulesu6kipnn6iuwptnw3jdsscaj4n7e52bb6mlgnaubwvrzd2","USD"],[0.671194,20200402,"xiaojianxu","USD"],[2.641935,20200402,"xplattestgexpressroute8595","USD"],[9.2E-05,20200402,"yeming","USD"],[0.00013,20200402,"yu-test-rg-westus","USD"],[15.302219,20200402,"zhoxing-test","USD"],[6.724994,20200402,"zuh","USD"],[0.151246,20200402,"zuhcentral","USD"],[0.000504,20200403,"","USD"],[0.008468,20200403,"$system","USD"],[0.001152,20200403,"7257c237-39bc-44b5-bc33-e5cc7c4f265d","USD"],[0.27531,20200403,"azure_search_cli_testbwbcvjsk5ufkaned7qi45n2jjzs2fan66mdidb7lhrbz4kaguoec5v","USD"],[5.08032,20200403,"azure_search_cli_testdu4gt4d2qasm4rribpmq7k4p5k3ooewzex5lpfpmtei3nhmuajat43","USD"],[0.21168,20200403,"azure_search_cli_testgb3wrenvmirqwedg2kbgdibc5zb5iay4ns2jxy7t4pifz6n4bmit3u","USD"],[10.16064,20200403,"azure_search_cli_testh6w6rnsdqz2m7c3gkuohyf6xuojyor3ck6f5azrmc55o5fu26seizr","USD"],[5.08032,20200403,"azure_search_cli_testkutpdg5rerx5fc5ficub65iaph3ksnb6wp4qstd73rukb5ijewtsrc","USD"],[0.21168,20200403,"azure_search_cli_testnjn4ncyneuunv6ylmv22ercqbgmnjzaafz2up32xy3q5nd4nz4mnyf","USD"],[10.16064,20200403,"azure_search_cli_testoeuyti5jqqlaunupbhpnfnhfdkjamnaej4glqkdy66fufyan2y3zm6","USD"],[5.08032,20200403,"azure_search_cli_testrw7hdqfh5svtz52326ewkagn2fuqt54udftyqa7jwh6b6dyeeiosne","USD"],[1.27008,20200403,"azure_search_cli_testrxyi2chdncmbl2tda34ewgxntfl3w765as7lmo34sxxlryvyty4m63","USD"],[0.42336,20200403,"azure_search_cli_testsb2fjtkzzevg6a6qbis6zzulpkwvqf7ee4qjnxblen4mqvn7fdgzlt","USD"],[5.08032,20200403,"azure_search_cli_testtjjvfawgr4d453ylkbz7vjlshkytobkqpyswvq744ujs2xehbqaskh","USD"],[10.16064,20200403,"azure_search_cli_testudvlgq7mimi6y2dcvfqjs32lqxdh4twqewzy3s23gtedyg5le2girc","USD"],[0.42336,20200403,"azure_search_cli_testuhlej2knchojk3siozou4apipl356pgv3bqknipi4jsb75iv57vieo","USD"],[0.21168,20200403,"azure_search_cli_testvpc3sezpj72ich3ex4h4hhytv5vhohpjzqq3x6m3spsbbrwlof22hh","USD"],[5.08032,20200403,"azure_search_cli_testy24raerip4gad6kudhxho32gijmv2rnfkgzfsopme77bjdwh3u4vcf","USD"],[0.0,20200403,"azurecli-functionapp-c-e2e4nnx3n354scyu43zjurcmgdbksc6ufgvxmmy3onu6wnsd4udc","USD"],[0.0,20200403,"azurecli-functionapp-c-e2e-ragrsnildalmjzppep2mceygxsgrxz4bccgkdlmpyhg27fmv","USD"],[0.0,20200403,"azurecli-functionapp-linuxnxwuzd2sjkenyaduxvqk6uacz4pumudvalvjismua4mgxgeid","USD"],[0.0,20200403,"azurecli-functionapp-linuxyig2qsqf52c7u2by3uvvnkctydehjycvpjtkbmdufigaezlpx","USD"],[0.0,20200403,"azure-cli-test-rg","USD"],[0.005499,20200403,"azure-core-poc","USD"],[0.007917,20200403,"azuresdktest_reserved","USD"],[0.265074,20200403,"bim_pl_test_rg","USD"],[0.735178,20200403,"bim-rg","USD"],[0.180075,20200403,"cli_test_active_active_cross_premise_connection3bv3s72aoalsd7rmaltmbuykbszr","USD"],[0.05145,20200403,"cli_test_active_active_vnet_vnet_connectionnsckhrno623n53won5dzmhrzlphl3qmo","USD"],[0.003932,20200403,"cli_test_adla_catalog_mgmt5ip7w3itvswqc7vakw2ef4ajmkqt627h6kpy5bok4ki6ciuzm","USD"],[0.003939,20200403,"cli_test_adla_job_mgmtrk6i2fbk5xioycehywyxn32cwk5af3snxk5ljd6agnknoaergcndu","USD"],[7E-06,20200403,"cli_test_adls_access2qrgsqx6765s4626v5yh4t5vha2m6dr2rfy53ugsbggfdt4dkbaafxg","USD"],[0.019757,20200403,"cli_test_ag_auth_certlkqzsbac6sl5b7h6x6ralv4p3mlpzwlu2nv76fje62oopndjmwqtmf","USD"],[0.038121,20200403,"cli_test_ag_basic_with_waf_v2_sku3fnhv7bsa4khciq7cwcv7sna7wdhjccwph2lc23zil","USD"],[0.010898,20200403,"cli_test_ag_basic67ggs7dwviasfzmuhday3osl3z7hsub7pbz542nhuu72sddzzcrr7di66v","USD"],[0.019757,20200403,"cli_test_ag_basicgt426a5zgb6rt23soujz3w3vbwbcjzafr7jbwlejyofeqpfvuuqlj7ugv5","USD"],[0.02058,20200403,"cli_test_ag_existing_subnetsts4t5w2zdxwbwsygmzxg7u2dfhqt7p4ffveww64rhuu7a5o","USD"],[0.018934,20200403,"cli_test_ag_frontend_ip_privateqfcsfosswoh4ih6kobzq4mjf7gt6hopcz4hzyuvh4miu","USD"],[0.018934,20200403,"cli_test_ag_frontend_ip_public4clmqllfgtm2oklfo5lpxkjxqgo3wfj5mhuukyxmvqewk","USD"],[0.20253,20200403,"cli_test_ag_http_listeneromvibh3xbkmxh2skwxdyz5c7ijpz4x5xzlvr7n4zquzytqc3bd","USD"],[0.018945,20200403,"cli_test_ag_http_settingsconkzv3hfoxx5q42p24murwp56boeafukxns6zoq5wdhisfguf","USD"],[0.08034,20200403,"cli_test_ag_identityzg2dd22usnxt4vyt5hrxfoht2rywbhar6vxyplvgengenc25ayjgp7x","USD"],[0.030484,20200403,"cli_test_ag_no_wait3hhgpndpl5rh7kj6hlo6vf3fg2gztvtbefaysm7lbjai3x7vqcyf7gh6","USD"],[0.054355,20200403,"cli_test_ag_private_ipnh6s2mt7nr2bc6ga4ol3brkxrphkdrijpsyip7qklmnhwznkcuacz","USD"],[0.109457,20200403,"cli_test_ag_probevqj2sjfnku725bojlv5n4gl3gdczvwrnfc6aaq3liz37odonb6ps6urbmm","USD"],[0.081553,20200403,"cli_test_ag_rewrite_rulesetssukaghuzmsvxnveo7efopuvn5ktywyc3dyutt2mmgesxijs","USD"],[0.092039,20200403,"cli_test_ag_root_certviofxdlkqlevqvr4to4fo2gjduczz2n62bd6lkrwxciohirmbod3y2","USD"],[0.087381,20200403,"cli_test_ag_rule7eootq3n2ldpwqyztqmdhor5fbnydt3bt2ntv64otrpkww2c6xbpv3xdltu","USD"],[0.058721,20200403,"cli_test_ag_url_path_mapdkqsnjmkox3247iwwy2pnqksism3chzvex4g4id65jdgvklmipl","USD"],[0.018334,20200403,"cli_test_ag_zone6dhbkfwr3kx326nngjathpqi2prjkrmljs3k2yoq2mnak7kwu3julksurhc","USD"],[0.041454,20200403,"cli_test_apim-ii4dryj3hpqtujryphwhsk25cxi5g54gfdszjyn35i4jtzqiju43hvb5tru26","USD"],[0.164826,20200403,"cli_test_app_gateway_waf_policy_iybcz3bnrni6kjtseuse53cxfnjeqystq63nopzrpy4","USD"],[0.076464,20200403,"cli_test_app_gateway_waf_v2_config654jrh77hbpqtud5ifz4akvw7ko36wjjvwvgptsj5","USD"],[0.201616,20200403,"cli_test_cosmosdb_cassandra_resource_throughput2k6phztna2dfbp2lrddlvykuytiw","USD"],[0.201616,20200403,"cli_test_cosmosdb_gremlin_resource_throughputp2qak6fjykugixja3seopydxh5m4hv","USD"],[0.201616,20200403,"cli_test_cosmosdb_mongodb_resource_throughput2qqhpgbc4x7d43jy4ymxlk2ou3gs7d","USD"],[0.201616,20200403,"cli_test_cosmosdb_sql_resource_throughputeudr7xs4jr2jy6sbgiwhd2r4dlbeyk6ueu","USD"],[0.020175,20200403,"cli_test_cosmosdb_sql_stored_procedurex5tl5l5623a6232nyozgyuhulgjsuob3lol6n","USD"],[0.020171,20200403,"cli_test_cosmosdb_sql_triggerbvedxz42nypvvhy665gsqeoz6msfpgxxhbfyqmz563mj7t","USD"],[0.02017,20200403,"cli_test_cosmosdb_sql_user_defined_functiondeizkx5y3nhibzmff73emt2tffctjscm","USD"],[0.100805,20200403,"cli_test_cosmosdb_table_resource_throughput7i2yn4gq7s4mekalhunczuadb2xchcqo","USD"],[2.4E-05,20200403,"cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn","USD"],[1.2E-05,20200403,"cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk","USD"],[1.2E-05,20200403,"cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y","USD"],[1.2E-05,20200403,"cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2","USD"],[1.2E-05,20200403,"cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3","USD"],[1.2E-05,20200403,"cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme","USD"],[1.2E-05,20200403,"cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p","USD"],[2.4E-05,20200403,"cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi","USD"],[1.2E-05,20200403,"cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw","USD"],[1.2E-05,20200403,"cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa","USD"],[2.4E-05,20200403,"cli_test_datashare_sampleresourcegroup","USD"],[2E-06,20200403,"cli_test_disk_encryption_set_disk_update_gp2gvog4fgnp7xzdx7hfudqyu6lb72vr7g","USD"],[2E-06,20200403,"cli_test_disk_encryption_set_snapshot_yab76fi2nxofkmskjkqlratuuey37dfrsafjk","USD"],[2E-06,20200403,"cli_test_disk_encryption_set_ubelv4vyfwo7yk36uju7bkmpq7pw6n3twjonmtvuanabej","USD"],[6E-06,20200403,"cli_test_eh_aliasbpr3pqssfszn4nshvbhhu72r2dfleqcuqxtza7nfaqjbzxsmw6nhem4fg6","USD"],[1.1E-05,20200403,"cli_test_eh_aliasdrj6y3jjzz2b5gjynzeg3hlvh4vbevx6axtox4ijutmqpe3uhr2f6zjcvp","USD"],[1.1E-05,20200403,"cli_test_eh_aliasfaxwrtp645isrxreqi6kj6gtvb4j3lh23klbxtfz7d67cc276s43xrosgp","USD"],[1.1E-05,20200403,"cli_test_eh_aliasr6icm7ctnbnlupvodhdxfvgm7ukjbnbzw3w6543qcf232tden7ulag356e","USD"],[1E-06,20200403,"cli_test_eh_eventnhubotzqo5vjss7vhgtnqwhcjgr3wp7uuceqvapdlamlttxoao7hh7vjfb","USD"],[2E-06,20200403,"cli_test_eh_networkjxwd564pafaearewxsmap6gxa44xys4gsls52stkyt34jduo2jda7mvd","USD"],[0.006313,20200403,"cli_test_gallery_specialized_is6boc2j4vwcm3a52zicjyptnv64gkmi5uuaa5e6dq2tpc","USD"],[4E-06,20200403,"cli_test_keyvault_cert_importtie2qyp6jemlojyy7nv4qpeavpczxpntg47q7jiebgojnf","USD"],[6.6E-05,20200403,"cli_test_keyvault_certcoxyuucjje6oy5af3u7ow4cl34nmgbr4bzklapulot3ougegdbonk","USD"],[7.560108,20200403,"cli_test_keyvault_key7dbjus2plezksg5gbx56xv4okyrlccbac5sh6qidetcfaqt5cvnlow","USD"],[0.00063,20200403,"cli_test_keyvault_pec7gqrxn6caglmddnfd5yfuc7t46jw3njjz64yf54ergm7graoursgfw","USD"],[3.4E-05,20200403,"cli_test_keyvault_sdmsgdudbjkzsub7r2rnpqhwm67ncgfgjde27xsi7jnqb25kbepuvtq7c","USD"],[6E-06,20200403,"cli_test_keyvault_secret_soft_deletezbjdpnsa7slcaposhktupwsvip3kmq3lb3p3jun","USD"],[5.7E-05,20200403,"cli_test_keyvault_secretbapopzgk3g7ov4ry3pwycd2cpoucqaqr7apwwmxiran2hro27wx","USD"],[1.7E-05,20200403,"cli_test_kv_cert_contacts6gxicptr4qvk7g2zzhk63u6fiu5xhqvrrr6ijx35fn4sd6oqtt","USD"],[8E-06,20200403,"cli_test_kv_cert_download7ew5dvtzltikymbcbmefo7ejvl5fxy3hsr6yki5kyucswkm4mj","USD"],[3.4E-05,20200403,"cli_test_kv_cert_issuerkvvfum4v3epxdj7hgy3mor4yp32dq5mnu4tloe4osgy3doahr7qy","USD"],[1.9E-05,20200403,"cli_test_kv_cert_pending4ng2qqwlholspwkjzjsseon2ozcyikdqi3slanr53xgyqhezomv","USD"],[6.930352,20200403,"cli_test_kv_key_downloadxzqpkucy5xizhqqiq7ty5ci35oaqcn5ygsvahfwglpxuucsippa","USD"],[0.000227,20200403,"cli_test_load_balanceraywp5pp4dyw57cxob235ogcpwmdnud23dsvvffc4th7jofe3w7apk","USD"],[0.020175,20200403,"cli_test_lock_with_resource_id7zt4ofhuuqmgz53vrnmaqjwc7k7xf33xz6guuavr7p3e6","USD"],[0.005761,20200403,"cli_test_managed_diskdt4sy7h47eehd5onivbl6kxwu2tq5drfjo2n3ocshoyvwoiacjo76i","USD"],[0.021417,20200403,"cli_test_metric_alert_special_char4xgp4hlahnnzhzaqjb5wyahm7ixi7lcvjtmtzsl24","USD"],[0.00924,20200403,"cli_test_monitor_autoscale_rulesepbdh5nk3oqwch63qb57zhbkgn4z6dvgj4od33v5u4n","USD"],[0.000945,20200403,"cli_test_network_lb_zonetksi6ampc4wo6tof5ws52cbriuugb4vp2dqkoq4ockalj7o76i5","USD"],[0.003024,20200403,"cli_test_network_public_ip_prefix7puitybnupv44dfh255vrlqmb5cco3vqqjx2lxvuev","USD"],[0.027989,20200403,"cli_test_nic_app_gatewayjqnh4uhrspuuclkf4cb3lwg2cmldnaarltm45tl5ez2ccqrf2u3","USD"],[0.007887,20200403,"cli_test_nw_connection_monitor37ipy4nvdvvnqqrq4or7t3datzgidv3xo6cbfbgqfy2ga","USD"],[0.00189,20200403,"cli_test_nw_troubleshootinggjs7szrh4b77mwyqr2rk3xeuv2ulhvkqkb57oplve3we2o2o","USD"],[0.004032,20200403,"cli_test_nw_vmwcsuwrakdqu22qdqbcvzasthgcmz723dmprrj42m6mkit264shp533id4sa6k","USD"],[0.000454,20200403,"cli_test_public_ipz5ctbk2bvavzn7hss3qxtydrjzn724dnr5lktr2b3ti6rm3maqlkthq32","USD"],[1.890525,20200403,"cli_test_redis4fi3zmkxvanofwj7til7vfg65gvgwee7f52qeqekaz2yozt4naljndprrebti","USD"],[0.074382,20200403,"cli_test_redis5w7c5upnaajph7i7m7l23if7az4esw45w3dyuq2lkeq6brn7rwje2jthrrtsp","USD"],[1.896342,20200403,"cli_test_redisdtit6p4uk44zlk7pxobgh4mc5s5lu2ihgl4f3rgdb4v76dpiapgaiyzf3qwmo","USD"],[0.074613,20200403,"cli_test_redisl5c4b6pvpa4n6xqbgzcysvhager37negd7yftbxkgl34vgzuvpsv37p6avn4h","USD"],[0.073458,20200403,"cli_test_redissjldzezn2p7k5ud72cr7ka6sg6tszx2chx2q3uikfsedmoa7n5cntbr3qzxrp","USD"],[0.0,20200403,"cli_test_relay_hycoyxoq3yadaafimlrm3b6dj35pdwsf65iwd2r752qiw7cuyggpbwk6s6nq","USD"],[1E-06,20200403,"cli_test_relay_namespaceqef6osy6vgdgimnvbi37lwwjmfjgc4qzonnl532iqhb43zdmggv","USD"],[1E-06,20200403,"cli_test_relay_wcfrelayyq4q4qcwrl6d2bg3xeiz6znyg3jxny5ljhcaxcp7oumxqchma43n","USD"],[1.16865,20200403,"cli_test_sb_aliasagvtzpektpos4okul2iv3s4u7fl634xzcqcfmkremdyxorlcykxdelkai7","USD"],[27.463275,20200403,"cli_test_sb_aliasjvmz65dvg7inej34lr2j6ymns5ewjlrnrp4z6ylhegesgpf6io57pmksme","USD"],[27.463275,20200403,"cli_test_sb_aliaszm3yvalycherhh6usqybb4tp3eqbckvxbdrujxlfo2b2kgt74tb645a4r5","USD"],[0.584336,20200403,"cli_test_sb_migration2bzgrgnibziigo633obky265yaumvcsvrqmwmv75mnxzbvmuspycrp","USD"],[0.0,20200403,"cli_test_sb_queuevhl2yqvjiiix4fwgw5vp7auytseilyl47zhqshwymzb5reiqjydb3b5rre","USD"],[1E-06,20200403,"cli_test_sb_rules2s7hnbvz4vyoyf46773taksvrarn6dkifpgbub7uli7egyknbquay43mcm","USD"],[0.0,20200403,"cli_test_sb_subscriptionuqfggtkjusyov27srogupvubyxxtiea7kttef5rbzcssu35mwbq","USD"],[1.7E-05,20200403,"cli_test_sp_with_kv_existing_cert34tfgome3g4zylmfdu3zug3t2uofuw52hcuud6r6mh","USD"],[2.6E-05,20200403,"cli_test_sp_with_kv_new_certzfryguc2guf6ab4u7tofq367r5qeefiq52rhmsvgcft75l7","USD"],[0.0,20200403,"cli_test_vm_create_none_options3p66cuoddn7mt37xgcf3cq5dill6v7o5scuhyfiejlz5","USD"],[0.003951,20200403,"cli_test_vm_create_with_workspace_windowsfmzhzcsqj7qlrgbpdnbnpu4s6br7ik7dxh","USD"],[0.002528,20200403,"cli_test_vm_disk_max_shares_etc_yrm65hg4blygtnzv6hxmuommigqykypq5minls2nuo3","USD"],[1.9E-05,20200403,"cli_test_vm_secretsurhf4nialqdhevywavrnjh3ipterd3dwefsrk3qs3uzkgsfjneajxzr6","USD"],[0.003285,20200403,"cli_test_vm_update_with_workspace_linuxnlvcany7mrpqcowcsszgopkwfukf3wdgdy2j","USD"],[0.005268,20200403,"cli_test_vm_update_with_workspace_windowsd6yg74kjwrtl6y2s2j5ogapuy7m6uyibai","USD"],[0.01512,20200403,"cli_test_vmss_create_and_modify5z2xgkuo7wzrsvxk5hq2af7pwahhuwnjo6npnwp3vuip","USD"],[1.9E-05,20200403,"cli_test_vmss_create_linux_secretsme437cmlz3xg62g4362udvkuapcac4j3mkdpxow2n","USD"],[0.00315,20200403,"cli_test_vmss_create_options2quf7w22utb3f7745wfnnqjljz2nvl6s74vqzr3jjf6xa5g","USD"],[0.0063,20200403,"cli_test_vmss_create_options3nfj7lemreryutq7iacumjknipiivvrkcrjij2tw6i7glvc","USD"],[0.790406,20200403,"cli_test_vmss_create_w_agobxbvyxtdf37vbcdbhkslestbrracgkln53awldpghle4xcte7","USD"],[0.006945,20200403,"cli_test_vmss_encryptionbgssk4cx4f24xc6egded6vsudftjmn2cppxm5g7rrpwkcry5vny","USD"],[0.00504,20200403,"cli_test_vmss_extensiona4e7l2godcpa3rg64mi7lpuddshfyklwg3dw5gq2slc7e5w6t52b","USD"],[0.013861,20200403,"cli_test_vmss_rolling_updatezwkqv6dconcq7srpb25gb54zetusqqb4cwq4a2p3xgajhhc","USD"],[0.00945,20200403,"cli_test_vmss_run_command_w_paramsfczxputbjc6fcwz4lmpbpaki5bnxgdiumtzm5jz2m","USD"],[0.0,20200403,"cli_test_vmss_run_commandthvkll33qfdekfkohir362vjj36ijuoydx2uqojmtf6catzdnp","USD"],[0.00882,20200403,"cli_test_vmss_terminate_notification_cqrjgtk6tuuqc2s2xceowi56k2ezz6bp6sj2j5","USD"],[0.00567,20200403,"cli_test_vmss_update_2xxo6tqu2sb44err3nygrdkpmzc4oej7tlnl4ipmgu5moqplxg23wp","USD"],[0.00315,20200403,"cli_test_vmss_update_automatic_repairs_with_health_probe_a2nakvbecmlpqhi6vr","USD"],[0.00882,20200403,"cli_test_vmss_vmsqxszsx4526pamlfwex4pikznpjem2h2qgryyzyoq4uqtybfheypmorlym3","USD"],[0.025725,20200403,"cli_test_vnet_gateway_ipsecru2yeggx7wdumh3jrfh7ppyubpjmd2dvb3gsobsa6ixr5bs5","USD"],[0.00189,20200403,"cli_test_vnet_peering5xfjgkll5kp2qjaam4b6jmxen63ml23ad2au73wbyoc6hrdzfs5hts","USD"],[0.009975,20200403,"cli_test_vpn_connection_ipsecaqans4a2tlhvl2gicjqclsuldahlxge2tcygqahp2ss6qn","USD"],[0.009975,20200403,"cli_test_vpn_gateway_aad_tvqo4isltieyfpz5mn7uqejdr4wp3zpmozz234w4m57ltskwgd","USD"],[0.15939,20200403,"cli_test_vpn_gateway2pvfgxmz37ebnjlq3g57k73qttjkjzvjyc4uankbsohkkxwmpfclm7i","USD"],[2.3E-05,20200403,"clitest.rg247ps3eq6ndc2vpwtmqlp3zywzvqfxkpkyoqt4zrkpczoqmh2pqhk2j5kfbiddhb3","USD"],[0.119226,20200403,"clitest.rg2qgvxjxy46scnjuh6q5gtypebpi5oeuajfgxb7yrrsggnqxrij6pnc3d7ybz2chih","USD"],[1.3E-05,20200403,"clitest.rg2uffjf47bjtaldmjfqdwp3xlcaahn6uidc6obmdhsb2xpvtggmhohkwmamufj4kub","USD"],[0.119463,20200403,"clitest.rg35pihforqftkb5qllg3t75zoxlztjwsmuftgdsphbiy2r3adx3t3spnkzzs2c5c4s","USD"],[0.576767,20200403,"clitest.rg35thfcby523q7c6dvse5qrgdc5t3kekd6jj6njmsvohi3lorjpzfvcmuqddcgwfop","USD"],[0.120262,20200403,"clitest.rg3s3h2izedr4olwdk4jqjhltn4lkukfixgfalhtfjmiy6u3xndqvdkrr4j4jqhx6hu","USD"],[0.0,20200403,"clitest.rg3yyf4ut3dmp7zefyrvgrtpnkir2zvjgvhjfgmwghbqorjxclfwzxyeiski434gc5i","USD"],[0.00553,20200403,"clitest.rg4k5d2qzwqf","USD"],[0.001998,20200403,"clitest.rg4kz6exnono","USD"],[0.0,20200403,"clitest.rg53iiey6sy7e32dv4363we3lfvm42nd7q24xlraapas3tlqla2xdllv2awy2gvzqx5","USD"],[0.001097,20200403,"clitest.rg5k5e5u5iqz","USD"],[0.002258,20200403,"clitest.rg5snz2q6ibvp3c7724vcxhdohqld3pnnp6bmu4myz62omvookad2hgbap4jc224upv","USD"],[0.000517,20200403,"clitest.rg5zjabytlln7cfln34on64kdlcjrmzyxsgxikxjx5pqzqmaqhkyj7f2edhqpl5nls5","USD"],[0.001256,20200403,"clitest.rg63yyjmj7mgr2q3td7b7wr4edercrjfh7h7m6byh3lhy2hfuq57ovvqjjdeojdzlnh","USD"],[0.0,20200403,"clitest.rg6ajbgu7sicue53hg6mpeyltjuungen3v6s7uao2s3bwuupxsezhlfl7lcqzh5ezxq","USD"],[1.3E-05,20200403,"clitest.rg6i4hl6iakg","USD"],[0.0,20200403,"clitest.rg6ja3xu2gdcddz4j57b52chj5gq5ijndhw4aq4dqdi33n4to33w62uhdbz2slsgdcq","USD"],[0.120385,20200403,"clitest.rg6mxjzuorkskzxoisjj4q7leopfu5mge2nncxfuw33pn7w5rzgt6nqhx3f2koq427p","USD"],[0.004622,20200403,"clitest.rg6ujl5hcyjjhzb754i3foytlvngantubqet4xqcfoe6ke5olegyd3mlo5gmc7qmhge","USD"],[0.508066,20200403,"clitest.rg6z7nujzskrlfdtbf64e2vm3gfnqtblcuyzkofhucriqfhmkgmppy6lgoqfi34r47d","USD"],[0.0,20200403,"clitest.rg73brdb67p56oqyoffurockohfnrh2oioeou6oaswvz63lvkpjz65pcukspdgwqymp","USD"],[0.0,20200403,"clitest.rg77vs6mxm2tjkw4m3ojm4i7e2ulubixtqqixghvie6ovlfws3weh274hke2n2zzl7d","USD"],[0.0,20200403,"clitest.rga2pwem7sln4kr37u44cnw3wvym3wgsi5scs75xfd5ahkiaao2h7r4lm2mnmgzdtac","USD"],[0.001358,20200403,"clitest.rga2ztamw63nvhwdyd4kbcpejrpswdt6cq43dygaknzc5xqczbhzvqa5yrgmr574v7a","USD"],[0.005216,20200403,"clitest.rgabbcthpvwv","USD"],[0.000611,20200403,"clitest.rgaqnmmo4aevwm2a36ceps7l7pvxk2m4i37mgjfegjfebjun4ktjreooxtcbqvz724a","USD"],[0.670495,20200403,"clitest.rgasdbrndwzp3wnhq2m3pi2lli6cljxsbxngfgzr2ni3zbhn3wrbexr52tkbfxpyn2n","USD"],[0.0,20200403,"clitest.rgbxrcltdsy4eina44my53y3bitwpv4cjxjckl5oufqx2tnmqvtenfuorgkcortcs7x","USD"],[0.0,20200403,"clitest.rgc2pdynh6bhjnmqzdaem7n6euesvwnjzyxo4jcahylblamksrihmkqpywamaixv7sz","USD"],[0.001167,20200403,"clitest.rgd3vgkvglii","USD"],[4E-06,20200403,"clitest.rgdd3pvc445vb7vkctepirlk7u7ehgatpxqkt7etu7jzzxnby36lhts5532grmo4xqt","USD"],[0.184966,20200403,"clitest.rgdmym6so7ox6fd3cpjk7tr2u2vi23rcm6eptgeiy7i4srixnyih54k5lchmex66yoy","USD"],[0.120236,20200403,"clitest.rgduxuhyeqzrek7s3jfr776qvugv4qtmrxnlqcwiodxu2wihvqvuajr5bvtbfw2c74d","USD"],[0.120278,20200403,"clitest.rgdzk3w2kpwtbjaippkz6nrab53pinz3nbdcoxurf2fm477d5j2qa43kpmvlh34nudn","USD"],[0.006212,20200403,"clitest.rgdzzo2omvvn","USD"],[0.000541,20200403,"clitest.rge352ysyt6ohkhwn54ujzh3e33zhwioip67gowdrqzrdictzprdfp7jxdybfdc3dma","USD"],[0.0,20200403,"clitest.rgeatw466f55nibd652xyo35rr3wvyaaiohgjp6hb2rgox32guylejxli2zn2jxtbbs","USD"],[0.000315,20200403,"clitest.rgeha33urrm3yvnmjgnrcrgl2jo45cb7p2jcfxckgdjixmxw7qsl2hqsvyiaeu4etnd","USD"],[0.0,20200403,"clitest.rgeqcouiliymexed375d52j7dx5ecynxp3upiojec34exvkgdaksc2cat5gxnezpfo7","USD"],[0.0,20200403,"clitest.rgf5ntefaikegwhvlalea4kj6qy3roaevwee54x7d6o4bscnc64xcvyjykpndowbntd","USD"],[0.013051,20200403,"clitest.rgfcwdnofirhkntrxebi5znrx7skjpf3xcdwzeee6ev5nmqvehq6ep6tfyr3hxei3mn","USD"],[0.113387,20200403,"clitest.rgfqradpgobitnl3cuxvp57tgcxz7w5baifcwehpxdiltabzwvtt7yeoiyvl4fvckes","USD"],[0.000227,20200403,"clitest.rggjrx2nuhzhyaa2yilwxgwoisyvglgramsxo5dwfvble7aajaah3em365dfvcyetzm","USD"],[0.508065,20200403,"clitest.rggplxul7vj6u3hewelqoki2e4ojrxgxo7lzygsy3x4tzi3pcv4do5szec36fopk4lu","USD"],[2E-06,20200403,"clitest.rggqe5qp2g4ikjuk4quunjltoatlnnfvg4jy6lw5mup4qcbrvofg4uioaohki5xkfem","USD"],[0.0,20200403,"clitest.rggvii65ft2znruncatbe7nupztoifotp3kbtemqu4zyx6fr7pq2fv34gqwudc7fwee","USD"],[0.001823,20200403,"clitest.rggwlnccve3abtwrpdtfqp4lpxsiphrdyqbtkagcs5p4znowzey5qpfxkjsz6y5i52w","USD"],[0.001669,20200403,"clitest.rgha3ntfc44xta7sr3jytaifkukxo5sbj7vum4y3sk2nnlncdpkulngeq6n64rsjtni","USD"],[0.001285,20200403,"clitest.rghux65pxe2d","USD"],[0.000894,20200403,"clitest.rgi6pmxjklybyqbgvxrhktkj4wafqlxsgrbkhpixuexbzqt66rvm3sg42w7weqfmdr4","USD"],[0.120152,20200403,"clitest.rgib3viqdhrawwnaopavpcsc2u3psfod7wlami5tg57borlex2io2b7nolpz4qxhm5p","USD"],[0.000789,20200403,"clitest.rgifpn25bqc2","USD"],[0.0,20200403,"clitest.rgii6fsqwoe4gjxb6gonym4pgroeszhsqdcmiof3ut6r5vknznet7y7swvvr5saae6b","USD"],[0.0,20200403,"clitest.rgilwxpvfb7ceqb6lwqgvzzlyjrv2wrmqvvairkvkpli2kplrd34uvh6sjc56whehrw","USD"],[0.004733,20200403,"clitest.rgipn3nb7jdvwmgaw6jokpce54slbsjahxjrvn3bokq6yfgi7mpzw5vi4yzh6vefivx","USD"],[0.0,20200403,"clitest.rgjepsv725n5yyzcnpj2mjzjrpvztzqlft2rn3ywv2pddtr3piqpnrwfzrhwa5mfdms","USD"],[0.0,20200403,"clitest.rgjl4hvwmftqduf56lkc2rsjqy4hubkpe5tuhlxng6zu7aywikac4qrdzjywhvxuk2b","USD"],[0.001292,20200403,"clitest.rgjlrtsd6s7bwvajwo7kgpn7iyoco44m43oa4erfcqk6okn3xphifngat7garhltljd","USD"],[0.003078,20200403,"clitest.rgjmg4x4jhezrks2tsedtkwieofdpp57pzn2cft5auglpazus7w6kufepmdsyecndlw","USD"],[0.003365,20200403,"clitest.rgjv3vb4aux4","USD"],[0.004227,20200403,"clitest.rgk3at676jqghxyl6pj3ezyhw2vggfdeuhfyxybpxvo4dbca5szl66hkhy47ps5py27","USD"],[2E-06,20200403,"clitest.rgkjk5zpf6vpm4eazar7zv554ytwslfx3wfo6vpev4ypj3664cr3nnzzrhgiio2hvab","USD"],[0.001549,20200403,"clitest.rgkrlxa2byqjtq7cefxjzxstyncpj2iahzy2ezqod5iqonopim3dsaxkw2z5ctdim5o","USD"],[0.0,20200403,"clitest.rgl5d572wfsn4iq65yarnzs7sppjzn4zgniai7p2wia6l6e3hdxqvkane442hf6coxh","USD"],[0.002688,20200403,"clitest.rgl5wejzg4errdzg5wqeymj5ka4eyvjjrple57sbyumlsgjc7tumyjlznlmbyf62sjk","USD"],[1.1E-05,20200403,"clitest.rglehb4t33v6l7aav6lrrilj75qviy5knltkxmzqccdi5h6gd2gk7bt7a3fnwaoroe4","USD"],[0.000422,20200403,"clitest.rglxdzwfoxytt44v4envog3wffyevcr32tvkdaxd7eyi7gevf74z2mkuteqcmj25s24","USD"],[0.0,20200403,"clitest.rgm4jnm66skishhnohqqgwhuwtqvlyvb4qtawfmsmr666njbuh4hie4moidarlaldz6","USD"],[0.110863,20200403,"clitest.rgmaaqeht6cprb5nimakv77yofqtntwqchgikatriqhwdszd26lefi7yj5k6b7s2uiy","USD"],[0.0,20200403,"clitest.rgmeihohwzdbsdufsgov6emhhw7f7fzu5t2ntylhto6vx3a4zt3brlqhez3q2pjrom4","USD"],[0.005878,20200403,"clitest.rgmmyleflfqg","USD"],[0.003178,20200403,"clitest.rgmubuhn2tr36zhotgifxtkqafojuenkwwjs74cih3hcw4v7jqrft7jxypzkn5avtmg","USD"],[2.3E-05,20200403,"clitest.rgnbonippvgbp4jle2vhvi2n2xyteloqtestfy3yareznsycijpu4egb4xdtyvy3jns","USD"],[0.0,20200403,"clitest.rgnfxu7jjgpy2gvyofxq3qkpqxp25avqtq4daod7kpkn7azeqhtm2fuh2bwskyx5hcu","USD"],[0.0,20200403,"clitest.rgnl3lgnowhbj2ssexmyxi7xzsqzurljch7kzyjnbxlcrwm4q2oeihgxy2mx3s5e45l","USD"],[0.004262,20200403,"clitest.rgo2bx3y7tet7qstecvm3rlbjw7v5jums7zjwnkbtslnhqwudkp4awflsomy7nv5zpl","USD"],[0.0,20200403,"clitest.rgocc3egrf5b5pfd3ea2hfi7qcciamxzqn7lmnoxsmi3rt44kfwzel65tg3gf3oqpew","USD"],[2E-06,20200403,"clitest.rgof3oy22ihkrkvxmos32f4x7rg662il55cz42puy634klszugqsoj3kafahile6edj","USD"],[0.008852,20200403,"clitest.rgoiuekzpb45ikpyk3xjc44dd2622po6g6wtjezmd22jbreew3wv234yp2p6ok3djpw","USD"],[0.004069,20200403,"clitest.rgokb2iemokrba47wbnkwknqvr7qdlhaqpehdvlouobgcfv7dwznuo5sork7zzy5adx","USD"],[0.0,20200403,"clitest.rgp2bwun4lw5he2aff2e7bdk5o7slfqqduzzuaytse62n3qrx2bfjruhgg6jzbz3uxu","USD"],[0.120245,20200403,"clitest.rgp535jz2dxemblsqlvzwsk4ehth7eprd5yny22fi5rppnick62nncsonvlutvmvbje","USD"],[0.000512,20200403,"clitest.rgpcjzbtyiskl4sicspcuzk3x4n6csgtif4d3mmy25gdnf4sjw7b2nez7nz3rvqbbvt","USD"],[0.167867,20200403,"clitest.rgpkh4rs6hornojpz7i6ivcnglu7546u5a3zvwcqjiwjjkmbau7salfdp3wpeurug2n","USD"],[2E-06,20200403,"clitest.rgpp7umbplzr35tazjcayrhmwc2webmkfxh3rgywzkobi4sge6dsgdczmnwniueh4ia","USD"],[0.000105,20200403,"clitest.rgpqzfkotnk6g3cvy4lmfq3y3yqt4qo37c3qktmzcnzlijle7mogdqpn2vbsxjhft36","USD"],[0.000499,20200403,"clitest.rgqjhjuoq3cvukef6u3mu5fiurydwtyst6dpw2soj73utozlw2xhlhbkkmygd46skrf","USD"],[2E-06,20200403,"clitest.rgqzxdc4qlur4ldpzn5ysrsgw3iq7ot2pjm2twuh5h7mydbhfromknwnwmbcte2jnf6","USD"],[0.11925,20200403,"clitest.rgr5sog7j3q3a5o2vy3r4gpl3ylcovxfcbkttkotqe653iz4mlsrbjns76tv4v4lbqq","USD"],[0.199796,20200403,"clitest.rgrbzhabr2albk3tbadxjetf4rieq2vo27br2upnbfmj4eggvypihbkdkn2watbfwcd","USD"],[5.4E-05,20200403,"clitest.rgrjyp2j5v53xnee62avvvtol7jpn55inohh7zhxbjgkbbofhxrjmatfglcynblnwvx","USD"],[2E-06,20200403,"clitest.rgrsyxntxfpaaox5qm77j37jgojydhj6vgwpffnchul5hhnd2txbb2upcw5lpcrayhz","USD"],[0.0,20200403,"clitest.rgrvxefucnadmq3ibfkwjzgjw6gtk3dhptds5d5idyuzbsaaxlbakzgx6rfwaew4cu2","USD"],[0.508065,20200403,"clitest.rgsy5rwwdnd6vce57ms6wkeetbhyhqqoc4dexhcesmpxe4v7ogmaibywsgx5uo4vtsh","USD"],[0.003197,20200403,"clitest.rgta7j4myco72yxca6hdvuz5gjmlpsn7t7khngws3ngnfjzqmlypiiweybofdccjkqq","USD"],[0.006357,20200403,"clitest.rgtlglxiyyw3xyotgtabplbjdeqkls3fi4fjiycchg5uwdwk6n7kdnyihs6l4b4fhac","USD"],[2.125447,20200403,"clitest.rgufx3u5mzecknufst3rwrkywotkynplzmgtt5unt4f22d47hb2r7eymufl3rgjavig","USD"],[0.119262,20200403,"clitest.rguk5hr7imq2zbvjzaogkt7gke2onbbn6sr3ux5rfdiqufofpfrmblbmbzrtd663lkn","USD"],[2.696838,20200403,"clitest.rgunctodvbnuyducby4fucytb4yiybbyokfvrgcyem3kjo3ovvxss23b4hbwfzug57p","USD"],[0.002394,20200403,"clitest.rgunvs6bhy6h","USD"],[0.167065,20200403,"clitest.rgvjnkyvjxmgj5nubtvoew3ok5t47nebhr266gplmpvliqztzgkbnrxoxgfwnujctwm","USD"],[0.002057,20200403,"clitest.rgvxv2guoueqmqf5u2krgj425ozx5jmx5z6zlmoqhkykrz5yburrxlqz7ctdhmmurfh","USD"],[0.184966,20200403,"clitest.rgwkrus4kbl6rbulaxshckkhktn7kgp7eahtivs44ygadvhrw2tfeyzshfrozq6vayo","USD"],[0.003129,20200403,"clitest.rgxkza6l7we2utynu37z4txgz2jiqtjcnlfzydsfguytbwq34lxswzfwmvvupojtswl","USD"],[0.000508,20200403,"clitest.rgxssqukwzu5tc3vvtgxrgfoynav2luio3nq75qqspj4hw4xzdm7p5q5vanfcrd4pyn","USD"],[0.0,20200403,"clitest.rgxxxzr4gg5ptpll3q43s6wpfkhgbevwgmegdtojnt6zye7qaoi4mrglsigzdzqsli2","USD"],[0.0,20200403,"clitest.rgxzclba2jccc2rbol57b66u63kitks2y6jqkevsam6jroq6w24vw22hwupt245rc25","USD"],[0.00824,20200403,"clitest.rgy43pqpl6fpgsnc5zsbbesfhoyoumnreizm6xuw6ipar4qt7nlt3ko2tpgsqycwwwj","USD"],[0.119247,20200403,"clitest.rgyreu2qkpgqyrm56i4cocrrcf5xb2uzmvlm2lau226cqk6zetyu5olii7figpx2mix","USD"],[0.003011,20200403,"clitest.rgyw63hsmxtfaoylwitllpqtgwfdr6furtbfxllykemfrurdhoiypg7xefwxemnw5xj","USD"],[0.004844,20200403,"clitest.rgyxmi72kbgzfg7icxvb4dr47phj7oimwysp7jqc6vfuj7agpktwp6xnpu6ujovvoxd","USD"],[0.00288,20200403,"clitest.rgz5hdtqnqkjiadf4ftegi7pexk3z6xij5qp2bdqtsul3dndqg23l3i6uxqqwq5p2mo","USD"],[0.004081,20200403,"clitest.rgzhgp2tmvd2","USD"],[0.122006,20200403,"clitest.rgzj3xc6lmggzuorcimokxvkq7lrrxtcty3dilmrxzwdjcq35dqahmc7e7snha4milh","USD"],[8E-06,20200403,"clitest.rgzxfxvsuwpkltocrzlotwmvar47zxikb77cddz44otvy7u6bw4wbgri7cb2c6hlpsw","USD"],[2E-06,20200403,"clitest_privatedns2go4dclk55f73dhsisin7mpfnx6ede5cyvwknphfe36ycdaze6upxwraj","USD"],[8E-06,20200403,"clitest_privatedns2uguun4onfennf5zjsbnvfm5ay64u4bgxqiiluckzs2w42s6pyqymunoi","USD"],[7E-06,20200403,"clitest_privatedns3pe6lbfn6sewswiy2mvtholv4pahij5qwmke2hrsuoy4ugwvvavwcfhdq","USD"],[7E-06,20200403,"clitest_privatedns3vcgl2d4axrfbog6cas5qnkwg3ic3wy4drw44ah2vamz6nrpglw3u4fit","USD"],[3E-06,20200403,"clitest_privatedns4ge56gomt2s4d4cadb2xgy6h2un2muea32wc6jqcduwpszk5oxc3hni45","USD"],[9E-06,20200403,"clitest_privatedns4j7tk5p2c2qxbuxlg7md5yxlplfgriiqxtsqejza6s3aqjs3ph4tfkeoe","USD"],[2E-06,20200403,"clitest_privatedns4skjv57fj66ney6r2oqlt26f3ypxmcfypbtfjou5b3i5l46alv6z4j4uu","USD"],[3E-06,20200403,"clitest_privatedns52ftgnjkayi366mgoerqmsn4fbryifprmkjxuprl4s27gc5z3gcsrwb6a","USD"],[1E-05,20200403,"clitest_privatedns52mps7kf3hjs6oiom3aujedpk4cmund6xyqycxbbqxzjwscfxkzdum6fq","USD"],[3E-06,20200403,"clitest_privatedns5veltzfqlxzgcdomrrqog7ibrmjgys26ng3fsqueihq3c2qp6edmwszh2","USD"],[2E-06,20200403,"clitest_privatedns6ezsvgqh6ueaymw4wrv4ttw2fenwha3sztkjlnthvj57eti23mkalqfvi","USD"],[7E-06,20200403,"clitest_privatedns6mfeahhgdcjlvfz6vo6jzyt74jysso7tgr22xvq5v5haelan6du5qkpmw","USD"],[1.1E-05,20200403,"clitest_privatedns6ncqx7silnote4xa7lcvy2vfsqb6nuaefgkwdumdlst2l6bc32h5snypt","USD"],[2E-06,20200403,"clitest_privatedns6rpc7si4uz5pc2vlbdvmdseewcvob473sjf6ns3fsxmtjl7pf7wxqhazr","USD"],[1E-05,20200403,"clitest_privatedns7ldxml52wqfvonzsixuoce47tqimxleeht6ippusocrfhhfuaaca4lvzo","USD"],[1.1E-05,20200403,"clitest_privatedns7staugumg7f6pbq3qfy2ieyksgefqs43vv36dohzo3yoreqktbqv4vjh7","USD"],[3E-06,20200403,"clitest_privatedns7toctukhjzwpla2b6szzezj5d7ofei2w4rfo65xtdjkyknsc4jymw5vke","USD"],[6E-06,20200403,"clitest_privatedns7vife3s2t7dwick35rquplwebxmd4n6zc6y54ozdkpdwrw3imffpnoulw","USD"],[6E-06,20200403,"clitest_privatednsazhmrcipkoue2lhocsqdduyz7v3h2hadeuunqmsurlaonuqh5v62m5glm","USD"],[2E-06,20200403,"clitest_privatednsbokq3sznbrofypfyp4fn3kyyfwowl2ywtcel2326prqtev4r45ef22b3m","USD"],[3E-06,20200403,"clitest_privatednsbpfh3djwr6qjyxdw4wlf6rrr56dawlnmrrtdwz3ikjj4fdqpvdtbsvptc","USD"],[8E-06,20200403,"clitest_privatednscgaqg4v5hxnbg44hoyy4mqvmfdgsvvzwnzujl2zsckv6lk456f466obq7","USD"],[2E-06,20200403,"clitest_privatednsegm3pxzl3fzooxry6ielxj36hncedzhscjee757bncurevtkx5dpzhtq3","USD"],[4E-06,20200403,"clitest_privatednsep2zicvladsy6arm3wv75mfvb3l4uc2bcrlkmcrygxv44hrgc6ir6s6k6","USD"],[7E-06,20200403,"clitest_privatednseuqegcuxbebie6y2cvcqubokxxkwqznxzsrwqocozshbb73murxjxeas3","USD"],[8E-06,20200403,"clitest_privatednsezfime6ogijdvtk5kfqngvwsv2aytb7fjgedlwr3tudk663nadyfuumwb","USD"],[8E-06,20200403,"clitest_privatednsfqz4i4i4bchvja6bgmmmjokv6cfablw4dlbdruci72wwt3nmuirf2u2al","USD"],[7E-06,20200403,"clitest_privatednsgqz3aft4fjdvaef6pkigonxugwwkqohl24u2v4bqrh3rl27wcuxa33oia","USD"],[2E-06,20200403,"clitest_privatednshyhlqhvrstknpk6gkcvjyidmdcttbb7elkyma7grtbdosjnfavtrwxat6","USD"],[3E-06,20200403,"clitest_privatednsi6yr5376llt7l2vxb4vnhsp3bypnzavbt3sghpvf4s725floivafevrt3","USD"],[1E-06,20200403,"clitest_privatednsje2h2kzsu327nkrwv5eywkar25prw6r44e7ju5s235kkoi6f6hzb2nj2c","USD"],[2E-06,20200403,"clitest_privatednsje3mktujc6brcgiafxppdyn7pojo4mgkhrsr3iiaomma2awl3xhz3hjeh","USD"],[2E-06,20200403,"clitest_privatednsjjnnnebmo23fod6aeokf26k4dbnyc4k7bfzmyagi6yv2tugzizj4you4j","USD"],[4E-06,20200403,"clitest_privatednsjknp6buykyekp5bxylmjao4gvlc7gjtjxip7fvzqn53imqxfsfnrydysu","USD"],[2E-06,20200403,"clitest_privatednskjmpnecz3vj2ihzxvjll5qrmhx7oglxzjbdygrowd7yq5sceghmwespus","USD"],[9E-06,20200403,"clitest_privatednskujkczauneuf6ve4grtrugmqhz56f2if6klbkj6psmap5epwzndnznvry","USD"],[5E-06,20200403,"clitest_privatednskzglzehjuydmi643cvpneoqydpluul7a646b2j3yrkgknjvvklbyjcajf","USD"],[2E-06,20200403,"clitest_privatednsmtjjc3ed5ciggxai6tvicagvol4yazblbe56vyny4txbnfhyhs35avnlw","USD"],[7E-06,20200403,"clitest_privatednsn4eya35pidu3byngvohxcq7exe4pftq6ej5mlrlnjjzjuhrans4qkfduf","USD"],[2E-06,20200403,"clitest_privatednsnagdetnkhpnopi4x74p3sja72bweqze3tchzaj2sosv4ujhzndracfaft","USD"],[3E-06,20200403,"clitest_privatednsnnpmucnfgbshdv6qkiitejv7mhtfsu5v6b3rj3i5b5rly7fp4raaitd74","USD"],[2E-06,20200403,"clitest_privatednspk4enb33aumiv5ri7cd6rfvk5cl36lslzrnbfnlkpeh2k4apqf3qypffk","USD"],[5E-06,20200403,"clitest_privatednspkrttfiif7dpj6gwe2wp54i7ychirosdmtlooct6e3w7xvdi6bxbd5jpe","USD"],[6E-06,20200403,"clitest_privatednspnlzktgihn6n2efxsg4jvvpqqcbuasvoxpx37k4qii4vl72nvz5utkpqj","USD"],[7E-06,20200403,"clitest_privatednspopj6cyv2gh47vbile4xb4un24k4pjjyk36qownbywew525p2wpvh2koa","USD"],[3E-06,20200403,"clitest_privatednsqx6mbybtvd7dhrz5olsj6lizen2md26tycnlenq74zpwaq3tntxgefakx","USD"],[7E-06,20200403,"clitest_privatednsrtdxjszykyxhxfz7672q5dojo2n6j7qp7cdfodwzjklq2cmm7szzz2yen","USD"],[2E-06,20200403,"clitest_privatednss5oj7vebp2wdj2c5j2jifnlz4ouxxr3y2t2274e2nweo46ato74bmdsy3","USD"],[7E-06,20200403,"clitest_privatednst5ri5wbhyrg4eqotu5nkfb56zko6m5qo2jdgmagxdgaejqdcmqrfpawii","USD"],[6E-06,20200403,"clitest_privatednstfmu3gbd5qmxmklauap2jkdzzb32f6bgdvfgoveupkwtxlbohclmjok5j","USD"],[9E-06,20200403,"clitest_privatednstyzcatu3mub6hop6lgt5u27bpgm5rpkxw2ze5mx4qtrbdc76mev7jyxa3","USD"],[2E-06,20200403,"clitest_privatednsv7qr5rbk6saa5jhehk6456uz3tehsncxetjj5ft22yjsfmvonsu6mahcl","USD"],[3E-06,20200403,"clitest_privatednsvqknis3tsq5lxjlvk7q4oqfvepijqcfl3whfcybsfdmecs7j7yqjz67vt","USD"],[7E-06,20200403,"clitest_privatednsvukg2qzry347vdwdfvdy6jids3ij63ydewnltxk3fxu5mm2u5oi23pgh2","USD"],[8E-06,20200403,"clitest_privatednsw6436nojqqk4cqycavbjqgqhmtuv76icohfcsf7z5gcalcksqffvzj53m","USD"],[2E-06,20200403,"clitest_privatednswif22j34ndu2rlefhghf3hfcu6iirzy7mybn63nbyqvy2qbjnovttepkc","USD"],[1.4E-05,20200403,"clitest_privatednswiup2hfm36or7vctlmjmebvxgdbfowxeifrbxamdicap37uxbliw5zbnv","USD"],[3E-06,20200403,"clitest_privatednswm54ptesyageiogf2sqvv4skigi3gns5rmudqkl2kvwmg2oxxm7n2xq2s","USD"],[3E-06,20200403,"clitest_privatednswzvaeysmhpedjaj7bxjgyr6hcrrpdobptkxrbbwabpyohefpmfqmmkdnu","USD"],[2E-06,20200403,"clitest_privatednsx2riukziztnwselhgjmpyuvsgua5mzkiorbw52l3rshraxtlg2mtubpyu","USD"],[2E-06,20200403,"clitest_privatednsxh2b5cyhabu7hayh4i5v3iesbf7ga2udj2p6rutq2sanv6r63ngb237sc","USD"],[1.1E-05,20200403,"clitest_privatednsxu7ovvwt72hphdu7h75hg5d6upne7vziprvbvwcv4ghii7miaswtqh6c4","USD"],[2E-06,20200403,"clitest_privatednsxxy55f5zrnwxfmrfj4zpfcglrwnsibbsyoffm7npncsbvi4ld6k4nbnda","USD"],[3E-06,20200403,"clitest_privatednsxym5zi57jmepgx4vq76wsto4dj6heeylpqrhzbl622tsalhltuk5b5nmz","USD"],[0.723336,20200403,"clitest2ybpwzrmgl","USD"],[0.021475,20200403,"cli-test-stdssdkbgq2vnztksixc4bakrkqhwzn7zy2nigmjsjldhqozdwoi3az4wff6xdh7ik","USD"],[0.002475,20200403,"cli-test-stdssdkqnlvoewfk4ye6flxrhzkhuyrk4ba5erwpwtls5oagb6xqcbqgxwtyxtk65z","USD"],[0.000361,20200403,"cli-test-ultrassdwabbqrhi65okygomaehd3h6s7dejqymmh72mbpraraof6xaebeszxfxezl","USD"],[0.004123,20200403,"cloud-shell-storage-southeastasia","USD"],[6E-05,20200403,"cls_test_adls_file6iyi2fni23tneovhorshrkpsxuewbdbmlzx3oem6m7cyd5qlyzlkaiuqi","USD"],[0.015153,20200403,"connection_monitor_v2_test_3qjh7ercftbltftvflssqhpu74n6pvopicnlfipo2gzdbe3j","USD"],[0.020662,20200403,"connection_monitor_v2_test_4wotnymxcqugpbxtrnysbz5y4mdwl36esewgix64jklzu6y3","USD"],[0.004446,20200403,"connection_monitor_v2_test_7bn2wgvr3spurhwnptntutkv7dejqzu5kkefgq2en3mxm43k","USD"],[0.016566,20200403,"connection_monitor_v2_test_7dnre7nc6v3nrqa2s7557o7vciufegdeprbjvbjn5bwesb6r","USD"],[0.016971,20200403,"connection_monitor_v2_test_hyzoyof7muxs22igrfwr5gxqphto6byswwbj6qefv6y5tpnn","USD"],[0.020004,20200403,"connection_monitor_v2_test_jb45plhagrn3ykx642ryq3557go26eg7qu6h4bx7fwe6pioi","USD"],[0.00657,20200403,"connection_monitor_v2_test_jfs27vjqsg3w32c76bgey27hkr422vvaiqy223ixgys2bjz2","USD"],[0.007326,20200403,"connection_monitor_v2_test_t3vuf2rip34c7r5nk3cxfsqfplyzwo6zdv5uwbi5ftespd3w","USD"],[0.00657,20200403,"connection_monitor_v2_test_tedp4byge6tj7rnsrun772nf6sr6wcp7oio5hrcv7x7bul5e","USD"],[0.007074,20200403,"connection_monitor_v2_test_tu52iujkduzkwjb2p3sszurnviawefvovdkdzrsbwr23mqwu","USD"],[2E-06,20200403,"databricks-rg-my-standard-space-fez3hbt1bsvmr","USD"],[0.000477,20200403,"defaultresourcegroup-eus","USD"],[1.536182,20200403,"emerald-city-bookstore","USD"],[6.306511,20200403,"fanqiu-vm","USD"],[7.42601,20200403,"feng-cli-rg","USD"],[0.055444,20200403,"fytest","USD"],[0.000123,20200403,"harold","USD"],[0.0,20200403,"harold-test-rsg","USD"],[0.040827,20200403,"hdicli-26xiy","USD"],[0.128676,20200403,"hdicli-3asnf","USD"],[0.482753,20200403,"hdicli-7xduj","USD"],[0.149698,20200403,"hdicli-cq3u3","USD"],[0.050657,20200403,"hdicli-ghihs","USD"],[0.095212,20200403,"hdicli-o4owp","USD"],[0.027291,20200403,"hdicli-ofdlr","USD"],[0.040812,20200403,"hdicli-oqgh2","USD"],[0.027236,20200403,"hdicli-p2gpj","USD"],[0.040892,20200403,"hdicli-prdlx","USD"],[0.05262,20200403,"hdicli-rquos","USD"],[0.108877,20200403,"hdicli-rztsh","USD"],[6E-06,20200403,"javacsmrg46947","USD"],[0.006124,20200403,"jlrg1","USD"],[0.162603,20200403,"jlvm2rg","USD"],[0.012979,20200403,"mc_clitestcbe6rvaev4_cliakstesty2xmmq_eastus","USD"],[0.54432,20200403,"microsoft.default","USD"],[0.00126,20200403,"networkwatcherrg","USD"],[1.52712,20200403,"new-experiences","USD"],[243.839088,20200403,"qianwens","USD"],[4.5E-05,20200403,"storage_blob_restorelgsnaopzuzblnuxuzojq7eo725opbpfmp2jwlntndhozoedq6chvyzq","USD"],[5.348992,20200403,"storage-v2rt-repro","USD"],[0.014952,20200403,"test_network_bastion_hostdhdxwuow5yoysbryf3ukgdbvkk7pfcat7cvgtixpwkolmhzfzk","USD"],[0.001827,20200403,"test_network_lb_outbound_rules4ukngkqts6jka2jh6yk32uedaokz7ffw6o5bs2joxn4ns","USD"],[0.718342,20200403,"xiaojianxu","USD"],[2.641935,20200403,"xplattestgexpressroute8595","USD"],[0.000126,20200403,"yeming","USD"],[0.000209,20200403,"yu-test-rg-westus","USD"],[27.935038,20200403,"zhoxing-test","USD"],[6.770708,20200403,"zuh","USD"],[0.151245,20200403,"zuhcentral","USD"],[5.08032,20200404,"azure_search_cli_testdu4gt4d2qasm4rribpmq7k4p5k3ooewzex5lpfpmtei3nhmuajat43","USD"],[10.16064,20200404,"azure_search_cli_testh6w6rnsdqz2m7c3gkuohyf6xuojyor3ck6f5azrmc55o5fu26seizr","USD"],[5.08032,20200404,"azure_search_cli_testkutpdg5rerx5fc5ficub65iaph3ksnb6wp4qstd73rukb5ijewtsrc","USD"],[10.16064,20200404,"azure_search_cli_testoeuyti5jqqlaunupbhpnfnhfdkjamnaej4glqkdy66fufyan2y3zm6","USD"],[5.08032,20200404,"azure_search_cli_testrw7hdqfh5svtz52326ewkagn2fuqt54udftyqa7jwh6b6dyeeiosne","USD"],[5.08032,20200404,"azure_search_cli_testtjjvfawgr4d453ylkbz7vjlshkytobkqpyswvq744ujs2xehbqaskh","USD"],[10.16064,20200404,"azure_search_cli_testudvlgq7mimi6y2dcvfqjs32lqxdh4twqewzy3s23gtedyg5le2girc","USD"],[5.08032,20200404,"azure_search_cli_testy24raerip4gad6kudhxho32gijmv2rnfkgzfsopme77bjdwh3u4vcf","USD"],[0.0,20200404,"azure-cli-test-rg","USD"],[0.005451,20200404,"azure-core-poc","USD"],[0.011086,20200404,"azuresdktest_reserved","USD"],[0.263814,20200404,"bim_pl_test_rg","USD"],[0.735132,20200404,"bim-rg","USD"],[0.04662,20200404,"cli_test_ag_http_listeneromvibh3xbkmxh2skwxdyz5c7ijpz4x5xzlvr7n4zquzytqc3bd","USD"],[1.4E-05,20200404,"cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn","USD"],[7E-06,20200404,"cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk","USD"],[7E-06,20200404,"cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y","USD"],[7E-06,20200404,"cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2","USD"],[7E-06,20200404,"cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3","USD"],[7E-06,20200404,"cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme","USD"],[1E-05,20200404,"cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p","USD"],[1.7E-05,20200404,"cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi","USD"],[7E-06,20200404,"cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw","USD"],[7E-06,20200404,"cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa","USD"],[2.7E-05,20200404,"cli_test_datashare_sampleresourcegroup","USD"],[6E-06,20200404,"cli_test_eh_aliasdrj6y3jjzz2b5gjynzeg3hlvh4vbevx6axtox4ijutmqpe3uhr2f6zjcvp","USD"],[6E-06,20200404,"cli_test_eh_aliasfaxwrtp645isrxreqi6kj6gtvb4j3lh23klbxtfz7d67cc276s43xrosgp","USD"],[6E-06,20200404,"cli_test_eh_aliasr6icm7ctnbnlupvodhdxfvgm7ukjbnbzw3w6543qcf232tden7ulag356e","USD"],[0.017281,20200404,"cli_test_managed_diskdt4sy7h47eehd5onivbl6kxwu2tq5drfjo2n3ocshoyvwoiacjo76i","USD"],[5.322555,20200404,"cli_test_redis4fi3zmkxvanofwj7til7vfg65gvgwee7f52qeqekaz2yozt4naljndprrebti","USD"],[0.211596,20200404,"cli_test_redis5w7c5upnaajph7i7m7l23if7az4esw45w3dyuq2lkeq6brn7rwje2jthrrtsp","USD"],[5.322555,20200404,"cli_test_redisdtit6p4uk44zlk7pxobgh4mc5s5lu2ihgl4f3rgdb4v76dpiapgaiyzf3qwmo","USD"],[0.211365,20200404,"cli_test_redisl5c4b6pvpa4n6xqbgzcysvhager37negd7yftbxkgl34vgzuvpsv37p6avn4h","USD"],[0.219219,20200404,"cli_test_redissjldzezn2p7k5ud72cr7ka6sg6tszx2chx2q3uikfsedmoa7n5cntbr3qzxrp","USD"],[28.0476,20200404,"cli_test_sb_aliasjvmz65dvg7inej34lr2j6ymns5ewjlrnrp4z6ylhegesgpf6io57pmksme","USD"],[28.0476,20200404,"cli_test_sb_aliaszm3yvalycherhh6usqybb4tp3eqbckvxbdrujxlfo2b2kgt74tb645a4r5","USD"],[0.119226,20200404,"clitest.rg2qgvxjxy46scnjuh6q5gtypebpi5oeuajfgxb7yrrsggnqxrij6pnc3d7ybz2chih","USD"],[0.119463,20200404,"clitest.rg35pihforqftkb5qllg3t75zoxlztjwsmuftgdsphbiy2r3adx3t3spnkzzs2c5c4s","USD"],[0.120262,20200404,"clitest.rg3s3h2izedr4olwdk4jqjhltn4lkukfixgfalhtfjmiy6u3xndqvdkrr4j4jqhx6hu","USD"],[8E-06,20200404,"clitest.rg6i4hl6iakg","USD"],[0.120385,20200404,"clitest.rg6mxjzuorkskzxoisjj4q7leopfu5mge2nncxfuw33pn7w5rzgt6nqhx3f2koq427p","USD"],[1E-06,20200404,"clitest.rgdd3pvc445vb7vkctepirlk7u7ehgatpxqkt7etu7jzzxnby36lhts5532grmo4xqt","USD"],[0.120236,20200404,"clitest.rgduxuhyeqzrek7s3jfr776qvugv4qtmrxnlqcwiodxu2wihvqvuajr5bvtbfw2c74d","USD"],[0.120278,20200404,"clitest.rgdzk3w2kpwtbjaippkz6nrab53pinz3nbdcoxurf2fm477d5j2qa43kpmvlh34nudn","USD"],[0.0,20200404,"clitest.rggqe5qp2g4ikjuk4quunjltoatlnnfvg4jy6lw5mup4qcbrvofg4uioaohki5xkfem","USD"],[0.120152,20200404,"clitest.rgib3viqdhrawwnaopavpcsc2u3psfod7wlami5tg57borlex2io2b7nolpz4qxhm5p","USD"],[0.0,20200404,"clitest.rgkjk5zpf6vpm4eazar7zv554ytwslfx3wfo6vpev4ypj3664cr3nnzzrhgiio2hvab","USD"],[0.0,20200404,"clitest.rgof3oy22ihkrkvxmos32f4x7rg662il55cz42puy634klszugqsoj3kafahile6edj","USD"],[0.120245,20200404,"clitest.rgp535jz2dxemblsqlvzwsk4ehth7eprd5yny22fi5rppnick62nncsonvlutvmvbje","USD"],[0.0,20200404,"clitest.rgqzxdc4qlur4ldpzn5ysrsgw3iq7ot2pjm2twuh5h7mydbhfromknwnwmbcte2jnf6","USD"],[0.11925,20200404,"clitest.rgr5sog7j3q3a5o2vy3r4gpl3ylcovxfcbkttkotqe653iz4mlsrbjns76tv4v4lbqq","USD"],[0.0,20200404,"clitest.rgrsyxntxfpaaox5qm77j37jgojydhj6vgwpffnchul5hhnd2txbb2upcw5lpcrayhz","USD"],[0.119262,20200404,"clitest.rguk5hr7imq2zbvjzaogkt7gke2onbbn6sr3ux5rfdiqufofpfrmblbmbzrtd663lkn","USD"],[0.119247,20200404,"clitest.rgyreu2qkpgqyrm56i4cocrrcf5xb2uzmvlm2lau226cqk6zetyu5olii7figpx2mix","USD"],[0.122006,20200404,"clitest.rgzj3xc6lmggzuorcimokxvkq7lrrxtcty3dilmrxzwdjcq35dqahmc7e7snha4milh","USD"],[1E-06,20200404,"databricks-rg-my-standard-space-fez3hbt1bsvmr","USD"],[1.53617,20200404,"emerald-city-bookstore","USD"],[6.307432,20200404,"fanqiu-vm","USD"],[7.44789,20200404,"feng-cli-rg","USD"],[0.055444,20200404,"fytest","USD"],[4.1E-05,20200404,"harold","USD"],[0.0,20200404,"harold-test-rsg","USD"],[3E-06,20200404,"javacsmrg46947","USD"],[0.00541,20200404,"jlrg1","USD"],[0.162145,20200404,"jlvm2rg","USD"],[0.54432,20200404,"microsoft.default","USD"],[1.52712,20200404,"new-experiences","USD"],[243.839613,20200404,"qianwens","USD"],[5E-06,20200404,"storage_blob_restorelgsnaopzuzblnuxuzojq7eo725opbpfmp2jwlntndhozoedq6chvyzq","USD"],[5.348676,20200404,"storage-v2rt-repro","USD"],[0.668682,20200404,"xiaojianxu","USD"],[2.641935,20200404,"xplattestgexpressroute8595","USD"],[9.2E-05,20200404,"yeming","USD"],[0.000131,20200404,"yu-test-rg-westus","USD"],[35.516189,20200404,"zhoxing-test","USD"],[6.771108,20200404,"zuh","USD"],[0.14998,20200404,"zuhcentral","USD"],[5.08032,20200405,"azure_search_cli_testdu4gt4d2qasm4rribpmq7k4p5k3ooewzex5lpfpmtei3nhmuajat43","USD"],[10.16064,20200405,"azure_search_cli_testh6w6rnsdqz2m7c3gkuohyf6xuojyor3ck6f5azrmc55o5fu26seizr","USD"],[5.08032,20200405,"azure_search_cli_testkutpdg5rerx5fc5ficub65iaph3ksnb6wp4qstd73rukb5ijewtsrc","USD"],[10.16064,20200405,"azure_search_cli_testoeuyti5jqqlaunupbhpnfnhfdkjamnaej4glqkdy66fufyan2y3zm6","USD"],[5.08032,20200405,"azure_search_cli_testrw7hdqfh5svtz52326ewkagn2fuqt54udftyqa7jwh6b6dyeeiosne","USD"],[5.08032,20200405,"azure_search_cli_testtjjvfawgr4d453ylkbz7vjlshkytobkqpyswvq744ujs2xehbqaskh","USD"],[10.16064,20200405,"azure_search_cli_testudvlgq7mimi6y2dcvfqjs32lqxdh4twqewzy3s23gtedyg5le2girc","USD"],[5.08032,20200405,"azure_search_cli_testy24raerip4gad6kudhxho32gijmv2rnfkgzfsopme77bjdwh3u4vcf","USD"],[0.0,20200405,"azure-cli-test-rg","USD"],[0.005451,20200405,"azure-core-poc","USD"],[0.007363,20200405,"azuresdktest_reserved","USD"],[0.259404,20200405,"bim_pl_test_rg","USD"],[0.735133,20200405,"bim-rg","USD"],[1.5E-05,20200405,"cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn","USD"],[7E-06,20200405,"cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk","USD"],[7E-06,20200405,"cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y","USD"],[7E-06,20200405,"cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2","USD"],[7E-06,20200405,"cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3","USD"],[7E-06,20200405,"cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme","USD"],[7E-06,20200405,"cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p","USD"],[1.5E-05,20200405,"cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi","USD"],[7E-06,20200405,"cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw","USD"],[7E-06,20200405,"cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa","USD"],[5.7E-05,20200405,"cli_test_datashare_sampleresourcegroup","USD"],[7E-06,20200405,"cli_test_eh_aliasdrj6y3jjzz2b5gjynzeg3hlvh4vbevx6axtox4ijutmqpe3uhr2f6zjcvp","USD"],[7E-06,20200405,"cli_test_eh_aliasfaxwrtp645isrxreqi6kj6gtvb4j3lh23klbxtfz7d67cc276s43xrosgp","USD"],[7E-06,20200405,"cli_test_eh_aliasr6icm7ctnbnlupvodhdxfvgm7ukjbnbzw3w6543qcf232tden7ulag356e","USD"],[28.0476,20200405,"cli_test_sb_aliasjvmz65dvg7inej34lr2j6ymns5ewjlrnrp4z6ylhegesgpf6io57pmksme","USD"],[28.0476,20200405,"cli_test_sb_aliaszm3yvalycherhh6usqybb4tp3eqbckvxbdrujxlfo2b2kgt74tb645a4r5","USD"],[0.119226,20200405,"clitest.rg2qgvxjxy46scnjuh6q5gtypebpi5oeuajfgxb7yrrsggnqxrij6pnc3d7ybz2chih","USD"],[0.119463,20200405,"clitest.rg35pihforqftkb5qllg3t75zoxlztjwsmuftgdsphbiy2r3adx3t3spnkzzs2c5c4s","USD"],[0.120262,20200405,"clitest.rg3s3h2izedr4olwdk4jqjhltn4lkukfixgfalhtfjmiy6u3xndqvdkrr4j4jqhx6hu","USD"],[9E-06,20200405,"clitest.rg6i4hl6iakg","USD"],[0.120385,20200405,"clitest.rg6mxjzuorkskzxoisjj4q7leopfu5mge2nncxfuw33pn7w5rzgt6nqhx3f2koq427p","USD"],[1E-06,20200405,"clitest.rgdd3pvc445vb7vkctepirlk7u7ehgatpxqkt7etu7jzzxnby36lhts5532grmo4xqt","USD"],[0.120236,20200405,"clitest.rgduxuhyeqzrek7s3jfr776qvugv4qtmrxnlqcwiodxu2wihvqvuajr5bvtbfw2c74d","USD"],[0.120278,20200405,"clitest.rgdzk3w2kpwtbjaippkz6nrab53pinz3nbdcoxurf2fm477d5j2qa43kpmvlh34nudn","USD"],[0.0,20200405,"clitest.rggqe5qp2g4ikjuk4quunjltoatlnnfvg4jy6lw5mup4qcbrvofg4uioaohki5xkfem","USD"],[0.120152,20200405,"clitest.rgib3viqdhrawwnaopavpcsc2u3psfod7wlami5tg57borlex2io2b7nolpz4qxhm5p","USD"],[0.0,20200405,"clitest.rgkjk5zpf6vpm4eazar7zv554ytwslfx3wfo6vpev4ypj3664cr3nnzzrhgiio2hvab","USD"],[0.0,20200405,"clitest.rgof3oy22ihkrkvxmos32f4x7rg662il55cz42puy634klszugqsoj3kafahile6edj","USD"],[0.120245,20200405,"clitest.rgp535jz2dxemblsqlvzwsk4ehth7eprd5yny22fi5rppnick62nncsonvlutvmvbje","USD"],[0.0,20200405,"clitest.rgqzxdc4qlur4ldpzn5ysrsgw3iq7ot2pjm2twuh5h7mydbhfromknwnwmbcte2jnf6","USD"],[0.11925,20200405,"clitest.rgr5sog7j3q3a5o2vy3r4gpl3ylcovxfcbkttkotqe653iz4mlsrbjns76tv4v4lbqq","USD"],[0.0,20200405,"clitest.rgrsyxntxfpaaox5qm77j37jgojydhj6vgwpffnchul5hhnd2txbb2upcw5lpcrayhz","USD"],[0.119262,20200405,"clitest.rguk5hr7imq2zbvjzaogkt7gke2onbbn6sr3ux5rfdiqufofpfrmblbmbzrtd663lkn","USD"],[0.119247,20200405,"clitest.rgyreu2qkpgqyrm56i4cocrrcf5xb2uzmvlm2lau226cqk6zetyu5olii7figpx2mix","USD"],[0.122006,20200405,"clitest.rgzj3xc6lmggzuorcimokxvkq7lrrxtcty3dilmrxzwdjcq35dqahmc7e7snha4milh","USD"],[1E-06,20200405,"databricks-rg-my-standard-space-fez3hbt1bsvmr","USD"],[1.536172,20200405,"emerald-city-bookstore","USD"],[6.307438,20200405,"fanqiu-vm","USD"],[7.477202,20200405,"feng-cli-rg","USD"],[0.055444,20200405,"fytest","USD"],[4.3E-05,20200405,"harold","USD"],[0.0,20200405,"harold-test-rsg","USD"],[4E-06,20200405,"javacsmrg46947","USD"],[0.00541,20200405,"jlrg1","USD"],[0.162825,20200405,"jlvm2rg","USD"],[0.54432,20200405,"microsoft.default","USD"],[1.52712,20200405,"new-experiences","USD"],[243.832878,20200405,"qianwens","USD"],[5E-06,20200405,"storage_blob_restorelgsnaopzuzblnuxuzojq7eo725opbpfmp2jwlntndhozoedq6chvyzq","USD"],[5.348707,20200405,"storage-v2rt-repro","USD"],[0.668684,20200405,"xiaojianxu","USD"],[2.641935,20200405,"xplattestgexpressroute8595","USD"],[9.2E-05,20200405,"yeming","USD"],[0.00013,20200405,"yu-test-rg-westus","USD"],[35.500384,20200405,"zhoxing-test","USD"],[6.770602,20200405,"zuh","USD"],[0.151241,20200405,"zuhcentral","USD"],[5.08032,20200406,"azure_search_cli_testdu4gt4d2qasm4rribpmq7k4p5k3ooewzex5lpfpmtei3nhmuajat43","USD"],[10.16064,20200406,"azure_search_cli_testh6w6rnsdqz2m7c3gkuohyf6xuojyor3ck6f5azrmc55o5fu26seizr","USD"],[5.08032,20200406,"azure_search_cli_testkutpdg5rerx5fc5ficub65iaph3ksnb6wp4qstd73rukb5ijewtsrc","USD"],[10.16064,20200406,"azure_search_cli_testoeuyti5jqqlaunupbhpnfnhfdkjamnaej4glqkdy66fufyan2y3zm6","USD"],[5.08032,20200406,"azure_search_cli_testrw7hdqfh5svtz52326ewkagn2fuqt54udftyqa7jwh6b6dyeeiosne","USD"],[5.08032,20200406,"azure_search_cli_testtjjvfawgr4d453ylkbz7vjlshkytobkqpyswvq744ujs2xehbqaskh","USD"],[10.16064,20200406,"azure_search_cli_testudvlgq7mimi6y2dcvfqjs32lqxdh4twqewzy3s23gtedyg5le2girc","USD"],[5.08032,20200406,"azure_search_cli_testy24raerip4gad6kudhxho32gijmv2rnfkgzfsopme77bjdwh3u4vcf","USD"],[0.0,20200406,"azure-cli-test-rg","USD"],[0.005451,20200406,"azure-core-poc","USD"],[0.007521,20200406,"azuresdktest_reserved","USD"],[0.246804,20200406,"bim_pl_test_rg","USD"],[0.735133,20200406,"bim-rg","USD"],[1.4E-05,20200406,"cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn","USD"],[7E-06,20200406,"cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk","USD"],[7E-06,20200406,"cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y","USD"],[7E-06,20200406,"cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2","USD"],[7E-06,20200406,"cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3","USD"],[7E-06,20200406,"cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme","USD"],[7E-06,20200406,"cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p","USD"],[1.4E-05,20200406,"cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi","USD"],[7E-06,20200406,"cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw","USD"],[7E-06,20200406,"cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa","USD"],[6E-06,20200406,"cli_test_eh_aliasdrj6y3jjzz2b5gjynzeg3hlvh4vbevx6axtox4ijutmqpe3uhr2f6zjcvp","USD"],[6E-06,20200406,"cli_test_eh_aliasfaxwrtp645isrxreqi6kj6gtvb4j3lh23klbxtfz7d67cc276s43xrosgp","USD"],[6E-06,20200406,"cli_test_eh_aliasr6icm7ctnbnlupvodhdxfvgm7ukjbnbzw3w6543qcf232tden7ulag356e","USD"],[27.463275,20200406,"cli_test_sb_aliasjvmz65dvg7inej34lr2j6ymns5ewjlrnrp4z6ylhegesgpf6io57pmksme","USD"],[27.463275,20200406,"cli_test_sb_aliaszm3yvalycherhh6usqybb4tp3eqbckvxbdrujxlfo2b2kgt74tb645a4r5","USD"],[1E-06,20200406,"cli_test_z22vk35o35hitlazujrcx3uaip46dzpercdmgcgzahijbckielm5lqyng7t2owivto","USD"],[0.119226,20200406,"clitest.rg2qgvxjxy46scnjuh6q5gtypebpi5oeuajfgxb7yrrsggnqxrij6pnc3d7ybz2chih","USD"],[0.119463,20200406,"clitest.rg35pihforqftkb5qllg3t75zoxlztjwsmuftgdsphbiy2r3adx3t3spnkzzs2c5c4s","USD"],[0.120262,20200406,"clitest.rg3s3h2izedr4olwdk4jqjhltn4lkukfixgfalhtfjmiy6u3xndqvdkrr4j4jqhx6hu","USD"],[8E-06,20200406,"clitest.rg6i4hl6iakg","USD"],[0.120385,20200406,"clitest.rg6mxjzuorkskzxoisjj4q7leopfu5mge2nncxfuw33pn7w5rzgt6nqhx3f2koq427p","USD"],[1E-06,20200406,"clitest.rgdd3pvc445vb7vkctepirlk7u7ehgatpxqkt7etu7jzzxnby36lhts5532grmo4xqt","USD"],[0.120236,20200406,"clitest.rgduxuhyeqzrek7s3jfr776qvugv4qtmrxnlqcwiodxu2wihvqvuajr5bvtbfw2c74d","USD"],[0.120278,20200406,"clitest.rgdzk3w2kpwtbjaippkz6nrab53pinz3nbdcoxurf2fm477d5j2qa43kpmvlh34nudn","USD"],[0.0,20200406,"clitest.rggqe5qp2g4ikjuk4quunjltoatlnnfvg4jy6lw5mup4qcbrvofg4uioaohki5xkfem","USD"],[0.120152,20200406,"clitest.rgib3viqdhrawwnaopavpcsc2u3psfod7wlami5tg57borlex2io2b7nolpz4qxhm5p","USD"],[0.0,20200406,"clitest.rgkjk5zpf6vpm4eazar7zv554ytwslfx3wfo6vpev4ypj3664cr3nnzzrhgiio2hvab","USD"],[0.0,20200406,"clitest.rgof3oy22ihkrkvxmos32f4x7rg662il55cz42puy634klszugqsoj3kafahile6edj","USD"],[0.120245,20200406,"clitest.rgp535jz2dxemblsqlvzwsk4ehth7eprd5yny22fi5rppnick62nncsonvlutvmvbje","USD"],[0.0,20200406,"clitest.rgqzxdc4qlur4ldpzn5ysrsgw3iq7ot2pjm2twuh5h7mydbhfromknwnwmbcte2jnf6","USD"],[0.11925,20200406,"clitest.rgr5sog7j3q3a5o2vy3r4gpl3ylcovxfcbkttkotqe653iz4mlsrbjns76tv4v4lbqq","USD"],[0.0,20200406,"clitest.rgrsyxntxfpaaox5qm77j37jgojydhj6vgwpffnchul5hhnd2txbb2upcw5lpcrayhz","USD"],[0.119262,20200406,"clitest.rguk5hr7imq2zbvjzaogkt7gke2onbbn6sr3ux5rfdiqufofpfrmblbmbzrtd663lkn","USD"],[0.119247,20200406,"clitest.rgyreu2qkpgqyrm56i4cocrrcf5xb2uzmvlm2lau226cqk6zetyu5olii7figpx2mix","USD"],[0.122006,20200406,"clitest.rgzj3xc6lmggzuorcimokxvkq7lrrxtcty3dilmrxzwdjcq35dqahmc7e7snha4milh","USD"],[1E-06,20200406,"databricks-rg-my-standard-space-fez3hbt1bsvmr","USD"],[1.536178,20200406,"emerald-city-bookstore","USD"],[6.307634,20200406,"fanqiu-vm","USD"],[7.361799,20200406,"feng-cli-rg","USD"],[8.2E-05,20200406,"feng-datashare-rg","USD"],[0.055444,20200406,"fytest","USD"],[4.3E-05,20200406,"harold","USD"],[0.0,20200406,"harold-test-rsg","USD"],[3E-06,20200406,"javacsmrg46947","USD"],[0.00541,20200406,"jlrg1","USD"],[0.161011,20200406,"jlvm2rg","USD"],[0.54432,20200406,"microsoft.default","USD"],[1.52712,20200406,"new-experiences","USD"],[243.853183,20200406,"qianwens","USD"],[5E-06,20200406,"storage_blob_restorelgsnaopzuzblnuxuzojq7eo725opbpfmp2jwlntndhozoedq6chvyzq","USD"],[5.3487,20200406,"storage-v2rt-repro","USD"],[0.67121,20200406,"xiaojianxu","USD"],[2.641935,20200406,"xplattestgexpressroute8595","USD"],[9.2E-05,20200406,"yeming","USD"],[0.000129,20200406,"yu-test-rg-westus","USD"],[35.512261,20200406,"zhoxing-test","USD"],[6.768082,20200406,"zuh","USD"],[0.150611,20200406,"zuhcentral","USD"],[5.08032,20200407,"azure_search_cli_testdu4gt4d2qasm4rribpmq7k4p5k3ooewzex5lpfpmtei3nhmuajat43","USD"],[9.31392,20200407,"azure_search_cli_testh6w6rnsdqz2m7c3gkuohyf6xuojyor3ck6f5azrmc55o5fu26seizr","USD"],[4.44528,20200407,"azure_search_cli_testkutpdg5rerx5fc5ficub65iaph3ksnb6wp4qstd73rukb5ijewtsrc","USD"],[8.89056,20200407,"azure_search_cli_testoeuyti5jqqlaunupbhpnfnhfdkjamnaej4glqkdy66fufyan2y3zm6","USD"],[4.44528,20200407,"azure_search_cli_testrw7hdqfh5svtz52326ewkagn2fuqt54udftyqa7jwh6b6dyeeiosne","USD"],[4.65696,20200407,"azure_search_cli_testtjjvfawgr4d453ylkbz7vjlshkytobkqpyswvq744ujs2xehbqaskh","USD"],[10.16064,20200407,"azure_search_cli_testudvlgq7mimi6y2dcvfqjs32lqxdh4twqewzy3s23gtedyg5le2girc","USD"],[4.44528,20200407,"azure_search_cli_testy24raerip4gad6kudhxho32gijmv2rnfkgzfsopme77bjdwh3u4vcf","USD"],[0.0,20200407,"azure-cli-test-rg","USD"],[0.005556,20200407,"azure-core-poc","USD"],[0.008075,20200407,"azuresdktest_reserved","USD"],[0.239874,20200407,"bim_pl_test_rg","USD"],[0.734518,20200407,"bim-rg","USD"],[0.12077,20200407,"cli_test_azure_firewall_ip_configetk4as4x2pt27laa3iuxcz7up2pldna2rybomoxjlb","USD"],[0.00504,20200407,"cli_test_azure_firewall_management_ip_config3zuuwmqivcboeuju6xe4guxde747v4i","USD"],[0.00504,20200407,"cli_test_azure_firewall_management_ip_configd3s6opp35gyegmfkvdjnn57o7yzvkip","USD"],[0.00504,20200407,"cli_test_azure_firewall_management_ip_configlga4opwkmplu5jihvdxijgxizti2jvs","USD"],[0.380302,20200407,"cli_test_azure_firewall_with_firewall_policy4633bty2ji24ylwholf7ffldi66tw7w","USD"],[1.5E-05,20200407,"cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn","USD"],[7E-06,20200407,"cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk","USD"],[7E-06,20200407,"cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y","USD"],[7E-06,20200407,"cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2","USD"],[7E-06,20200407,"cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3","USD"],[7E-06,20200407,"cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme","USD"],[7E-06,20200407,"cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p","USD"],[1.5E-05,20200407,"cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi","USD"],[7E-06,20200407,"cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw","USD"],[7E-06,20200407,"cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa","USD"],[7E-06,20200407,"cli_test_eh_aliasdrj6y3jjzz2b5gjynzeg3hlvh4vbevx6axtox4ijutmqpe3uhr2f6zjcvp","USD"],[7E-06,20200407,"cli_test_eh_aliasfaxwrtp645isrxreqi6kj6gtvb4j3lh23klbxtfz7d67cc276s43xrosgp","USD"],[7E-06,20200407,"cli_test_eh_aliasr6icm7ctnbnlupvodhdxfvgm7ukjbnbzw3w6543qcf232tden7ulag356e","USD"],[3E-06,20200407,"cli_test_eh_networkgyranxdsawyposwqonzxneka6wc4wu52qyf6aegolodc7f3kpky6carb","USD"],[7.560108,20200407,"cli_test_keyvault_keyjzo7l2pfpmh5slqzzochymsdmgk3v4cze5wpruszy5znvgwg5d7ivk","USD"],[0.021414,20200407,"cli_test_metric_alert_special_charlnn56nemufqojn5pyx3xtorptgq3v7nue33ovgkcr","USD"],[28.0476,20200407,"cli_test_sb_aliasjvmz65dvg7inej34lr2j6ymns5ewjlrnrp4z6ylhegesgpf6io57pmksme","USD"],[28.0476,20200407,"cli_test_sb_aliaszm3yvalycherhh6usqybb4tp3eqbckvxbdrujxlfo2b2kgt74tb645a4r5","USD"],[2.1E-05,20200407,"cli_test_sp_with_kv_existing_certesfsuskyyrheucwyovfjmejh7mcxuzqtzsfqb3jd3p","USD"],[1.9E-05,20200407,"cli_test_sp_with_kv_existing_certn56wmbp3zv63brgspn34lwtxkvjpzfbqvvx6wxue6u","USD"],[2.1E-05,20200407,"cli_test_sp_with_kv_existing_certr65tkgzuhbxr36jqcerjgiqxdebx757g7qthi6atei","USD"],[2E-06,20200407,"cli_test_storage_encryption7pjhkdmy4uie62b4rui2was26xlsxahuk3kwyjfecq7o3f5b","USD"],[2.1E-05,20200407,"cli_test_storage_encryptioni7mfy3kaxrzbutng7ay3xrecw5qp2iferodjw2lathegjcwr","USD"],[0.00462,20200407,"cli_test_vm_create_nsg_rule_y2rpqtk4khbdhpganpdquo34uem4ucnxo4dnaejsv7zu6tm","USD"],[0.004196,20200407,"cli_test_vm_create_with_workspace_windows55qfzxx3yij46a3zzthhvhatld4hj6egs4","USD"],[0.00395,20200407,"cli_test_vm_create_with_workspace_windowseqlgsdr3pc4qwgwv4qyvtw3t2yqja5bdcu","USD"],[0.004851,20200407,"cli_test_vm_update_with_workspace_linux7sz46ikiaq2vwo7dvrnspudwgkdmyldbmouy","USD"],[2.5E-05,20200407,"cli_test_vmss_create_linux_secretsqaa26jpzv3l7nyeqw56i4eggy74ewctqfzgfn4pvf","USD"],[0.0,20200407,"cli_test_vmss_create_nonepka6vjrgxkqkiszfej72e76sxheea27xy7kaohrcz25bex42dn","USD"],[0.0,20200407,"cli_test_vmss_lb_skuofyiluea4h5hlyxf5lr5ud7v7mzvlkwuiqpcfdztodoccaypd24sx5f","USD"],[0.021842,20200407,"cli_test_vmss_rolling_update4433nm344bb26zwh6ustuulg4ogkupxq3bssjiqt5svomgm","USD"],[0.00504,20200407,"cli_test_vmss_run_commandiewcqhipymqcuyfjgjw44flwncpv4hptc53iiwdi6xwo65aiqt","USD"],[0.01806,20200407,"cli_test_vmss_set_orchestration_service_state_ndminjqt3gkn6rsmqawm5d5iha2vq","USD"],[0.01197,20200407,"cli_test_vmss_update_automatic_repairs_with_health_probe_gmtditjwpte2ccnqm2","USD"],[0.01134,20200407,"cli_test_vmss_vms7e3osmeb3swp3ron626rbqyxfdxngquzriiiwzbshszqdyuzltxfopw6uu","USD"],[0.119226,20200407,"clitest.rg2qgvxjxy46scnjuh6q5gtypebpi5oeuajfgxb7yrrsggnqxrij6pnc3d7ybz2chih","USD"],[0.119463,20200407,"clitest.rg35pihforqftkb5qllg3t75zoxlztjwsmuftgdsphbiy2r3adx3t3spnkzzs2c5c4s","USD"],[0.120262,20200407,"clitest.rg3s3h2izedr4olwdk4jqjhltn4lkukfixgfalhtfjmiy6u3xndqvdkrr4j4jqhx6hu","USD"],[0.112757,20200407,"clitest.rg4xro2tn57fzk33hgvfuutmow3ho4jfxfk2bp5vlj4bj67w5w3npvqjl6hnqr5cyoa","USD"],[0.110867,20200407,"clitest.rg4y7bsbzmx4crgm2e2jo666aqygqeoy4k44cjcl4i4dtarksq2k6ips64lyyn2bevm","USD"],[0.00455,20200407,"clitest.rg5lebqdh7aac6nm4nm37j4aay4iv2fmpgwlzu464tdj2vdwkwmtatmig7oo4qxo6p3","USD"],[9E-06,20200407,"clitest.rg6i4hl6iakg","USD"],[0.120385,20200407,"clitest.rg6mxjzuorkskzxoisjj4q7leopfu5mge2nncxfuw33pn7w5rzgt6nqhx3f2koq427p","USD"],[1E-06,20200407,"clitest.rgdd3pvc445vb7vkctepirlk7u7ehgatpxqkt7etu7jzzxnby36lhts5532grmo4xqt","USD"],[0.120236,20200407,"clitest.rgduxuhyeqzrek7s3jfr776qvugv4qtmrxnlqcwiodxu2wihvqvuajr5bvtbfw2c74d","USD"],[0.120278,20200407,"clitest.rgdzk3w2kpwtbjaippkz6nrab53pinz3nbdcoxurf2fm477d5j2qa43kpmvlh34nudn","USD"],[0.0,20200407,"clitest.rggqe5qp2g4ikjuk4quunjltoatlnnfvg4jy6lw5mup4qcbrvofg4uioaohki5xkfem","USD"],[2.1E-05,20200407,"clitest.rghetymlgdfdp2uf5xiq3ooabujswwvavljtzn546psnepv4doa4qe77c4jfll62tud","USD"],[0.120152,20200407,"clitest.rgib3viqdhrawwnaopavpcsc2u3psfod7wlami5tg57borlex2io2b7nolpz4qxhm5p","USD"],[0.000254,20200407,"clitest.rgiqozgktpvy2gen27rhykxanu2ygrsdy54qu77i7ofdzy63qtl7gecjzolrdz3dd3o","USD"],[2E-06,20200407,"clitest.rgjf622f4xuqjyblmweqrl6ckyukare747alx23dnma3uzwajterqebl3hp2mddrqli","USD"],[0.0,20200407,"clitest.rgkjk5zpf6vpm4eazar7zv554ytwslfx3wfo6vpev4ypj3664cr3nnzzrhgiio2hvab","USD"],[0.000744,20200407,"clitest.rgmx5ebotzi2cptcvs6moqmvy3r7rg2putzl5qbwohsyszd6pyg54l3jzqxqcrq4l4o","USD"],[0.0,20200407,"clitest.rgof3oy22ihkrkvxmos32f4x7rg662il55cz42puy634klszugqsoj3kafahile6edj","USD"],[0.120245,20200407,"clitest.rgp535jz2dxemblsqlvzwsk4ehth7eprd5yny22fi5rppnick62nncsonvlutvmvbje","USD"],[2.3E-05,20200407,"clitest.rgpeo3jr76kcrslqrtqjzcdb5ow2hobyd7ftkmddtztbwu7c4jcebes6us53kvq5mqp","USD"],[0.0,20200407,"clitest.rgqzxdc4qlur4ldpzn5ysrsgw3iq7ot2pjm2twuh5h7mydbhfromknwnwmbcte2jnf6","USD"],[0.11925,20200407,"clitest.rgr5sog7j3q3a5o2vy3r4gpl3ylcovxfcbkttkotqe653iz4mlsrbjns76tv4v4lbqq","USD"],[0.0,20200407,"clitest.rgrsyxntxfpaaox5qm77j37jgojydhj6vgwpffnchul5hhnd2txbb2upcw5lpcrayhz","USD"],[1.9E-05,20200407,"clitest.rgswkbn52vkdmhxbz6n5bee2o3feeqdpndtjh3y46ijsra3b7np26popa2p3aopob6t","USD"],[0.119262,20200407,"clitest.rguk5hr7imq2zbvjzaogkt7gke2onbbn6sr3ux5rfdiqufofpfrmblbmbzrtd663lkn","USD"],[2E-06,20200407,"clitest.rgx6jed4c3mcs7pyaskwwrxizqpys2pn4f222g7p6o3r7uxmkcmnem6ezx6lqsqmkpb","USD"],[0.111497,20200407,"clitest.rgyk4mgrijsgotmffyamugpqancpg374fojo2semmpodvwfnnzjkbxb6amzmu3mpdc4","USD"],[0.119247,20200407,"clitest.rgyreu2qkpgqyrm56i4cocrrcf5xb2uzmvlm2lau226cqk6zetyu5olii7figpx2mix","USD"],[0.122006,20200407,"clitest.rgzj3xc6lmggzuorcimokxvkq7lrrxtcty3dilmrxzwdjcq35dqahmc7e7snha4milh","USD"],[1.2E-05,20200407,"clitest_privatedns4ycbylx3ju4ypeacj2yseldhi4whcewbarbq7jrekc5dmtf4kmuaxlslm","USD"],[1.1E-05,20200407,"clitest_privatednsg4qchknkqwxmjmvq2owzi5d6w7lsfyxq4z7osfohr67k63vmaknz4gyob","USD"],[1.3E-05,20200407,"clitest_privatednshawebqvlmq5hwbozk54zj2scfftuktm2hgrkadkwvdh6aw7zqhflp6zi7","USD"],[9E-06,20200407,"clitest_privatednsjj6tf4dqer3elskz3q64splahaepbzo7p5mmnlj3hvcej3sn4p22zn5n7","USD"],[1E-05,20200407,"clitest_privatednskrqfvwxgho4maw63unqn63uhugtjm6qo7kuzgr3643jbfvvk4p4gr4tus","USD"],[9E-06,20200407,"clitest_privatednsqtwtmvcgxaemwnlorua6mgth3vdapun2ev2s4uaa65durghr22jkijm5d","USD"],[1E-05,20200407,"clitest_privatednsx7n256neoak6wubslze7cern6wnwyhtdcl7n6wiwzpdiaxbp6y62fgr3c","USD"],[9E-06,20200407,"clitest_privatednsxjgzeabqkim2kpvz55v3kcnh7pa67aw73apavfnc2dsnscsgt6334aiiq","USD"],[0.00063,20200407,"clitest6zx4tyus52","USD"],[0.006048,20200407,"clitestcoib6h7bvb","USD"],[0.006048,20200407,"clitestephcdtdsan","USD"],[0.00063,20200407,"clitestrwrbg32vwn","USD"],[0.723336,20200407,"clitestxnl2uutjkq","USD"],[0.001564,20200407,"cloud-shell-storage-southeastasia","USD"],[1E-06,20200407,"databricks-rg-my-standard-space-fez3hbt1bsvmr","USD"],[0.094544,20200407,"datashare_provider_rg","USD"],[1.53617,20200407,"emerald-city-bookstore","USD"],[6.308055,20200407,"fanqiu-vm","USD"],[7.503146,20200407,"feng-cli-rg","USD"],[0.084059,20200407,"feng-datashare-rg","USD"],[0.065511,20200407,"fytest","USD"],[4.3E-05,20200407,"harold","USD"],[0.0,20200407,"harold-test-rsg","USD"],[4E-06,20200407,"javacsmrg46947","USD"],[0.007739,20200407,"jlrg1","USD"],[0.162598,20200407,"jlvm2rg","USD"],[3.736581,20200407,"mc_jlrg_jlaks_eastus","USD"],[0.54432,20200407,"microsoft.default","USD"],[1.52712,20200407,"new-experiences","USD"],[326.394316,20200407,"qianwens","USD"],[6E-06,20200407,"storage_blob_restorelgsnaopzuzblnuxuzojq7eo725opbpfmp2jwlntndhozoedq6chvyzq","USD"],[5.34871,20200407,"storage-v2rt-repro","USD"],[0.670961,20200407,"xiaojianxu","USD"],[2.641935,20200407,"xplattestgexpressroute8595","USD"],[9.4E-05,20200407,"yeming","USD"],[0.000131,20200407,"yu-test-rg-westus","USD"],[35.500377,20200407,"zhoxing-test","USD"],[6.76884,20200407,"zuh","USD"],[0.151241,20200407,"zuhcentral","USD"],[0.63504,20200408,"azure_search_cli_testdu4gt4d2qasm4rribpmq7k4p5k3ooewzex5lpfpmtei3nhmuajat43","USD"],[0.84672,20200408,"azure_search_cli_testudvlgq7mimi6y2dcvfqjs32lqxdh4twqewzy3s23gtedyg5le2girc","USD"],[1.1E-05,20200408,"azure-cli-sub-resource-grouphq6cw3p7dyw4rqlp36sweozg6zhhpcjh","USD"],[1.2E-05,20200408,"azure-cli-sub-resource-groupr2tswf5fywzopbixjqj7j7ohub6edbqx","USD"],[0.166204,20200408,"azure-cli-test-rg","USD"],[0.005622,20200408,"azure-core-poc","USD"],[0.008234,20200408,"azuresdktest_reserved","USD"],[0.237984,20200408,"bim_pl_test_rg","USD"],[0.734788,20200408,"bim-rg","USD"],[0.433306,20200408,"cli_netappfiles_test_snapshot_bogo22p2734hp7rdxfzi7y6kk4skgsxxehhithd6jtrgy","USD"],[0.259983,20200408,"cli_netappfiles_test_snapshot_k3ff5fxppbloktcexirc4dykm7oxh4xhgs3tyezxgnjns","USD"],[0.0,20200408,"cli_netappfiles_test_snapshot_ttavezvnahmc4btbm4nuiz76tdlsqw3m4hfvomt442gek","USD"],[0.433306,20200408,"cli_netappfiles_test_snapshot_zv7djq6sahp77mjdncs5v27rtk7p6uwte6h5mbfahui3k","USD"],[0.346644,20200408,"cli_netappfiles_test_volume_225qbxpuehbge4bb6ysqyyqcsczkui4222i4efpvpvpf2zb","USD"],[0.606628,20200408,"cli_netappfiles_test_volume_bfx7h326lj5j7pd4lrzlzqaprw43cmjnsobr5zm7fmlfxyu","USD"],[0.606628,20200408,"cli_netappfiles_test_volume_jdnjs4hok23wfiojmueamjbuu3mjjdvfzgmass3zgdzioeh","USD"],[0.693289,20200408,"cli_netappfiles_test_volume_ki5x2xsaeqmgbw3ki55v23l2iqva2rmds3dmglkqyevcsse","USD"],[0.693289,20200408,"cli_netappfiles_test_volume_l7jxj4kmoaeyejolxgbv3yirjlqpjomuiklutw3kvn6ekpk","USD"],[0.086661,20200408,"cli_netappfiles_test_volume_rgvsve5kmeeijucdh5iuokuynvi3drwmekmyokw7remuu7z","USD"],[0.086661,20200408,"cli_netappfiles_test_volume_uqig7j5ipyk2jwba25xg467flgp2ow2pdztxvsni5kumzsl","USD"],[0.259983,20200408,"cli_netappfiles_test_volume_w5ui3rtpuqzs75orucpwihvmsejmfxjl53goomr4fcxvrke","USD"],[12.162662,20200408,"cli_netappfiles_test_volume_xe7jbaor2jea3hjq6ddzlkzy7pgmxnv3ge2svhjc5wtvqmg","USD"],[0.00924,20200408,"cli_test_asge5dfbxqbvdsv2rnll3j24qsdp4ygxxtwjf4n3hnqlw6fh767hqdzr5xhwxwc2io","USD"],[0.004725,20200408,"cli_test_azure_firewall_management_ip_config743oftkesjgk2ylqs4a4gvvcktonyzr","USD"],[0.0063,20200408,"cli_test_azure_firewall_management_ip_configwnwev23746373ix553dpuxbaxut7wjk","USD"],[0.0,20200408,"cli_test_azure_firewall_with_firewall_policy4633bty2ji24ylwholf7ffldi66tw7w","USD"],[0.000252,20200408,"cli_test_create_vm_existing_nicebwyivarrakhkmjjppdgauwtlhliewvlwi74qcmt7ynn","USD"],[3.5E-05,20200408,"cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn","USD"],[1.7E-05,20200408,"cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk","USD"],[1.7E-05,20200408,"cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y","USD"],[1.7E-05,20200408,"cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2","USD"],[1.7E-05,20200408,"cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3","USD"],[1.7E-05,20200408,"cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme","USD"],[1.7E-05,20200408,"cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p","USD"],[3.5E-05,20200408,"cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi","USD"],[1.7E-05,20200408,"cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw","USD"],[1.7E-05,20200408,"cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa","USD"],[1.6E-05,20200408,"cli_test_eh_aliasdrj6y3jjzz2b5gjynzeg3hlvh4vbevx6axtox4ijutmqpe3uhr2f6zjcvp","USD"],[1.6E-05,20200408,"cli_test_eh_aliasfaxwrtp645isrxreqi6kj6gtvb4j3lh23klbxtfz7d67cc276s43xrosgp","USD"],[1.6E-05,20200408,"cli_test_eh_aliasr6icm7ctnbnlupvodhdxfvgm7ukjbnbzw3w6543qcf232tden7ulag356e","USD"],[28.0476,20200408,"cli_test_sb_aliasjvmz65dvg7inej34lr2j6ymns5ewjlrnrp4z6ylhegesgpf6io57pmksme","USD"],[28.0476,20200408,"cli_test_sb_aliaszm3yvalycherhh6usqybb4tp3eqbckvxbdrujxlfo2b2kgt74tb645a4r5","USD"],[1.5E-05,20200408,"cli_test_sp_with_kv_existing_certas7x6en5ktwi2zc2dbzf3l7eol6fjvi3u4gamduomf","USD"],[1.5E-05,20200408,"cli_test_sp_with_kv_existing_certulhickdwbm4simfzio44zq7z46g2kneqss5ctqvuat","USD"],[0.008085,20200408,"cli_test_vm_custom_ipg4u2gfrwuix2go7a62qu4v67ewiet37i7tmwdzcuc2zur4wlrayhkc","USD"],[0.01512,20200408,"cli_test_vm_lb_integrationcafg3colxainoan2tk7diw7e52nskkmizk3y6m444mcbhs2wx","USD"],[0.00063,20200408,"cli_test_vm_list_ipgx5vcd5u5n6qdsl2f4gh4e5qmcpa3hr4gzfpz6d7nu2qhqvid7ttbgfk","USD"],[0.000252,20200408,"cli_test_vm_run_command7fzdeswft4bcxdt42i3k7mfqxstwnycf37wgxa6u5zqyxszyqvva","USD"],[0.004851,20200408,"cli_test_vm_state_modkh4eydb5iiiycymv7yzhwp4imulukxx7ggawb5tsn3zqw6w4r2m4ok","USD"],[0.00483,20200408,"cli_test_vm_zoneedmbqnlsm5l5ba5wnlujirecb2r2k6a3onruqlfixa3rxld5bd5hwugsd3e","USD"],[0.00882,20200408,"cli_test_vmss_create_idempotentc2ox6s3nnzycqyln7sovy4x5bxrlaytnrdooibxtile6","USD"],[0.00603,20200408,"cli_test_vmss_lb_sku5lnzfllq7t3ub627a4glr7ul3hw63tvplzoqrrml5mkyyonf3clceto","USD"],[0.002205,20200408,"cli_test_vmss_zonesr67zjroqp7n2xxtdvbxsnle7winaulvgioxy32x5qpcbxshxw53v5nqn","USD"],[0.012627,20200408,"cli_test_vmss_zonestzc6d5lfasqhfg6nzf6fipuwozjv45gntapmhv4wdflqavcqo7ftdqqx","USD"],[0.002205,20200408,"cli_test_vmss_zoneszstbgryjkxqz2q3pmdid5jaauafpzrj3szz2kleacu72wudcd6my36f7","USD"],[8.752773,20200408,"cli-rg-t3chthuuaul7rhffs","USD"],[0.119226,20200408,"clitest.rg2qgvxjxy46scnjuh6q5gtypebpi5oeuajfgxb7yrrsggnqxrij6pnc3d7ybz2chih","USD"],[0.119463,20200408,"clitest.rg35pihforqftkb5qllg3t75zoxlztjwsmuftgdsphbiy2r3adx3t3spnkzzs2c5c4s","USD"],[0.120262,20200408,"clitest.rg3s3h2izedr4olwdk4jqjhltn4lkukfixgfalhtfjmiy6u3xndqvdkrr4j4jqhx6hu","USD"],[1.9E-05,20200408,"clitest.rg6i4hl6iakg","USD"],[0.120385,20200408,"clitest.rg6mxjzuorkskzxoisjj4q7leopfu5mge2nncxfuw33pn7w5rzgt6nqhx3f2koq427p","USD"],[0.01113,20200408,"clitest.rgaq4phog5w7jd3dyud5iaxovlwu2ivx4kehojtf6mbuxwdqas4hcl7ybtzrujwjzdb","USD"],[8E-06,20200408,"clitest.rgdd3pvc445vb7vkctepirlk7u7ehgatpxqkt7etu7jzzxnby36lhts5532grmo4xqt","USD"],[0.112757,20200408,"clitest.rgdmfi7jwxzkdd2j6ty556kh3kkwvypxtlyhki42lcdh3kycd7u53lpy6vp65kwej62","USD"],[0.120236,20200408,"clitest.rgduxuhyeqzrek7s3jfr776qvugv4qtmrxnlqcwiodxu2wihvqvuajr5bvtbfw2c74d","USD"],[0.120278,20200408,"clitest.rgdzk3w2kpwtbjaippkz6nrab53pinz3nbdcoxurf2fm477d5j2qa43kpmvlh34nudn","USD"],[3E-06,20200408,"clitest.rggqe5qp2g4ikjuk4quunjltoatlnnfvg4jy6lw5mup4qcbrvofg4uioaohki5xkfem","USD"],[0.120152,20200408,"clitest.rgib3viqdhrawwnaopavpcsc2u3psfod7wlami5tg57borlex2io2b7nolpz4qxhm5p","USD"],[3E-06,20200408,"clitest.rgkjk5zpf6vpm4eazar7zv554ytwslfx3wfo6vpev4ypj3664cr3nnzzrhgiio2hvab","USD"]]}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '88431' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 23 May 2020 07:49:53 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - c22c8c09-e879-4265-974a-d024c52ea12c + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-microsoft.costmanagement-entity-retry-after: + - '60' + x-ms-ratelimit-microsoft.costmanagement-tenant-retry-after: + - '60' + x-ms-ratelimit-remaining-microsoft.costmanagement-entity-requests: + - '29' + x-ms-ratelimit-remaining-microsoft.costmanagement-tenant-requests: + - '199' + status: + code: 200 + message: OK +version: 1 diff --git a/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_export_create_in_subscription_scope.yaml b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_export_create_in_subscription_scope.yaml new file mode 100644 index 00000000000..531c5472c28 --- /dev/null +++ b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_export_create_in_subscription_scope.yaml @@ -0,0 +1,240 @@ +interactions: +- request: + body: 'b''b\''{"properties": {"format": "Csv", "definition": {"timeframe": "TheLastMonth", + "dataset": {"granularity": "Daily"}}, "deliveryInfo": {"destination": {"resourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_export_create000001/providers/Microsoft.Storage/storageAccounts/testexportcreate000002", + "container": "export"}}}}\''''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export create + Connection: + - keep-alive + Content-Length: + - '402' + Content-Type: + - application/json + ParameterSetName: + - --scope --name --storage-account-id --storage-container --timeframe + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-01?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-01","name":"ep-01","type":"Microsoft.CostManagement/exports","eTag":"\"1d632b0cc49b476\"","properties":{"schedule":{"status":"Inactive"},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_export_create000001/providers/Microsoft.Storage/storageAccounts/testexportcreate000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth","dataSet":{"granularity":"Daily"}}}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '651' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 May 2020 16:23:17 GMT + expires: + - '-1' + location: + - https://consumption.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-01?api-version=2019-11-01 + pragma: + - no-cache + session-id: + - 6eb815a1-6549-4fa0-802f-ac6828d4733c + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export show + Connection: + - keep-alive + ParameterSetName: + - --scope --name + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-01?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-01","name":"ep-01","type":"Microsoft.CostManagement/exports","eTag":"\"1d632b0cc49b476\"","properties":{"schedule":{"status":"Inactive"},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_export_create000001/providers/Microsoft.Storage/storageAccounts/testexportcreate000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth","dataSet":{"granularity":"Daily"}}}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '651' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 May 2020 16:23:20 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 7a420c2a-c0de-435b-b745-260b5e585a45 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export list + Connection: + - keep-alive + ParameterSetName: + - --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports?api-version=2019-11-01 + response: + body: + string: '{"value":[{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-01","name":"ep-01","type":"Microsoft.CostManagement/exports","eTag":"\"1d632b0cc49b476\"","properties":{"schedule":{"status":"Inactive"},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_export_create000001/providers/Microsoft.Storage/storageAccounts/testexportcreate000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth","dataSet":{"granularity":"Daily"}}}}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '663' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 May 2020 16:23:22 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 7fa481d5-86d7-4f2c-9825-6221acec98f3 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --scope --name + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-01?api-version=2019-11-01 + response: + body: + string: '' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 25 May 2020 16:23:24 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 593e18f3-60b3-4e77-b59b-d1211ebfe2c3 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export show + Connection: + - keep-alive + ParameterSetName: + - --scope --name + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-01?api-version=2019-11-01 + response: + body: + string: '{"error":{"code":"404","message":"No export found for ep-01, Subscription: + 0b1f6471-1bf0-4dda-aec3-cb9272f09590. (Request ID: 03578b77-49b5-4f39-8291-5ce2c86ed9dd)"}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '166' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 May 2020 16:24:00 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - a82ade4f-3cfe-43dd-8b2d-b6523cbb81c9 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_export_create_with_schedule_in_subscription_scope.yaml b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_export_create_with_schedule_in_subscription_scope.yaml new file mode 100644 index 00000000000..1b9071681de --- /dev/null +++ b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_export_create_with_schedule_in_subscription_scope.yaml @@ -0,0 +1,242 @@ +interactions: +- request: + body: 'b''b\''{"properties": {"format": "Csv", "definition": {"timeframe": "TheLastMonth", + "dataset": {"granularity": "Daily"}}, "deliveryInfo": {"destination": {"resourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_export_schedule000001/providers/Microsoft.Storage/storageAccounts/testexportschedule000002", + "container": "export"}}, "schedule": {"status": "Active", "recurrence": "Weekly", + "recurrencePeriod": {"from": "2020-06-01T00:00:00.000Z", "to": "2020-10-31T00:00:00.000Z"}}}}\''''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export create + Connection: + - keep-alive + Content-Length: + - '552' + Content-Type: + - application/json + ParameterSetName: + - --scope --name --storage-account-id --storage-container --timeframe --recurrence + --recurrence-period --schedule-status + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-02?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-02","name":"ep-02","type":"Microsoft.CostManagement/exports","eTag":"\"1d632b63fc1f02c\"","properties":{"schedule":{"status":"Active","recurrence":"Weekly","recurrencePeriod":{"from":"2020-06-01T00:00:00Z","to":"2020-10-31T00:00:00Z"}},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_export_schedule000001/providers/Microsoft.Storage/storageAccounts/testexportschedule000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth","dataSet":{"granularity":"Daily"}}}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '750' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 May 2020 17:02:22 GMT + expires: + - '-1' + location: + - https://consumption.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-02?api-version=2019-11-01 + pragma: + - no-cache + session-id: + - 336ddc09-3140-41b1-bdb4-cc8b655ec825 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export show + Connection: + - keep-alive + ParameterSetName: + - --scope --name + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-02?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-02","name":"ep-02","type":"Microsoft.CostManagement/exports","eTag":"\"1d632b63fc1f02c\"","properties":{"schedule":{"status":"Active","recurrence":"Weekly","recurrencePeriod":{"from":"2020-06-01T00:00:00Z","to":"2020-10-31T00:00:00Z"}},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_export_schedule000001/providers/Microsoft.Storage/storageAccounts/testexportschedule000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth","dataSet":{"granularity":"Daily"}}}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '750' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 May 2020 17:02:27 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 3534ff0b-c57e-4e9c-8dfe-3bede1074dac + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export list + Connection: + - keep-alive + ParameterSetName: + - --scope + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports?api-version=2019-11-01 + response: + body: + string: '{"value":[{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-02","name":"ep-02","type":"Microsoft.CostManagement/exports","eTag":"\"1d632b63fc1f02c\"","properties":{"schedule":{"status":"Active","recurrence":"Weekly","recurrencePeriod":{"from":"2020-06-01T00:00:00Z","to":"2020-10-31T00:00:00Z"}},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_export_schedule000001/providers/Microsoft.Storage/storageAccounts/testexportschedule000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth","dataSet":{"granularity":"Daily"}}}}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '762' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 May 2020 17:02:29 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 47c0121f-b169-4e6f-88ff-f924f1f37830 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --scope --name + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-02?api-version=2019-11-01 + response: + body: + string: '' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 25 May 2020 17:02:34 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - ff579052-533d-4ffa-b45f-9b010824a969 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export show + Connection: + - keep-alive + ParameterSetName: + - --scope --name + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.7.4 (Linux-4.15.0-99-generic-x86_64-with-debian-buster-sid) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-02?api-version=2019-11-01 + response: + body: + string: '{"error":{"code":"404","message":"No export found for ep-02, Subscription: + 0b1f6471-1bf0-4dda-aec3-cb9272f09590. (Request ID: c5981703-754c-4d66-bf6e-ec7d6e194319)"}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '166' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 May 2020 17:02:34 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 0be6f646-5c8f-4c55-8250-da54e03e48b6 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_update_with_timeperiod_in_subscription_scope.yaml b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_update_with_timeperiod_in_subscription_scope.yaml new file mode 100644 index 00000000000..2a139508acf --- /dev/null +++ b/src/costmanagement/azext_costmanagement/tests/latest/recordings/test_update_with_timeperiod_in_subscription_scope.yaml @@ -0,0 +1,203 @@ +interactions: +- request: + body: 'b''b\''{"properties": {"format": "Csv", "definition": {"timeframe": "TheLastMonth", + "dataset": {"granularity": "Daily"}}, "deliveryInfo": {"destination": {"resourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_update_schedule000001/providers/Microsoft.Storage/storageAccounts/testupdateschedule000002", + "container": "export"}}}}\''''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export create + Connection: + - keep-alive + Content-Length: + - '402' + Content-Type: + - application/json + ParameterSetName: + - --scope --name --storage-account-id --storage-container --timeframe + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.6.8 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-03?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-03","name":"ep-03","type":"Microsoft.CostManagement/exports","eTag":"\"1d6349e4e2280a3\"","properties":{"schedule":{"status":"Inactive"},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_update_schedule000001/providers/Microsoft.Storage/storageAccounts/testupdateschedule000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth","dataSet":{"granularity":"Daily"}}}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '651' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 May 2020 03:15:57 GMT + expires: + - '-1' + location: + - https://consumption.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-03?api-version=2019-11-01 + pragma: + - no-cache + session-id: + - 66e27b54-aed6-4a49-89af-494bfc36267c + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export update + Connection: + - keep-alive + ParameterSetName: + - --scope --name --recurrence-period --timeframe + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.6.8 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-03?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-03","name":"ep-03","type":"Microsoft.CostManagement/exports","eTag":"\"1d6349e4e2280a3\"","properties":{"schedule":{"status":"Inactive"},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_update_schedule000001/providers/Microsoft.Storage/storageAccounts/testupdateschedule000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth","dataSet":{"granularity":"Daily"}}}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '651' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 May 2020 03:15:59 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 7bc73480-159e-464b-9f3c-9a6393f55a5c + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: 'b''b\''{"eTag": "\\\\"1d6349e4e2280a3\\\\"", "properties": {"format": "Csv", + "definition": {"type": "Usage", "timeframe": "TheLastBillingMonth", "dataset": + {"granularity": "Daily"}}, "deliveryInfo": {"destination": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_update_schedule000001/providers/Microsoft.Storage/storageAccounts/testupdateschedule000002", + "container": "export"}}, "schedule": {"status": "Inactive", "recurrencePeriod": + {"from": "2020-08-01T00:00:00.000Z", "to": "2020-10-31T00:00:00.000Z"}}}}\''''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export update + Connection: + - keep-alive + Content-Length: + - '585' + Content-Type: + - application/json + ParameterSetName: + - --scope --name --recurrence-period --timeframe + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.6.8 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-03?api-version=2019-11-01 + response: + body: + string: '{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.CostManagement/exports/ep-03","name":"ep-03","type":"Microsoft.CostManagement/exports","eTag":"\"1d6349e50a33823\"","properties":{"schedule":{"status":"Inactive","recurrencePeriod":{"from":"2020-08-01T00:00:00Z","to":"2020-10-31T00:00:00Z"}},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_update_schedule000001/providers/Microsoft.Storage/storageAccounts/testupdateschedule000002","container":"export","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastBillingMonth","dataSet":{"granularity":"Daily"}}}}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '737' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 May 2020 03:16:23 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 59c60dfe-2bdd-4d55-81eb-ab05e67a3c77 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - costmanagement export delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --scope --name + User-Agent: + - AZURECLI/2.6.0 azsdk-python-mgmt-costmanagement/1.2.0 Python/3.6.8 (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/ep-03?api-version=2019-11-01 + response: + body: + string: '' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 28 May 2020 03:16:27 GMT + expires: + - '-1' + pragma: + - no-cache + session-id: + - 7af62cb9-75aa-4731-ba51-a37eeac6387f + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/costmanagement/azext_costmanagement/tests/latest/test_costmanagement_scenario.py b/src/costmanagement/azext_costmanagement/tests/latest/test_costmanagement_scenario.py index 8798621115e..74de71a8bfe 100644 --- a/src/costmanagement/azext_costmanagement/tests/latest/test_costmanagement_scenario.py +++ b/src/costmanagement/azext_costmanagement/tests/latest/test_costmanagement_scenario.py @@ -9,11 +9,8 @@ # -------------------------------------------------------------------------- import os -import unittest - -from azure_devtools.scenario_tests import AllowLargeResponse from azure.cli.testsdk import ScenarioTest -from .. import try_manual +from .. import try_manual, raise_if from azure.cli.testsdk import ResourceGroupPreparer from azure.cli.testsdk import StorageAccountPreparer @@ -414,7 +411,7 @@ def step__dimensions_get_subscriptiondimensionslist_legacy(test, rg): @try_manual def step__exports_put_billingaccountcreateorupdateexport(test, rg): test.cmd('az costmanagement export create ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--definition-type "Usage" ' '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}' '}}}" ' @@ -440,7 +437,7 @@ def step__exports_put_billingaccountcreateorupdateexport(test, rg): @try_manual def step__exports_put_departmentcreateorupdateexport(test, rg): test.cmd('az costmanagement export create ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--definition-type "Usage" ' '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}' '}}}" ' @@ -466,7 +463,7 @@ def step__exports_put_departmentcreateorupdateexport(test, rg): @try_manual def step__exports_put_enrollmentaccountcreateorupdateexport(test, rg): test.cmd('az costmanagement export create ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--definition-type "Usage" ' '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}' '}}}" ' @@ -492,7 +489,7 @@ def step__exports_put_enrollmentaccountcreateorupdateexport(test, rg): @try_manual def step__exports_put_managementgroupcreateorupdateexport(test, rg): test.cmd('az costmanagement export create ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--definition-type "Usage" ' '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}' '}}}" ' @@ -518,7 +515,7 @@ def step__exports_put_managementgroupcreateorupdateexport(test, rg): @try_manual def step__exports_put_resourcegroupcreateorupdateexport(test, rg): test.cmd('az costmanagement export create ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--definition-type "Usage" ' '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}' '}}}" ' @@ -544,7 +541,7 @@ def step__exports_put_resourcegroupcreateorupdateexport(test, rg): @try_manual def step__exports_put_subscriptioncreateorupdateexport(test, rg): test.cmd('az costmanagement export create ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--definition-type "Usage" ' '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}' '}}}" ' @@ -569,8 +566,8 @@ def step__exports_put_subscriptioncreateorupdateexport(test, rg): # EXAMPLE: /Exports/get/BillingAccountExecutionHistoryExport @try_manual def step__exports_get_billingaccountexecutionhistoryexport(test, rg): - test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + test.cmd('az costmanagement export get-execution-history ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/123456"', checks=[]) @@ -579,7 +576,7 @@ def step__exports_get_billingaccountexecutionhistoryexport(test, rg): @try_manual def step__exports_get_billingaccountexport(test, rg): test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/123456"', checks=[]) @@ -595,8 +592,8 @@ def step__exports_get_billingaccountexportlist(test, rg): # EXAMPLE: /Exports/get/DepartmentExecutionHistoryExport @try_manual def step__exports_get_departmentexecutionhistoryexport(test, rg): - test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + test.cmd('az costmanagement export get-execution-history ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"', checks=[]) @@ -605,7 +602,7 @@ def step__exports_get_departmentexecutionhistoryexport(test, rg): @try_manual def step__exports_get_departmentexport(test, rg): test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"', checks=[]) @@ -621,8 +618,8 @@ def step__exports_get_departmentexportlist(test, rg): # EXAMPLE: /Exports/get/EnrollmentAccountExecutionHistoryExport @try_manual def step__exports_get_enrollmentaccountexecutionhistoryexport(test, rg): - test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + test.cmd('az costmanagement export get-execution-history ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"', checks=[]) @@ -631,7 +628,7 @@ def step__exports_get_enrollmentaccountexecutionhistoryexport(test, rg): @try_manual def step__exports_get_enrollmentaccountexport(test, rg): test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"', checks=[]) @@ -647,8 +644,8 @@ def step__exports_get_enrollmentaccountexportlist(test, rg): # EXAMPLE: /Exports/get/ManagementGroupExecutionHistoryExport @try_manual def step__exports_get_managementgroupexecutionhistoryexport(test, rg): - test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + test.cmd('az costmanagement export get-execution-history ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Management/managementGroups/TestMG"', checks=[]) @@ -657,7 +654,7 @@ def step__exports_get_managementgroupexecutionhistoryexport(test, rg): @try_manual def step__exports_get_managementgroupexport(test, rg): test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Management/managementGroups/TestMG"', checks=[]) @@ -673,8 +670,8 @@ def step__exports_get_managementgroupexportlist(test, rg): # EXAMPLE: /Exports/get/ResourceGroupExecutionHistoryExport @try_manual def step__exports_get_resourcegroupexecutionhistoryexport(test, rg): - test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + test.cmd('az costmanagement export get-execution-history ' + '--name "{TestExport}" ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"', checks=[]) @@ -683,7 +680,7 @@ def step__exports_get_resourcegroupexecutionhistoryexport(test, rg): @try_manual def step__exports_get_resourcegroupexport(test, rg): test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"', checks=[]) @@ -699,8 +696,8 @@ def step__exports_get_resourcegroupexportlist(test, rg): # EXAMPLE: /Exports/get/SubscriptionExecutionHistoryExport @try_manual def step__exports_get_subscriptionexecutionhistoryexport(test, rg): - test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + test.cmd('az costmanagement export get-execution-history ' + '--name "{TestExport}" ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000"', checks=[]) @@ -709,7 +706,7 @@ def step__exports_get_subscriptionexecutionhistoryexport(test, rg): @try_manual def step__exports_get_subscriptionexport(test, rg): test.cmd('az costmanagement export show ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000"', checks=[]) @@ -726,7 +723,7 @@ def step__exports_get_subscriptionexportlist(test, rg): @try_manual def step__exports_post_billingaccountexecuteexport(test, rg): test.cmd('az costmanagement export execute ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/123456"', checks=[]) @@ -735,7 +732,7 @@ def step__exports_post_billingaccountexecuteexport(test, rg): @try_manual def step__exports_post_departmentexecuteexport(test, rg): test.cmd('az costmanagement export execute ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"', checks=[]) @@ -744,7 +741,7 @@ def step__exports_post_departmentexecuteexport(test, rg): @try_manual def step__exports_post_enrollmentaccountexecuteexport(test, rg): test.cmd('az costmanagement export execute ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"', checks=[]) @@ -753,7 +750,7 @@ def step__exports_post_enrollmentaccountexecuteexport(test, rg): @try_manual def step__exports_post_managementgroupexecuteexport(test, rg): test.cmd('az costmanagement export execute ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Management/managementGroups/TestMG"', checks=[]) @@ -762,7 +759,7 @@ def step__exports_post_managementgroupexecuteexport(test, rg): @try_manual def step__exports_post_resourcegroupexecuteexport(test, rg): test.cmd('az costmanagement export execute ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"', checks=[]) @@ -771,7 +768,7 @@ def step__exports_post_resourcegroupexecuteexport(test, rg): @try_manual def step__exports_post_subscriptionexecuteexport(test, rg): test.cmd('az costmanagement export execute ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000"', checks=[]) @@ -1254,7 +1251,7 @@ def step__views_put_resourcegroupcreateorupdateview(test, rg): 'irection\\":\\"Ascending\\"}}]}}" ' '--query-timeframe "MonthToDate" ' '--properties-scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" ' - '--view-name "{swaggerExample}"', + '--name "{swaggerExample}"', checks=[]) @@ -1262,7 +1259,7 @@ def step__views_put_resourcegroupcreateorupdateview(test, rg): @try_manual def step__views_get_privateview(test, rg): test.cmd('az costmanagement view show ' - '--view-name "{swaggerExample}"', + '--name "{swaggerExample}"', checks=[]) @@ -1276,9 +1273,9 @@ def step__views_get_privateviewlist(test, rg): # EXAMPLE: /Views/get/ResourceGroupView @try_manual def step__views_get_resourcegroupview(test, rg): - test.cmd('az costmanagement view show ' + test.cmd('az costmanagement view get-by-scope ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" ' - '--view-name "{swaggerExample}"', + '--name "{swaggerExample}"', checks=[]) @@ -1294,7 +1291,7 @@ def step__views_get_resourcegroupviewlist(test, rg): @try_manual def step__exports_delete_subscriptiondeleteexport(test, rg): test.cmd('az costmanagement export delete ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000"', checks=[]) @@ -1303,7 +1300,7 @@ def step__exports_delete_subscriptiondeleteexport(test, rg): @try_manual def step__exports_delete_resourcegroupdeleteexport(test, rg): test.cmd('az costmanagement export delete ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"', checks=[]) @@ -1312,7 +1309,7 @@ def step__exports_delete_resourcegroupdeleteexport(test, rg): @try_manual def step__exports_delete_managementgroupdeleteexport(test, rg): test.cmd('az costmanagement export delete ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Management/managementGroups/TestMG"', checks=[]) @@ -1321,7 +1318,7 @@ def step__exports_delete_managementgroupdeleteexport(test, rg): @try_manual def step__exports_delete_enrollmentaccountdeleteexport(test, rg): test.cmd('az costmanagement export delete ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"', checks=[]) @@ -1330,7 +1327,7 @@ def step__exports_delete_enrollmentaccountdeleteexport(test, rg): @try_manual def step__exports_delete_departmentdeleteexport(test, rg): test.cmd('az costmanagement export delete ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"', checks=[]) @@ -1339,7 +1336,7 @@ def step__exports_delete_departmentdeleteexport(test, rg): @try_manual def step__exports_delete_billingaccountdeleteexport(test, rg): test.cmd('az costmanagement export delete ' - '--export-name "{TestExport}" ' + '--name "{TestExport}" ' '--scope "providers/Microsoft.Billing/billingAccounts/123456"', checks=[]) @@ -1349,7 +1346,7 @@ def step__exports_delete_billingaccountdeleteexport(test, rg): def step__views_delete_resourcegroupdeleteview(test, rg): test.cmd('az costmanagement view delete ' '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" ' - '--view-name "{Views_2}"', + '--name "{Views_2}"', checks=[]) @@ -1502,8 +1499,9 @@ def test_costmanagement(self, rg): self.kwargs.update({ 'swaggerExample': 'swaggerExample', - 'Views_2': 'Views_2', + 'Views_2': 'TestView', 'TestExport': 'TestExport', }) call_scenario(self, rg) + raise_if() diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/__init__.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/__init__.py index 80154bae521..d22aaa8f169 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/__init__.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/__init__.py @@ -7,13 +7,10 @@ # -------------------------------------------------------------------------- from ._cost_management_client import CostManagementClient -from ._version import VERSION - -__version__ = VERSION __all__ = ['CostManagementClient'] try: - from .patch import patch_sdk + from ._patch import patch_sdk patch_sdk() except ImportError: pass diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_configuration.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_configuration.py index 8625677aaa9..d0d560606aa 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_configuration.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_configuration.py @@ -11,14 +11,13 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential +VERSION = "unknown" class CostManagementClientConfiguration(Configuration): """Configuration for CostManagementClient. @@ -43,7 +42,8 @@ def __init__( self.credential = credential self.api_version = "2019-11-01" self.credential_scopes = ['https://management.azure.com/.default'] - kwargs.setdefault('sdk_moniker', 'mgmt-costmanagement/{}'.format(VERSION)) + self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + kwargs.setdefault('sdk_moniker', 'costmanagementclient/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_cost_management_client.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_cost_management_client.py index 0cdba0c257e..b137f5955fd 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_cost_management_client.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_cost_management_client.py @@ -15,6 +15,8 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Optional + from azure.core.credentials import TokenCredential + from ._configuration import CostManagementClientConfiguration from .operations import ViewOperations from .operations import AlertOperations @@ -30,22 +32,23 @@ class CostManagementClient(object): """CostManagementClient. :ivar view: ViewOperations operations - :vartype view: azure.mgmt.costmanagement.operations.ViewOperations + :vartype view: cost_management_client.operations.ViewOperations :ivar alert: AlertOperations operations - :vartype alert: azure.mgmt.costmanagement.operations.AlertOperations + :vartype alert: cost_management_client.operations.AlertOperations :ivar forecast: ForecastOperations operations - :vartype forecast: azure.mgmt.costmanagement.operations.ForecastOperations + :vartype forecast: cost_management_client.operations.ForecastOperations :ivar dimension: DimensionOperations operations - :vartype dimension: azure.mgmt.costmanagement.operations.DimensionOperations + :vartype dimension: cost_management_client.operations.DimensionOperations :ivar query: QueryOperations operations - :vartype query: azure.mgmt.costmanagement.operations.QueryOperations + :vartype query: cost_management_client.operations.QueryOperations :ivar export: ExportOperations operations - :vartype export: azure.mgmt.costmanagement.operations.ExportOperations + :vartype export: cost_management_client.operations.ExportOperations :ivar operation: OperationOperations operations - :vartype operation: azure.mgmt.costmanagement.operations.OperationOperations + :vartype operation: cost_management_client.operations.OperationOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_version.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_version.py deleted file mode 100644 index dbf4c577231..00000000000 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "1.2.0" diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/_configuration_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/_configuration_async.py index 15d87f41cbf..c7bcafd7072 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/_configuration_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/_configuration_async.py @@ -11,12 +11,11 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials import TokenCredential + from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" class CostManagementClientConfiguration(Configuration): """Configuration for CostManagementClient. @@ -40,7 +39,8 @@ def __init__( self.credential = credential self.api_version = "2019-11-01" self.credential_scopes = ['https://management.azure.com/.default'] - kwargs.setdefault('sdk_moniker', 'mgmt-costmanagement/{}'.format(VERSION)) + self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + kwargs.setdefault('sdk_moniker', 'costmanagementclient/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/_cost_management_client_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/_cost_management_client_async.py index 0f81334bb70..f0e45241588 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/_cost_management_client_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/_cost_management_client_async.py @@ -6,11 +6,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Optional +from typing import Any, Optional, TYPE_CHECKING from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + from ._configuration_async import CostManagementClientConfiguration from .operations_async import ViewOperations from .operations_async import AlertOperations @@ -26,22 +30,23 @@ class CostManagementClient(object): """CostManagementClient. :ivar view: ViewOperations operations - :vartype view: azure.mgmt.costmanagement.aio.operations_async.ViewOperations + :vartype view: cost_management_client.aio.operations_async.ViewOperations :ivar alert: AlertOperations operations - :vartype alert: azure.mgmt.costmanagement.aio.operations_async.AlertOperations + :vartype alert: cost_management_client.aio.operations_async.AlertOperations :ivar forecast: ForecastOperations operations - :vartype forecast: azure.mgmt.costmanagement.aio.operations_async.ForecastOperations + :vartype forecast: cost_management_client.aio.operations_async.ForecastOperations :ivar dimension: DimensionOperations operations - :vartype dimension: azure.mgmt.costmanagement.aio.operations_async.DimensionOperations + :vartype dimension: cost_management_client.aio.operations_async.DimensionOperations :ivar query: QueryOperations operations - :vartype query: azure.mgmt.costmanagement.aio.operations_async.QueryOperations + :vartype query: cost_management_client.aio.operations_async.QueryOperations :ivar export: ExportOperations operations - :vartype export: azure.mgmt.costmanagement.aio.operations_async.ExportOperations + :vartype export: cost_management_client.aio.operations_async.ExportOperations :ivar operation: OperationOperations operations - :vartype operation: azure.mgmt.costmanagement.aio.operations_async.OperationOperations + :vartype operation: cost_management_client.aio.operations_async.OperationOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_alert_operations_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_alert_operations_async.py index fbfea22641e..17e62fe2027 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_alert_operations_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_alert_operations_async.py @@ -25,7 +25,7 @@ class AlertOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,16 +65,17 @@ async def list( specific for partners. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: AlertsResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.AlertsResult + :return: AlertsResult, or the result of cls(response) + :rtype: ~cost_management_client.models.AlertsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AlertsResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } @@ -101,10 +102,10 @@ async def list( deserialized = self._deserialize('AlertsResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts'} + list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts'} # type: ignore async def get( self, @@ -134,16 +135,17 @@ async def get( :param alert_id: Alert ID. :type alert_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert + :return: Alert, or the result of cls(response) + :rtype: ~cost_management_client.models.Alert :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Alert"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'alertId': self._serialize.url("alert_id", alert_id, 'str', skip_quote=True), @@ -171,10 +173,10 @@ async def get( deserialized = self._deserialize('Alert', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}'} + get.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}'} # type: ignore async def dismiss( self, @@ -230,15 +232,15 @@ async def dismiss( :param alert_id: Alert ID. :type alert_id: str :param definition: defines the type of alert. - :type definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition + :type definition: ~cost_management_client.models.AlertPropertiesDefinition :param description: Alert description. :type description: str :param source: Source of alert. - :type source: str or ~azure.mgmt.costmanagement.models.AlertSource + :type source: str or ~cost_management_client.models.AlertSource :param cost_entity_id: related budget. :type cost_entity_id: str :param status: alert status. - :type status: str or ~azure.mgmt.costmanagement.models.AlertStatus + :type status: str or ~cost_management_client.models.AlertStatus :param creation_time: dateTime in which alert was created. :type creation_time: str :param close_time: dateTime in which alert was closed. @@ -250,7 +252,7 @@ async def dismiss( :param status_modification_time: dateTime in which the alert status was last modified. :type status_modification_time: str :param time_grain_type: Type of timegrain cadence. - :type time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType + :type time_grain_type: str or ~cost_management_client.models.AlertTimeGrainType :param period_start_date: datetime of periodStartDate. :type period_start_date: str :param triggered_by: notificationId that triggered this alert. @@ -266,7 +268,7 @@ async def dismiss( :param threshold: notification threshold percentage as a decimal which activated this alert. :type threshold: float :param operator: operator used to compare currentSpend with amount. - :type operator: str or ~azure.mgmt.costmanagement.models.AlertOperator + :type operator: str or ~cost_management_client.models.AlertOperator :param amount: budget threshold amount. :type amount: float :param unit: unit of currency being used. @@ -282,19 +284,20 @@ async def dismiss( :param overriding_alert: overriding alert. :type overriding_alert: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert + :return: Alert, or the result of cls(response) + :rtype: ~cost_management_client.models.Alert :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Alert"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.DismissAlertPayload(definition=definition, description=description, source=source, cost_entity_id=cost_entity_id, status=status, creation_time=creation_time, close_time=close_time, modification_time=modification_time, status_modification_user_name=status_modification_user_name, status_modification_time=status_modification_time, time_grain_type=time_grain_type, period_start_date=period_start_date, triggered_by=triggered_by, resource_group_filter=resource_group_filter, resource_filter=resource_filter, meter_filter=meter_filter, tag_filter=tag_filter, threshold=threshold, operator=operator, amount=amount, unit=unit, current_spend=current_spend, contact_emails=contact_emails, contact_groups=contact_groups, contact_roles=contact_roles, overriding_alert=overriding_alert) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.dismiss.metadata['url'] + url = self.dismiss.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'alertId': self._serialize.url("alert_id", alert_id, 'str', skip_quote=True), @@ -327,10 +330,10 @@ async def dismiss( deserialized = self._deserialize('Alert', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - dismiss.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}'} + dismiss.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}'} # type: ignore async def list_external( self, @@ -343,21 +346,22 @@ async def list_external( :param external_cloud_provider_type: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - :type external_cloud_provider_type: str or ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :type external_cloud_provider_type: str or ~cost_management_client.models.ExternalCloudProviderType :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. :type external_cloud_provider_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: AlertsResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.AlertsResult + :return: AlertsResult, or the result of cls(response) + :rtype: ~cost_management_client.models.AlertsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AlertsResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.list_external.metadata['url'] + url = self.list_external.metadata['url'] # type: ignore path_format_arguments = { 'externalCloudProviderType': self._serialize.url("external_cloud_provider_type", external_cloud_provider_type, 'str'), 'externalCloudProviderId': self._serialize.url("external_cloud_provider_id", external_cloud_provider_id, 'str'), @@ -385,7 +389,7 @@ async def list_external( deserialized = self._deserialize('AlertsResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_external.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts'} + list_external.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_dimension_operations_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_dimension_operations_async.py index 9e7580d0894..9c11cba7224 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_dimension_operations_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_dimension_operations_async.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -26,7 +26,7 @@ class DimensionOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list( skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs - ) -> "models.DimensionsListResult": + ) -> AsyncIterable["models.DimensionsListResult"]: """Lists the dimensions by the defined scope. :param scope: The scope associated with dimension operations. This includes @@ -82,37 +82,38 @@ def list( :param top: May be used to limit the number of results to the most recent N dimension data. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: DimensionsListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.DimensionsListResult + :return: An iterator like instance of either DimensionsListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~cost_management_client.models.DimensionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DimensionsListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -144,7 +145,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/dimensions'} + list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/dimensions'} # type: ignore def by_external_cloud_provider_type( self, @@ -155,13 +156,13 @@ def by_external_cloud_provider_type( skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs - ) -> "models.DimensionsListResult": + ) -> AsyncIterable["models.DimensionsListResult"]: """Lists the dimensions by the external cloud provider type. :param external_cloud_provider_type: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - :type external_cloud_provider_type: str or ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :type external_cloud_provider_type: str or ~cost_management_client.models.ExternalCloudProviderType :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. :type external_cloud_provider_id: str @@ -178,38 +179,39 @@ def by_external_cloud_provider_type( :param top: May be used to limit the number of results to the most recent N dimension data. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: DimensionsListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.DimensionsListResult + :return: An iterator like instance of either DimensionsListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~cost_management_client.models.DimensionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DimensionsListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.by_external_cloud_provider_type.metadata['url'] + url = self.by_external_cloud_provider_type.metadata['url'] # type: ignore path_format_arguments = { 'externalCloudProviderType': self._serialize.url("external_cloud_provider_type", external_cloud_provider_type, 'str'), 'externalCloudProviderId': self._serialize.url("external_cloud_provider_id", external_cloud_provider_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -241,4 +243,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - by_external_cloud_provider_type.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions'} + by_external_cloud_provider_type.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_export_operations_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_export_operations_async.py index 20d718aea16..5fe883ae4ad 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_export_operations_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_export_operations_async.py @@ -25,7 +25,7 @@ class ExportOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,16 +65,17 @@ async def list( specific for partners. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExportListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ExportListResult + :return: ExportListResult, or the result of cls(response) + :rtype: ~cost_management_client.models.ExportListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ExportListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } @@ -101,10 +102,10 @@ async def list( deserialized = self._deserialize('ExportListResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports'} + list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports'} # type: ignore async def get( self, @@ -134,16 +135,17 @@ async def get( :param export_name: Export Name. :type export_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export + :return: Export, or the result of cls(response) + :rtype: ~cost_management_client.models.Export :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Export"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -171,10 +173,10 @@ async def get( deserialized = self._deserialize('Export', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} + get.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} # type: ignore async def create_or_update( self, @@ -184,8 +186,8 @@ async def create_or_update( timeframe: Optional[Union[str, "models.TimeframeType"]] = None, time_period: Optional["models.QueryTimePeriod"] = None, configuration: Optional["models.QueryDatasetConfiguration"] = None, - aggregation: Optional[Dict[str, "QueryAggregation"]] = None, - grouping: Optional[List["QueryGrouping"]] = None, + aggregation: Optional[Dict[str, "models.QueryAggregation"]] = None, + grouping: Optional[List["models.QueryGrouping"]] = None, filter: Optional["models.QueryFilter"] = None, destination: Optional["models.ExportDeliveryDestination"] = None, status: Optional[Union[str, "models.StatusType"]] = None, @@ -215,48 +217,49 @@ async def create_or_update( :param export_name: Export Name. :type export_name: str :param type: The type of the query. - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: The time frame for pulling data for the query. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :param destination: Has destination for the export being delivered. - :type destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + :type destination: ~cost_management_client.models.ExportDeliveryDestination :param status: The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused. - :type status: str or ~azure.mgmt.costmanagement.models.StatusType + :type status: str or ~cost_management_client.models.StatusType :param recurrence: The schedule recurrence. - :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :type recurrence: str or ~cost_management_client.models.RecurrenceType :param recurrence_period: Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. - :type recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + :type recurrence_period: ~cost_management_client.models.ExportRecurrencePeriod :keyword callable cls: A custom type or function that will be passed the direct response - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export or ~azure.mgmt.costmanagement.models.Export + :return: Export, or the result of cls(response) + :rtype: ~cost_management_client.models.Export :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Export"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.Export(type_properties_definition_type=type, timeframe=timeframe, time_period=time_period, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=filter, destination=destination, status=status, recurrence=recurrence, recurrence_period=recurrence_period) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -294,10 +297,10 @@ async def create_or_update( deserialized = self._deserialize('Export', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} # type: ignore async def delete( self, @@ -327,16 +330,17 @@ async def delete( :param export_name: Export Name. :type export_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -361,9 +365,9 @@ async def delete( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} + delete.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} # type: ignore async def execute( self, @@ -393,16 +397,17 @@ async def execute( :param export_name: Export Name. :type export_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.execute.metadata['url'] + url = self.execute.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -427,9 +432,9 @@ async def execute( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - execute.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run'} + execute.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run'} # type: ignore async def get_execution_history( self, @@ -459,16 +464,17 @@ async def get_execution_history( :param export_name: Export Name. :type export_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExportExecutionListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ExportExecutionListResult + :return: ExportExecutionListResult, or the result of cls(response) + :rtype: ~cost_management_client.models.ExportExecutionListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ExportExecutionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get_execution_history.metadata['url'] + url = self.get_execution_history.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -496,7 +502,7 @@ async def get_execution_history( deserialized = self._deserialize('ExportExecutionListResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get_execution_history.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory'} + get_execution_history.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_forecast_operations_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_forecast_operations_async.py index 50b4a7cf64c..23bc5a88aa0 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_forecast_operations_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_forecast_operations_async.py @@ -25,7 +25,7 @@ class ForecastOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,8 +50,8 @@ async def usage( include_actual_cost: Optional[bool] = None, include_fresh_partial_cost: Optional[bool] = None, configuration: Optional["models.QueryDatasetConfiguration"] = None, - aggregation: Optional[Dict[str, "QueryAggregation"]] = None, - grouping: Optional[List["QueryGrouping"]] = None, + aggregation: Optional[Dict[str, "models.QueryAggregation"]] = None, + grouping: Optional[List["models.QueryGrouping"]] = None, query_filter: Optional["models.QueryFilter"] = None, **kwargs ) -> "models.QueryResult": @@ -75,46 +75,47 @@ async def usage( specific for partners. :type scope: str :param type: The type of the forecast. - :type type: str or ~azure.mgmt.costmanagement.models.ForecastType + :type type: str or ~cost_management_client.models.ForecastType :param timeframe: The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType + :type timeframe: str or ~cost_management_client.models.ForecastTimeframeType :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. :type filter: str :param time_period: Has time period for pulling data for the forecast. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param include_actual_cost: a boolean determining if actualCost will be included. :type include_actual_cost: bool :param include_fresh_partial_cost: a boolean determining if FreshPartialCost will be included. :type include_fresh_partial_cost: bool :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param query_filter: Has filter expression to use in the query. - :type query_filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type query_filter: ~cost_management_client.models.QueryFilter :keyword callable cls: A custom type or function that will be passed the direct response - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :return: QueryResult, or the result of cls(response) + :rtype: ~cost_management_client.models.QueryResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.QueryResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.ForecastDefinition(type=type, timeframe=timeframe, time_period=time_period, include_actual_cost=include_actual_cost, include_fresh_partial_cost=include_fresh_partial_cost, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=query_filter) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.usage.metadata['url'] + url = self.usage.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } @@ -148,10 +149,10 @@ async def usage( deserialized = self._deserialize('QueryResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/forecast'} + usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/forecast'} # type: ignore async def external_cloud_provider_usage( self, @@ -164,8 +165,8 @@ async def external_cloud_provider_usage( include_actual_cost: Optional[bool] = None, include_fresh_partial_cost: Optional[bool] = None, configuration: Optional["models.QueryDatasetConfiguration"] = None, - aggregation: Optional[Dict[str, "QueryAggregation"]] = None, - grouping: Optional[List["QueryGrouping"]] = None, + aggregation: Optional[Dict[str, "models.QueryAggregation"]] = None, + grouping: Optional[List["models.QueryGrouping"]] = None, query_filter: Optional["models.QueryFilter"] = None, **kwargs ) -> "models.QueryResult": @@ -174,51 +175,52 @@ async def external_cloud_provider_usage( :param external_cloud_provider_type: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - :type external_cloud_provider_type: str or ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :type external_cloud_provider_type: str or ~cost_management_client.models.ExternalCloudProviderType :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. :type external_cloud_provider_id: str :param type: The type of the forecast. - :type type: str or ~azure.mgmt.costmanagement.models.ForecastType + :type type: str or ~cost_management_client.models.ForecastType :param timeframe: The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType + :type timeframe: str or ~cost_management_client.models.ForecastTimeframeType :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. :type filter: str :param time_period: Has time period for pulling data for the forecast. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param include_actual_cost: a boolean determining if actualCost will be included. :type include_actual_cost: bool :param include_fresh_partial_cost: a boolean determining if FreshPartialCost will be included. :type include_fresh_partial_cost: bool :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param query_filter: Has filter expression to use in the query. - :type query_filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type query_filter: ~cost_management_client.models.QueryFilter :keyword callable cls: A custom type or function that will be passed the direct response - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :return: QueryResult, or the result of cls(response) + :rtype: ~cost_management_client.models.QueryResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.QueryResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.ForecastDefinition(type=type, timeframe=timeframe, time_period=time_period, include_actual_cost=include_actual_cost, include_fresh_partial_cost=include_fresh_partial_cost, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=query_filter) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.external_cloud_provider_usage.metadata['url'] + url = self.external_cloud_provider_usage.metadata['url'] # type: ignore path_format_arguments = { 'externalCloudProviderType': self._serialize.url("external_cloud_provider_type", external_cloud_provider_type, 'str'), 'externalCloudProviderId': self._serialize.url("external_cloud_provider_id", external_cloud_provider_id, 'str'), @@ -253,7 +255,7 @@ async def external_cloud_provider_usage( deserialized = self._deserialize('QueryResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - external_cloud_provider_usage.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast'} + external_cloud_provider_usage.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_operation_operations_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_operation_operations_async.py index 3100d06cf5b..a812850f2a0 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_operation_operations_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_operation_operations_async.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -26,7 +26,7 @@ class OperationOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,29 +44,30 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, **kwargs - ) -> "models.OperationListResult": + ) -> AsyncIterable["models.OperationListResult"]: """Lists all of the available cost management REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.OperationListResult + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~cost_management_client.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -98,4 +99,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.CostManagement/operations'} + list.metadata = {'url': '/providers/Microsoft.CostManagement/operations'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_query_operations_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_query_operations_async.py index 994fc5fa69f..bf1f3e55c2a 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_query_operations_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_query_operations_async.py @@ -25,7 +25,7 @@ class QueryOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,8 +47,8 @@ async def usage( timeframe: Union[str, "models.TimeframeType"], time_period: Optional["models.QueryTimePeriod"] = None, configuration: Optional["models.QueryDatasetConfiguration"] = None, - aggregation: Optional[Dict[str, "QueryAggregation"]] = None, - grouping: Optional[List["QueryGrouping"]] = None, + aggregation: Optional[Dict[str, "models.QueryAggregation"]] = None, + grouping: Optional[List["models.QueryGrouping"]] = None, filter: Optional["models.QueryFilter"] = None, **kwargs ) -> "models.QueryResult": @@ -72,38 +72,39 @@ async def usage( specific for partners. :type scope: str :param type: The type of the query. - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: The time frame for pulling data for the query. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :keyword callable cls: A custom type or function that will be passed the direct response - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :return: QueryResult, or the result of cls(response) + :rtype: ~cost_management_client.models.QueryResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.QueryResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.QueryDefinition(type=type, timeframe=timeframe, time_period=time_period, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=filter) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.usage.metadata['url'] + url = self.usage.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } @@ -135,10 +136,10 @@ async def usage( deserialized = self._deserialize('QueryResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/query'} + usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/query'} # type: ignore async def usage_by_external_cloud_provider_type( self, @@ -148,8 +149,8 @@ async def usage_by_external_cloud_provider_type( timeframe: Union[str, "models.TimeframeType"], time_period: Optional["models.QueryTimePeriod"] = None, configuration: Optional["models.QueryDatasetConfiguration"] = None, - aggregation: Optional[Dict[str, "QueryAggregation"]] = None, - grouping: Optional[List["QueryGrouping"]] = None, + aggregation: Optional[Dict[str, "models.QueryAggregation"]] = None, + grouping: Optional[List["models.QueryGrouping"]] = None, filter: Optional["models.QueryFilter"] = None, **kwargs ) -> "models.QueryResult": @@ -158,43 +159,44 @@ async def usage_by_external_cloud_provider_type( :param external_cloud_provider_type: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - :type external_cloud_provider_type: str or ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :type external_cloud_provider_type: str or ~cost_management_client.models.ExternalCloudProviderType :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. :type external_cloud_provider_id: str :param type: The type of the query. - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: The time frame for pulling data for the query. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :keyword callable cls: A custom type or function that will be passed the direct response - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :return: QueryResult, or the result of cls(response) + :rtype: ~cost_management_client.models.QueryResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.QueryResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.QueryDefinition(type=type, timeframe=timeframe, time_period=time_period, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=filter) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.usage_by_external_cloud_provider_type.metadata['url'] + url = self.usage_by_external_cloud_provider_type.metadata['url'] # type: ignore path_format_arguments = { 'externalCloudProviderType': self._serialize.url("external_cloud_provider_type", external_cloud_provider_type, 'str'), 'externalCloudProviderId': self._serialize.url("external_cloud_provider_id", external_cloud_provider_id, 'str'), @@ -227,7 +229,7 @@ async def usage_by_external_cloud_provider_type( deserialized = self._deserialize('QueryResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - usage_by_external_cloud_provider_type.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query'} + usage_by_external_cloud_provider_type.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_view_operations_async.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_view_operations_async.py index c606c6c32da..03436baa607 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_view_operations_async.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/aio/operations_async/_view_operations_async.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -26,7 +26,7 @@ class ViewOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,29 +44,30 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, **kwargs - ) -> "models.ViewListResult": + ) -> AsyncIterable["models.ViewListResult"]: """Lists all views by tenant and object. :keyword callable cls: A custom type or function that will be passed the direct response - :return: ViewListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ViewListResult + :return: An iterator like instance of either ViewListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~cost_management_client.models.ViewListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ViewListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -98,13 +99,13 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.CostManagement/views'} + list.metadata = {'url': '/providers/Microsoft.CostManagement/views'} # type: ignore def list_by_scope( self, scope: str, **kwargs - ) -> "models.ViewListResult": + ) -> AsyncIterable["models.ViewListResult"]: """Lists all views at the given scope. :param scope: The scope associated with view operations. This includes @@ -126,29 +127,30 @@ def list_by_scope( External Subscription scope. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ViewListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ViewListResult + :return: An iterator like instance of either ViewListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~cost_management_client.models.ViewListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ViewListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_scope.metadata['url'] + url = self.list_by_scope.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -180,7 +182,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views'} + list_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views'} # type: ignore async def get( self, @@ -192,16 +194,17 @@ async def get( :param view_name: View name. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View + :return: View, or the result of cls(response) + :rtype: ~cost_management_client.models.View :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.View"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'viewName': self._serialize.url("view_name", view_name, 'str'), } @@ -228,10 +231,10 @@ async def get( deserialized = self._deserialize('View', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} + get.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore async def create_or_update( self, @@ -242,8 +245,8 @@ async def create_or_update( chart: Optional[Union[str, "models.ChartType"]] = None, accumulated: Optional[Union[str, "models.AccumulatedType"]] = None, metric: Optional[Union[str, "models.MetricType"]] = None, - kpis: Optional[List["KpiProperties"]] = None, - pivots: Optional[List["PivotProperties"]] = None, + kpis: Optional[List["models.KpiProperties"]] = None, + pivots: Optional[List["models.PivotProperties"]] = None, timeframe: Optional[Union[str, "models.ReportTimeframeType"]] = None, time_period: Optional["models.ReportConfigTimePeriod"] = None, dataset: Optional["models.ReportConfigDataset"] = None, @@ -277,36 +280,37 @@ async def create_or_update( ExternalSubscription scope. :type scope: str :param chart: Chart type of the main view in Cost Analysis. Required. - :type chart: str or ~azure.mgmt.costmanagement.models.ChartType + :type chart: str or ~cost_management_client.models.ChartType :param accumulated: Show costs accumulated over time. - :type accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType + :type accumulated: str or ~cost_management_client.models.AccumulatedType :param metric: Metric to use when displaying costs. - :type metric: str or ~azure.mgmt.costmanagement.models.MetricType + :type metric: str or ~cost_management_client.models.MetricType :param kpis: List of KPIs to show in Cost Analysis UI. - :type kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] + :type kpis: list[~cost_management_client.models.KpiProperties] :param pivots: Configuration of 3 sub-views in the Cost Analysis UI. - :type pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] + :type pivots: list[~cost_management_client.models.PivotProperties] :param timeframe: The time frame for pulling data for the report. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType + :type timeframe: str or ~cost_management_client.models.ReportTimeframeType :param time_period: Has time period for pulling data for the report. - :type time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod + :type time_period: ~cost_management_client.models.ReportConfigTimePeriod :param dataset: Has definition for data in this report config. - :type dataset: ~azure.mgmt.costmanagement.models.ReportConfigDataset + :type dataset: ~cost_management_client.models.ReportConfigDataset :keyword callable cls: A custom type or function that will be passed the direct response - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View or ~azure.mgmt.costmanagement.models.View + :return: View, or the result of cls(response) + :rtype: ~cost_management_client.models.View :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.View"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.View(e_tag=e_tag, display_name=display_name, scope=scope, chart=chart, accumulated=accumulated, metric=metric, kpis=kpis, pivots=pivots, timeframe=timeframe, time_period=time_period, dataset=dataset) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'viewName': self._serialize.url("view_name", view_name, 'str'), } @@ -343,10 +347,10 @@ async def create_or_update( deserialized = self._deserialize('View', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} + create_or_update.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore async def delete( self, @@ -358,16 +362,17 @@ async def delete( :param view_name: View name. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'viewName': self._serialize.url("view_name", view_name, 'str'), } @@ -391,9 +396,9 @@ async def delete( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} + delete.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore async def get_by_scope( self, @@ -424,16 +429,17 @@ async def get_by_scope( :param view_name: View name. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View + :return: View, or the result of cls(response) + :rtype: ~cost_management_client.models.View :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.View"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get_by_scope.metadata['url'] + url = self.get_by_scope.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'viewName': self._serialize.url("view_name", view_name, 'str'), @@ -461,10 +467,10 @@ async def get_by_scope( deserialized = self._deserialize('View', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} + get_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore async def create_or_update_by_scope( self, @@ -476,8 +482,8 @@ async def create_or_update_by_scope( chart: Optional[Union[str, "models.ChartType"]] = None, accumulated: Optional[Union[str, "models.AccumulatedType"]] = None, metric: Optional[Union[str, "models.MetricType"]] = None, - kpis: Optional[List["KpiProperties"]] = None, - pivots: Optional[List["PivotProperties"]] = None, + kpis: Optional[List["models.KpiProperties"]] = None, + pivots: Optional[List["models.PivotProperties"]] = None, timeframe: Optional[Union[str, "models.ReportTimeframeType"]] = None, time_period: Optional["models.ReportConfigTimePeriod"] = None, dataset: Optional["models.ReportConfigDataset"] = None, @@ -529,36 +535,37 @@ async def create_or_update_by_scope( ExternalSubscription scope. :type view_properties_scope: str :param chart: Chart type of the main view in Cost Analysis. Required. - :type chart: str or ~azure.mgmt.costmanagement.models.ChartType + :type chart: str or ~cost_management_client.models.ChartType :param accumulated: Show costs accumulated over time. - :type accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType + :type accumulated: str or ~cost_management_client.models.AccumulatedType :param metric: Metric to use when displaying costs. - :type metric: str or ~azure.mgmt.costmanagement.models.MetricType + :type metric: str or ~cost_management_client.models.MetricType :param kpis: List of KPIs to show in Cost Analysis UI. - :type kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] + :type kpis: list[~cost_management_client.models.KpiProperties] :param pivots: Configuration of 3 sub-views in the Cost Analysis UI. - :type pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] + :type pivots: list[~cost_management_client.models.PivotProperties] :param timeframe: The time frame for pulling data for the report. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType + :type timeframe: str or ~cost_management_client.models.ReportTimeframeType :param time_period: Has time period for pulling data for the report. - :type time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod + :type time_period: ~cost_management_client.models.ReportConfigTimePeriod :param dataset: Has definition for data in this report config. - :type dataset: ~azure.mgmt.costmanagement.models.ReportConfigDataset + :type dataset: ~cost_management_client.models.ReportConfigDataset :keyword callable cls: A custom type or function that will be passed the direct response - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View or ~azure.mgmt.costmanagement.models.View + :return: View, or the result of cls(response) + :rtype: ~cost_management_client.models.View :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.View"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.View(e_tag=e_tag, display_name=display_name, scope=view_properties_scope, chart=chart, accumulated=accumulated, metric=metric, kpis=kpis, pivots=pivots, timeframe=timeframe, time_period=time_period, dataset=dataset) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_or_update_by_scope.metadata['url'] + url = self.create_or_update_by_scope.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'viewName': self._serialize.url("view_name", view_name, 'str'), @@ -596,10 +603,10 @@ async def create_or_update_by_scope( deserialized = self._deserialize('View', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} + create_or_update_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore async def delete_by_scope( self, @@ -630,16 +637,17 @@ async def delete_by_scope( :param view_name: View name. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.delete_by_scope.metadata['url'] + url = self.delete_by_scope.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'viewName': self._serialize.url("view_name", view_name, 'str'), @@ -664,6 +672,6 @@ async def delete_by_scope( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} + delete_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py index 410223929c1..fa8491b5267 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py @@ -64,16 +64,16 @@ class Alert(Resource): :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param definition: defines the type of alert. - :type definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition + :type definition: ~cost_management_client.models.AlertPropertiesDefinition :param description: Alert description. :type description: str :param source: Source of alert. Possible values include: "Preset", "User". - :type source: str or ~azure.mgmt.costmanagement.models.AlertSource + :type source: str or ~cost_management_client.models.AlertSource :param cost_entity_id: related budget. :type cost_entity_id: str :param status: alert status. Possible values include: "None", "Active", "Overridden", "Resolved", "Dismissed". - :type status: str or ~azure.mgmt.costmanagement.models.AlertStatus + :type status: str or ~cost_management_client.models.AlertStatus :param creation_time: dateTime in which alert was created. :type creation_time: str :param close_time: dateTime in which alert was closed. @@ -86,7 +86,7 @@ class Alert(Resource): :type status_modification_time: str :param time_grain_type: Type of timegrain cadence. Possible values include: "None", "Monthly", "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual". - :type time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType + :type time_grain_type: str or ~cost_management_client.models.AlertTimeGrainType :param period_start_date: datetime of periodStartDate. :type period_start_date: str :param triggered_by: notificationId that triggered this alert. @@ -103,7 +103,7 @@ class Alert(Resource): :type threshold: float :param operator: operator used to compare currentSpend with amount. Possible values include: "None", "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", "LessThan", "LessThanOrEqualTo". - :type operator: str or ~azure.mgmt.costmanagement.models.AlertOperator + :type operator: str or ~cost_management_client.models.AlertOperator :param amount: budget threshold amount. :type amount: float :param unit: unit of currency being used. @@ -198,16 +198,16 @@ class AlertPropertiesDefinition(msrest.serialization.Model): :param type: type of alert. Possible values include: "Budget", "Invoice", "Credit", "Quota", "General", "xCloud", "BudgetForecast". - :type type: str or ~azure.mgmt.costmanagement.models.AlertType + :type type: str or ~cost_management_client.models.AlertType :param category: Alert category. Possible values include: "Cost", "Usage", "Billing", "System". - :type category: str or ~azure.mgmt.costmanagement.models.AlertCategory + :type category: str or ~cost_management_client.models.AlertCategory :param criteria: Criteria that triggered alert. Possible values include: "CostThresholdExceeded", "UsageThresholdExceeded", "CreditThresholdApproaching", "CreditThresholdReached", "QuotaThresholdApproaching", "QuotaThresholdReached", "MultiCurrency", "ForecastCostThresholdExceeded", "ForecastUsageThresholdExceeded", "InvoiceDueDateApproaching", "InvoiceDueDateReached", "CrossCloudNewDataAvailable", "CrossCloudCollectionError", "GeneralThresholdError". - :type criteria: str or ~azure.mgmt.costmanagement.models.AlertCriteria + :type criteria: str or ~cost_management_client.models.AlertCriteria """ _attribute_map = { @@ -232,7 +232,7 @@ class AlertsResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of alerts. - :vartype value: list[~azure.mgmt.costmanagement.models.Alert] + :vartype value: list[~cost_management_client.models.Alert] :ivar next_link: URL to get the next set of alerts results if there are any. :vartype next_link: str """ @@ -267,29 +267,29 @@ class CommonExportProperties(msrest.serialization.Model): :vartype format: str :param type: Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :ivar granularity: The granularity of rows in the query. Default value: "Daily". :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :param destination: Required. Has destination for the export being delivered. - :type destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + :type destination: ~cost_management_client.models.ExportDeliveryDestination """ _validation = { @@ -418,7 +418,7 @@ class DimensionsListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of dimensions. - :vartype value: list[~azure.mgmt.costmanagement.models.Dimension] + :vartype value: list[~cost_management_client.models.Dimension] """ _validation = { @@ -441,16 +441,16 @@ class DismissAlertPayload(msrest.serialization.Model): """The request payload to update an alert. :param definition: defines the type of alert. - :type definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition + :type definition: ~cost_management_client.models.AlertPropertiesDefinition :param description: Alert description. :type description: str :param source: Source of alert. Possible values include: "Preset", "User". - :type source: str or ~azure.mgmt.costmanagement.models.AlertSource + :type source: str or ~cost_management_client.models.AlertSource :param cost_entity_id: related budget. :type cost_entity_id: str :param status: alert status. Possible values include: "None", "Active", "Overridden", "Resolved", "Dismissed". - :type status: str or ~azure.mgmt.costmanagement.models.AlertStatus + :type status: str or ~cost_management_client.models.AlertStatus :param creation_time: dateTime in which alert was created. :type creation_time: str :param close_time: dateTime in which alert was closed. @@ -463,7 +463,7 @@ class DismissAlertPayload(msrest.serialization.Model): :type status_modification_time: str :param time_grain_type: Type of timegrain cadence. Possible values include: "None", "Monthly", "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual". - :type time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType + :type time_grain_type: str or ~cost_management_client.models.AlertTimeGrainType :param period_start_date: datetime of periodStartDate. :type period_start_date: str :param triggered_by: notificationId that triggered this alert. @@ -480,7 +480,7 @@ class DismissAlertPayload(msrest.serialization.Model): :type threshold: float :param operator: operator used to compare currentSpend with amount. Possible values include: "None", "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", "LessThan", "LessThanOrEqualTo". - :type operator: str or ~azure.mgmt.costmanagement.models.AlertOperator + :type operator: str or ~cost_management_client.models.AlertOperator :param amount: budget threshold amount. :type amount: float :param unit: unit of currency being used. @@ -602,7 +602,7 @@ class ErrorResponse(msrest.serialization.Model): 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header. :param error: The details of the error. - :type error: ~azure.mgmt.costmanagement.models.ErrorDetails + :type error: ~cost_management_client.models.ErrorDetails """ _attribute_map = { @@ -634,38 +634,38 @@ class Export(Resource): :vartype format: str :param type_properties_definition_type: The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type_properties_definition_type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type_properties_definition_type: str or ~cost_management_client.models.ExportType :param timeframe: The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :ivar granularity: The granularity of rows in the query. Default value: "Daily". :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :param destination: Has destination for the export being delivered. - :type destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + :type destination: ~cost_management_client.models.ExportDeliveryDestination :param status: The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused. Possible values include: "Active", "Inactive". - :type status: str or ~azure.mgmt.costmanagement.models.StatusType + :type status: str or ~cost_management_client.models.StatusType :param recurrence: The schedule recurrence. Possible values include: "Daily", "Weekly", "Monthly", "Annually". - :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :type recurrence: str or ~cost_management_client.models.RecurrenceType :param recurrence_period: Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. - :type recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + :type recurrence_period: ~cost_management_client.models.ExportRecurrencePeriod """ _validation = { @@ -769,10 +769,10 @@ class ExportExecution(Resource): :vartype tags: dict[str, str] :param execution_type: The type of the export execution. Possible values include: "OnDemand", "Scheduled". - :type execution_type: str or ~azure.mgmt.costmanagement.models.ExecutionType + :type execution_type: str or ~cost_management_client.models.ExecutionType :param status: The status of the export execution. Possible values include: "Queued", "InProgress", "Completed", "Failed", "Timeout", "NewDataNotAvailable", "DataNotAvailable". - :type status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus + :type status: str or ~cost_management_client.models.ExecutionStatus :param submitted_by: The identifier for the entity that executed the export. For OnDemand executions, it is the email id. For Scheduled executions, it is the constant value - System. :type submitted_by: str @@ -785,7 +785,7 @@ class ExportExecution(Resource): :param file_name: The name of the file export got written to. :type file_name: str :param run_settings: The common properties of the export. - :type run_settings: ~azure.mgmt.costmanagement.models.CommonExportProperties + :type run_settings: ~cost_management_client.models.CommonExportProperties """ _validation = { @@ -831,7 +831,7 @@ class ExportExecutionListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of export executions. - :vartype value: list[~azure.mgmt.costmanagement.models.ExportExecution] + :vartype value: list[~cost_management_client.models.ExportExecution] """ _validation = { @@ -856,7 +856,7 @@ class ExportListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of exports. - :vartype value: list[~azure.mgmt.costmanagement.models.Export] + :vartype value: list[~cost_management_client.models.Export] """ _validation = { @@ -886,38 +886,38 @@ class ExportProperties(CommonExportProperties): :vartype format: str :param type: Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :ivar granularity: The granularity of rows in the query. Default value: "Daily". :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :param destination: Required. Has destination for the export being delivered. - :type destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + :type destination: ~cost_management_client.models.ExportDeliveryDestination :param status: The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused. Possible values include: "Active", "Inactive". - :type status: str or ~azure.mgmt.costmanagement.models.StatusType + :type status: str or ~cost_management_client.models.StatusType :param recurrence: The schedule recurrence. Possible values include: "Daily", "Weekly", "Monthly", "Annually". - :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :type recurrence: str or ~cost_management_client.models.RecurrenceType :param recurrence_period: Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. - :type recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + :type recurrence_period: ~cost_management_client.models.ExportRecurrencePeriod """ _validation = { @@ -996,13 +996,13 @@ class ForecastDefinition(msrest.serialization.Model): :param type: Required. The type of the forecast. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type: str or ~azure.mgmt.costmanagement.models.ForecastType + :type type: str or ~cost_management_client.models.ForecastType :param timeframe: Required. The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType + :type timeframe: str or ~cost_management_client.models.ForecastTimeframeType :param time_period: Has time period for pulling data for the forecast. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param include_actual_cost: a boolean determining if actualCost will be included. :type include_actual_cost: bool :param include_fresh_partial_cost: a boolean determining if FreshPartialCost will be included. @@ -1011,16 +1011,16 @@ class ForecastDefinition(msrest.serialization.Model): :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter """ _validation = { @@ -1065,7 +1065,7 @@ class KpiProperties(msrest.serialization.Model): """Each KPI must contain a 'type' and 'enabled' key. :param type: KPI type (Forecast, Budget). Possible values include: "Forecast", "Budget". - :type type: str or ~azure.mgmt.costmanagement.models.KpiType + :type type: str or ~cost_management_client.models.KpiType :param id: ID of resource related to metric (budget). :type id: str :param enabled: show the KPI in the UI?. @@ -1096,7 +1096,7 @@ class Operation(msrest.serialization.Model): :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str :param display: The object that represents the operation. - :type display: ~azure.mgmt.costmanagement.models.OperationDisplay + :type display: ~cost_management_client.models.OperationDisplay """ _validation = { @@ -1159,7 +1159,7 @@ class OperationListResult(msrest.serialization.Model): :ivar value: List of cost management operations supported by the Microsoft.CostManagement resource provider. - :vartype value: list[~azure.mgmt.costmanagement.models.Operation] + :vartype value: list[~cost_management_client.models.Operation] :ivar next_link: URL to get the next set of operation list results if there are any. :vartype next_link: str """ @@ -1187,7 +1187,7 @@ class PivotProperties(msrest.serialization.Model): """Each pivot must contain a 'type' and 'name'. :param type: Data type to show in view. Possible values include: "Dimension", "TagKey". - :type type: str or ~azure.mgmt.costmanagement.models.PivotType + :type type: str or ~cost_management_client.models.PivotType :param name: Data field to show in view. :type name: str """ @@ -1311,7 +1311,7 @@ class QueryComparisonExpression(msrest.serialization.Model): :type name: str :param operator: Required. The operator to use for comparison. Possible values include: "In", "Contains". - :type operator: str or ~azure.mgmt.costmanagement.models.OperatorType + :type operator: str or ~cost_management_client.models.OperatorType :param values: Required. Array of values to use for comparison. :type values: list[str] """ @@ -1367,27 +1367,27 @@ class QueryDefinition(msrest.serialization.Model): :param type: Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :ivar granularity: The granularity of rows in the query. Default value: "Daily". :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter """ _validation = { @@ -1428,15 +1428,15 @@ class QueryFilter(msrest.serialization.Model): """The filter expression to be used in the export. :param and_property: The logical "AND" expression. Must have at least 2 items. - :type and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :type and_property: list[~cost_management_client.models.QueryFilter] :param or_property: The logical "OR" expression. Must have at least 2 items. - :type or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :type or_property: list[~cost_management_client.models.QueryFilter] :param not_property: The logical "NOT" expression. - :type not_property: ~azure.mgmt.costmanagement.models.QueryFilter + :type not_property: ~cost_management_client.models.QueryFilter :param dimension: Has comparison expression for a dimension. - :type dimension: ~azure.mgmt.costmanagement.models.QueryComparisonExpression + :type dimension: ~cost_management_client.models.QueryComparisonExpression :param tag: Has comparison expression for a tag. - :type tag: ~azure.mgmt.costmanagement.models.QueryComparisonExpression + :type tag: ~cost_management_client.models.QueryComparisonExpression """ _validation = { @@ -1471,7 +1471,7 @@ class QueryGrouping(msrest.serialization.Model): :param type: Required. Has type of the column to group. Possible values include: "Tag", "Dimension". - :type type: str or ~azure.mgmt.costmanagement.models.QueryColumnType + :type type: str or ~cost_management_client.models.QueryColumnType :param name: Required. The name of the column to group. :type name: str """ @@ -1511,7 +1511,7 @@ class QueryResult(Resource): :param next_link: The link (url) to the next page of results. :type next_link: str :param columns: Array of columns. - :type columns: list[~azure.mgmt.costmanagement.models.QueryColumn] + :type columns: list[~cost_management_client.models.QueryColumn] :param rows: Array of rows. :type rows: list[list[object]] """ @@ -1615,7 +1615,7 @@ class ReportConfigComparisonExpression(msrest.serialization.Model): :type name: str :param operator: Required. The operator to use for comparison. Possible values include: "In", "Contains". - :type operator: str or ~azure.mgmt.costmanagement.models.OperatorType + :type operator: str or ~cost_management_client.models.OperatorType :param values: Required. Array of values to use for comparison. :type values: list[str] """ @@ -1647,21 +1647,21 @@ class ReportConfigDataset(msrest.serialization.Model): :param granularity: The granularity of rows in the report. Possible values include: "Daily", "Monthly". - :type granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType + :type granularity: str or ~cost_management_client.models.ReportGranularityType :param configuration: Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration + :type configuration: ~cost_management_client.models.ReportConfigDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] + :type aggregation: dict[str, ~cost_management_client.models.ReportConfigAggregation] :param grouping: Array of group by expression to use in the report. Report can have up to 2 group by clauses. - :type grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] + :type grouping: list[~cost_management_client.models.ReportConfigGrouping] :param sorting: Array of order by expression to use in the report. - :type sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] + :type sorting: list[~cost_management_client.models.ReportConfigSorting] :param filter: Has filter expression to use in the report. - :type filter: ~azure.mgmt.costmanagement.models.ReportConfigFilter + :type filter: ~cost_management_client.models.ReportConfigFilter """ _validation = { @@ -1714,15 +1714,15 @@ class ReportConfigFilter(msrest.serialization.Model): """The filter expression to be used in the report. :param and_property: The logical "AND" expression. Must have at least 2 items. - :type and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] + :type and_property: list[~cost_management_client.models.ReportConfigFilter] :param or_property: The logical "OR" expression. Must have at least 2 items. - :type or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] + :type or_property: list[~cost_management_client.models.ReportConfigFilter] :param not_property: The logical "NOT" expression. - :type not_property: ~azure.mgmt.costmanagement.models.ReportConfigFilter + :type not_property: ~cost_management_client.models.ReportConfigFilter :param dimension: Has comparison expression for a dimension. - :type dimension: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression + :type dimension: ~cost_management_client.models.ReportConfigComparisonExpression :param tag: Has comparison expression for a tag. - :type tag: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression + :type tag: ~cost_management_client.models.ReportConfigComparisonExpression """ _validation = { @@ -1757,7 +1757,7 @@ class ReportConfigGrouping(msrest.serialization.Model): :param type: Required. Has type of the column to group. Possible values include: "Tag", "Dimension". - :type type: str or ~azure.mgmt.costmanagement.models.ReportConfigColumnType + :type type: str or ~cost_management_client.models.ReportConfigColumnType :param name: Required. The name of the column to group. This version supports subscription lowest possible grain. :type name: str @@ -1788,7 +1788,7 @@ class ReportConfigSorting(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param direction: Direction of sort. Possible values include: "Ascending", "Descending". - :type direction: str or ~azure.mgmt.costmanagement.models.ReportConfigSortingDirection + :type direction: str or ~cost_management_client.models.ReportConfigSortingDirection :param name: Required. The name of the column to sort. :type name: str """ @@ -1881,16 +1881,16 @@ class View(ProxyResource): :vartype modified_on: ~datetime.datetime :param chart: Chart type of the main view in Cost Analysis. Required. Possible values include: "Area", "Line", "StackedColumn", "GroupedColumn", "Table". - :type chart: str or ~azure.mgmt.costmanagement.models.ChartType + :type chart: str or ~cost_management_client.models.ChartType :param accumulated: Show costs accumulated over time. Possible values include: "true", "false". - :type accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType + :type accumulated: str or ~cost_management_client.models.AccumulatedType :param metric: Metric to use when displaying costs. Possible values include: "ActualCost", "AmortizedCost", "AHUB". - :type metric: str or ~azure.mgmt.costmanagement.models.MetricType + :type metric: str or ~cost_management_client.models.MetricType :param kpis: List of KPIs to show in Cost Analysis UI. - :type kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] + :type kpis: list[~cost_management_client.models.KpiProperties] :param pivots: Configuration of 3 sub-views in the Cost Analysis UI. - :type pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] + :type pivots: list[~cost_management_client.models.PivotProperties] :ivar type_properties_query_type: The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates. Default value: @@ -1899,11 +1899,11 @@ class View(ProxyResource): :param timeframe: The time frame for pulling data for the report. If custom, then a specific time period must be provided. Possible values include: "WeekToDate", "MonthToDate", "YearToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType + :type timeframe: str or ~cost_management_client.models.ReportTimeframeType :param time_period: Has time period for pulling data for the report. - :type time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod + :type time_period: ~cost_management_client.models.ReportConfigTimePeriod :param dataset: Has definition for data in this report config. - :type dataset: ~azure.mgmt.costmanagement.models.ReportConfigDataset + :type dataset: ~cost_management_client.models.ReportConfigDataset """ _validation = { @@ -1962,7 +1962,7 @@ class ViewListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of views. - :vartype value: list[~azure.mgmt.costmanagement.models.View] + :vartype value: list[~cost_management_client.models.View] :ivar next_link: The link (url) to the next page of results. :vartype next_link: str """ diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models_py3.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models_py3.py index 432af12953b..8b45b1a31c8 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models_py3.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models_py3.py @@ -12,6 +12,8 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._cost_management_client_enums import * + class Resource(msrest.serialization.Model): """The Resource model definition. @@ -67,16 +69,16 @@ class Alert(Resource): :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param definition: defines the type of alert. - :type definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition + :type definition: ~cost_management_client.models.AlertPropertiesDefinition :param description: Alert description. :type description: str :param source: Source of alert. Possible values include: "Preset", "User". - :type source: str or ~azure.mgmt.costmanagement.models.AlertSource + :type source: str or ~cost_management_client.models.AlertSource :param cost_entity_id: related budget. :type cost_entity_id: str :param status: alert status. Possible values include: "None", "Active", "Overridden", "Resolved", "Dismissed". - :type status: str or ~azure.mgmt.costmanagement.models.AlertStatus + :type status: str or ~cost_management_client.models.AlertStatus :param creation_time: dateTime in which alert was created. :type creation_time: str :param close_time: dateTime in which alert was closed. @@ -89,7 +91,7 @@ class Alert(Resource): :type status_modification_time: str :param time_grain_type: Type of timegrain cadence. Possible values include: "None", "Monthly", "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual". - :type time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType + :type time_grain_type: str or ~cost_management_client.models.AlertTimeGrainType :param period_start_date: datetime of periodStartDate. :type period_start_date: str :param triggered_by: notificationId that triggered this alert. @@ -106,7 +108,7 @@ class Alert(Resource): :type threshold: float :param operator: operator used to compare currentSpend with amount. Possible values include: "None", "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", "LessThan", "LessThanOrEqualTo". - :type operator: str or ~azure.mgmt.costmanagement.models.AlertOperator + :type operator: str or ~cost_management_client.models.AlertOperator :param amount: budget threshold amount. :type amount: float :param unit: unit of currency being used. @@ -228,16 +230,16 @@ class AlertPropertiesDefinition(msrest.serialization.Model): :param type: type of alert. Possible values include: "Budget", "Invoice", "Credit", "Quota", "General", "xCloud", "BudgetForecast". - :type type: str or ~azure.mgmt.costmanagement.models.AlertType + :type type: str or ~cost_management_client.models.AlertType :param category: Alert category. Possible values include: "Cost", "Usage", "Billing", "System". - :type category: str or ~azure.mgmt.costmanagement.models.AlertCategory + :type category: str or ~cost_management_client.models.AlertCategory :param criteria: Criteria that triggered alert. Possible values include: "CostThresholdExceeded", "UsageThresholdExceeded", "CreditThresholdApproaching", "CreditThresholdReached", "QuotaThresholdApproaching", "QuotaThresholdReached", "MultiCurrency", "ForecastCostThresholdExceeded", "ForecastUsageThresholdExceeded", "InvoiceDueDateApproaching", "InvoiceDueDateReached", "CrossCloudNewDataAvailable", "CrossCloudCollectionError", "GeneralThresholdError". - :type criteria: str or ~azure.mgmt.costmanagement.models.AlertCriteria + :type criteria: str or ~cost_management_client.models.AlertCriteria """ _attribute_map = { @@ -266,7 +268,7 @@ class AlertsResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of alerts. - :vartype value: list[~azure.mgmt.costmanagement.models.Alert] + :vartype value: list[~cost_management_client.models.Alert] :ivar next_link: URL to get the next set of alerts results if there are any. :vartype next_link: str """ @@ -301,29 +303,29 @@ class CommonExportProperties(msrest.serialization.Model): :vartype format: str :param type: Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :ivar granularity: The granularity of rows in the query. Default value: "Daily". :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :param destination: Required. Has destination for the export being delivered. - :type destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + :type destination: ~cost_management_client.models.ExportDeliveryDestination """ _validation = { @@ -463,7 +465,7 @@ class DimensionsListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of dimensions. - :vartype value: list[~azure.mgmt.costmanagement.models.Dimension] + :vartype value: list[~cost_management_client.models.Dimension] """ _validation = { @@ -486,16 +488,16 @@ class DismissAlertPayload(msrest.serialization.Model): """The request payload to update an alert. :param definition: defines the type of alert. - :type definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition + :type definition: ~cost_management_client.models.AlertPropertiesDefinition :param description: Alert description. :type description: str :param source: Source of alert. Possible values include: "Preset", "User". - :type source: str or ~azure.mgmt.costmanagement.models.AlertSource + :type source: str or ~cost_management_client.models.AlertSource :param cost_entity_id: related budget. :type cost_entity_id: str :param status: alert status. Possible values include: "None", "Active", "Overridden", "Resolved", "Dismissed". - :type status: str or ~azure.mgmt.costmanagement.models.AlertStatus + :type status: str or ~cost_management_client.models.AlertStatus :param creation_time: dateTime in which alert was created. :type creation_time: str :param close_time: dateTime in which alert was closed. @@ -508,7 +510,7 @@ class DismissAlertPayload(msrest.serialization.Model): :type status_modification_time: str :param time_grain_type: Type of timegrain cadence. Possible values include: "None", "Monthly", "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual". - :type time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType + :type time_grain_type: str or ~cost_management_client.models.AlertTimeGrainType :param period_start_date: datetime of periodStartDate. :type period_start_date: str :param triggered_by: notificationId that triggered this alert. @@ -525,7 +527,7 @@ class DismissAlertPayload(msrest.serialization.Model): :type threshold: float :param operator: operator used to compare currentSpend with amount. Possible values include: "None", "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", "LessThan", "LessThanOrEqualTo". - :type operator: str or ~azure.mgmt.costmanagement.models.AlertOperator + :type operator: str or ~cost_management_client.models.AlertOperator :param amount: budget threshold amount. :type amount: float :param unit: unit of currency being used. @@ -674,7 +676,7 @@ class ErrorResponse(msrest.serialization.Model): 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header. :param error: The details of the error. - :type error: ~azure.mgmt.costmanagement.models.ErrorDetails + :type error: ~cost_management_client.models.ErrorDetails """ _attribute_map = { @@ -708,38 +710,38 @@ class Export(Resource): :vartype format: str :param type_properties_definition_type: The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type_properties_definition_type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type_properties_definition_type: str or ~cost_management_client.models.ExportType :param timeframe: The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :ivar granularity: The granularity of rows in the query. Default value: "Daily". :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :param destination: Has destination for the export being delivered. - :type destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + :type destination: ~cost_management_client.models.ExportDeliveryDestination :param status: The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused. Possible values include: "Active", "Inactive". - :type status: str or ~azure.mgmt.costmanagement.models.StatusType + :type status: str or ~cost_management_client.models.StatusType :param recurrence: The schedule recurrence. Possible values include: "Daily", "Weekly", "Monthly", "Annually". - :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :type recurrence: str or ~cost_management_client.models.RecurrenceType :param recurrence_period: Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. - :type recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + :type recurrence_period: ~cost_management_client.models.ExportRecurrencePeriod """ _validation = { @@ -859,10 +861,10 @@ class ExportExecution(Resource): :vartype tags: dict[str, str] :param execution_type: The type of the export execution. Possible values include: "OnDemand", "Scheduled". - :type execution_type: str or ~azure.mgmt.costmanagement.models.ExecutionType + :type execution_type: str or ~cost_management_client.models.ExecutionType :param status: The status of the export execution. Possible values include: "Queued", "InProgress", "Completed", "Failed", "Timeout", "NewDataNotAvailable", "DataNotAvailable". - :type status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus + :type status: str or ~cost_management_client.models.ExecutionStatus :param submitted_by: The identifier for the entity that executed the export. For OnDemand executions, it is the email id. For Scheduled executions, it is the constant value - System. :type submitted_by: str @@ -875,7 +877,7 @@ class ExportExecution(Resource): :param file_name: The name of the file export got written to. :type file_name: str :param run_settings: The common properties of the export. - :type run_settings: ~azure.mgmt.costmanagement.models.CommonExportProperties + :type run_settings: ~cost_management_client.models.CommonExportProperties """ _validation = { @@ -930,7 +932,7 @@ class ExportExecutionListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of export executions. - :vartype value: list[~azure.mgmt.costmanagement.models.ExportExecution] + :vartype value: list[~cost_management_client.models.ExportExecution] """ _validation = { @@ -955,7 +957,7 @@ class ExportListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of exports. - :vartype value: list[~azure.mgmt.costmanagement.models.Export] + :vartype value: list[~cost_management_client.models.Export] """ _validation = { @@ -985,38 +987,38 @@ class ExportProperties(CommonExportProperties): :vartype format: str :param type: Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :ivar granularity: The granularity of rows in the query. Default value: "Daily". :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :param destination: Required. Has destination for the export being delivered. - :type destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + :type destination: ~cost_management_client.models.ExportDeliveryDestination :param status: The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused. Possible values include: "Active", "Inactive". - :type status: str or ~azure.mgmt.costmanagement.models.StatusType + :type status: str or ~cost_management_client.models.StatusType :param recurrence: The schedule recurrence. Possible values include: "Daily", "Weekly", "Monthly", "Annually". - :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :type recurrence: str or ~cost_management_client.models.RecurrenceType :param recurrence_period: Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. - :type recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + :type recurrence_period: ~cost_management_client.models.ExportRecurrencePeriod """ _validation = { @@ -1110,13 +1112,13 @@ class ForecastDefinition(msrest.serialization.Model): :param type: Required. The type of the forecast. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type: str or ~azure.mgmt.costmanagement.models.ForecastType + :type type: str or ~cost_management_client.models.ForecastType :param timeframe: Required. The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType + :type timeframe: str or ~cost_management_client.models.ForecastTimeframeType :param time_period: Has time period for pulling data for the forecast. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param include_actual_cost: a boolean determining if actualCost will be included. :type include_actual_cost: bool :param include_fresh_partial_cost: a boolean determining if FreshPartialCost will be included. @@ -1125,16 +1127,16 @@ class ForecastDefinition(msrest.serialization.Model): :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter """ _validation = { @@ -1189,7 +1191,7 @@ class KpiProperties(msrest.serialization.Model): """Each KPI must contain a 'type' and 'enabled' key. :param type: KPI type (Forecast, Budget). Possible values include: "Forecast", "Budget". - :type type: str or ~azure.mgmt.costmanagement.models.KpiType + :type type: str or ~cost_management_client.models.KpiType :param id: ID of resource related to metric (budget). :type id: str :param enabled: show the KPI in the UI?. @@ -1224,7 +1226,7 @@ class Operation(msrest.serialization.Model): :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str :param display: The object that represents the operation. - :type display: ~azure.mgmt.costmanagement.models.OperationDisplay + :type display: ~cost_management_client.models.OperationDisplay """ _validation = { @@ -1289,7 +1291,7 @@ class OperationListResult(msrest.serialization.Model): :ivar value: List of cost management operations supported by the Microsoft.CostManagement resource provider. - :vartype value: list[~azure.mgmt.costmanagement.models.Operation] + :vartype value: list[~cost_management_client.models.Operation] :ivar next_link: URL to get the next set of operation list results if there are any. :vartype next_link: str """ @@ -1317,7 +1319,7 @@ class PivotProperties(msrest.serialization.Model): """Each pivot must contain a 'type' and 'name'. :param type: Data type to show in view. Possible values include: "Dimension", "TagKey". - :type type: str or ~azure.mgmt.costmanagement.models.PivotType + :type type: str or ~cost_management_client.models.PivotType :param name: Data field to show in view. :type name: str """ @@ -1451,7 +1453,7 @@ class QueryComparisonExpression(msrest.serialization.Model): :type name: str :param operator: Required. The operator to use for comparison. Possible values include: "In", "Contains". - :type operator: str or ~azure.mgmt.costmanagement.models.OperatorType + :type operator: str or ~cost_management_client.models.OperatorType :param values: Required. Array of values to use for comparison. :type values: list[str] """ @@ -1513,27 +1515,27 @@ class QueryDefinition(msrest.serialization.Model): :param type: Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :ivar granularity: The granularity of rows in the query. Default value: "Daily". :vartype granularity: str :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter """ _validation = { @@ -1582,15 +1584,15 @@ class QueryFilter(msrest.serialization.Model): """The filter expression to be used in the export. :param and_property: The logical "AND" expression. Must have at least 2 items. - :type and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :type and_property: list[~cost_management_client.models.QueryFilter] :param or_property: The logical "OR" expression. Must have at least 2 items. - :type or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :type or_property: list[~cost_management_client.models.QueryFilter] :param not_property: The logical "NOT" expression. - :type not_property: ~azure.mgmt.costmanagement.models.QueryFilter + :type not_property: ~cost_management_client.models.QueryFilter :param dimension: Has comparison expression for a dimension. - :type dimension: ~azure.mgmt.costmanagement.models.QueryComparisonExpression + :type dimension: ~cost_management_client.models.QueryComparisonExpression :param tag: Has comparison expression for a tag. - :type tag: ~azure.mgmt.costmanagement.models.QueryComparisonExpression + :type tag: ~cost_management_client.models.QueryComparisonExpression """ _validation = { @@ -1631,7 +1633,7 @@ class QueryGrouping(msrest.serialization.Model): :param type: Required. Has type of the column to group. Possible values include: "Tag", "Dimension". - :type type: str or ~azure.mgmt.costmanagement.models.QueryColumnType + :type type: str or ~cost_management_client.models.QueryColumnType :param name: Required. The name of the column to group. :type name: str """ @@ -1674,7 +1676,7 @@ class QueryResult(Resource): :param next_link: The link (url) to the next page of results. :type next_link: str :param columns: Array of columns. - :type columns: list[~azure.mgmt.costmanagement.models.QueryColumn] + :type columns: list[~cost_management_client.models.QueryColumn] :param rows: Array of rows. :type rows: list[list[object]] """ @@ -1787,7 +1789,7 @@ class ReportConfigComparisonExpression(msrest.serialization.Model): :type name: str :param operator: Required. The operator to use for comparison. Possible values include: "In", "Contains". - :type operator: str or ~azure.mgmt.costmanagement.models.OperatorType + :type operator: str or ~cost_management_client.models.OperatorType :param values: Required. Array of values to use for comparison. :type values: list[str] """ @@ -1823,21 +1825,21 @@ class ReportConfigDataset(msrest.serialization.Model): :param granularity: The granularity of rows in the report. Possible values include: "Daily", "Monthly". - :type granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType + :type granularity: str or ~cost_management_client.models.ReportGranularityType :param configuration: Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration + :type configuration: ~cost_management_client.models.ReportConfigDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] + :type aggregation: dict[str, ~cost_management_client.models.ReportConfigAggregation] :param grouping: Array of group by expression to use in the report. Report can have up to 2 group by clauses. - :type grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] + :type grouping: list[~cost_management_client.models.ReportConfigGrouping] :param sorting: Array of order by expression to use in the report. - :type sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] + :type sorting: list[~cost_management_client.models.ReportConfigSorting] :param filter: Has filter expression to use in the report. - :type filter: ~azure.mgmt.costmanagement.models.ReportConfigFilter + :type filter: ~cost_management_client.models.ReportConfigFilter """ _validation = { @@ -1899,15 +1901,15 @@ class ReportConfigFilter(msrest.serialization.Model): """The filter expression to be used in the report. :param and_property: The logical "AND" expression. Must have at least 2 items. - :type and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] + :type and_property: list[~cost_management_client.models.ReportConfigFilter] :param or_property: The logical "OR" expression. Must have at least 2 items. - :type or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] + :type or_property: list[~cost_management_client.models.ReportConfigFilter] :param not_property: The logical "NOT" expression. - :type not_property: ~azure.mgmt.costmanagement.models.ReportConfigFilter + :type not_property: ~cost_management_client.models.ReportConfigFilter :param dimension: Has comparison expression for a dimension. - :type dimension: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression + :type dimension: ~cost_management_client.models.ReportConfigComparisonExpression :param tag: Has comparison expression for a tag. - :type tag: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression + :type tag: ~cost_management_client.models.ReportConfigComparisonExpression """ _validation = { @@ -1948,7 +1950,7 @@ class ReportConfigGrouping(msrest.serialization.Model): :param type: Required. Has type of the column to group. Possible values include: "Tag", "Dimension". - :type type: str or ~azure.mgmt.costmanagement.models.ReportConfigColumnType + :type type: str or ~cost_management_client.models.ReportConfigColumnType :param name: Required. The name of the column to group. This version supports subscription lowest possible grain. :type name: str @@ -1982,7 +1984,7 @@ class ReportConfigSorting(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param direction: Direction of sort. Possible values include: "Ascending", "Descending". - :type direction: str or ~azure.mgmt.costmanagement.models.ReportConfigSortingDirection + :type direction: str or ~cost_management_client.models.ReportConfigSortingDirection :param name: Required. The name of the column to sort. :type name: str """ @@ -2081,16 +2083,16 @@ class View(ProxyResource): :vartype modified_on: ~datetime.datetime :param chart: Chart type of the main view in Cost Analysis. Required. Possible values include: "Area", "Line", "StackedColumn", "GroupedColumn", "Table". - :type chart: str or ~azure.mgmt.costmanagement.models.ChartType + :type chart: str or ~cost_management_client.models.ChartType :param accumulated: Show costs accumulated over time. Possible values include: "true", "false". - :type accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType + :type accumulated: str or ~cost_management_client.models.AccumulatedType :param metric: Metric to use when displaying costs. Possible values include: "ActualCost", "AmortizedCost", "AHUB". - :type metric: str or ~azure.mgmt.costmanagement.models.MetricType + :type metric: str or ~cost_management_client.models.MetricType :param kpis: List of KPIs to show in Cost Analysis UI. - :type kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] + :type kpis: list[~cost_management_client.models.KpiProperties] :param pivots: Configuration of 3 sub-views in the Cost Analysis UI. - :type pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] + :type pivots: list[~cost_management_client.models.PivotProperties] :ivar type_properties_query_type: The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates. Default value: @@ -2099,11 +2101,11 @@ class View(ProxyResource): :param timeframe: The time frame for pulling data for the report. If custom, then a specific time period must be provided. Possible values include: "WeekToDate", "MonthToDate", "YearToDate", "Custom". - :type timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType + :type timeframe: str or ~cost_management_client.models.ReportTimeframeType :param time_period: Has time period for pulling data for the report. - :type time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod + :type time_period: ~cost_management_client.models.ReportConfigTimePeriod :param dataset: Has definition for data in this report config. - :type dataset: ~azure.mgmt.costmanagement.models.ReportConfigDataset + :type dataset: ~cost_management_client.models.ReportConfigDataset """ _validation = { @@ -2174,7 +2176,7 @@ class ViewListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of views. - :vartype value: list[~azure.mgmt.costmanagement.models.View] + :vartype value: list[~cost_management_client.models.View] :ivar next_link: The link (url) to the next page of results. :vartype next_link: str """ diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_alert_operations.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_alert_operations.py index 83936db63c6..ba50357bc8b 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_alert_operations.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_alert_operations.py @@ -29,7 +29,7 @@ class AlertOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -70,16 +70,17 @@ def list( specific for partners. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: AlertsResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.AlertsResult + :return: AlertsResult, or the result of cls(response) + :rtype: ~cost_management_client.models.AlertsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AlertsResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } @@ -106,10 +107,10 @@ def list( deserialized = self._deserialize('AlertsResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts'} + list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts'} # type: ignore def get( self, @@ -140,16 +141,17 @@ def get( :param alert_id: Alert ID. :type alert_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert + :return: Alert, or the result of cls(response) + :rtype: ~cost_management_client.models.Alert :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Alert"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'alertId': self._serialize.url("alert_id", alert_id, 'str', skip_quote=True), @@ -177,10 +179,10 @@ def get( deserialized = self._deserialize('Alert', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}'} + get.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}'} # type: ignore def dismiss( self, @@ -237,15 +239,15 @@ def dismiss( :param alert_id: Alert ID. :type alert_id: str :param definition: defines the type of alert. - :type definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition + :type definition: ~cost_management_client.models.AlertPropertiesDefinition :param description: Alert description. :type description: str :param source: Source of alert. - :type source: str or ~azure.mgmt.costmanagement.models.AlertSource + :type source: str or ~cost_management_client.models.AlertSource :param cost_entity_id: related budget. :type cost_entity_id: str :param status: alert status. - :type status: str or ~azure.mgmt.costmanagement.models.AlertStatus + :type status: str or ~cost_management_client.models.AlertStatus :param creation_time: dateTime in which alert was created. :type creation_time: str :param close_time: dateTime in which alert was closed. @@ -257,7 +259,7 @@ def dismiss( :param status_modification_time: dateTime in which the alert status was last modified. :type status_modification_time: str :param time_grain_type: Type of timegrain cadence. - :type time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType + :type time_grain_type: str or ~cost_management_client.models.AlertTimeGrainType :param period_start_date: datetime of periodStartDate. :type period_start_date: str :param triggered_by: notificationId that triggered this alert. @@ -273,7 +275,7 @@ def dismiss( :param threshold: notification threshold percentage as a decimal which activated this alert. :type threshold: float :param operator: operator used to compare currentSpend with amount. - :type operator: str or ~azure.mgmt.costmanagement.models.AlertOperator + :type operator: str or ~cost_management_client.models.AlertOperator :param amount: budget threshold amount. :type amount: float :param unit: unit of currency being used. @@ -289,19 +291,20 @@ def dismiss( :param overriding_alert: overriding alert. :type overriding_alert: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert + :return: Alert, or the result of cls(response) + :rtype: ~cost_management_client.models.Alert :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Alert"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.DismissAlertPayload(definition=definition, description=description, source=source, cost_entity_id=cost_entity_id, status=status, creation_time=creation_time, close_time=close_time, modification_time=modification_time, status_modification_user_name=status_modification_user_name, status_modification_time=status_modification_time, time_grain_type=time_grain_type, period_start_date=period_start_date, triggered_by=triggered_by, resource_group_filter=resource_group_filter, resource_filter=resource_filter, meter_filter=meter_filter, tag_filter=tag_filter, threshold=threshold, operator=operator, amount=amount, unit=unit, current_spend=current_spend, contact_emails=contact_emails, contact_groups=contact_groups, contact_roles=contact_roles, overriding_alert=overriding_alert) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.dismiss.metadata['url'] + url = self.dismiss.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'alertId': self._serialize.url("alert_id", alert_id, 'str', skip_quote=True), @@ -334,10 +337,10 @@ def dismiss( deserialized = self._deserialize('Alert', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - dismiss.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}'} + dismiss.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}'} # type: ignore def list_external( self, @@ -351,21 +354,22 @@ def list_external( :param external_cloud_provider_type: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - :type external_cloud_provider_type: str or ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :type external_cloud_provider_type: str or ~cost_management_client.models.ExternalCloudProviderType :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. :type external_cloud_provider_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: AlertsResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.AlertsResult + :return: AlertsResult, or the result of cls(response) + :rtype: ~cost_management_client.models.AlertsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AlertsResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.list_external.metadata['url'] + url = self.list_external.metadata['url'] # type: ignore path_format_arguments = { 'externalCloudProviderType': self._serialize.url("external_cloud_provider_type", external_cloud_provider_type, 'str'), 'externalCloudProviderId': self._serialize.url("external_cloud_provider_id", external_cloud_provider_id, 'str'), @@ -393,7 +397,7 @@ def list_external( deserialized = self._deserialize('AlertsResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_external.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts'} + list_external.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_dimension_operations.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_dimension_operations.py index aa72450bb03..c8615a3c1bd 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_dimension_operations.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_dimension_operations.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -30,7 +30,7 @@ class DimensionOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> "models.DimensionsListResult" + # type: (...) -> Iterable["models.DimensionsListResult"] """Lists the dimensions by the defined scope. :param scope: The scope associated with dimension operations. This includes @@ -87,37 +87,38 @@ def list( :param top: May be used to limit the number of results to the most recent N dimension data. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: DimensionsListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.DimensionsListResult + :return: An iterator like instance of either DimensionsListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~cost_management_client.models.DimensionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DimensionsListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -149,7 +150,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/dimensions'} + list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/dimensions'} # type: ignore def by_external_cloud_provider_type( self, @@ -161,13 +162,13 @@ def by_external_cloud_provider_type( top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> "models.DimensionsListResult" + # type: (...) -> Iterable["models.DimensionsListResult"] """Lists the dimensions by the external cloud provider type. :param external_cloud_provider_type: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - :type external_cloud_provider_type: str or ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :type external_cloud_provider_type: str or ~cost_management_client.models.ExternalCloudProviderType :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. :type external_cloud_provider_id: str @@ -184,38 +185,39 @@ def by_external_cloud_provider_type( :param top: May be used to limit the number of results to the most recent N dimension data. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: DimensionsListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.DimensionsListResult + :return: An iterator like instance of either DimensionsListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~cost_management_client.models.DimensionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DimensionsListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.by_external_cloud_provider_type.metadata['url'] + url = self.by_external_cloud_provider_type.metadata['url'] # type: ignore path_format_arguments = { 'externalCloudProviderType': self._serialize.url("external_cloud_provider_type", external_cloud_provider_type, 'str'), 'externalCloudProviderId': self._serialize.url("external_cloud_provider_id", external_cloud_provider_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -247,4 +249,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - by_external_cloud_provider_type.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions'} + by_external_cloud_provider_type.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_export_operations.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_export_operations.py index 2021519d44e..29bae6d6174 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_export_operations.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_export_operations.py @@ -29,7 +29,7 @@ class ExportOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -70,16 +70,17 @@ def list( specific for partners. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExportListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ExportListResult + :return: ExportListResult, or the result of cls(response) + :rtype: ~cost_management_client.models.ExportListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ExportListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } @@ -106,10 +107,10 @@ def list( deserialized = self._deserialize('ExportListResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports'} + list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports'} # type: ignore def get( self, @@ -140,16 +141,17 @@ def get( :param export_name: Export Name. :type export_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export + :return: Export, or the result of cls(response) + :rtype: ~cost_management_client.models.Export :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Export"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -177,10 +179,10 @@ def get( deserialized = self._deserialize('Export', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} + get.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} # type: ignore def create_or_update( self, @@ -190,8 +192,8 @@ def create_or_update( timeframe=None, # type: Optional[Union[str, "models.TimeframeType"]] time_period=None, # type: Optional["models.QueryTimePeriod"] configuration=None, # type: Optional["models.QueryDatasetConfiguration"] - aggregation=None, # type: Optional[Dict[str, "QueryAggregation"]] - grouping=None, # type: Optional[List["QueryGrouping"]] + aggregation=None, # type: Optional[Dict[str, "models.QueryAggregation"]] + grouping=None, # type: Optional[List["models.QueryGrouping"]] filter=None, # type: Optional["models.QueryFilter"] destination=None, # type: Optional["models.ExportDeliveryDestination"] status=None, # type: Optional[Union[str, "models.StatusType"]] @@ -222,48 +224,49 @@ def create_or_update( :param export_name: Export Name. :type export_name: str :param type: The type of the query. - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: The time frame for pulling data for the query. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :param destination: Has destination for the export being delivered. - :type destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + :type destination: ~cost_management_client.models.ExportDeliveryDestination :param status: The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused. - :type status: str or ~azure.mgmt.costmanagement.models.StatusType + :type status: str or ~cost_management_client.models.StatusType :param recurrence: The schedule recurrence. - :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :type recurrence: str or ~cost_management_client.models.RecurrenceType :param recurrence_period: Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. - :type recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + :type recurrence_period: ~cost_management_client.models.ExportRecurrencePeriod :keyword callable cls: A custom type or function that will be passed the direct response - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export or ~azure.mgmt.costmanagement.models.Export + :return: Export, or the result of cls(response) + :rtype: ~cost_management_client.models.Export :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Export"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.Export(type_properties_definition_type=type, timeframe=timeframe, time_period=time_period, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=filter, destination=destination, status=status, recurrence=recurrence, recurrence_period=recurrence_period) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -301,10 +304,10 @@ def create_or_update( deserialized = self._deserialize('Export', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} # type: ignore def delete( self, @@ -335,16 +338,17 @@ def delete( :param export_name: Export Name. :type export_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -369,9 +373,9 @@ def delete( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} + delete.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}'} # type: ignore def execute( self, @@ -402,16 +406,17 @@ def execute( :param export_name: Export Name. :type export_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.execute.metadata['url'] + url = self.execute.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -436,9 +441,9 @@ def execute( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - execute.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run'} + execute.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run'} # type: ignore def get_execution_history( self, @@ -469,16 +474,17 @@ def get_execution_history( :param export_name: Export Name. :type export_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExportExecutionListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ExportExecutionListResult + :return: ExportExecutionListResult, or the result of cls(response) + :rtype: ~cost_management_client.models.ExportExecutionListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ExportExecutionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get_execution_history.metadata['url'] + url = self.get_execution_history.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'exportName': self._serialize.url("export_name", export_name, 'str'), @@ -506,7 +512,7 @@ def get_execution_history( deserialized = self._deserialize('ExportExecutionListResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get_execution_history.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory'} + get_execution_history.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_forecast_operations.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_forecast_operations.py index 5b97876549e..d640e9c1d21 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_forecast_operations.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_forecast_operations.py @@ -29,7 +29,7 @@ class ForecastOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,8 +54,8 @@ def usage( include_actual_cost=None, # type: Optional[bool] include_fresh_partial_cost=None, # type: Optional[bool] configuration=None, # type: Optional["models.QueryDatasetConfiguration"] - aggregation=None, # type: Optional[Dict[str, "QueryAggregation"]] - grouping=None, # type: Optional[List["QueryGrouping"]] + aggregation=None, # type: Optional[Dict[str, "models.QueryAggregation"]] + grouping=None, # type: Optional[List["models.QueryGrouping"]] query_filter=None, # type: Optional["models.QueryFilter"] **kwargs # type: Any ): @@ -80,46 +80,47 @@ def usage( specific for partners. :type scope: str :param type: The type of the forecast. - :type type: str or ~azure.mgmt.costmanagement.models.ForecastType + :type type: str or ~cost_management_client.models.ForecastType :param timeframe: The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType + :type timeframe: str or ~cost_management_client.models.ForecastTimeframeType :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. :type filter: str :param time_period: Has time period for pulling data for the forecast. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param include_actual_cost: a boolean determining if actualCost will be included. :type include_actual_cost: bool :param include_fresh_partial_cost: a boolean determining if FreshPartialCost will be included. :type include_fresh_partial_cost: bool :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param query_filter: Has filter expression to use in the query. - :type query_filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type query_filter: ~cost_management_client.models.QueryFilter :keyword callable cls: A custom type or function that will be passed the direct response - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :return: QueryResult, or the result of cls(response) + :rtype: ~cost_management_client.models.QueryResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.QueryResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.ForecastDefinition(type=type, timeframe=timeframe, time_period=time_period, include_actual_cost=include_actual_cost, include_fresh_partial_cost=include_fresh_partial_cost, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=query_filter) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.usage.metadata['url'] + url = self.usage.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } @@ -153,10 +154,10 @@ def usage( deserialized = self._deserialize('QueryResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/forecast'} + usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/forecast'} # type: ignore def external_cloud_provider_usage( self, @@ -169,8 +170,8 @@ def external_cloud_provider_usage( include_actual_cost=None, # type: Optional[bool] include_fresh_partial_cost=None, # type: Optional[bool] configuration=None, # type: Optional["models.QueryDatasetConfiguration"] - aggregation=None, # type: Optional[Dict[str, "QueryAggregation"]] - grouping=None, # type: Optional[List["QueryGrouping"]] + aggregation=None, # type: Optional[Dict[str, "models.QueryAggregation"]] + grouping=None, # type: Optional[List["models.QueryGrouping"]] query_filter=None, # type: Optional["models.QueryFilter"] **kwargs # type: Any ): @@ -180,51 +181,52 @@ def external_cloud_provider_usage( :param external_cloud_provider_type: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - :type external_cloud_provider_type: str or ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :type external_cloud_provider_type: str or ~cost_management_client.models.ExternalCloudProviderType :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. :type external_cloud_provider_id: str :param type: The type of the forecast. - :type type: str or ~azure.mgmt.costmanagement.models.ForecastType + :type type: str or ~cost_management_client.models.ForecastType :param timeframe: The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType + :type timeframe: str or ~cost_management_client.models.ForecastTimeframeType :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. :type filter: str :param time_period: Has time period for pulling data for the forecast. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param include_actual_cost: a boolean determining if actualCost will be included. :type include_actual_cost: bool :param include_fresh_partial_cost: a boolean determining if FreshPartialCost will be included. :type include_fresh_partial_cost: bool :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param query_filter: Has filter expression to use in the query. - :type query_filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type query_filter: ~cost_management_client.models.QueryFilter :keyword callable cls: A custom type or function that will be passed the direct response - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :return: QueryResult, or the result of cls(response) + :rtype: ~cost_management_client.models.QueryResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.QueryResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.ForecastDefinition(type=type, timeframe=timeframe, time_period=time_period, include_actual_cost=include_actual_cost, include_fresh_partial_cost=include_fresh_partial_cost, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=query_filter) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.external_cloud_provider_usage.metadata['url'] + url = self.external_cloud_provider_usage.metadata['url'] # type: ignore path_format_arguments = { 'externalCloudProviderType': self._serialize.url("external_cloud_provider_type", external_cloud_provider_type, 'str'), 'externalCloudProviderId': self._serialize.url("external_cloud_provider_id", external_cloud_provider_id, 'str'), @@ -259,7 +261,7 @@ def external_cloud_provider_usage( deserialized = self._deserialize('QueryResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - external_cloud_provider_usage.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast'} + external_cloud_provider_usage.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_operation_operations.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_operation_operations.py index 6d83e16b9dc..a05e593f940 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_operation_operations.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_operation_operations.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -30,7 +30,7 @@ class OperationOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,29 +49,30 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> "models.OperationListResult" + # type: (...) -> Iterable["models.OperationListResult"] """Lists all of the available cost management REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.OperationListResult + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~cost_management_client.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -103,4 +104,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.CostManagement/operations'} + list.metadata = {'url': '/providers/Microsoft.CostManagement/operations'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_query_operations.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_query_operations.py index 8443fd8acae..053556262a6 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_query_operations.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_query_operations.py @@ -29,7 +29,7 @@ class QueryOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +51,8 @@ def usage( timeframe, # type: Union[str, "models.TimeframeType"] time_period=None, # type: Optional["models.QueryTimePeriod"] configuration=None, # type: Optional["models.QueryDatasetConfiguration"] - aggregation=None, # type: Optional[Dict[str, "QueryAggregation"]] - grouping=None, # type: Optional[List["QueryGrouping"]] + aggregation=None, # type: Optional[Dict[str, "models.QueryAggregation"]] + grouping=None, # type: Optional[List["models.QueryGrouping"]] filter=None, # type: Optional["models.QueryFilter"] **kwargs # type: Any ): @@ -77,38 +77,39 @@ def usage( specific for partners. :type scope: str :param type: The type of the query. - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: The time frame for pulling data for the query. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :keyword callable cls: A custom type or function that will be passed the direct response - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :return: QueryResult, or the result of cls(response) + :rtype: ~cost_management_client.models.QueryResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.QueryResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.QueryDefinition(type=type, timeframe=timeframe, time_period=time_period, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=filter) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.usage.metadata['url'] + url = self.usage.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } @@ -140,10 +141,10 @@ def usage( deserialized = self._deserialize('QueryResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/query'} + usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/query'} # type: ignore def usage_by_external_cloud_provider_type( self, @@ -153,8 +154,8 @@ def usage_by_external_cloud_provider_type( timeframe, # type: Union[str, "models.TimeframeType"] time_period=None, # type: Optional["models.QueryTimePeriod"] configuration=None, # type: Optional["models.QueryDatasetConfiguration"] - aggregation=None, # type: Optional[Dict[str, "QueryAggregation"]] - grouping=None, # type: Optional[List["QueryGrouping"]] + aggregation=None, # type: Optional[Dict[str, "models.QueryAggregation"]] + grouping=None, # type: Optional[List["models.QueryGrouping"]] filter=None, # type: Optional["models.QueryFilter"] **kwargs # type: Any ): @@ -164,43 +165,44 @@ def usage_by_external_cloud_provider_type( :param external_cloud_provider_type: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - :type external_cloud_provider_type: str or ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :type external_cloud_provider_type: str or ~cost_management_client.models.ExternalCloudProviderType :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. :type external_cloud_provider_id: str :param type: The type of the query. - :type type: str or ~azure.mgmt.costmanagement.models.ExportType + :type type: str or ~cost_management_client.models.ExportType :param timeframe: The time frame for pulling data for the query. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :type timeframe: str or ~cost_management_client.models.TimeframeType :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :type time_period: ~cost_management_client.models.QueryTimePeriod :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :type configuration: ~cost_management_client.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :type aggregation: dict[str, ~cost_management_client.models.QueryAggregation] :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] + :type grouping: list[~cost_management_client.models.QueryGrouping] :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + :type filter: ~cost_management_client.models.QueryFilter :keyword callable cls: A custom type or function that will be passed the direct response - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :return: QueryResult, or the result of cls(response) + :rtype: ~cost_management_client.models.QueryResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.QueryResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.QueryDefinition(type=type, timeframe=timeframe, time_period=time_period, configuration=configuration, aggregation=aggregation, grouping=grouping, filter=filter) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.usage_by_external_cloud_provider_type.metadata['url'] + url = self.usage_by_external_cloud_provider_type.metadata['url'] # type: ignore path_format_arguments = { 'externalCloudProviderType': self._serialize.url("external_cloud_provider_type", external_cloud_provider_type, 'str'), 'externalCloudProviderId': self._serialize.url("external_cloud_provider_id", external_cloud_provider_id, 'str'), @@ -233,7 +235,7 @@ def usage_by_external_cloud_provider_type( deserialized = self._deserialize('QueryResult', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - usage_by_external_cloud_provider_type.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query'} + usage_by_external_cloud_provider_type.metadata = {'url': '/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_view_operations.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_view_operations.py index bf08f8e37e3..d00b71be5d2 100644 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_view_operations.py +++ b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/operations/_view_operations.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -30,7 +30,7 @@ class ViewOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.costmanagement.models + :type models: ~cost_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,29 +49,30 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> "models.ViewListResult" + # type: (...) -> Iterable["models.ViewListResult"] """Lists all views by tenant and object. :keyword callable cls: A custom type or function that will be passed the direct response - :return: ViewListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ViewListResult + :return: An iterator like instance of either ViewListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~cost_management_client.models.ViewListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ViewListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -103,14 +104,14 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.CostManagement/views'} + list.metadata = {'url': '/providers/Microsoft.CostManagement/views'} # type: ignore def list_by_scope( self, scope, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ViewListResult" + # type: (...) -> Iterable["models.ViewListResult"] """Lists all views at the given scope. :param scope: The scope associated with view operations. This includes @@ -132,29 +133,30 @@ def list_by_scope( External Subscription scope. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ViewListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ViewListResult + :return: An iterator like instance of either ViewListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~cost_management_client.models.ViewListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ViewListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_scope.metadata['url'] + url = self.list_by_scope.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - + query_parameters = {} # type: Dict[str, Any] # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' @@ -186,7 +188,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views'} + list_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views'} # type: ignore def get( self, @@ -199,16 +201,17 @@ def get( :param view_name: View name. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View + :return: View, or the result of cls(response) + :rtype: ~cost_management_client.models.View :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.View"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'viewName': self._serialize.url("view_name", view_name, 'str'), } @@ -235,10 +238,10 @@ def get( deserialized = self._deserialize('View', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} + get.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore def create_or_update( self, @@ -249,8 +252,8 @@ def create_or_update( chart=None, # type: Optional[Union[str, "models.ChartType"]] accumulated=None, # type: Optional[Union[str, "models.AccumulatedType"]] metric=None, # type: Optional[Union[str, "models.MetricType"]] - kpis=None, # type: Optional[List["KpiProperties"]] - pivots=None, # type: Optional[List["PivotProperties"]] + kpis=None, # type: Optional[List["models.KpiProperties"]] + pivots=None, # type: Optional[List["models.PivotProperties"]] timeframe=None, # type: Optional[Union[str, "models.ReportTimeframeType"]] time_period=None, # type: Optional["models.ReportConfigTimePeriod"] dataset=None, # type: Optional["models.ReportConfigDataset"] @@ -285,36 +288,37 @@ def create_or_update( ExternalSubscription scope. :type scope: str :param chart: Chart type of the main view in Cost Analysis. Required. - :type chart: str or ~azure.mgmt.costmanagement.models.ChartType + :type chart: str or ~cost_management_client.models.ChartType :param accumulated: Show costs accumulated over time. - :type accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType + :type accumulated: str or ~cost_management_client.models.AccumulatedType :param metric: Metric to use when displaying costs. - :type metric: str or ~azure.mgmt.costmanagement.models.MetricType + :type metric: str or ~cost_management_client.models.MetricType :param kpis: List of KPIs to show in Cost Analysis UI. - :type kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] + :type kpis: list[~cost_management_client.models.KpiProperties] :param pivots: Configuration of 3 sub-views in the Cost Analysis UI. - :type pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] + :type pivots: list[~cost_management_client.models.PivotProperties] :param timeframe: The time frame for pulling data for the report. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType + :type timeframe: str or ~cost_management_client.models.ReportTimeframeType :param time_period: Has time period for pulling data for the report. - :type time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod + :type time_period: ~cost_management_client.models.ReportConfigTimePeriod :param dataset: Has definition for data in this report config. - :type dataset: ~azure.mgmt.costmanagement.models.ReportConfigDataset + :type dataset: ~cost_management_client.models.ReportConfigDataset :keyword callable cls: A custom type or function that will be passed the direct response - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View or ~azure.mgmt.costmanagement.models.View + :return: View, or the result of cls(response) + :rtype: ~cost_management_client.models.View :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.View"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.View(e_tag=e_tag, display_name=display_name, scope=scope, chart=chart, accumulated=accumulated, metric=metric, kpis=kpis, pivots=pivots, timeframe=timeframe, time_period=time_period, dataset=dataset) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'viewName': self._serialize.url("view_name", view_name, 'str'), } @@ -351,10 +355,10 @@ def create_or_update( deserialized = self._deserialize('View', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} + create_or_update.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore def delete( self, @@ -367,16 +371,17 @@ def delete( :param view_name: View name. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'viewName': self._serialize.url("view_name", view_name, 'str'), } @@ -400,9 +405,9 @@ def delete( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} + delete.metadata = {'url': '/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore def get_by_scope( self, @@ -434,16 +439,17 @@ def get_by_scope( :param view_name: View name. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View + :return: View, or the result of cls(response) + :rtype: ~cost_management_client.models.View :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.View"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.get_by_scope.metadata['url'] + url = self.get_by_scope.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'viewName': self._serialize.url("view_name", view_name, 'str'), @@ -471,10 +477,10 @@ def get_by_scope( deserialized = self._deserialize('View', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} + get_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore def create_or_update_by_scope( self, @@ -486,8 +492,8 @@ def create_or_update_by_scope( chart=None, # type: Optional[Union[str, "models.ChartType"]] accumulated=None, # type: Optional[Union[str, "models.AccumulatedType"]] metric=None, # type: Optional[Union[str, "models.MetricType"]] - kpis=None, # type: Optional[List["KpiProperties"]] - pivots=None, # type: Optional[List["PivotProperties"]] + kpis=None, # type: Optional[List["models.KpiProperties"]] + pivots=None, # type: Optional[List["models.PivotProperties"]] timeframe=None, # type: Optional[Union[str, "models.ReportTimeframeType"]] time_period=None, # type: Optional["models.ReportConfigTimePeriod"] dataset=None, # type: Optional["models.ReportConfigDataset"] @@ -540,36 +546,37 @@ def create_or_update_by_scope( ExternalSubscription scope. :type view_properties_scope: str :param chart: Chart type of the main view in Cost Analysis. Required. - :type chart: str or ~azure.mgmt.costmanagement.models.ChartType + :type chart: str or ~cost_management_client.models.ChartType :param accumulated: Show costs accumulated over time. - :type accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType + :type accumulated: str or ~cost_management_client.models.AccumulatedType :param metric: Metric to use when displaying costs. - :type metric: str or ~azure.mgmt.costmanagement.models.MetricType + :type metric: str or ~cost_management_client.models.MetricType :param kpis: List of KPIs to show in Cost Analysis UI. - :type kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] + :type kpis: list[~cost_management_client.models.KpiProperties] :param pivots: Configuration of 3 sub-views in the Cost Analysis UI. - :type pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] + :type pivots: list[~cost_management_client.models.PivotProperties] :param timeframe: The time frame for pulling data for the report. If custom, then a specific time period must be provided. - :type timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType + :type timeframe: str or ~cost_management_client.models.ReportTimeframeType :param time_period: Has time period for pulling data for the report. - :type time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod + :type time_period: ~cost_management_client.models.ReportConfigTimePeriod :param dataset: Has definition for data in this report config. - :type dataset: ~azure.mgmt.costmanagement.models.ReportConfigDataset + :type dataset: ~cost_management_client.models.ReportConfigDataset :keyword callable cls: A custom type or function that will be passed the direct response - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View or ~azure.mgmt.costmanagement.models.View + :return: View, or the result of cls(response) + :rtype: ~cost_management_client.models.View :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.View"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) _parameters = models.View(e_tag=e_tag, display_name=display_name, scope=view_properties_scope, chart=chart, accumulated=accumulated, metric=metric, kpis=kpis, pivots=pivots, timeframe=timeframe, time_period=time_period, dataset=dataset) api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_or_update_by_scope.metadata['url'] + url = self.create_or_update_by_scope.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'viewName': self._serialize.url("view_name", view_name, 'str'), @@ -607,10 +614,10 @@ def create_or_update_by_scope( deserialized = self._deserialize('View', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} + create_or_update_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore def delete_by_scope( self, @@ -642,16 +649,17 @@ def delete_by_scope( :param view_name: View name. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-11-01" # Construct URL - url = self.delete_by_scope.metadata['url'] + url = self.delete_by_scope.metadata['url'] # type: ignore path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'viewName': self._serialize.url("view_name", view_name, 'str'), @@ -676,6 +684,6 @@ def delete_by_scope( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} + delete_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/views/{viewName}'} # type: ignore diff --git a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/setup.py b/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/setup.py deleted file mode 100644 index 23e053083da..00000000000 --- a/src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/setup.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "costmanagementclient" -VERSION = "1.2.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="CostManagementClient", - author_email="", - url="", - keywords=["Swagger", "CostManagementClient"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - CostManagementClient. - """ -) diff --git a/src/costmanagement/report.md b/src/costmanagement/report.md index 4860bdc623a..13b88402042 100644 --- a/src/costmanagement/report.md +++ b/src/costmanagement/report.md @@ -111,6 +111,14 @@ delete a costmanagement export. execute a costmanagement export. +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--scope**|string|The scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.|scope| +|**--export-name**|string|Export Name.|export_name| +### costmanagement export get-execution-history + +get-execution-history a costmanagement export. + |Option|Type|Description|Path (SDK)|Path (swagger)| |------|----|-----------|----------|--------------| |**--scope**|string|The scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.|scope| @@ -237,6 +245,14 @@ create a costmanagement view. delete a costmanagement view. +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--scope**|string|The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.|scope| +|**--view-name**|string|View name|view_name| +### costmanagement view get-by-scope + +get-by-scope a costmanagement view. + |Option|Type|Description|Path (SDK)|Path (swagger)| |------|----|-----------|----------|--------------| |**--scope**|string|The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.|scope| @@ -254,5 +270,4 @@ show a costmanagement view. |Option|Type|Description|Path (SDK)|Path (swagger)| |------|----|-----------|----------|--------------| -|**--scope**|string|The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.|scope| |**--view-name**|string|View name|view_name| \ No newline at end of file diff --git a/src/costmanagement/setup.py b/src/costmanagement/setup.py index d99d8b3aa94..8d0bea50e74 100644 --- a/src/costmanagement/setup.py +++ b/src/costmanagement/setup.py @@ -9,9 +9,12 @@ from codecs import open from setuptools import setup, find_packages -# TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. VERSION = '0.1.0' +try: + from .manual.version import VERSION +except ImportError: + pass # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers @@ -27,8 +30,11 @@ 'License :: OSI Approved :: MIT License', ] -# TODO: Add any additional SDK dependencies here DEPENDENCIES = [] +try: + from .manual.dependency import DEPENDENCIES +except ImportError: + pass with open('README.md', 'r', encoding='utf-8') as f: README = f.read() @@ -39,11 +45,9 @@ name='costmanagement', version=VERSION, description='Microsoft Azure Command-Line Tools CostManagementClient Extension', - # TODO: Update author and email, if applicable author='Microsoft Corporation', author_email='azpycli@microsoft.com', - # TODO: consider pointing directly to your source code instead of the generic repo - url='https://github.com/Azure/azure-cli-extensions', + url='https://github.com/Azure/azure-cli-extensions/tree/master/src/costmanagement', long_description=README + '\n\n' + HISTORY, license='MIT', classifiers=CLASSIFIERS,