Class: AWSCDK::DeviceFarm::CfnInstanceProfileProps

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

Overview

Properties for defining a CfnInstanceProfile.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description: nil, exclude_app_packages_from_cleanup: nil, package_cleanup: nil, reboot_after_use: nil, tags: nil) ⇒ CfnInstanceProfileProps

Returns a new instance of CfnInstanceProfileProps.

Parameters:

  • name (String)

    The name of the instance profile.

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

    The description of the instance profile.

  • exclude_app_packages_from_cleanup (Array<String>, nil) (defaults to: nil)

    An array of strings containing the list of app packages that should not be cleaned up from the device after a test run completes.

  • package_cleanup (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    When set to true , Device Farm removes app packages after a test run.

  • reboot_after_use (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    When set to true , Device Farm reboots the instance after a test run.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'device_farm/cfn_instance_profile_props.rb', line 15

def initialize(name:, description: nil, exclude_app_packages_from_cleanup: nil, package_cleanup: nil, reboot_after_use: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @exclude_app_packages_from_cleanup = exclude_app_packages_from_cleanup
  Jsii::Type.check_type(@exclude_app_packages_from_cleanup, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludeAppPackagesFromCleanup") unless @exclude_app_packages_from_cleanup.nil?
  @package_cleanup = package_cleanup
  Jsii::Type.check_type(@package_cleanup, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "packageCleanup") unless @package_cleanup.nil?
  @reboot_after_use = reboot_after_use
  Jsii::Type.check_type(@reboot_after_use, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "rebootAfterUse") unless @reboot_after_use.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the instance profile.



39
40
41
# File 'device_farm/cfn_instance_profile_props.rb', line 39

def description
  @description
end

#exclude_app_packages_from_cleanupArray<String>? (readonly)

An array of strings containing the list of app packages that should not be cleaned up from the device after a test run completes.

The list of packages is considered only if you set package_cleanup to true .



46
47
48
# File 'device_farm/cfn_instance_profile_props.rb', line 46

def exclude_app_packages_from_cleanup
  @exclude_app_packages_from_cleanup
end

#nameString (readonly)

The name of the instance profile.



34
35
36
# File 'device_farm/cfn_instance_profile_props.rb', line 34

def name
  @name
end

#package_cleanupBoolean, ... (readonly)

When set to true , Device Farm removes app packages after a test run.

The default value is false for private devices.



53
54
55
# File 'device_farm/cfn_instance_profile_props.rb', line 53

def package_cleanup
  @package_cleanup
end

#reboot_after_useBoolean, ... (readonly)

When set to true , Device Farm reboots the instance after a test run.

The default value is true .



60
61
62
# File 'device_farm/cfn_instance_profile_props.rb', line 60

def reboot_after_use
  @reboot_after_use
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag in the guide .



67
68
69
# File 'device_farm/cfn_instance_profile_props.rb', line 67

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



69
70
71
72
73
74
75
76
77
78
# File 'device_farm/cfn_instance_profile_props.rb', line 69

def self.jsii_properties
  {
    :name => "name",
    :description => "description",
    :exclude_app_packages_from_cleanup => "excludeAppPackagesFromCleanup",
    :package_cleanup => "packageCleanup",
    :reboot_after_use => "rebootAfterUse",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



80
81
82
83
84
85
86
87
88
89
90
91
# File 'device_farm/cfn_instance_profile_props.rb', line 80

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "description" => @description,
    "excludeAppPackagesFromCleanup" => @exclude_app_packages_from_cleanup,
    "packageCleanup" => @package_cleanup,
    "rebootAfterUse" => @reboot_after_use,
    "tags" => @tags,
  })
  result.compact
end