Class: Azure::Cosmosdb::Mgmt::V2019_08_01::Models::FailoverPolicy

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb

Overview

The failover policy for a given region of a database account.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#failover_priorityInteger

priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.

Returns:

  • (Integer)

    The failover priority of the region. A failover



29
30
31
# File 'lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb', line 29

def failover_priority
  @failover_priority
end

#idString

database account replicates to. Example: <accountName>-<locationName>.

Returns:

  • (String)

    The unique identifier of the region in which the



18
19
20
# File 'lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb', line 18

def id
  @id
end

#location_nameString

exists.

Returns:

  • (String)

    The name of the region in which the database account



22
23
24
# File 'lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb', line 22

def location_name
  @location_name
end

Class Method Details

.mapperObject

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



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
# File 'lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb', line 36

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'FailoverPolicy',
    type: {
      name: 'Composite',
      class_name: 'FailoverPolicy',
      model_properties: {
        id: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'id',
          type: {
            name: 'String'
          }
        },
        location_name: {
          client_side_validation: true,
          required: false,
          serialized_name: 'locationName',
          type: {
            name: 'String'
          }
        },
        failover_priority: {
          client_side_validation: true,
          required: false,
          serialized_name: 'failoverPriority',
          constraints: {
            InclusiveMinimum: 0
          },
          type: {
            name: 'Number'
          }
        }
      }
    }
  }
end