Class: Infrawrench::PostureDismissalsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::PostureDismissalsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.posture.dismissals
Instance Method Summary collapse
-
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Dismiss a posture finding.
-
#delete(resource_id:, rule_id:, org_id: nil, request_options: nil) ⇒ nil
Restore a dismissed posture finding.
-
#initialize(transport) ⇒ PostureDismissalsNamespace
constructor
private
A new instance of PostureDismissalsNamespace.
Constructor Details
#initialize(transport) ⇒ PostureDismissalsNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PostureDismissalsNamespace.
10757 10758 10759 |
# File 'lib/infrawrench/client.rb', line 10757 def initialize(transport) @transport = transport end |
Instance Method Details
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Dismiss a posture finding
Accept a finding — the bucket really is meant to be public, the key really
is rotated out of band. The finding leaves findings and stops feeding
the daily posture alerts, but the rule keeps being evaluated and the
finding is reported back under dismissed for as long as it still
matches. Idempotent: dismissing an already-dismissed finding rewrites the
note and the author.
Requires permission: resources:write.
POST /api/org/orgId/posture/dismissals
Raises on 400: Bad request
10782 10783 10784 10785 10786 10787 10788 10789 10790 |
# File 'lib/infrawrench/client.rb', line 10782 def create(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/posture/dismissals", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(resource_id:, rule_id:, org_id: nil, request_options: nil) ⇒ nil
Restore a dismissed posture finding
Undo a dismissal, putting the finding back on the list and back into the alert feed. The finding is identified by query parameters rather than path segments because resource ids are provider-native and routinely contain slashes.
Requires permission: resources:write.
DELETE /api/org/orgId/posture/dismissals
Raises on 400: Bad request
Raises on 404: Not found
10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 |
# File 'lib/infrawrench/client.rb', line 10814 def delete(resource_id:, rule_id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/posture/dismissals", path_params: { "orgId" => org_id }, query: { "resourceId" => resource_id, "ruleId" => rule_id }, accept: :empty, request_options: ) end |