Class: RubyAemAws::Component::AuthorPrimary
- Inherits:
-
Object
- Object
- RubyAemAws::Component::AuthorPrimary
- Includes:
- AbstractSingleComponent, AbstractSnapshot, HealthyStateVerifier, MetricVerifier, SnapshotVerifier
- Defined in:
- lib/ruby_aem_aws/component/author_primary.rb
Overview
Interface to the AWS instance running the Author-Primary component of a full-set AEM stack.
Constant Summary collapse
- EC2_COMPONENT =
'author-primary'.freeze
- EC2_NAME =
'AEM Author - Primary'.freeze
Instance Attribute Summary collapse
-
#cloud_watch_client ⇒ Object
readonly
Returns the value of attribute cloud_watch_client.
-
#cloud_watch_log_client ⇒ Object
readonly
Returns the value of attribute cloud_watch_log_client.
-
#descriptor ⇒ Object
readonly
Returns the value of attribute descriptor.
-
#ec2_resource ⇒ Object
readonly
Returns the value of attribute ec2_resource.
Instance Method Summary collapse
- #get_tags ⇒ Object
-
#initialize(stack_prefix, params) ⇒ Object
constructor
-
CloudWatchClient: AWS Cloudwatch Client.
-
-
#terminate ⇒ Object
Aws::EC2::Instance.
Methods included from SnapshotVerifier
Methods included from MetricVerifier
#alarm?, #component_alarm?, #component_ec2_metric?, #component_log_event?, #component_log_stream?, #component_loggroup?, #component_metric?, #log_event?, #log_stream?, #loggroup?, #metric?
Methods included from RubyAemAws::CloudwatchClient
#get_alarm, #get_log_event, #get_log_streams, #get_metrics
Methods included from HealthyStateVerifier
#healthy?, #wait_until_healthy
Methods included from AbstractSnapshot
#get_snapshot_by_id, #get_snapshots_by_type
Methods included from AbstractComponent
Methods included from InstanceDescriber
#describe_instance, #describe_instances
Methods included from AbstractSingleComponent
#get_all_instances, #get_instance
Constructor Details
#initialize(stack_prefix, params) ⇒ Object
-
CloudWatchClient: AWS Cloudwatch Client.
-
CloudWatchLogsClient: AWS Cloudwatch Logs Client.
-
Ec2Resource: AWS EC2 Resource connection.
42 43 44 45 46 47 48 |
# File 'lib/ruby_aem_aws/component/author_primary.rb', line 42 def initialize(stack_prefix, params) @descriptor = ComponentDescriptor.new(stack_prefix, EC2Descriptor.new(EC2_COMPONENT, EC2_NAME)) @cloud_watch_client = params[:CloudWatchClient] @cloud_watch_log_client = params[:CloudWatchLogsClient] @ec2_resource = params[:Ec2Resource] end |
Instance Attribute Details
#cloud_watch_client ⇒ Object (readonly)
Returns the value of attribute cloud_watch_client.
25 26 27 |
# File 'lib/ruby_aem_aws/component/author_primary.rb', line 25 def cloud_watch_client @cloud_watch_client end |
#cloud_watch_log_client ⇒ Object (readonly)
Returns the value of attribute cloud_watch_log_client.
25 26 27 |
# File 'lib/ruby_aem_aws/component/author_primary.rb', line 25 def cloud_watch_log_client @cloud_watch_log_client end |
#descriptor ⇒ Object (readonly)
Returns the value of attribute descriptor.
25 26 27 |
# File 'lib/ruby_aem_aws/component/author_primary.rb', line 25 def descriptor @descriptor end |
#ec2_resource ⇒ Object (readonly)
Returns the value of attribute ec2_resource.
25 26 27 |
# File 'lib/ruby_aem_aws/component/author_primary.rb', line 25 def ec2_resource @ec2_resource end |
Instance Method Details
#get_tags ⇒ Object
57 58 59 60 |
# File 'lib/ruby_aem_aws/component/author_primary.rb', line 57 def instance = get_instance instance. end |
#terminate ⇒ Object
Returns Aws::EC2::Instance.
51 52 53 54 55 |
# File 'lib/ruby_aem_aws/component/author_primary.rb', line 51 def terminate instance = get_instance instance.terminate instance.wait_until_terminated end |