Skip to content

Get Policy

verifiedpermissions_get_policy R Documentation

Retrieves information about the specified policy

Description

Retrieves information about the specified policy.

Usage

verifiedpermissions_get_policy(policyStoreId, policyId)

Arguments

policyStoreId

[required] Specifies the ID of the policy store that contains the policy that you want information about.

To specify a policy store, use its ID or alias name. When using an alias name, prefix it with ⁠policy-store-alias/⁠. For example:

  • ID: PSEXAMPLEabcdefg111111

  • Alias name: policy-store-alias/example-policy-store

To view aliases, use list_policy_store_aliases.

policyId

[required] Specifies the ID of the policy you want information about.

You can use the policy name in place of the policy ID. When using a name, prefix it with ⁠name/⁠. For example:

  • ID: SPEXAMPLEabcdefg111111

  • Name: name/example-policy

Value

A list with the following syntax:

list(
  policyStoreId = "string",
  policyId = "string",
  policyType = "STATIC"|"TEMPLATE_LINKED",
  principal = list(
    entityType = "string",
    entityId = "string"
  ),
  resource = list(
    entityType = "string",
    entityId = "string"
  ),
  actions = list(
    list(
      actionType = "string",
      actionId = "string"
    )
  ),
  definition = list(
    static = list(
      description = "string",
      statement = "string"
    ),
    templateLinked = list(
      policyTemplateId = "string",
      principal = list(
        entityType = "string",
        entityId = "string"
      ),
      resource = list(
        entityType = "string",
        entityId = "string"
      )
    )
  ),
  createdDate = as.POSIXct(
    "2015-01-01"
  ),
  lastUpdatedDate = as.POSIXct(
    "2015-01-01"
  ),
  effect = "Permit"|"Forbid",
  name = "string"
)

Request syntax

svc$get_policy(
  policyStoreId = "string",
  policyId = "string"
)