Package org.cdk8s.plus24
Class ClusterRole.Builder
- java.lang.Object
-
- org.cdk8s.plus24.ClusterRole.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClusterRole>
- Enclosing class:
- ClusterRole
@Stability(Stable) public static final class ClusterRole.Builder extends Object implements software.amazon.jsii.Builder<ClusterRole>
A fluent builder forClusterRole
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusterRole.Builder
aggregationLabels(Map<String,String> aggregationLabels)
Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole's rules.ClusterRole
build()
static ClusterRole.Builder
create(software.constructs.Construct scope, String id)
ClusterRole.Builder
metadata(org.cdk8s.ApiObjectMetadata metadata)
Metadata that all persisted resources must have, which includes all objects users must create.ClusterRole.Builder
rules(List<? extends ClusterRolePolicyRule> rules)
A list of rules the role should allow.
-
-
-
Method Detail
-
create
@Stability(Stable) public static ClusterRole.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ClusterRole.Builder
.
-
metadata
@Stability(Stable) public ClusterRole.Builder metadata(org.cdk8s.ApiObjectMetadata metadata)
Metadata that all persisted resources must have, which includes all objects users must create.- Parameters:
metadata
- Metadata that all persisted resources must have, which includes all objects users must create. This parameter is required.- Returns:
this
-
aggregationLabels
@Stability(Stable) public ClusterRole.Builder aggregationLabels(Map<String,String> aggregationLabels)
Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole's rules.- Parameters:
aggregationLabels
- Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole's rules. This parameter is required.- Returns:
this
-
rules
@Stability(Stable) public ClusterRole.Builder rules(List<? extends ClusterRolePolicyRule> rules)
A list of rules the role should allow.Default: []
- Parameters:
rules
- A list of rules the role should allow. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public ClusterRole build()
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ClusterRole>
-
-