[VC-43403] CyberArk(dataupload): replace PostDataReadingsWithOptions with PutSnapshot #703
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stacked on #701
Trying to untangle the CyberArk dataupload API wrapper from the DataReadings API of the agent.
The conversion between DataReadings and Snapshot will be implemented in a followup PR.
Snapshot
struct to represent the payload for the CyberArk Discovery and Context API.PostDataReadingsWithOptions
method withPutSnapshot
, which now uses theSnapshot
struct and removes the dependency onapi.DataReadingsPost
.retrievePresignedUploadURL
method to acceptclusterID
directly instead of relying onOptions
.PutSnapshot
method andSnapshot
struct. Removed unused imports and legacy test cases.Follow up PRs
Testing
I ran the data upload test with against the real API.