Skip to content

Update Policy Template

verifiedpermissions_update_policy_template R Documentation

Updates the specified policy template

Description

Updates the specified policy template. You can update only the description and the some elements of the policyBody.

Changes you make to the policy template content are immediately (within the constraints of eventual consistency) reflected in authorization decisions that involve all template-linked policies instantiated from this template.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Usage

verifiedpermissions_update_policy_template(policyStoreId,
  policyTemplateId, description, statement)

Arguments

policyStoreId

[required] Specifies the ID of the policy store that contains the policy template that you want to update.

policyTemplateId

[required] Specifies the ID of the policy template that you want to update.

description

Specifies a new description to apply to the policy template.

statement

[required] Specifies new statement content written in Cedar policy language to replace the current body of the policy template.

You can change only the following elements of the policy body:

  • The action referenced by the policy template.

  • Any conditional clauses, such as when or unless clauses.

You can't change the following elements:

  • The effect (permit or forbid) of the policy template.

  • The principal referenced by the policy template.

  • The resource referenced by the policy template.

Value

A list with the following syntax:

list(
  policyStoreId = "string",
  policyTemplateId = "string",
  createdDate = as.POSIXct(
    "2015-01-01"
  ),
  lastUpdatedDate = as.POSIXct(
    "2015-01-01"
  )
)

Request syntax

svc$update_policy_template(
  policyStoreId = "string",
  policyTemplateId = "string",
  description = "string",
  statement = "string"
)