Class: TencentCloud::Tke::V20180525::OpenPolicySwitch

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

Overview

opa策略开关

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enforcementaction = nil, name = nil, kind = nil, enabledstatus = nil, openconstraintinfolist = nil) ⇒ OpenPolicySwitch

Returns a new instance of OpenPolicySwitch.



15314
15315
15316
15317
15318
15319
15320
# File 'lib/v20180525/models.rb', line 15314

def initialize(enforcementaction=nil, name=nil, kind=nil, enabledstatus=nil, openconstraintinfolist=nil)
  @EnforcementAction = enforcementaction
  @Name = name
  @Kind = kind
  @EnabledStatus = enabledstatus
  @OpenConstraintInfoList = openconstraintinfolist
end

Instance Attribute Details

#EnabledStatusObject

Parameters:

  • EnforcementAction:

    策略运行模式:dryrun空跑不生效,deny拦截生效

  • Name:

    策略英文名称

  • Kind:

    策略模板类型

  • EnabledStatus:

    策略开关状态:open打开,close关闭

  • OpenConstraintInfoList:

    策略关联的实例列表



15312
15313
15314
# File 'lib/v20180525/models.rb', line 15312

def EnabledStatus
  @EnabledStatus
end

#EnforcementActionObject

Parameters:

  • EnforcementAction:

    策略运行模式:dryrun空跑不生效,deny拦截生效

  • Name:

    策略英文名称

  • Kind:

    策略模板类型

  • EnabledStatus:

    策略开关状态:open打开,close关闭

  • OpenConstraintInfoList:

    策略关联的实例列表



15312
15313
15314
# File 'lib/v20180525/models.rb', line 15312

def EnforcementAction
  @EnforcementAction
end

#KindObject

Parameters:

  • EnforcementAction:

    策略运行模式:dryrun空跑不生效,deny拦截生效

  • Name:

    策略英文名称

  • Kind:

    策略模板类型

  • EnabledStatus:

    策略开关状态:open打开,close关闭

  • OpenConstraintInfoList:

    策略关联的实例列表



15312
15313
15314
# File 'lib/v20180525/models.rb', line 15312

def Kind
  @Kind
end

#NameObject

Parameters:

  • EnforcementAction:

    策略运行模式:dryrun空跑不生效,deny拦截生效

  • Name:

    策略英文名称

  • Kind:

    策略模板类型

  • EnabledStatus:

    策略开关状态:open打开,close关闭

  • OpenConstraintInfoList:

    策略关联的实例列表



15312
15313
15314
# File 'lib/v20180525/models.rb', line 15312

def Name
  @Name
end

#OpenConstraintInfoListObject

Parameters:

  • EnforcementAction:

    策略运行模式:dryrun空跑不生效,deny拦截生效

  • Name:

    策略英文名称

  • Kind:

    策略模板类型

  • EnabledStatus:

    策略开关状态:open打开,close关闭

  • OpenConstraintInfoList:

    策略关联的实例列表



15312
15313
15314
# File 'lib/v20180525/models.rb', line 15312

def OpenConstraintInfoList
  @OpenConstraintInfoList
end

Instance Method Details

#deserialize(params) ⇒ Object



15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
# File 'lib/v20180525/models.rb', line 15322

def deserialize(params)
  @EnforcementAction = params['EnforcementAction']
  @Name = params['Name']
  @Kind = params['Kind']
  @EnabledStatus = params['EnabledStatus']
  unless params['OpenConstraintInfoList'].nil?
    @OpenConstraintInfoList = []
    params['OpenConstraintInfoList'].each do |i|
      openconstraintinfo_tmp = OpenConstraintInfo.new
      openconstraintinfo_tmp.deserialize(i)
      @OpenConstraintInfoList << openconstraintinfo_tmp
    end
  end
end