Interface AddToResourcePolicyResult
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AddToResourcePolicyResult.Jsii$Proxy
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-04T09:27:42.867Z")
@Stability(Stable)
public interface AddToResourcePolicyResult
extends software.amazon.jsii.JsiiSerializable
Result of calling addToResourcePolicy.
Example:
IBucket bucket = Bucket.fromBucketName(this, "existingBucket", "amzn-s3-demo-bucket");
// No policy statement will be added to the resource
AddToResourcePolicyResult result = bucket.addToResourcePolicy(
PolicyStatement.Builder.create()
.actions(List.of("s3:GetObject"))
.resources(List.of(bucket.arnForObjects("file.txt")))
.principals(List.of(new AccountRootPrincipal()))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAddToResourcePolicyResultstatic final classAn implementation forAddToResourcePolicyResult -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default software.constructs.IDependableDependable which allows depending on the policy change being applied.Whether the statement was added.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getStatementAdded
Whether the statement was added. -
getPolicyDependable
@Stability(Stable) @Nullable default software.constructs.IDependable getPolicyDependable()Dependable which allows depending on the policy change being applied.Default: - If `statementAdded` is true, the resource object itself. Otherwise, no dependable.
-
builder
- Returns:
- a
AddToResourcePolicyResult.BuilderofAddToResourcePolicyResult
-