Skip to content

Commit

Permalink
Add Connector resource type as preview to CostManagement RP (#3569)
Browse files Browse the repository at this point in the history
* Initial commit for Microsoft.CostManagement 2018-09-01-preview
* Add Connector resource type as preview to CostManagement RP
  • Loading branch information
ariehf authored and sergey-shandar committed Aug 2, 2018
1 parent 9ff4521 commit 369c902
Show file tree
Hide file tree
Showing 19 changed files with 3,240 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"billingAccountId": "100"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31",
"name": "dimensions_ResourceGroup_2018-05-01_2018-05-31",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [],
"total": 377,
"category": "ResourceGroup",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00"
}
},
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31",
"name": "dimensions_ResourceType_2018-05-01_2018-05-31",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [],
"total": 37,
"category": "ResourceType",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"billingAccountId": "100",
"$expand": "properties/data",
"$top": "5"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5",
"name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [
"thoroetrg01",
"default-notificationhubs-westus",
"jedikeyvaultrg",
"contosocodeflow8d4a",
"noobaa"
],
"total": 377,
"category": "ResourceGroup",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00"
}
},
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5",
"name": "dimensions_ResourceType_2018-05-01_2018-05-31_5",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [
"microsoft.automation/automationaccounts",
"microsoft.databricks/workspaces",
"microsoft.dbformysql/servers",
"microsoft.containerregistry/registries",
"microsoft.search/searchservices"
],
"total": 37,
"category": "ResourceType",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"billingAccountId": "100",
"$expand": "properties/data",
"$top": "5",
"$filter": "properties/category eq 'instanceId'"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_InstanceId_2018-05-01_2018-05-31_5",
"name": "dimensions_InstanceId_2018-05-01_2018-05-31_5",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [
"/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount",
"/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount",
"/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus",
"/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1",
"/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume"
],
"total": 1409,
"category": "InstanceId",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00",
"nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'instanceId'&$top=5&api-version=2018-05-31&$expand=properties/data&$skiptoken=AQAAAA%3D%3D"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"billingAccountId": "70664866",
"parameters":{
"type": "Usage",
"timeframe": "MonthToDate",
"dataset": {
"granularity": "Daily",
"configuration": {
"columns": [
"PreTaxCost",
"ResourceGroup",
"UsageDate"
]
},
"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"
]
}
}
]
}
}
}
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd",
"name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd",
"type": "microsoft.costmanagement/Query",
"properties": {
"nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D",
"columns": [
{
"name": "PreTaxCost",
"type": "Number"
},
{
"name": "ResourceGroup",
"type": "String"
},
{
"name": "UsageDate",
"type": "Number"
}
],
"rows": [
[
19.545363672276512,
"JapanUnifia-Trial",
20180331
],
[
173.41979241290323,
"RVIIOT-TRIAL",
20180331
],
[
20.359416562625452,
"VSTSHOL-1595322048000",
20180331
],
[
0.16677720329728665,
"gs-stms-dev",
20180331
]
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"subscriptionId": "01234567-89ab-cdef-0123-456789abcdef",
"resourceGroupName": "rg1",
"connectorName": "AWSBillingAccount"
},
"responses": {
"200": {
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"subscriptionId": "01234567-89ab-cdef-0123-456789abcdef",
"resourceGroupName": "rg1",
"connectorName": "AWSBillingAccount"
},
"responses": {
"200": {
"body": {
"kind": "aws",
"id": "/subscriptions/01234567-89ab-cdef-0123-456789abcdef/resourceGroups/rg1/providers/Microsoft.CostManagement/connectors/AWSBillingAccount",
"name": "AWSBillingAccount",
"type": "Microsoft.CostManagement/connectors",
"location": "westus",
"properties": {
"displayName": "AWS-Consolidated-1",
"credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole",
"reportId": "HourlyWithResources",
"createdOn": "2018-05-15T13:25:48Z",
"modifiedOn": "2018-05-23T09:21:11Z",
"status": "active",
"collection": {
"lastRun": "2018-06-15T03:21:08Z",
"sourceLastUpdated": "2018-06-12T16:41:28Z",
"lastUpdated": "2018-06-12T17:25:28Z",
"error": {
"errorMessage": "Insufficient access to assume role arn:aws:iam::123456789012:role/AzureCostManagementRole",
"errorCode": "AwsPermissionDenied",
"errorStartTime": "2018-06-12T21:41:03Z"
}
}
}
}
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"subscriptionId": "01234567-89ab-cdef-0123-456789abcdef",
"resourceGroupName": "rg1"
},
"responses": {
"200": {
"body": {
"value": [
{
"kind": "aws",
"id": "/subscriptions/01234567-89ab-cdef-0123-456789abcdef/resourceGroups/rg1/providers/Microsoft.CostManagement/connectors/AWSBillingAccount",
"name": "AWSBillingAccount",
"type": "Microsoft.CostManagement/connectors",
"location": "westus",
"properties": {
"displayName": "AWS-Consolidated-1",
"credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole",
"reportId": "HourlyWithResources",
"createdOn": "2018-05-15T13:25:48Z",
"modifiedOn": "2018-05-23T09:21:11Z",
"status": "active"
}
},
{
"kind": "aws",
"id": "/subscriptions/01234567-89ab-cdef-0123-456789abcdef/resourceGroups/rg1/providers/Microsoft.CostManagement/connectors/AWSBillingAccount2",
"name": "AWSBillingAccount2",
"type": "Microsoft.CostManagement/connectors",
"location": "westus",
"properties": {
"displayName": "AWSBillingAccount2",
"credentialsKey": "arn:aws:iam::000000000000:role/AzureCostManagementRole",
"reportId": "CURHourlyWithResources",
"createdOn": "2018-06-16T11:23:44Z",
"modifiedOn": "2018-06-21T17:33:28Z",
"status": "suspended"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"subscriptionId": "01234567-89ab-cdef-0123-456789abcdef",
"resourceGroupName": "rg1",
"connectorName": "AWSBillingAccount",
"connector": {
"properties": {
"displayName": "AWS-Consolidated-2"
}
}
},
"responses": {
"200": {
"body": {
"kind": "aws",
"id": "/subscriptions/01234567-89ab-cdef-0123-456789abcdef/resourceGroups/rg1/providers/Microsoft.CostManagement/connectors/AWSBillingAccount",
"name": "AWSBillingAccount",
"type": "Microsoft.CostManagement/connectors",
"location": "westus",
"properties": {
"displayName": "AWS-Consolidated-2",
"credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole",
"reportId": "HourlyWithResources",
"createdOn": "2018-05-15T13:25:48Z",
"modifiedOn": "2018-05-23T09:21:11Z",
"status": "active"
}
}
}
}
}

Loading

0 comments on commit 369c902

Please sign in to comment.