Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apps][aliyun] Set EndTime in the request #1247

Merged
merged 2 commits into from
May 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions streamalert/apps/_apps/aliyun.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
"""
from datetime import datetime
import json
import re

Expand Down Expand Up @@ -59,6 +60,11 @@ def __init__(self, event, context):
self.request.set_MaxResults(self._MAX_RESULTS)
self.request.set_StartTime(self._config.last_timestamp)

# Source code can be found here https://github.com/aliyun/aliyun-openapi-python-sdk/blob/
# master/aliyun-python-sdk-actiontrail/aliyunsdkactiontrail/request/v20171204/
# LookupEventsRequest.py
self.request.set_EndTime(datetime.utcnow().strftime(self.date_formatter()))

@classmethod
def _type(cls):
return 'actiontrail'
Expand Down