class Azure::KeyVault::Mgmt::V2018_02_14::Models::Resource

Key Vault resource

Attributes

id[RW]

@return [String] The Azure Resource Manager resource ID for the key vault.

location[RW]

@return [String] The supported Azure location where the key vault should be created.

name[RW]

@return [String] The name of the key vault.

tags[RW]

@return [Hash{String => String}] The tags that will be assigned to the key vault.

type[RW]

@return [String] The resource type of the key vault.

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-02-14/generated/azure_mgmt_key_vault/models/resource.rb, line 47
def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'Resource',
    type: {
      name: 'Composite',
      class_name: 'Resource',
      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'
          }
        },
        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'
                }
            }
          }
        }
      }
    }
  }
end

Private Instance Methods

resource_group() click to toggle source

@return [String] the name of the resource group of the resource.

# File lib/2018-02-14/generated/azure_mgmt_key_vault/models/resource.rb, line 35
def resource_group
  unless self.id.nil?
    groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/)
    groups.captures[0].strip if groups
  end
end