@Generated(value="jsii-pacmak/1.29.0 (build 41df200)", date="2021-06-02T09:55:31.423Z") @Stability(value=Experimental) public class PolicyDocument extends software.amazon.jsii.JsiiObject implements IResolvable
| Modifier and Type | Class and Description |
|---|---|
static class |
PolicyDocument.Builder
(experimental) A fluent builder for
PolicyDocument. |
software.amazon.jsii.JsiiObject.InitializationModeIResolvable.Jsii$Default, IResolvable.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
PolicyDocument() |
protected |
PolicyDocument(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
PolicyDocument(software.amazon.jsii.JsiiObjectRef objRef) |
|
PolicyDocument(PolicyDocumentProps props) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStatements(PolicyStatement... statement)
(experimental) Adds a statement to the policy document.
|
static PolicyDocument |
fromJson(Object obj)
(experimental) Creates a new PolicyDocument based on the object provided.
|
List<String> |
getCreationStack()
(experimental) The creation stack of this resolvable which will be appended to errors thrown during resolution.
|
Boolean |
getIsEmpty()
(experimental) Whether the policy document contains any statements.
|
Number |
getStatementCount()
(experimental) The number of statements already added to this policy.
|
Object |
resolve(IResolveContext context)
(experimental) Produce the Token's value at resolution time.
|
Object |
toJSON()
(experimental) JSON-ify the document.
|
String |
toString()
(experimental) Encode the policy document as a string.
|
List<String> |
validateForAnyPolicy()
(experimental) Validate that all policy statements in the policy document satisfies the requirements for any policy.
|
List<String> |
validateForIdentityPolicy()
(experimental) Validate that all policy statements in the policy document satisfies the requirements for an identity-based policy.
|
List<String> |
validateForResourcePolicy()
(experimental) Validate that all policy statements in the policy document satisfies the requirements for a resource-based policy.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected PolicyDocument(software.amazon.jsii.JsiiObjectRef objRef)
protected PolicyDocument(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public PolicyDocument(@Nullable
PolicyDocumentProps props)
props - @Stability(value=Experimental) public PolicyDocument()
@Stability(value=Experimental) @NotNull public static PolicyDocument fromJson(@NotNull Object obj)
This will accept an object created from the .toJSON() call
obj - the PolicyDocument in object form. This parameter is required.@Stability(value=Experimental)
public void addStatements(@NotNull
PolicyStatement... statement)
statement - the statement to add. This parameter is required.@Stability(value=Experimental) @NotNull public Object resolve(@NotNull IResolveContext context)
resolve in interface IResolvablecontext - This parameter is required.@Stability(value=Experimental) @NotNull public Object toJSON()
Used when JSON.stringify() is called
@Stability(value=Experimental) @NotNull public String toString()
toString in interface IResolvabletoString in class Object@Stability(value=Experimental) @NotNull public List<String> validateForAnyPolicy()
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json@Stability(value=Experimental) @NotNull public List<String> validateForIdentityPolicy()
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json@Stability(value=Experimental) @NotNull public List<String> validateForResourcePolicy()
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json@Stability(value=Experimental) @NotNull public List<String> getCreationStack()
This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.
getCreationStack in interface IResolvable@Stability(value=Experimental) @NotNull public Boolean getIsEmpty()
@Stability(value=Experimental) @NotNull public Number getStatementCount()
Can be used, for example, to generate unique "sid"s within the policy.
Copyright © 2021. All rights reserved.