{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-lambda/json-schema/aws-lambda-create-capacity-provider-request-schema.json",
  "title": "CreateCapacityProviderRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-lambda-capacity-providers-api-openapi.yml#/components/schemas/CreateCapacityProviderRequest",
  "type": "object",
  "properties": {
    "CapacityProviderName": {
      "type": "string",
      "description": "The name of the capacity provider."
    },
    "VpcConfig": {
      "$ref": "#/$defs/CapacityProviderVpcConfig"
    },
    "PermissionsConfig": {
      "$ref": "#/$defs/CapacityProviderPermissionsConfig"
    },
    "InstanceRequirements": {
      "$ref": "#/$defs/InstanceRequirements"
    },
    "CapacityProviderScalingConfig": {
      "$ref": "#/$defs/CapacityProviderScalingConfig"
    },
    "KmsKeyArn": {
      "type": "string",
      "description": "The ARN of the KMS key used to encrypt data associated with the capacity provider."
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A list of tags to associate with the capacity provider."
    },
    "PropagateTags": {
      "$ref": "#/$defs/PropagateTags"
    },
    "TelemetryConfig": {
      "$ref": "#/$defs/CapacityProviderTelemetryConfig"
    }
  },
  "required": [
    "CapacityProviderName",
    "VpcConfig",
    "PermissionsConfig"
  ],
  "$defs": {
    "CapacityProviderLoggingConfig": {
      "type": "object",
      "properties": {
        "SystemLogLevel": {
          "type": "string",
          "enum": [
            "DEBUG",
            "INFO",
            "WARN"
          ],
          "description": "Set this property to filter the system logs for your capacity provider that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest."
        },
        "LogGroup": {
          "type": "string",
          "description": "The name of the Amazon CloudWatch log group the capacity provider sends logs to. By default, Lambda capacity providers send logs to a default log group named /aws/lambda/capacity-provider/&lt;capacity provider name&gt;. To use a different log group, enter an existing log group or enter a new log group name."
        }
      }
    },
    "CapacityProviderPermissionsConfig": {
      "type": "object",
      "properties": {
        "CapacityProviderOperatorRoleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that the capacity provider uses to manage compute instances and other Amazon Web Services resources."
        }
      },
      "required": [
        "CapacityProviderOperatorRoleArn"
      ]
    },
    "CapacityProviderScalingConfig": {
      "type": "object",
      "properties": {
        "MaxVCpuCount": {
          "type": "integer",
          "description": "The maximum number of vCPUs that the capacity provider can provision across all compute instances."
        },
        "ScalingMode": {
          "type": "string",
          "enum": [
            "Auto",
            "Manual"
          ],
          "description": "The scaling mode that determines how the capacity provider responds to changes in demand."
        },
        "ScalingPolicies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TargetTrackingScalingPolicy"
          },
          "description": "A list of scaling policies that define how the capacity provider scales compute instances based on metrics and thresholds."
        }
      }
    },
    "CapacityProviderTelemetryConfig": {
      "type": "object",
      "properties": {
        "LoggingConfig": {
          "$ref": "#/$defs/CapacityProviderLoggingConfig"
        }
      }
    },
    "CapacityProviderVpcConfig": {
      "type": "object",
      "properties": {
        "SubnetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of subnet IDs where the capacity provider launches compute instances."
        },
        "SecurityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of security group IDs that control network access for compute instances managed by the capacity provider."
        }
      },
      "required": [
        "SubnetIds",
        "SecurityGroupIds"
      ]
    },
    "InstanceRequirements": {
      "type": "object",
      "properties": {
        "Architectures": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "x86_64",
              "arm64"
            ]
          },
          "description": "A list of supported CPU architectures for compute instances. Valid values include x86_64 and arm64."
        },
        "AllowedInstanceTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of EC2 instance types that the capacity provider is allowed to use. If not specified, all compatible instance types are allowed."
        },
        "ExcludedInstanceTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of EC2 instance types that the capacity provider should not use, even if they meet other requirements."
        }
      }
    },
    "PropagateTags": {
      "type": "object",
      "properties": {
        "Mode": {
          "type": "string",
          "enum": [
            "None",
            "Explicit"
          ],
          "description": "The tag propagation mode. Set to Explicit to propagate the tags specified in ExplicitTags to managed resources. Set to None to disable tag propagation."
        },
        "ExplicitTags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A list of tags to apply to managed resources when Mode is set to Explicit. You can specify up to 40 tags."
        }
      }
    },
    "TargetTrackingScalingPolicy": {
      "type": "object",
      "properties": {
        "PredefinedMetricType": {
          "type": "string",
          "enum": [
            "LambdaCapacityProviderAverageCPUUtilization"
          ],
          "description": "The predefined metric type to track for scaling decisions."
        },
        "TargetValue": {
          "type": "number",
          "description": "The target value for the metric that the scaling policy attempts to maintain through scaling actions."
        }
      },
      "required": [
        "PredefinedMetricType",
        "TargetValue"
      ]
    }
  }
}