Interface GrantWithResourceOptions

All Superinterfaces:
CommonGrantOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
GrantWithResourceOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.310Z") @Stability(Stable) public interface GrantWithResourceOptions extends software.amazon.jsii.JsiiSerializable, CommonGrantOptions
Options for a grant operation.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.iam.*;
 IGrantable grantable;
 IResourceWithPolicy resourceWithPolicy;
 GrantWithResourceOptions grantWithResourceOptions = GrantWithResourceOptions.builder()
         .actions(List.of("actions"))
         .grantee(grantable)
         .resource(resourceWithPolicy)
         .resourceArns(List.of("resourceArns"))
         // the properties below are optional
         .resourceSelfArns(List.of("resourceSelfArns"))
         .build();
 
  • Method Details

    • getResource

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

      The statement will be added to the resource policy if it couldn't be added to the principal policy.

    • 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 GrantWithResourceOptions.Builder builder()
      Returns:
      a GrantWithResourceOptions.Builder of GrantWithResourceOptions