Sha256: dc04e5f981b859842c6459c23b8c57287e23129f04d7d014ad825a22691e5da5

Contents?: true

Size: 451 Bytes

Versions: 12

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

module Awspec::Type
  class CloudwatchEvent < ResourceBase
    def resource_via_client
      @resource_via_client ||= find_cloudwatch_event(@display_name)
    end

    def id
      @id ||= resource_via_client.arn if resource_via_client
    end

    def enable?
      resource_via_client.state == 'ENABLED'
    end

    def scheduled?(schedule)
      resource_via_client.schedule_expression == schedule
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
awspec-1.30.0 lib/awspec/type/cloudwatch_event.rb
awspec-1.29.3 lib/awspec/type/cloudwatch_event.rb
awspec-1.29.2 lib/awspec/type/cloudwatch_event.rb
awspec-1.29.1 lib/awspec/type/cloudwatch_event.rb
awspec-1.29.0 lib/awspec/type/cloudwatch_event.rb
awspec-1.28.2 lib/awspec/type/cloudwatch_event.rb
awspec-1.28.1 lib/awspec/type/cloudwatch_event.rb
awspec-1.28.0 lib/awspec/type/cloudwatch_event.rb
awspec-1.27.1 lib/awspec/type/cloudwatch_event.rb
awspec-1.27.0 lib/awspec/type/cloudwatch_event.rb
awspec-1.26.0 lib/awspec/type/cloudwatch_event.rb
awspec-1.25.2 lib/awspec/type/cloudwatch_event.rb