mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 06:09:53 +05:00
Updated SQSPoster to accept token as optional parameter
This commit is contained in:
committed by
Dan Christian Bogos
parent
40a301676f
commit
a661a4c88b
@@ -92,7 +92,7 @@
|
||||
},
|
||||
"sqs_test_file": {
|
||||
"export_format": "*sqs_json_map",
|
||||
"export_path": "http://localhost:4576/?aws_region=eu-west-1&aws_key=key1&aws_secret=secret&aws_token=token",
|
||||
"export_path": "http://sqs.eu-west-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret",
|
||||
"content_fields": [
|
||||
{"tag": "CGRID", "type": "*composed", "value": "~CGRID", "field_id": "CGRID"},
|
||||
],
|
||||
|
||||
@@ -663,8 +663,7 @@ func (pstr *SQSPoster) newPosterSession() (s *sqs.SQS, err error) {
|
||||
cfg.Region = aws.String(pstr.awsRegion)
|
||||
}
|
||||
if len(pstr.awsID) != 0 &&
|
||||
len(pstr.awsKey) != 0 &&
|
||||
len(pstr.awsToken) != 0 {
|
||||
len(pstr.awsKey) != 0 {
|
||||
cfg.Credentials = credentials.NewStaticCredentials(pstr.awsID, pstr.awsKey, pstr.awsToken)
|
||||
}
|
||||
ses, err = session.NewSessionWithOptions(
|
||||
|
||||
Reference in New Issue
Block a user