Skip to content

PutPolicy

Source: src/AWS/FMS/PutPolicy.ts

Runtime binding for fms:PutPolicy.

Creates or updates a Firewall Manager policy — a WAF, Shield Advanced, security group, Network Firewall, DNS Firewall, or network ACL policy applied across the organization’s accounts. Provide the implementation with Effect.provide(AWS.FMS.PutPolicyHttp).

// init — account-level binding takes no resource
const putPolicy = yield* AWS.FMS.PutPolicy();
// runtime
const result = yield* putPolicy({
Policy: {
PolicyName: "org-waf-baseline",
SecurityServicePolicyData: { Type: "WAFV2", ManagedServiceData: "..." },
ResourceType: "AWS::ElasticLoadBalancingV2::LoadBalancer",
ExcludeResourceTags: false,
RemediationEnabled: true,
},
});
console.log(result.Policy?.PolicyId);