Method: Wavefront::Validators#wf_aws_external_id?

Defined in:
lib/wavefront-sdk/validators.rb

#wf_aws_external_id?(id) ⇒ Boolean

Ensure the given argument is a valid AWS external ID, used in the AWS cloud integration. not valid

Parameters:

  • id (String)

    the external ID to validate

Returns:

  • (Boolean)

    true if the external ID is valid

Raises:

  • Wavefront::Exception::InvalidAwsExternalId if the external ID is



650
651
652
653
654
# File 'lib/wavefront-sdk/validators.rb', line 650

def wf_aws_external_id?(id)
  return true if id.is_a?(String) && id =~ /^[a-z0-9A-Z]{16}$/

  raise Wavefront::Exception::InvalidAwsExternalId, id
end