import type { Construct } from 'constructs'; import { ConsumableResourceGrants } from './batch-grants.generated'; import type { IResource } from '../../core'; import { Resource } from '../../core'; import type { IConsumableResourceRef, ConsumableResourceReference } from '../../interfaces/generated/aws-batch-interfaces.generated'; /** * Represents a Batch Consumable Resource */ export interface IConsumableResource extends IResource, IConsumableResourceRef { /** * The ARN of this consumable resource * * @attribute */ readonly consumableResourceArn: string; /** * The name of this consumable resource * * @attribute */ readonly consumableResourceName: string; /** * Collection of grant methods for this consumable resource */ readonly grants: ConsumableResourceGrants; } /** * The type of consumable resource */ export declare enum ConsumableResourceType { /** * Resource can be re-used after a job completes */ REPLENISHABLE = "REPLENISHABLE", /** * Resource cannot be re-used after a job completes */ NON_REPLENISHABLE = "NON_REPLENISHABLE" } /** * Properties for defining a Batch Consumable Resource */ export interface ConsumableResourceProps { /** * 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 */ readonly consumableResourceName?: string; /** * 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 */ readonly resourceType?: ConsumableResourceType; /** * The total quantity of the consumable resource * * Must be a non-negative integer. */ readonly totalQuantity: number; /** * Tags to apply to the consumable resource * * @default - no tags */ readonly tags?: { [key: string]: string; }; } declare abstract class ConsumableResourceBase extends Resource implements IConsumableResource { abstract readonly consumableResourceArn: string; abstract readonly consumableResourceName: string; readonly grants: ConsumableResourceGrants; get consumableResourceRef(): ConsumableResourceReference; } /** * A Batch Consumable Resource * * Consumable resources are finite resources that are consumed by jobs, * such as third-party software licenses or API rate limits. * * @resource AWS::Batch::ConsumableResource */ export declare class ConsumableResource extends ConsumableResourceBase { /** Uniquely identifies this class. */ static readonly PROPERTY_INJECTION_ID: string; /** * Import an existing consumable resource from its ARN */ static fromConsumableResourceArn(scope: Construct, id: string, consumableResourceArn: string): IConsumableResource; private readonly resource; get consumableResourceArn(): string; get consumableResourceName(): string; constructor(scope: Construct, id: string, props: ConsumableResourceProps); } export {};