{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-create-capacity-provider-input-schema.json",
  "title": "CreateCapacityProviderInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-capacity-providers-api-openapi.yml#/components/schemas/CreateCapacityProviderInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the capacity provider. The name must be unique within your account."
    },
    "description": {
      "type": "string",
      "description": "An optional description of the capacity provider. If you don't specify a description, the service creates the capacity provider without one."
    },
    "permissionsConfiguration": {
      "$ref": "#/$defs/PermissionsConfiguration"
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of tag keys and values to associate with the capacity provider. If you don't specify tags, the capacity provider is created with no tags."
    },
    "computeConfiguration": {
      "$ref": "#/$defs/ComputeConfiguration"
    }
  },
  "required": [
    "name",
    "permissionsConfiguration",
    "computeConfiguration"
  ],
  "$defs": {
    "BedrockAgentcoreControlVpcConfiguration": {
      "type": "object",
      "properties": {
        "subnets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The IDs of the subnets in which to launch instances. You must specify at least one subnet."
        },
        "securityGroups": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The IDs of the security groups to associate with the instances. You must specify at least one security group."
        }
      },
      "required": [
        "subnets",
        "securityGroups"
      ]
    },
    "CapacityReservationSpecification": {
      "type": "object",
      "properties": {
        "capacityReservationPreference": {
          "type": "string",
          "enum": [
            "capacity-reservations-only",
            "open",
            "none"
          ],
          "description": "The Capacity Reservation preference for the instances."
        },
        "capacityReservationTarget": {
          "$ref": "#/$defs/CapacityReservationTarget"
        }
      }
    },
    "CapacityReservationTarget": {
      "type": "object",
      "properties": {
        "capacityReservationId": {
          "type": "string",
          "description": "The ID of the Capacity Reservation in which to run the instances."
        },
        "capacityReservationResourceGroupArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Capacity Reservation resource group in which to run the instances."
        }
      }
    },
    "ComputeConfiguration": {
      "type": "object",
      "properties": {
        "ec2Configuration": {
          "$ref": "#/$defs/Ec2Configuration"
        }
      },
      "description": "Exactly one member is set."
    },
    "EbsVolumeConfiguration": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The logical name of the volume. Use this name to reference the volume when you mount it into an agent runtime."
        },
        "sizeGiB": {
          "type": "integer",
          "description": "The size of the volume, in GiB."
        },
        "volumeType": {
          "type": "string",
          "enum": [
            "standard",
            "io1",
            "io2",
            "gp2",
            "sc1",
            "st1",
            "gp3"
          ],
          "description": "The Amazon EBS volume type. If you do not specify a type, the default is gp3."
        },
        "iops": {
          "type": "integer",
          "description": "The number of IOPS to provision. Valid only for gp3, io1, and io2 volumes."
        },
        "throughput": {
          "type": "integer",
          "description": "The throughput, in MiB/s. Valid only for gp3 volumes."
        },
        "encrypted": {
          "type": "boolean",
          "description": "Specifies whether to encrypt the volume. If true, the service encrypts the volume with the KMS key that you specify in kmsKeyId, or the default KMS key for Amazon EBS if you do not specify one. The default is true."
        },
        "kmsKeyId": {
          "type": "string",
          "description": "The identifier of the KMS key to use for encryption."
        },
        "snapshotId": {
          "type": "string",
          "description": "An optional Amazon EBS snapshot ID. If provided, the volume is initialized from this snapshot the first time it is created. On subsequent restarts, the existing volume is used and the snapshot is ignored."
        }
      },
      "required": [
        "name",
        "sizeGiB"
      ]
    },
    "Ec2Configuration": {
      "type": "object",
      "properties": {
        "launchTemplateSource": {
          "$ref": "#/$defs/LaunchTemplateSource"
        },
        "vpcConfiguration": {
          "$ref": "#/$defs/BedrockAgentcoreControlVpcConfiguration"
        },
        "volumes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VolumeConfiguration"
          },
          "description": "The named persistent Amazon EBS volumes for the capacity provider. A capacity provider can define up to five volumes."
        },
        "lifecycleConfiguration": {
          "$ref": "#/$defs/InstanceLifecycleConfiguration"
        },
        "rootVolume": {
          "$ref": "#/$defs/RootVolumeConfiguration"
        }
      },
      "required": [
        "launchTemplateSource",
        "vpcConfiguration"
      ]
    },
    "EphemeralBlockDeviceMapping": {
      "type": "object",
      "properties": {
        "deviceName": {
          "type": "string",
          "description": "The device name, for example /dev/sdh or xvdh."
        },
        "virtualName": {
          "type": "string",
          "description": "The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume."
        },
        "ebs": {
          "$ref": "#/$defs/EphemeralEBSVolumeConfiguration"
        }
      }
    },
    "EphemeralEBSVolumeConfiguration": {
      "type": "object",
      "properties": {
        "volumeType": {
          "type": "string",
          "enum": [
            "standard",
            "io1",
            "io2",
            "gp2",
            "sc1",
            "st1",
            "gp3"
          ],
          "description": "The Amazon EBS volume type. If you do not specify a type, the default is gp3."
        },
        "iops": {
          "type": "integer",
          "description": "The number of IOPS to provision. For gp3, io1, and io2 volumes, this is the number of IOPS provisioned for the volume. For gp2 volumes, this sets the baseline IOPS performance. It also controls the rate at which the volume accumulates I/O credits for bursting. Supported values: gp3, 3,000–80,000; io1, 100–64,000; io2, 100–256,000."
        },
        "throughput": {
          "type": "integer",
          "description": "The throughput to provision, in MiB/s. Valid only for gp3 volumes. Valid range: 125–2,000 MiB/s."
        },
        "encrypted": {
          "type": "boolean",
          "description": "Specifies whether to encrypt the volume. Encrypted volumes can be attached only to instances that support Amazon EBS encryption. If you create a volume from a snapshot, you cannot specify an encryption value."
        },
        "kmsKeyId": {
          "type": "string",
          "description": "The identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for Amazon EBS encryption."
        },
        "snapshotId": {
          "type": "string",
          "description": "The ID of the snapshot."
        },
        "volumeSize": {
          "type": "integer",
          "description": "The size of the volume, in GiB. You must specify either a snapshot ID or a volume size. Supported sizes: gp2, 1–16,384; gp3, 1–65,536; io1, 4–16,384; io2, 4–65,536."
        },
        "volumeInitializationRate": {
          "type": "integer",
          "description": "The rate at which the volume is initialized after creation, in MiB/s. Supported only for volumes created from snapshots. Valid range: 100–300 MiB/s."
        },
        "ebsCardIndex": {
          "type": "integer",
          "description": "The index of the Amazon EBS card. Applies to instances with multiple Amazon EBS cards."
        }
      }
    },
    "InstanceLifecycleConfiguration": {
      "type": "object",
      "properties": {
        "idleInstanceTimeout": {
          "type": "integer",
          "description": "The number of seconds an instance can remain idle before it is stopped. An instance is considered idle when all of its agents are idle. The default is 900 seconds (15 minutes)."
        },
        "maxLifetime": {
          "type": "integer",
          "description": "The maximum lifetime of an instance, in seconds. When an instance reaches this limit, the service terminates it regardless of activity. The default is 28800 seconds (8 hours). The maximum is 1209600 seconds (14 days)."
        }
      }
    },
    "InstanceRequirements": {
      "type": "object",
      "properties": {
        "allowedInstanceTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of allowed instance types. You can specify up to 30 instance types."
        }
      },
      "required": [
        "allowedInstanceTypes"
      ]
    },
    "LaunchParameters": {
      "type": "object",
      "properties": {
        "operatingSystem": {
          "type": "string",
          "enum": [
            "LINUX_X86_64",
            "LINUX_ARM64"
          ],
          "description": "The operating system and CPU architecture for the instances."
        },
        "instanceRequirements": {
          "$ref": "#/$defs/InstanceRequirements"
        },
        "ephemeralVolumes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EphemeralBlockDeviceMapping"
          },
          "description": "The block device mappings for instance store (ephemeral) volumes. You can specify up to five mappings."
        },
        "monitoring": {
          "type": "string",
          "enum": [
            "BASIC",
            "DETAILED"
          ],
          "description": "The monitoring level for the instances."
        },
        "licenseSpecifications": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LicenseSpecification"
          },
          "description": "The license configurations to associate with the instances. You can specify up to five configurations."
        },
        "capacityReservationSpecification": {
          "$ref": "#/$defs/CapacityReservationSpecification"
        },
        "sshKeyName": {
          "type": "string",
          "description": "The name of the SSH key pair to configure on the instances for SSH connectivity."
        },
        "instanceProfileArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM instance profile to associate with launched instances. If provided, this overrides the default instance profile."
        },
        "propagatedTags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags to propagate to all Amazon EC2 resources (instances, volumes, and network interfaces) that the capacity provider creates."
        }
      },
      "required": [
        "operatingSystem",
        "instanceRequirements"
      ]
    },
    "LaunchTemplateSource": {
      "type": "object",
      "properties": {
        "launchParameters": {
          "$ref": "#/$defs/LaunchParameters"
        }
      },
      "description": "Exactly one member is set."
    },
    "LicenseSpecification": {
      "type": "object",
      "properties": {
        "licenseConfigurationArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the license configuration."
        }
      },
      "required": [
        "licenseConfigurationArn"
      ]
    },
    "PermissionsConfiguration": {
      "type": "object",
      "properties": {
        "capacityProviderOperatorRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role that AgentCore assumes to manage the capacity provider, including launching, tagging, and terminating instances and their network interfaces. We recommend scoping this role to the minimum permissions that your workloads require."
        }
      },
      "required": [
        "capacityProviderOperatorRoleArn"
      ]
    },
    "RootVolumeConfiguration": {
      "type": "object",
      "properties": {
        "volumeType": {
          "type": "string",
          "enum": [
            "standard",
            "io1",
            "io2",
            "gp2",
            "sc1",
            "st1",
            "gp3"
          ],
          "description": "The Amazon EBS volume type. If you do not specify a type, the default is gp3."
        },
        "iops": {
          "type": "integer",
          "description": "The number of IOPS to provision. For gp3, io1, and io2 volumes, this is the number of IOPS provisioned for the volume. For gp2 volumes, this sets the baseline IOPS performance. It also controls the rate at which the volume accumulates I/O credits for bursting. Supported values: gp3, 3,000–80,000; io1, 100–64,000; io2, 100–256,000."
        },
        "throughput": {
          "type": "integer",
          "description": "The throughput to provision, in MiB/s. Valid only for gp3 volumes. Valid range: 125–2,000 MiB/s."
        },
        "encrypted": {
          "type": "boolean",
          "description": "Specifies whether to encrypt the volume. Encrypted volumes can be attached only to instances that support Amazon EBS encryption. If you create a volume from a snapshot, you cannot specify an encryption value."
        },
        "kmsKeyId": {
          "type": "string",
          "description": "The identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for Amazon EBS encryption."
        },
        "freeSpaceGiB": {
          "type": "integer",
          "description": "The free space guaranteed on the root volume, in GiB. AgentCore adds the operating system overhead on top of this value. The default is 8 GiB."
        }
      }
    },
    "VolumeConfiguration": {
      "type": "object",
      "properties": {
        "ebsConfiguration": {
          "$ref": "#/$defs/EbsVolumeConfiguration"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}