Sha256: 20c1044ed4c819b13bebd2a27110a3724872aa5e75d717ecbebf4cdc26b41a1e

Contents?: true

Size: 1.14 KB

Versions: 50

Compression:

Stored size: 1.14 KB

Contents

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

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

    STATUSES = %w(
      PENDING_VALIDATION
      ISSUED
      INACTIVE
      EXPIRED
      VALIDATION_TIMED_OUT
      REVOKED
      FAILED
    )

    STATUSES.each do |status|
      define_method status.downcase + '?' do
        resource_via_client.status == status
      end
    end

    def has_domain_name?(domain)
      resource_via_client.domain_name == domain && \
      resource_via_client.certificate_arn == id
    end

    def has_domain_validation_option?(domain_name:, validation_method:, validation_status: nil)
      resource_via_client.domain_validation_options.find do |domain_validation_option|
        validation_status ||= domain_validation_option.validation_status
        domain_validation_option.domain_name == domain_name && \
        domain_validation_option.validation_method == validation_method && \
        domain_validation_option.validation_status == validation_status
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 3 rubygems

Version Path
awspec-1.25.1 lib/awspec/type/acm.rb
awspec-1.25.0 lib/awspec/type/acm.rb
awspec-1.24.4 lib/awspec/type/acm.rb
awspec-1.24.3 lib/awspec/type/acm.rb
awspec-1.24.2 lib/awspec/type/acm.rb
awspec-1.24.1 lib/awspec/type/acm.rb
awspec-1.24.0 lib/awspec/type/acm.rb
awspec-1.23.0 lib/awspec/type/acm.rb
awspec-1.22.1 lib/awspec/type/acm.rb
awspec-1.22.0 lib/awspec/type/acm.rb
awspec-1.21.1 lib/awspec/type/acm.rb
awspec-1.21.0 lib/awspec/type/acm.rb
awspec-1.20.0 lib/awspec/type/acm.rb
awspec-1.19.2 lib/awspec/type/acm.rb
awspec-1.19.1 lib/awspec/type/acm.rb
awspec-1.19.0 lib/awspec/type/acm.rb
cthiesfork-awspec-1.2.4 lib/awspec/type/acm.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/type/acm.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/type/acm.rb
awspec-1.18.6 lib/awspec/type/acm.rb