Class ConsumableResource.Builder
java.lang.Object
software.amazon.awscdk.services.batch.ConsumableResource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ConsumableResource>
- Enclosing class:
ConsumableResource
@Stability(Stable)
public static final class ConsumableResource.Builder
extends Object
implements software.amazon.jsii.Builder<ConsumableResource>
A fluent builder for
ConsumableResource.-
Method Summary
Modifier and TypeMethodDescriptionbuild()consumableResourceName(String consumableResourceName) The name of the consumable resource.static ConsumableResource.BuilderresourceType(ConsumableResourceType resourceType) The type of consumable resource.Tags to apply to the consumable resource.totalQuantity(Number totalQuantity) The total quantity of the consumable resource.
-
Method Details
-
create
@Stability(Stable) public static ConsumableResource.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
ConsumableResource.Builder.
-
totalQuantity
The total quantity of the consumable resource.Must be a non-negative integer.
- Parameters:
totalQuantity- The total quantity of the consumable resource. This parameter is required.- Returns:
this
-
consumableResourceName
@Stability(Stable) public ConsumableResource.Builder consumableResourceName(String consumableResourceName) The name of the consumable resource.The name must be unique within the account and Region. Changing it replaces the resource.
Default: - CloudFormation-generated name
- Parameters:
consumableResourceName- The name of the consumable resource. This parameter is required.- Returns:
this
-
resourceType
@Stability(Stable) public ConsumableResource.Builder resourceType(ConsumableResourceType resourceType) The type of consumable resource.Changing this property replaces the resource. Because the name must be unique within the account and Region, changing the type of a resource that has a
consumableResourceNamefails the deployment unless the name is changed as well.Default: ConsumableResourceType.REPLENISHABLE
- Parameters:
resourceType- The type of consumable resource. This parameter is required.- Returns:
this
-
tags
Tags to apply to the consumable resource.Default: - no tags
- Parameters:
tags- Tags to apply to the consumable resource. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ConsumableResource>- Returns:
- a newly built instance of
ConsumableResource.
-