Interface AddToResourcePolicyResult

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AddToResourcePolicyResult.Jsii$Proxy

@Generated(value="jsii-pacmak/1.95.0 (build f1ff514)", date="2024-03-26T18:09:24.640Z") @Stability(Stable) public interface AddToResourcePolicyResult extends software.amazon.jsii.JsiiSerializable
Result of calling addToResourcePolicy.

Example:

 IBucket bucket = Bucket.fromBucketName(this, "existingBucket", "bucket-name");
 // 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());
 
  • Method Details

    • getStatementAdded

      @Stability(Stable) @NotNull Boolean 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

      @Stability(Stable) static AddToResourcePolicyResult.Builder builder()
      Returns:
      a AddToResourcePolicyResult.Builder of AddToResourcePolicyResult