Class GrantWithResourceOptions.Builder
java.lang.Object
software.amazon.awscdk.services.iam.GrantWithResourceOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GrantWithResourceOptions>
- Enclosing interface:
- GrantWithResourceOptions
@Stability(Stable)
public static final class GrantWithResourceOptions.Builder
extends Object
implements software.amazon.jsii.Builder<GrantWithResourceOptions>
A builder for
GrantWithResourceOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCommonGrantOptions.getActions()
build()
Builds the configured instance.grantee
(IGrantable grantee) Sets the value ofCommonGrantOptions.getGrantee()
resource
(IResourceWithPolicy resource) Sets the value ofGrantWithResourceOptions.getResource()
resourceArns
(List<String> resourceArns) Sets the value ofCommonGrantOptions.getResourceArns()
resourceSelfArns
(List<String> resourceSelfArns) Sets the value ofGrantWithResourceOptions.getResourceSelfArns()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
resource
Sets the value ofGrantWithResourceOptions.getResource()
- Parameters:
resource
- The resource with a resource policy. This parameter is required. The statement will be added to the resource policy if it couldn't be added to the principal policy.- Returns:
this
-
resourceSelfArns
@Stability(Stable) public GrantWithResourceOptions.Builder resourceSelfArns(List<String> resourceSelfArns) Sets the value ofGrantWithResourceOptions.getResourceSelfArns()
- Parameters:
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).- Returns:
this
-
actions
Sets the value ofCommonGrantOptions.getActions()
- Parameters:
actions
- The actions to grant. This parameter is required.- Returns:
this
-
grantee
Sets the value ofCommonGrantOptions.getGrantee()
- Parameters:
grantee
- The principal to grant to. This parameter is required.- Returns:
this
-
resourceArns
Sets the value ofCommonGrantOptions.getResourceArns()
- Parameters:
resourceArns
- The resource ARNs to grant to. This parameter is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GrantWithResourceOptions>
- Returns:
- a new instance of
GrantWithResourceOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-