CfnPolicyPropsMixin Mixin
Creates or updates a Cedar policy and saves it in the specified policy store.
You can create either a static policy or a policy linked to a policy template.
You can directly update only static policies. To update a template-linked policy, you must update its linked policy template instead.
- To create a static policy, in the
Definitioninclude aStaticelement that includes the Cedar policy text in theStatementelement. - To create a policy that is dynamically linked to a policy template, in the
Definitioninclude aTemplatelinkedelement that specifies the policy template ID and the principal and resource to associate with this policy. If the policy template is ever updated, any policies linked to the policy template automatically use the updated template.
If policy validation is enabled in the policy store, then updating a static policy causes Verified Permissions to validate the policy against the schema in the policy store. If the updated static policy doesn't pass validation, the operation fails and the update isn't stored.
When you edit a static policy, You can change only certain elements of a static policy:
The action referenced by the policy.
A condition clause, such as when and unless.
You can't change these elements of a static policy:
- Changing a policy from a static policy to a template-linked policy.
- Changing the effect of a static policy from permit or forbid.
- The principal referenced by a static policy.
- The resource referenced by a static policy.
- To update a template-linked policy, you must update the template instead.
- CloudFormation
AWS::VerifiedPermissions::Policy- Source
- Generated code
- Type last changed
- v2.269.0 · 16 Sep 2026
Initializer
new CfnPolicyPropsMixin(props: CfnPolicyMixinProps, options?: CfnPropertyMixinOptions)
CfnPolicyPropsMixin(props: CfnPolicyMixinProps, options: typing.Optional[CfnPropertyMixinOptions] = None)
new CfnPolicyPropsMixin(CfnPolicyMixinProps props, CfnPropertyMixinOptions options)
new CfnPolicyPropsMixin(CfnPolicyMixinProps props, CfnPropertyMixinOptions? options = null)
NewCfnPolicyPropsMixin(Props CfnPolicyMixinProps, Options CfnPropertyMixinOptions)
Methods
applyTo(construct: IConstruct): voiddef apply_to(self, construct: IConstruct) -> Nonepublic void applyTo(IConstruct construct)public void ApplyTo(IConstruct construct)func ApplyTo(Construct IConstruct)#isMixin(x: any): boolean@staticmethod def is_mixin(x: Any) -> boolpublic static Boolean isMixin(Object x)public static bool IsMixin(object x)func IsMixin(X interface{}) *boolstatic#1 parameter · returns
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Mixin.
supports(construct: IConstruct): booleandef supports(self, construct: IConstruct) -> boolpublic Boolean supports(IConstruct construct)public bool Supports(IConstruct construct)func Supports(Construct IConstruct) *bool#