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 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

      @Stability(Stable) public ConsumableResource.Builder totalQuantity(Number 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 consumableResourceName fails 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

      @Stability(Stable) public ConsumableResource.Builder tags(Map<String,String> 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

      @Stability(Stable) public ConsumableResource build()
      Specified by:
      build in interface software.amazon.jsii.Builder<ConsumableResource>
      Returns:
      a newly built instance of ConsumableResource.