github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/builtin/providers/aws/awserr.go (about)

     1  package aws
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/aws/aws-sdk-go/aws/awserr"
     7  )
     8  
     9  func isAWSErr(err error, code string, message string) bool {
    10  	if err, ok := err.(awserr.Error); ok {
    11  		return err.Code() == code && strings.Contains(err.Message(), message)
    12  	}
    13  	return false
    14  }