Class: Serverspec::Type::AWS::AutoScaling::LaunchConfiguration
- Inherits:
-
Base
- Object
- Base
- Serverspec::Type::AWS::AutoScaling::LaunchConfiguration
- Defined in:
- lib/resources/autoscaling/launch_configuration.rb
Overview
The LaunchConfiguration class exposes the AutoScaling::LaunchConfiguration resources
Instance Method Summary collapse
-
#block_device_mappings ⇒ Array(Hash)
A block device mapping that specifies how block devices are exposed to the Instance.
-
#classic_link_vpc_id ⇒ String
The ID of a ClassicLink-enabled VPC to link your EC2-Classic Instances to.
-
#classic_link_vpc_security_groups ⇒ Array(String)
The IDs of one or more SecurityGroups for the VPC specified in ClassicLinkVPCId.
-
#default_tenancy? ⇒ Boolean
Check if the Instance tenancy is default.
-
#ebs_optimized? ⇒ Boolean
Check if the Instance is optimized for EBS I/O.
-
#iam_instance_profile ⇒ String
The name or ARN of the Instance profile associated with the IAM role for the Instance.
-
#image_id ⇒ String
The ID of the AMI.
-
#initialize(config_name, instance = nil) ⇒ LaunchConfiguration
constructor
AWS SDK for Ruby v2 Aws::AutoScaling::Client wrapper for initializing a LaunchConfiguration resource.
-
#instance_monitored? ⇒ Boolean
Check if the Instance monitoring is enabled.
-
#instance_type ⇒ String
The Instance type for the EC2 Instances.
-
#kernel_id ⇒ String
The ID of the kernel associated with the AMI.
-
#key_name ⇒ String
The name of the key pair.
-
#ramdisk_id ⇒ String
The ID of the RAM disk associated with the AMI.
-
#security_groups ⇒ Array(String)
The SecurityGroups to associate with the EC2 Instances.
-
#to_s ⇒ Object
Returns the String representation of AutoScaling::LaunchConfiguration.
-
#user_data ⇒ String
The user data available to the EC2 Instances.
-
#with_public_ip_address? ⇒ Boolean
Check whether the EC2 Instances are associated with a public IP address.
Constructor Details
#initialize(config_name, instance = nil) ⇒ LaunchConfiguration
AWS SDK for Ruby v2 Aws::AutoScaling::Client wrapper for initializing a LaunchConfiguration resource
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 16 def initialize(config_name, instance = nil) check_init_arg( 'config_name', 'AutoScaling::LaunchConfiguration', config_name ) @config_name = config_name @aws = instance.nil? ? Aws::AutoScaling::Client.new : instance get_config config_name end |
Instance Method Details
#block_device_mappings ⇒ Array(Hash)
A block device mapping that specifies how block devices are exposed to the Instance. See AutoScaling#describe_launch_configurations
114 115 116 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 114 def block_device_mappings @config.block_device_mappings end |
#classic_link_vpc_id ⇒ String
The ID of a ClassicLink-enabled VPC to link your EC2-Classic Instances to
75 76 77 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 75 def classic_link_vpc_id @config.classic_link_vpc_id end |
#classic_link_vpc_security_groups ⇒ Array(String)
The IDs of one or more SecurityGroups for the VPC specified in ClassicLinkVPCId
82 83 84 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 82 def classic_link_vpc_security_groups @config.classic_link_vpc_security_groups end |
#default_tenancy? ⇒ Boolean
Check if the Instance tenancy is default
50 51 52 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 50 def default_tenancy? @config.placement_tenancy == 'default' end |
#ebs_optimized? ⇒ Boolean
Check if the Instance is optimized for EBS I/O
39 40 41 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 39 def ebs_optimized? @config.ebs_optimized end |
#iam_instance_profile ⇒ String
The name or ARN of the Instance profile associated with the IAM role for the Instance
121 122 123 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 121 def iam_instance_profile @config.iam_instance_profile end |
#image_id ⇒ String
The ID of the AMI
56 57 58 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 56 def image_id @config.image_id end |
#instance_monitored? ⇒ Boolean
Check if the Instance monitoring is enabled
34 35 36 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 34 def instance_monitored? @config.instance_monitoring.enabled end |
#instance_type ⇒ String
The Instance type for the EC2 Instances
94 95 96 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 94 def instance_type @config.instance_type end |
#kernel_id ⇒ String
The ID of the kernel associated with the AMI
100 101 102 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 100 def kernel_id @config.kernel_id end |
#key_name ⇒ String
The name of the key pair
62 63 64 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 62 def key_name @config.key_name end |
#ramdisk_id ⇒ String
The ID of the RAM disk associated with the AMI
106 107 108 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 106 def ramdisk_id @config.ramdisk_id end |
#security_groups ⇒ Array(String)
The SecurityGroups to associate with the EC2 Instances
68 69 70 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 68 def security_groups @config.security_groups end |
#to_s ⇒ Object
Returns the String representation of AutoScaling::LaunchConfiguration
29 30 31 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 29 def to_s "AutoScaling LaunchConfiguration: #{@config_name}" end |
#user_data ⇒ String
The user data available to the EC2 Instances
88 89 90 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 88 def user_data @config.user_data end |
#with_public_ip_address? ⇒ Boolean
Check whether the EC2 Instances are associated with a public IP address
45 46 47 |
# File 'lib/resources/autoscaling/launch_configuration.rb', line 45 def with_public_ip_address? @config.associate_public_ip_address end |