The AWS::Batch::ConsumableResource
resource specifies the parameters for an
AWS Batch consumable resource. For more information, see Resource-aware scheduling in the
AWS Batch User Guide
.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{
"Type" : "AWS::Batch::ConsumableResource",
"Properties" : {
"ConsumableResourceName" : String
,
"ResourceType" : String
,
"Tags" : {Key
: Value
, ...}
,
"TotalQuantity" : Integer
}
}
YAML
Type: AWS::Batch::ConsumableResource
Properties:
ConsumableResourceName: String
ResourceType: String
Tags:
Key
: Value
TotalQuantity: Integer
Properties
ConsumableResourceName
-
The name of the consumable resource.
Required: No
Type: String
Update requires: Replacement
ResourceType
-
Indicates whether the resource is available to be re-used after a job completes. Can be one of:
-
REPLENISHABLE
-
NON_REPLENISHABLE
Required: Yes
Type: String
Allowed values:
REPLENISHABLE | NON_REPLENISHABLE
Update requires: Replacement
-
-
The tags that you apply to the consumable resource to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your AWS Batch resources.
Required: No
Type: Object of String
Pattern:
.*
Update requires: Replacement
TotalQuantity
-
The total amount of the consumable resource that is available.
Required: Yes
Type: Integer
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the consumable resource ARN, such as arn:aws:batch:us-east-1:555555555555:consumable-resource/Resource
.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
AvailableQuantity
-
The amount of the consumable resource that is currently available to use.
ConsumableResourceArn
-
The Amazon Resource Name (ARN) of the consumable resource.
CreatedAt
-
The Unix timestamp (in milliseconds) for when the consumable resource was created.
InUseQuantity
-
The amount of the consumable resource that is currently in use.
See also
-
Resource-aware scheduling in the AWS Batch User Guide .