class Azure::DataBox::Mgmt::V2018_01_01::Models::Resource
Model of the Resource
.
Attributes
location[RW]
@return [String] The location of the resource. This will be one of the supported and registered Azure
Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.
sku[RW]
@return [Sku] The sku type.
Private Class Methods
mapper()
click to toggle source
Mapper for Resource
class as Ruby Hash. This will be used for serialization/deserialization.
# File lib/2018-01-01/generated/azure_mgmt_databox/models/resource.rb, line 44 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'Resource', type: { name: 'Composite', class_name: 'Resource', model_properties: { location: { client_side_validation: true, required: true, serialized_name: 'location', type: { name: 'String' } }, tags: { client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { name: 'String' } } } }, sku: { client_side_validation: true, required: true, serialized_name: 'sku', type: { name: 'Composite', class_name: 'Sku' } } } } } end
Private Instance Methods
resource_group()
click to toggle source
@return [String] the name of the resource group of the resource.
# File lib/2018-01-01/generated/azure_mgmt_databox/models/resource.rb, line 32 def resource_group unless self.id.nil? groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/) groups.captures[0].strip if groups end end