Skip to content

GetViolationDetails

Source: src/AWS/FMS/GetViolationDetails.ts

Runtime binding for fms:GetViolationDetails.

Returns violation details for the specified resource covered by a Firewall Manager network ACL, security group, Network Firewall, DNS Firewall, or third-party firewall policy. Provide the implementation with Effect.provide(AWS.FMS.GetViolationDetailsHttp).

// init — account-level binding takes no resource
const getViolationDetails = yield* AWS.FMS.GetViolationDetails();
// runtime
const result = yield* getViolationDetails({
PolicyId: policyId,
MemberAccount: accountId,
ResourceId: instanceId,
ResourceType: "AWS::EC2::Instance",
});
console.log(result.ViolationDetail?.ResourceViolations.length);