swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Budgets API schemes: - https tags: - name: Budgets paths: /{scope}/providers/Microsoft.Consumption/budgets: get: tags: - Budgets operationId: microsoftAzureBudgetsList description: Lists all budgets for the defined scope. externalDocs: url: https://docs.microsoft.com/en-us/rest/api/consumption/ x-ms-examples: BudgetsList: $ref: ./examples/BudgetsList.json parameters: - $ref: '#/parameters/scopeBudgetParameter' - $ref: '#/parameters/apiVersionParameter' responses: '200': description: OK. The request has succeeded. schema: $ref: '#/definitions/BudgetsListResult' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' x-ms-pageable: nextLinkName: nextLink summary: Microsoft Azure Get Scope Providers Microsoft Consumption Budgets /{scope}/providers/Microsoft.Consumption/budgets/{budgetName}: get: tags: - Budgets operationId: microsoftAzureBudgetsGet description: Gets the budget for the scope by budget name. externalDocs: url: https://docs.microsoft.com/en-us/rest/api/consumption/ x-ms-examples: Budget: $ref: ./examples/Budget.json parameters: - $ref: '#/parameters/scopeBudgetParameter' - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/budgetNameParameter' responses: '200': description: OK. The request has succeeded. schema: $ref: '#/definitions/Budget' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' summary: Microsoft Azure Get Scope Providers Microsoft Consumption Budgets Budgetname put: tags: - Budgets operationId: microsoftAzureBudgetsCreateorupdate description: The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. externalDocs: url: https://docs.microsoft.com/en-us/rest/api/consumption/ x-ms-examples: CreateOrUpdateBudget: $ref: ./examples/CreateOrUpdateBudget.json parameters: - $ref: '#/parameters/scopeBudgetParameter' - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/budgetNameParameter' - name: parameters in: body required: true schema: $ref: '#/definitions/Budget' description: Parameters supplied to the Create Budget operation. responses: '200': description: OK. The request has succeeded. schema: $ref: '#/definitions/Budget' '201': description: Created. schema: $ref: '#/definitions/Budget' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' summary: Microsoft Azure Put Scope Providers Microsoft Consumption Budgets Budgetname delete: tags: - Budgets operationId: microsoftAzureBudgetsDelete description: The operation to delete a budget. externalDocs: url: https://docs.microsoft.com/en-us/rest/api/consumption/ x-ms-examples: DeleteBudget: $ref: ./examples/DeleteBudget.json parameters: - $ref: '#/parameters/scopeBudgetParameter' - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/budgetNameParameter' responses: '200': description: OK. The request has succeeded. default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' summary: Microsoft Azure Delete Scope Providers Microsoft Consumption Budgets Budgetname definitions: Filters: description: May be used to filter budgets by resource group, resource, or meter. properties: resourceGroups: description: The list of filters on resource groups, allowed at subscription level only. type: array items: type: string minItems: 0 maxItems: 10 resources: description: The list of filters on resources. type: array items: type: string minItems: 0 maxItems: 10 meters: description: 'The list of filters on meters (GUID), mandatory for budgets of usage category. ' type: array items: type: string format: uuid minItems: 0 maxItems: 10 tags: type: object description: The dictionary of filters on tags. additionalProperties: type: array items: type: string minItems: 0 maxItems: 10 BudgetProperties: description: The properties of the budget. properties: category: description: The category of the budget, whether the budget tracks cost or usage. type: string enum: - Cost - Usage x-ms-enum: name: CategoryType modelAsString: true amount: description: The total amount of cost to track with the budget type: number format: decimal timeGrain: description: The time covered by a budget. Tracking of the amount will be reset based on the time grain. type: string enum: - Monthly - Quarterly - Annually x-ms-enum: name: TimeGrainType modelAsString: true timePeriod: description: Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than three months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. $ref: '#/definitions/BudgetTimePeriod' filters: description: May be used to filter budgets by resource group, resource, or meter. type: object $ref: '#/definitions/Filters' currentSpend: description: The current amount of cost which is being tracked for a budget. $ref: '#/definitions/CurrentSpend' readOnly: true notifications: type: object description: Dictionary of notifications associated with the budget. Budget can have up to five notifications. additionalProperties: type: object $ref: '#/definitions/Notification' maxItems: 5 required: - category - amount - timeGrain - timePeriod ErrorResponse: description: Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. type: object properties: error: description: The details of the error. $ref: '#/definitions/ErrorDetails' ProxyResource: description: The Resource model definition. properties: id: readOnly: true type: string description: Resource Id. name: readOnly: true type: string description: Resource name. type: readOnly: true type: string description: Resource type. eTag: type: string description: eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. x-ms-azure-resource: true CurrentSpend: description: The current amount of cost which is being tracked for a budget. properties: amount: description: The total amount of cost which is being tracked by the budget. type: number format: decimal readOnly: true unit: description: The unit of measure for the budget amount. type: string readOnly: true BudgetTimePeriod: description: The start and end date for a budget. properties: startDate: description: The start date for the budget. type: string format: date-time endDate: description: The end date for the budget. If not provided, we default this to 10 years from the start date. type: string format: date-time required: - startDate ErrorDetails: description: The details of the error. properties: code: description: Error code. type: string readOnly: true message: description: Error message indicating why the operation failed. type: string readOnly: true BudgetsListResult: description: Result of listing budgets. It contains a list of available budgets in the scope provided. properties: value: description: The list of budgets. type: array readOnly: true items: $ref: '#/definitions/Budget' nextLink: description: The link (url) to the next page of results. type: string readOnly: true Notification: description: The notification associated with a budget. properties: enabled: description: The notification is enabled or not. type: boolean operator: description: The comparison operator. type: string enum: - EqualTo - GreaterThan - GreaterThanOrEqualTo x-ms-enum: name: OperatorType modelAsString: true threshold: description: Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000. type: number format: decimal contactEmails: description: Email addresses to send the budget notification to when the threshold is exceeded. type: array items: type: string minItems: 1 maxItems: 50 contactRoles: description: Contact roles to send the budget notification to when the threshold is exceeded. type: array items: type: string contactGroups: description: Action groups to send the budget notification to when the threshold is exceeded. type: array items: type: string minItems: 0 maxItems: 50 required: - enabled - operator - threshold - contactEmails Budget: description: A budget resource. type: object allOf: - $ref: '#/definitions/ProxyResource' properties: properties: x-ms-client-flatten: true $ref: '#/definitions/BudgetProperties' title: Budget properties parameters: apiVersionParameter: name: api-version in: query required: true type: string description: Version of the API to be used with the client request. The current version is 2019-04-01-preview. budgetNameParameter: name: budgetName in: path description: Budget Name. required: true type: string x-ms-parameter-location: method scopeBudgetParameter: name: scope in: path required: true type: string description: The scope associated with budget 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.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. x-ms-parameter-location: method x-ms-skip-url-encoding: true x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'