Interface GrantOnPrincipalAndResourceOptions

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:39.107Z") @Stability(Stable) public interface GrantOnPrincipalAndResourceOptions extends, CommonGrantOptions
Options for a grant operation to both identity and resource.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 Object conditions;
 IGrantable grantable;
 IPrincipal principal;
 IResourceWithPolicy resourceWithPolicy;
 GrantOnPrincipalAndResourceOptions grantOnPrincipalAndResourceOptions = GrantOnPrincipalAndResourceOptions.builder()
         // the properties below are optional
                 "conditionsKey", Map.of(
                         "conditionsKey", conditions)))
  • Method Details

    • getResource

      @Stability(Stable) @NotNull IResourceWithPolicy getResource()
      The resource with a resource policy.

      The statement will always be added to the resource policy.

    • getResourcePolicyPrincipal

      @Stability(Stable) @Nullable default IPrincipal getResourcePolicyPrincipal()
      The principal to use in the statement for the resource policy.

      Default: - the principal of the grantee will be used

    • getResourceSelfArns

      @Stability(Stable) @Nullable default List<String> getResourceSelfArns()
      When referring to the resource in a resource policy, use this as ARN.

      (Depending on the resource type, this needs to be '*' in a resource policy).

      Default: Same as regular resource ARNs

    • builder

      @Stability(Stable) static GrantOnPrincipalAndResourceOptions.Builder builder()
      a GrantOnPrincipalAndResourceOptions.Builder of GrantOnPrincipalAndResourceOptions