@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.756Z") @Stability(value=Stable) public interface GrantOnPrincipalAndResourceOptions extends software.amazon.jsii.JsiiSerializable, CommonGrantOptions
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;
IPrincipal principal;
IResourceWithPolicy resourceWithPolicy;
GrantOnPrincipalAndResourceOptions grantOnPrincipalAndResourceOptions = GrantOnPrincipalAndResourceOptions.builder()
.actions(List.of("actions"))
.grantee(grantable)
.resource(resourceWithPolicy)
.resourceArns(List.of("resourceArns"))
// the properties below are optional
.resourcePolicyPrincipal(principal)
.resourceSelfArns(List.of("resourceSelfArns"))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
GrantOnPrincipalAndResourceOptions.Builder
A builder for
GrantOnPrincipalAndResourceOptions |
static class |
GrantOnPrincipalAndResourceOptions.Jsii$Proxy
An implementation for
GrantOnPrincipalAndResourceOptions |
| Modifier and Type | Method and Description |
|---|---|
static GrantOnPrincipalAndResourceOptions.Builder |
builder() |
IResourceWithPolicy |
getResource()
The resource with a resource policy.
|
default IPrincipal |
getResourcePolicyPrincipal()
The principal to use in the statement for the resource policy.
|
default List<String> |
getResourceSelfArns()
When referring to the resource in a resource policy, use this as ARN.
|
getActions, getGrantee, getResourceArns@Stability(value=Stable) @NotNull IResourceWithPolicy getResource()
The statement will always be added to the resource policy.
@Stability(value=Stable) @Nullable default IPrincipal getResourcePolicyPrincipal()
Default: - the principal of the grantee will be used
@Stability(value=Stable) @Nullable default List<String> getResourceSelfArns()
(Depending on the resource type, this needs to be '*' in a resource policy).
Default: Same as regular resource ARNs
@Stability(value=Stable) static GrantOnPrincipalAndResourceOptions.Builder builder()
builder in interface CommonGrantOptionsGrantOnPrincipalAndResourceOptions.Builder of GrantOnPrincipalAndResourceOptionsCopyright © 2022. All rights reserved.