Skip to content

PutDataProtectionPolicy

Source: src/AWS/SNS/PutDataProtectionPolicy.ts

Runtime binding for sns:PutDataProtectionPolicy.

Bind this operation to a Topic inside a function runtime to attach or replace the topic’s data protection policy; the ResourceArn is injected automatically. The binding grants the host function sns:PutDataProtectionPolicy on the topic. Provide the PutDataProtectionPolicyHttp layer on the Function to implement the binding.

// init (provide SNS.PutDataProtectionPolicyHttp on the Function)
const putDataProtectionPolicy = yield* SNS.PutDataProtectionPolicy(topic);
// runtime
yield* putDataProtectionPolicy({
DataProtectionPolicy: JSON.stringify({
Name: "basic-pii-audit",
Version: "2021-06-01",
Statement: [],
}),
});