github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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  }