public static final class GrantOnPrincipalAndResourceOptions.Builder
extends java.lang.Object
GrantOnPrincipalAndResourceOptions
Constructor and Description |
---|
Builder() |
public GrantOnPrincipalAndResourceOptions.Builder resource(IResourceWithPolicy resource)
GrantOnPrincipalAndResourceOptions.getResource()
resource
- The resource with a resource policy. This parameter is required.
The statement will always be added to the resource policy.this
public GrantOnPrincipalAndResourceOptions.Builder resourcePolicyPrincipal(IPrincipal resourcePolicyPrincipal)
GrantOnPrincipalAndResourceOptions.getResourcePolicyPrincipal()
resourcePolicyPrincipal
- The principal to use in the statement for the resource policy.this
public GrantOnPrincipalAndResourceOptions.Builder resourceSelfArns(java.util.List<java.lang.String> resourceSelfArns)
GrantOnPrincipalAndResourceOptions.getResourceSelfArns()
resourceSelfArns
- 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).this
public GrantOnPrincipalAndResourceOptions.Builder actions(java.util.List<java.lang.String> actions)
CommonGrantOptions.getActions()
actions
- The actions to grant. This parameter is required.this
public GrantOnPrincipalAndResourceOptions.Builder grantee(IGrantable grantee)
CommonGrantOptions.getGrantee()
grantee
- The principal to grant to. This parameter is required.this
public GrantOnPrincipalAndResourceOptions.Builder resourceArns(java.util.List<java.lang.String> resourceArns)
CommonGrantOptions.getResourceArns()
resourceArns
- The resource ARNs to grant to. This parameter is required.this
public GrantOnPrincipalAndResourceOptions build()
GrantOnPrincipalAndResourceOptions
java.lang.NullPointerException
- if any required attribute was not provided