feat(IAM Policy Management): add support for v2/policies #178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Shaun Colley [email protected]
PR summary
Code to support new v2/policies API has been introduced. The new v2/policies API will have new JSON fields and existing v1/fields have been changed.
v1/policies API will continue to be supported.
Also updated test to remove use of callback
done()
with async/await (throws error to use one or other and followed pattern of access groups).PR Checklist
Please make sure that your PR fulfills the following requirements:
PR's are currently open for staging and production docs. They are not currently merged:
Staging: https://github.ibm.com/cloud-api-docs/iam-access-management/pull/139
Production: https://github.ibm.com/cloud-api-docs/iam-access-management/pull/140
Current vs new behavior
Current behavior will remain same (v1 will continue to be supported). New behavior is v2/policies support which allows for time based restriction policies using new rule field (an integration test has been added of this example).
Does this PR introduce a breaking change?
Other information
See:
Issue: https://github.ibm.com/IAM/AM-issues/issues/925
TRI: https://github.ibm.com/IAM/architecture/blob/master/TRIDocs/Access-Management/Smart-Policies/smart_policies.md