Edit policy
    • PDF

    Edit policy

    • PDF

    Article Summary

    Edits a policy.

    API

    • PUT /policies/{policyId}

    Requests

    Path Variables

    ParametersRequirement statusTypeRestrictionsDescription
    policyIdYstringPolicy ID

    Body

    {
      "description": "string",
      "permissions": [
        {
          "effect": "string",
          "targets": [
            {
              "product": "string",
              "actions": [
                "string"
              ],
              "resourceNrns": [
                "string"
              ]
            }
          ]
        }
      ]
    }
    
    ParametersRequirement statusTypeRestrictionsDescription
    descriptionYstringPolicy description
    permissionsYarrayPermission list
    permissions.effectYstringPermission status (currently only supports Allow)
    permissions.targetsYarrayPermission target
    permissions.targets.productYstringTarget service codeTarget product code
    permissions.targets.actionsYarray- The following rules need to be applied according to the service-specific authority unit
    - Detailed action unit > Action name or View*, Change*
    - All views unit or All changes unit > All views: View*/All changes: Change*
    - Service units > Full authority: *
    Target action
    permissions.targets.resourceNrnsYarrayIf nrn is not specified, an asterisk (*) must be appliedTarget resource nrns

    Responses

    • Responses
    {
      "policyId": "string",
      "policyName": "string",
      "description": "string",
      "validationResult": {
        "details": [
          {
            "code": "string",
            "location": "string",
            "message": "string",
            "type": "ERROR"
          }
        ],
        "success": true
      }
    }
    
    Parameter nameRequirement statusTypeDescription
    policyIdNstringPolicy ID
    policyNameNstringPolicy
    descriptionNstringPolicy description
    validationResult.YobjectPolicy creation success status
    validationResult.successYbooleanPolicy creation success status
    validationResult.detailsNarrayValidation check result details
    validationResult.details.codeNstringValidation check detailed code
    validationResult.details.locationNstringValidation check location
    validationResult.details.messageNstringValidation check detailed message
    validationResult.details.typeNstring- Validation check result type (INFO/WARN/ERROR)
    - Failure when ERROR is included
    • Response examples - Success
    {
      "policyId": "000000000-qwer-asdf-123456789012",
      "policyName": "policy-test",
      "description": "policy test ",
      "validationResult": {
        "success": true
      }
    }
    
    • Response examples - Failure
    {
      "validationResult": {
        "success": false,
        "details": [
          {
            "type": "ERROR",
            "code": "iam.error.requiredFieldIsMissing",
            "location": "permissions",
            "message": "The required value is missing."
          }
        ]
      }
    }
    

    Was this article helpful?

    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.