Class: Azure::Consumption::Mgmt::V2018_01_31::Models::Budget

Inherits:
ProxyResource
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb

Overview

A budget resource.

Instance Attribute Summary collapse

Attributes inherited from ProxyResource

#e_tag, #id, #name, #type

Class Method Summary collapse

Instance Attribute Details

#amountObject

Returns The total amount of cost to track with the budget.

Returns:

  • The total amount of cost to track with the budget



20
21
22
# File 'lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb', line 20

def amount
  @amount
end

#categoryCategoryType

tracks cost or usage. Possible values include: ‘Cost’, ‘Usage’

Returns:

  • (CategoryType)

    The category of the budget, whether the budget



17
18
19
# File 'lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb', line 17

def category
  @category
end

#current_spendCurrentSpend

tracked for a budget.

Returns:

  • (CurrentSpend)

    The current amount of cost which is being



41
42
43
# File 'lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb', line 41

def current_spend
  @current_spend
end

#filtersFilters

resource, or meter.

Returns:

  • (Filters)

    May be used to filter budgets by resource group,



37
38
39
# File 'lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb', line 37

def filters
  @filters
end

#notificationsHash{String => Notification}

associated with the budget. Budget can have up to five notifications.

Returns:

  • (Hash{String => Notification})

    Dictionary of notifications



45
46
47
# File 'lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb', line 45

def notifications
  @notifications
end

#time_grainTimeGrainType

amount will be reset based on the time grain. Possible values include: ‘Monthly’, ‘Quarterly’, ‘Annually’

Returns:

  • (TimeGrainType)

    The time covered by a budget. Tracking of the



25
26
27
# File 'lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb', line 25

def time_grain
  @time_grain
end

#time_periodBudgetTimePeriod

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 preiod. There are no restrictions on the end date.

Returns:



33
34
35
# File 'lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb', line 33

def time_period
  @time_period
end

Class Method Details

.mapperObject

Mapper for Budget class as Ruby Hash. This will be used for serialization/deserialization.



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb', line 52

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'Budget',
    type: {
      name: 'Composite',
      class_name: 'Budget',
      model_properties: {
        id: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'id',
          type: {
            name: 'String'
          }
        },
        name: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'name',
          type: {
            name: 'String'
          }
        },
        type: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'type',
          type: {
            name: 'String'
          }
        },
        e_tag: {
          client_side_validation: true,
          required: false,
          serialized_name: 'eTag',
          type: {
            name: 'String'
          }
        },
        category: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.category',
          type: {
            name: 'String'
          }
        },
        amount: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.amount',
          type: {
            name: 'Number'
          }
        },
        time_grain: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.timeGrain',
          type: {
            name: 'String'
          }
        },
        time_period: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.timePeriod',
          type: {
            name: 'Composite',
            class_name: 'BudgetTimePeriod'
          }
        },
        filters: {
          client_side_validation: true,
          required: false,
          serialized_name: 'properties.filters',
          type: {
            name: 'Composite',
            class_name: 'Filters'
          }
        },
        current_spend: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'properties.currentSpend',
          type: {
            name: 'Composite',
            class_name: 'CurrentSpend'
          }
        },
        notifications: {
          client_side_validation: true,
          required: false,
          serialized_name: 'properties.notifications',
          type: {
            name: 'Dictionary',
            value: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NotificationElementType',
                type: {
                  name: 'Composite',
                  class_name: 'Notification'
                }
            }
          }
        }
      }
    }
  }
end