|
|
@ -259,15 +259,14 @@ func validateNotificationConfig(nConfig notificationConfig) APIErrorCode { |
|
|
|
// - kafka
|
|
|
|
// - kafka
|
|
|
|
// - webhook
|
|
|
|
// - webhook
|
|
|
|
func unmarshalSqsARN(queueARN string) (mSqs arnSQS) { |
|
|
|
func unmarshalSqsARN(queueARN string) (mSqs arnSQS) { |
|
|
|
mSqs = arnSQS{} |
|
|
|
|
|
|
|
strs := strings.SplitN(queueARN, ":", -1) |
|
|
|
strs := strings.SplitN(queueARN, ":", -1) |
|
|
|
if len(strs) != 6 { |
|
|
|
if len(strs) != 6 { |
|
|
|
return mSqs |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if serverConfig.GetRegion() != "" { |
|
|
|
if serverConfig.GetRegion() != "" { |
|
|
|
region := strs[3] |
|
|
|
region := strs[3] |
|
|
|
if region != serverConfig.GetRegion() { |
|
|
|
if region != serverConfig.GetRegion() { |
|
|
|
return mSqs |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
sqsType := strs[5] |
|
|
|
sqsType := strs[5] |
|
|
@ -294,5 +293,5 @@ func unmarshalSqsARN(queueARN string) (mSqs arnSQS) { |
|
|
|
|
|
|
|
|
|
|
|
mSqs.AccountID = strs[4] |
|
|
|
mSqs.AccountID = strs[4] |
|
|
|
|
|
|
|
|
|
|
|
return mSqs |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|