Class: TencentCloud::Cdn::V20180606::GeoBlocker

Inherits:
TencentCloud::Common::AbstractModel
  • Object
show all
Defined in:
lib/v20180606/models.rb

Overview

区域访问控制配置,默认为关闭状态

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, blockrules = nil) ⇒ GeoBlocker

Returns a new instance of GeoBlocker.



5374
5375
5376
5377
# File 'lib/v20180606/models.rb', line 5374

def initialize(switch=nil, blockrules=nil)
  @Switch = switch
  @BlockRules = blockrules
end

Instance Attribute Details

#BlockRulesObject

on:开启off:关闭

]

Parameters:

  • Switch:

    IP 黑白名单配置开关,取值有

  • BlockRules: ({ "BlockType": "whitelist", "RulePaths": [ "*" ], "RuleType": "all", "Districts": [ "CN-HK" ] })

    lockRules: [

    "BlockType": "whitelist",
    "RulePaths": [
      "*"
    ],
    "RuleType": "all",
    "Districts": [
      "CN-HK"
    ]
    



5372
5373
5374
# File 'lib/v20180606/models.rb', line 5372

def BlockRules
  @BlockRules
end

#SwitchObject

on:开启off:关闭

]

Parameters:

  • Switch:

    IP 黑白名单配置开关,取值有

  • BlockRules: ({ "BlockType": "whitelist", "RulePaths": [ "*" ], "RuleType": "all", "Districts": [ "CN-HK" ] })

    lockRules: [

    "BlockType": "whitelist",
    "RulePaths": [
      "*"
    ],
    "RuleType": "all",
    "Districts": [
      "CN-HK"
    ]
    



5372
5373
5374
# File 'lib/v20180606/models.rb', line 5372

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
# File 'lib/v20180606/models.rb', line 5379

def deserialize(params)
  @Switch = params['Switch']
  unless params['BlockRules'].nil?
    @BlockRules = []
    params['BlockRules'].each do |i|
      geoblockstrategy_tmp = GeoBlockStrategy.new
      geoblockstrategy_tmp.deserialize(i)
      @BlockRules << geoblockstrategy_tmp
    end
  end
end