Class: AWSCDK::DeviceFarm::CfnDevicePool::RuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
device_farm/cfn_device_pool.rb

Overview

Represents a condition for a device pool.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute: nil, operator: nil, value: nil) ⇒ RuleProperty

Returns a new instance of RuleProperty.

Parameters:

  • attribute (String, nil) (defaults to: nil)

    The rule's stringified attribute. For example, specify the value as "\"abc\"" .

  • operator (String, nil) (defaults to: nil)

    Specifies how Device Farm compares the rule's attribute to the value.

  • value (String, nil) (defaults to: nil)

    The rule's value.



586
587
588
589
590
591
592
593
# File 'device_farm/cfn_device_pool.rb', line 586

def initialize(attribute: nil, operator: nil, value: nil)
  @attribute = attribute
  Jsii::Type.check_type(@attribute, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attribute") unless @attribute.nil?
  @operator = operator
  Jsii::Type.check_type(@operator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operator") unless @operator.nil?
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless @value.nil?
end

Instance Attribute Details

#attributeString? (readonly)

The rule's stringified attribute. For example, specify the value as "\"abc\"" .

The supported operators for each attribute are provided in the following list.

  • APPIUM_VERSION - The Appium version for the test.

Supported operators: CONTAINS

  • ARN - The Amazon Resource Name (ARN) of the device (for example, arn:aws:devicefarm:us-west-2::device:12345Example .

Supported operators: EQUALS , IN , NOT_IN

  • AVAILABILITY - The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or TEMPORARY_NOT_AVAILABLE.

Supported operators: EQUALS

  • FLEET_TYPE - The fleet type. Valid values are PUBLIC or PRIVATE.

Supported operators: EQUALS

  • FORM_FACTOR - The device form factor. Valid values are PHONE or TABLET.

Supported operators: EQUALS , IN , NOT_IN

  • INSTANCE_ARN - The Amazon Resource Name (ARN) of the device instance.

Supported operators: IN , NOT_IN

  • INSTANCE_LABELS - The label of the device instance.

Supported operators: CONTAINS

  • MANUFACTURER - The device manufacturer (for example, Apple).

Supported operators: EQUALS , IN , NOT_IN

  • MODEL - The device model, such as Apple iPad Air 2 or Google Pixel.

Supported operators: CONTAINS , EQUALS , IN , NOT_IN

  • OS_VERSION - The operating system version (for example, 10.3.2).

Supported operators: EQUALS , GREATER_THAN , GREATER_THAN_OR_EQUALS , IN , LESS_THAN , LESS_THAN_OR_EQUALS , NOT_IN

  • PLATFORM - The device platform. Valid values are ANDROID or IOS.

Supported operators: EQUALS , IN , NOT_IN

  • REMOTE_ACCESS_ENABLED - Whether the device is enabled for remote access. Valid values are TRUE or FALSE.

Supported operators: EQUALS

  • REMOTE_DEBUG_ENABLED - Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE.

Supported operators: EQUALS

Because remote debugging is no longer supported , this filter is ignored.



655
656
657
# File 'device_farm/cfn_device_pool.rb', line 655

def attribute
  @attribute
end

#operatorString? (readonly)

Specifies how Device Farm compares the rule's attribute to the value.

For the operators that are supported by each attribute, see the attribute descriptions.



662
663
664
# File 'device_farm/cfn_device_pool.rb', line 662

def operator
  @operator
end

#valueString? (readonly)

The rule's value.



667
668
669
# File 'device_farm/cfn_device_pool.rb', line 667

def value
  @value
end

Class Method Details

.jsii_propertiesObject



669
670
671
672
673
674
675
# File 'device_farm/cfn_device_pool.rb', line 669

def self.jsii_properties
  {
    :attribute => "attribute",
    :operator => "operator",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



677
678
679
680
681
682
683
684
685
# File 'device_farm/cfn_device_pool.rb', line 677

def to_jsii
  result = {}
  result.merge!({
    "attribute" => @attribute,
    "operator" => @operator,
    "value" => @value,
  })
  result.compact
end