Checking policy validity
    • PDF

    Checking policy validity

    • PDF

    Article Summary

    This checks the validity of the policy JSON.

    API

    • POST /policy/validation

    Requests

    Body

    {
      "policyName": "string",
      "description": "string",
      "permissions": [
        {
          "effect": "string",
          "targets": [
            {
              "product": "string",
              "actions": [
                "string"
              ],
              "resourceNrns": [
                "string"
              ]
            }
          ]
        }
      ]
    }
    
    ParameterRequirement statusTypeRestrictionsDescription
    policyNameYstringPolicy name
    descriptionYstringPolicy description
    permissionsYarrayPermission list
    permissions.effectYstringPermission status (currently only supports Allow)
    permissions.targetsYarrayPermission target
    permissions.targets.productYstringTarget product code
    permissions.targets.actionsYarrayTarget action
    permissions.targets.resourceNrnsYarrayTarget resource nrns

    Responses

    • Response
    {
      "success": true,
      "details": [
        {
          "code": "string",
          "location": "string",
          "message": "string",
          "type": "string"
        }
      ]
    }
    
    Parameter nameRequirement statusTypeDescription
    successYbooleanValidity check success status
    detailsNarrayValidity check result details
    details.codeNstringValidity check detailed code
    details.locationNstringValidity check location
    details.messageNstringValidity check detailed message
    details.typeNstringValidity check result type (INFO, WARN, ERROR), validity check failure when ERROR is included
    • Response example - Success
    {
      "success": true
    }
    
    • Response example - Failure
    {
      "success": false,
      "details": [
        {
          "type": "ERROR",
          "code": "iam.policy.invalidName.length.max",
          "location": "policyName",
          "message": "Policy name should be shorter than 30 characters."
        },
        {
          "type": "ERROR",
          "code": "iam.error.requiredFieldIsMissing",
          "location": "permissions",
          "message": "Reguired input value is missing."
        }
      ]
    }
    

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.