Package org.cdk8s.plus23.k8s
Class ResourceQuotaSpec.Builder
- java.lang.Object
-
- org.cdk8s.plus23.k8s.ResourceQuotaSpec.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResourceQuotaSpec>
- Enclosing interface:
- ResourceQuotaSpec
@Stability(Stable) public static final class ResourceQuotaSpec.Builder extends Object implements software.amazon.jsii.Builder<ResourceQuotaSpec>
A builder forResourceQuotaSpec
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceQuotaSpec
build()
Builds the configured instance.ResourceQuotaSpec.Builder
hard(Map<String,? extends Quantity> hard)
Sets the value ofResourceQuotaSpec.getHard()
ResourceQuotaSpec.Builder
scopes(List<String> scopes)
Sets the value ofResourceQuotaSpec.getScopes()
ResourceQuotaSpec.Builder
scopeSelector(ScopeSelector scopeSelector)
Sets the value ofResourceQuotaSpec.getScopeSelector()
-
-
-
Method Detail
-
hard
@Stability(Stable) public ResourceQuotaSpec.Builder hard(Map<String,? extends Quantity> hard)
Sets the value ofResourceQuotaSpec.getHard()
- Parameters:
hard
- hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/- Returns:
this
-
scopes
@Stability(Stable) public ResourceQuotaSpec.Builder scopes(List<String> scopes)
Sets the value ofResourceQuotaSpec.getScopes()
- Parameters:
scopes
- A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.- Returns:
this
-
scopeSelector
@Stability(Stable) public ResourceQuotaSpec.Builder scopeSelector(ScopeSelector scopeSelector)
Sets the value ofResourceQuotaSpec.getScopeSelector()
- Parameters:
scopeSelector
- scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.- Returns:
this
-
build
@Stability(Stable) public ResourceQuotaSpec build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ResourceQuotaSpec>
- Returns:
- a new instance of
ResourceQuotaSpec
- Throws:
NullPointerException
- if any required attribute was not provided
-
-