Class: Azure::ARM::Storage::Models::StorageAccountProperties

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_storage/models/storage_account_properties.rb

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_tierAccessTier

cannot be changed more than once every 7 days (168 hours). Access tier cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or PremiumLRS account types. Possible values include: ‘Hot’, ‘Cool’

Returns:

  • (AccessTier)

    The access tier used for billing. Access tier



74
75
76
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 74

def access_tier
  @access_tier
end

#creation_timeDateTime

account in UTC.

Returns:

  • (DateTime)

    Gets the creation date and time of the storage



54
55
56
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 54

def creation_time
  @creation_time
end

#custom_domainCustomDomain

to this storage account.

Returns:

  • (CustomDomain)

    Gets the user assigned custom domain assigned



58
59
60
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 58

def custom_domain
  @custom_domain
end

#encryptionEncryption

unspecified the account is unencrypted.

Returns:

  • (Encryption)

    Gets the encryption settings on the account. If



68
69
70
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 68

def encryption
  @encryption
end

#last_geo_failover_timeDateTime

failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is StandardGRS or StandardRAGRS.

Returns:

  • (DateTime)

    Gets the timestamp of the most recent instance of a



39
40
41
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 39

def last_geo_failover_time
  @last_geo_failover_time
end

#primary_endpointsEndpoints

of a public blob, queue or table object.Note that StandardZRS and PremiumLRS accounts only return the blob endpoint.

Returns:

  • (Endpoints)

    Gets the URLs that are used to perform a retrieval



23
24
25
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 23

def primary_endpoints
  @primary_endpoints
end

#primary_locationString

account.

Returns:

  • (String)

    Gets the location of the primary for the storage



27
28
29
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 27

def primary_location
  @primary_location
end

#provisioning_stateProvisioningState

the time the operation was called. Possible values include: ‘Creating’, ‘ResolvingDNS’, ‘Succeeded’

Returns:



18
19
20
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 18

def provisioning_state
  @provisioning_state
end

#secondary_endpointsEndpoints

of a public blob, queue or table object from the secondary location of the storage account. Only available if the accountType is StandardRAGRS.

Returns:

  • (Endpoints)

    Gets the URLs that are used to perform a retrieval



64
65
66
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 64

def secondary_endpoints
  @secondary_endpoints
end

#secondary_locationString

the storage account. Only available if the accountType is StandardGRS or StandardRAGRS.

Returns:

  • (String)

    Gets the location of the geo replicated secondary for



44
45
46
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 44

def secondary_location
  @secondary_location
end

#status_of_primaryAccountStatus

location of the storage account is available or unavailable. Possible values include: ‘Available’, ‘Unavailable’

Returns:

  • (AccountStatus)

    Gets the status indicating whether the primary



32
33
34
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 32

def status_of_primary
  @status_of_primary
end

#status_of_secondaryAccountStatus

secondary location of the storage account is available or unavailable. Only available if the accountType is StandardGRS or StandardRAGRS. Possible values include: ‘Available’, ‘Unavailable’

Returns:



50
51
52
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 50

def status_of_secondary
  @status_of_secondary
end

Class Method Details

.deserialize_object(object) ⇒ StorageAccountProperties

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 153

def self.deserialize_object(object)
  return if object.nil?
  output_object = StorageAccountProperties.new

  deserialized_property = object['provisioningState']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = ProvisioningState.constants.any? { |e| ProvisioningState.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum ProvisioningState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.provisioning_state = deserialized_property

  deserialized_property = object['primaryEndpoints']
  unless deserialized_property.nil?
    deserialized_property = Endpoints.deserialize_object(deserialized_property)
  end
  output_object.primary_endpoints = deserialized_property

  deserialized_property = object['primaryLocation']
  output_object.primary_location = deserialized_property

  deserialized_property = object['statusOfPrimary']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = AccountStatus.constants.any? { |e| AccountStatus.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum AccountStatus does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.status_of_primary = deserialized_property

  deserialized_property = object['lastGeoFailoverTime']
  deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.last_geo_failover_time = deserialized_property

  deserialized_property = object['secondaryLocation']
  output_object.secondary_location = deserialized_property

  deserialized_property = object['statusOfSecondary']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = AccountStatus.constants.any? { |e| AccountStatus.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum AccountStatus does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.status_of_secondary = deserialized_property

  deserialized_property = object['creationTime']
  deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.creation_time = deserialized_property

  deserialized_property = object['customDomain']
  unless deserialized_property.nil?
    deserialized_property = CustomDomain.deserialize_object(deserialized_property)
  end
  output_object.custom_domain = deserialized_property

  deserialized_property = object['secondaryEndpoints']
  unless deserialized_property.nil?
    deserialized_property = Endpoints.deserialize_object(deserialized_property)
  end
  output_object.secondary_endpoints = deserialized_property

  deserialized_property = object['encryption']
  unless deserialized_property.nil?
    deserialized_property = Encryption.deserialize_object(deserialized_property)
  end
  output_object.encryption = deserialized_property

  deserialized_property = object['accessTier']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = AccessTier.constants.any? { |e| AccessTier.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum AccessTier does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.access_tier = deserialized_property

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



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
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 91

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.provisioning_state
  output_object['provisioningState'] = serialized_property unless serialized_property.nil?

  serialized_property = object.primary_endpoints
  unless serialized_property.nil?
    serialized_property = Endpoints.serialize_object(serialized_property)
  end
  output_object['primaryEndpoints'] = serialized_property unless serialized_property.nil?

  serialized_property = object.primary_location
  output_object['primaryLocation'] = serialized_property unless serialized_property.nil?

  serialized_property = object.status_of_primary
  output_object['statusOfPrimary'] = serialized_property unless serialized_property.nil?

  serialized_property = object.last_geo_failover_time
  serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
  output_object['lastGeoFailoverTime'] = serialized_property unless serialized_property.nil?

  serialized_property = object.secondary_location
  output_object['secondaryLocation'] = serialized_property unless serialized_property.nil?

  serialized_property = object.status_of_secondary
  output_object['statusOfSecondary'] = serialized_property unless serialized_property.nil?

  serialized_property = object.creation_time
  serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
  output_object['creationTime'] = serialized_property unless serialized_property.nil?

  serialized_property = object.custom_domain
  unless serialized_property.nil?
    serialized_property = CustomDomain.serialize_object(serialized_property)
  end
  output_object['customDomain'] = serialized_property unless serialized_property.nil?

  serialized_property = object.secondary_endpoints
  unless serialized_property.nil?
    serialized_property = Endpoints.serialize_object(serialized_property)
  end
  output_object['secondaryEndpoints'] = serialized_property unless serialized_property.nil?

  serialized_property = object.encryption
  unless serialized_property.nil?
    serialized_property = Encryption.serialize_object(serialized_property)
  end
  output_object['encryption'] = serialized_property unless serialized_property.nil?

  serialized_property = object.access_tier
  output_object['accessTier'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



79
80
81
82
83
84
# File 'lib/azure_mgmt_storage/models/storage_account_properties.rb', line 79

def validate
  @primary_endpoints.validate unless @primary_endpoints.nil?
  @custom_domain.validate unless @custom_domain.nil?
  @secondary_endpoints.validate unless @secondary_endpoints.nil?
  @encryption.validate unless @encryption.nil?
end