diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 699141844f71..2193dca44ff3 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1417,6 +1417,51 @@ } } }, + "/providers/Microsoft.CostManagement/checkConnectorEligibility": { + "post": { + "tags": [ + "CheckConnectorEligibility" + ], + "operationId": "Connector_CheckEligibility", + "description": "Check if a connector already exists and return it's definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CheckEligibility_Post": { + "$ref": "./examples/CheckEligibilityPost.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "connectorCredentials", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CheckEligibilityDefinition" + }, + "description": "Connector credentials" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.CostManagement/externalBillingAccounts": { "get": { "tags": [ @@ -2618,6 +2663,42 @@ } } }, + "CheckEligibilityDefinition": { + "type": "object", + "description": "The check eligibility Connector credentials definition", + "properties": { + "kind": { + "type": "string", + "description": "Connector kind (eg aws)" + }, + "credentialsKey": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Credentials authentication key (eg AWS ARN)" + }, + "credentialsSecret": { + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Credentials secret (eg AWS ExternalId)" + }, + "reportId": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)" + } + } + }, "ExternalBillingAccountDefinitionListResult": { "description": "Result of listing ExternalBillingAccount definitions. It contains a list of available ExternalBillingAccount definitions in the scope provided.", "properties": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CheckEligibilityPost.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CheckEligibilityPost.json new file mode 100644 index 000000000000..fabd1d2eddcf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CheckEligibilityPost.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorCredentials": { + "kind": "aws", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "credentialsSecret": "external-id", + "reportId": "HourlyWithResources" + } + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerBillingAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "defaultManagementGroupId": "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62 + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ShowbackRulePut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ShowbackRulePut.json index 010f490e8cea..b5cb7c3b4555 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ShowbackRulePut.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ShowbackRulePut.json @@ -4,7 +4,6 @@ "billingAccountId": "100", "ruleName": "testRule", "showbackRule": { - "name": "demo", "properties": { "description": "Welcome to Showback demo", "status": "Active",