@ThreadSafe public interface IamPolicyReader
IamPolicyReader converts a JSON policy into an IamPolicy.
IamPolicy.fromJson(String)| Modifier and Type | Method and Description |
|---|---|
static IamPolicyReader |
create()
Create a new
IamPolicyReader. |
IamPolicy |
read(byte[] policy)
Read a policy from a
byte array. |
IamPolicy |
read(InputStream policy)
Read a policy from an
InputStream. |
IamPolicy |
read(String policy)
Read a policy from a
String. |
static IamPolicyReader create()
IamPolicyReader.
This method is inexpensive, allowing the creation of readers wherever they are needed.
IamPolicy read(String policy)
String.
This only performs minimal validation on the provided policy.
RuntimeException - If the provided policy is not valid JSON or is missing a minimal set of required fields.IamPolicy read(InputStream policy)
InputStream.
The stream must provide a UTF-8 encoded string representing the policy. This only performs minimal validation on the provided policy.
RuntimeException - If the provided policy is not valid JSON or is missing a minimal set of required fields.IamPolicy read(byte[] policy)
byte array.
The stream must provide a UTF-8 encoded string representing the policy. This only performs minimal validation on the provided policy.
RuntimeException - If the provided policy is not valid JSON or is missing a minimal set of required fields.Copyright © 2023. All rights reserved.