# AWS::EC2::CapacityReservation Resource Type definition for AWS::EC2::CapacityReservation ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{
    "Type" : "AWS::EC2::CapacityReservation",
    "Properties" : {
        "Tenancy" : String,
        "EndDateType" : String,
        "TagSpecifications" : [ TagSpecification, ... ],
        "AvailabilityZone" : String,
        "EndDate" : String,
        "EbsOptimized" : Boolean,
        "OutPostArn" : String,
        "InstanceCount" : Integer,
        "PlacementGroupArn" : String,
        "InstancePlatform" : String,
        "InstanceType" : String,
        "EphemeralStorage" : Boolean,
        "InstanceMatchCriteria" : String
    }
}
### YAML
Type: AWS::EC2::CapacityReservation
Properties:
    Tenancy: String
    EndDateType: String
    TagSpecifications: 
      - TagSpecification
    AvailabilityZone: String
    EndDate: String
    EbsOptimized: Boolean
    OutPostArn: String
    InstanceCount: Integer
    PlacementGroupArn: String
    InstancePlatform: String
    InstanceType: String
    EphemeralStorage: Boolean
    InstanceMatchCriteria: String
## Properties #### Tenancy _Required_: No _Type_: String _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### EndDateType _Required_: No _Type_: String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### TagSpecifications _Required_: No _Type_: List of TagSpecification _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### AvailabilityZone _Required_: Yes _Type_: String _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### EndDate _Required_: No _Type_: String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### EbsOptimized _Required_: No _Type_: Boolean _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### OutPostArn _Required_: No _Type_: String _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### InstanceCount _Required_: Yes _Type_: Integer _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### PlacementGroupArn _Required_: No _Type_: String _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### InstancePlatform _Required_: Yes _Type_: String _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### InstanceType _Required_: Yes _Type_: String _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### EphemeralStorage _Required_: No _Type_: Boolean _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### InstanceMatchCriteria _Required_: No _Type_: String _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) ## Return Values ### Ref When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the Id. ### 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). #### Id Returns the Id value. #### AvailableInstanceCount Returns the AvailableInstanceCount value. #### TotalInstanceCount Returns the TotalInstanceCount value.