> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudidr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Capacity

> Update capacity configuration settings for a policy.



## OpenAPI

````yaml /api-reference/flex-compute/flex-api.json put /external/api/v1/flexcompute/capacity-configuration
openapi: 3.1.0
info:
  title: Cloudidr FlexCompute API
  description: API for managing compute schedule policies and capacity reservations.
  version: 1.0.0
servers:
  - url: https://public-api.cloudidr.com
    description: Production server
security:
  - bearerAuth: []
paths:
  /external/api/v1/flexcompute/capacity-configuration:
    put:
      summary: Configure Capacity
      description: Update capacity configuration settings for a policy.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - cidrId
              properties:
                cidrId:
                  type: string
                  description: Policy/Capacity ID (e.g., sc_830349911839)
                vpc:
                  type: string
                  pattern: ^vpc-.*
                  description: VPC ID, must start with vpc- (e.g., vpc-0a1b2c3d)
                securityGroup:
                  type: string
                  pattern: ^sg-.*
                  description: Security group ID, must start with sg- (e.g., sg-0a1b2c3d)
                amiImage:
                  type: string
                  pattern: ^ami-.*
                  description: AMI ID, must start with ami- (e.g., ami-0a1b2c3d)
                sshPairKey:
                  type: string
                  description: SSH key pair name (free-form string)
                ebsVolumeSize:
                  type: integer
                  minimum: 1
                  description: EBS volume size in GB (must be positive)
            example:
              cidrId: sc_830349911839
              vpc: vpc-12345678
              securityGroup: sg-12345678
              amiImage: ami-12345678
              sshPairKey: keypair-name
              ebsVolumeSize: 30
      responses:
        '200':
          description: Success - Capacity configuration updated
          content:
            application/json:
              example:
                cidrId: sc_830349911839
                policyName: Volod test policy
                cspAccountName: personal AWS
                policyStatus: ACTIVE
                policyOperatingState: QUEUED_FOR_START
                policyInstance:
                  id: 1688
                  instanceType: c5.large
                  platformCode: Linux/UNIX
                  tenancyCode: DEDICATED
                  vcpu: 2
                  memory: 4
                  gpu: 0
                  gpuMemory: 0
                  qty: 2
                cspRegion:
                  regionCode: us-west-2
                  regionType: PRIMARY
                  availabilityZoneId: usw2-az1
                createdDate: '2026-01-08T15:20:15.64868Z'
                capacityConfiguration:
                  launchDateTime: '2026-01-10T00:00:00-08:00'
                  endDateTime: '2026-01-12T23:15:00-08:00'
                  autoRenewalEnabled: false
                  frequency: null
                  vpc: vpc-12345678
                  securityGroups: sg-12345678
                  amiImage: ami-12345678
                  sshPairKey: keypair-name
                  ebsVolumeSize: 30
                pricing:
                  ourPrice: 8.48
                  cspProviderPrice: 12.11
                  savings: 3.63
                  savingsPercentage: 0.3
                  creditCardProcessingFee: null
                  bankAccountProcessingFee: null
        '400':
          description: Bad Request - Invalid configuration parameters
          content:
            application/json:
              example:
                error:
                  code: '400'
                  message: Bad Request
                  details:
                    timestamp: '2026-01-08T16:17:54'
                    description: >-
                      securityGroups: securityGroups must be sg- followed by at
                      least 8 hex characters
        '401':
          description: Unauthorized - Unable to process access token
          content:
            application/json:
              example:
                error:
                  code: '401'
                  message: Unauthorized
                  details:
                    timestamp: '2025-03-04T17:01:01'
                    description: Unable to process access token
        '404':
          description: >-
            Not Found - The specified cidr_id does not correspond to any
            existing schedule policy
          content:
            application/json:
              example:
                error:
                  code: '404'
                  message: Not Found
                  details:
                    timestamp: '2026-01-08T14:43:14'
                    description: >-
                      Supported instance type c5.large1 and platform Linux/UNIX
                      not found
        '500':
          description: Internal Server Error - Unexpected error occurred
          content:
            application/json:
              example:
                error:
                  code: '500'
                  message: Internal Server Error
                  details:
                    timestamp: '2025-03-04T17:17:08'
                    description: Unexpected error. Our team is working on it
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````