{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-workspaces/json-schema/amazon-workspaces-create-workspace-instance-request-schema.json",
  "title": "CreateWorkspaceInstanceRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-workspaces-workspace-instance-api-openapi.yml#/components/schemas/CreateWorkspaceInstanceRequest",
  "type": "object",
  "properties": {
    "ClientToken": {
      "type": "string",
      "description": "Unique token to ensure idempotent instance creation, preventing duplicate workspace launches."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WorkspacesInstancesTag"
      },
      "description": "Optional metadata tags for categorizing and managing WorkSpaces Instances."
    },
    "ManagedInstance": {
      "$ref": "#/$defs/ManagedInstanceRequest"
    },
    "BillingConfiguration": {
      "$ref": "#/$defs/BillingConfiguration"
    }
  },
  "required": [
    "ManagedInstance"
  ],
  "$defs": {
    "BillingConfiguration": {
      "type": "object",
      "properties": {
        "BillingMode": {
          "type": "string",
          "enum": [
            "MONTHLY",
            "HOURLY"
          ],
          "description": "Specifies the billing mode for WorkSpace Instances. MONTHLY provides fixed monthly rates for predictable budgeting, while HOURLY enables pay-per-second billing for actual usage."
        }
      },
      "required": [
        "BillingMode"
      ]
    },
    "BlockDeviceMappingRequest": {
      "type": "object",
      "properties": {
        "DeviceName": {
          "type": "string",
          "description": "Name of the device for storage mapping."
        },
        "Ebs": {
          "$ref": "#/$defs/EbsBlockDevice"
        },
        "NoDevice": {
          "type": "string",
          "description": "Indicates device should not be mapped."
        },
        "VirtualName": {
          "type": "string",
          "description": "Virtual device name for ephemeral storage."
        }
      }
    },
    "CapacityReservationSpecification": {
      "type": "object",
      "properties": {
        "CapacityReservationPreference": {
          "type": "string",
          "enum": [
            "capacity-reservations-only",
            "open",
            "none"
          ],
          "description": "Preference for using capacity reservation."
        },
        "CapacityReservationTarget": {
          "$ref": "#/$defs/CapacityReservationTarget"
        }
      }
    },
    "CapacityReservationTarget": {
      "type": "object",
      "properties": {
        "CapacityReservationId": {
          "type": "string",
          "description": "Unique identifier for the capacity reservation."
        },
        "CapacityReservationResourceGroupArn": {
          "type": "string",
          "description": "ARN of the capacity reservation resource group."
        }
      }
    },
    "ConnectionTrackingSpecificationRequest": {
      "type": "object",
      "properties": {
        "TcpEstablishedTimeout": {
          "type": "integer",
          "description": "Timeout for established TCP connections."
        },
        "UdpStreamTimeout": {
          "type": "integer",
          "description": "Timeout for UDP stream connections."
        },
        "UdpTimeout": {
          "type": "integer",
          "description": "General timeout for UDP connections."
        }
      }
    },
    "CpuOptionsRequest": {
      "type": "object",
      "properties": {
        "AmdSevSnp": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "AMD Secure Encrypted Virtualization configuration."
        },
        "CoreCount": {
          "type": "integer",
          "description": "Number of CPU cores to allocate."
        },
        "ThreadsPerCore": {
          "type": "integer",
          "description": "Number of threads per CPU core."
        },
        "NestedVirtualization": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Specifies whether to enable or disable nested virtualization."
        }
      }
    },
    "CreditSpecificationRequest": {
      "type": "object",
      "properties": {
        "CpuCredits": {
          "type": "string",
          "enum": [
            "standard",
            "unlimited"
          ],
          "description": "CPU credit specification mode."
        }
      }
    },
    "EbsBlockDevice": {
      "type": "object",
      "properties": {
        "VolumeType": {
          "type": "string",
          "enum": [
            "standard",
            "io1",
            "io2",
            "gp2",
            "sc1",
            "st1",
            "gp3"
          ],
          "description": "Type of EBS volume (e.g., gp2, io1)."
        },
        "Encrypted": {
          "type": "boolean",
          "description": "Indicates if the volume is encrypted."
        },
        "KmsKeyId": {
          "type": "string",
          "description": "KMS key used for volume encryption."
        },
        "Iops": {
          "type": "integer",
          "description": "Input/output operations per second for the volume."
        },
        "Throughput": {
          "type": "integer",
          "description": "Volume data transfer rate."
        },
        "VolumeSize": {
          "type": "integer",
          "description": "Size of the EBS volume in gigabytes."
        }
      }
    },
    "EnaSrdSpecificationRequest": {
      "type": "object",
      "properties": {
        "EnaSrdEnabled": {
          "type": "boolean",
          "description": "Enables or disables ENA SRD for network performance."
        },
        "EnaSrdUdpSpecification": {
          "$ref": "#/$defs/EnaSrdUdpSpecificationRequest"
        }
      }
    },
    "EnaSrdUdpSpecificationRequest": {
      "type": "object",
      "properties": {
        "EnaSrdUdpEnabled": {
          "type": "boolean",
          "description": "Enables or disables ENA SRD for UDP traffic."
        }
      }
    },
    "EnclaveOptionsRequest": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Enables or disables AWS Nitro Enclaves for enhanced security."
        }
      }
    },
    "HibernationOptionsRequest": {
      "type": "object",
      "properties": {
        "Configured": {
          "type": "boolean",
          "description": "Enables or disables instance hibernation capability."
        }
      }
    },
    "IamInstanceProfileSpecification": {
      "type": "object",
      "properties": {
        "Arn": {
          "type": "string",
          "description": "Amazon Resource Name (ARN) of the IAM instance profile."
        },
        "Name": {
          "type": "string",
          "description": "Name of the IAM instance profile."
        }
      }
    },
    "InstanceIpv6Address": {
      "type": "object",
      "properties": {
        "Ipv6Address": {
          "type": "string",
          "description": "Specific IPv6 address assigned to the instance."
        },
        "IsPrimaryIpv6": {
          "type": "boolean",
          "description": "Indicates if this is the primary IPv6 address for the instance."
        }
      }
    },
    "InstanceMaintenanceOptionsRequest": {
      "type": "object",
      "properties": {
        "AutoRecovery": {
          "type": "string",
          "enum": [
            "disabled",
            "default"
          ],
          "description": "Enables or disables automatic instance recovery."
        }
      }
    },
    "InstanceMarketOptionsRequest": {
      "type": "object",
      "properties": {
        "MarketType": {
          "type": "string",
          "enum": [
            "spot",
            "capacity-block"
          ],
          "description": "Specifies the type of marketplace for instance deployment."
        },
        "SpotOptions": {
          "$ref": "#/$defs/SpotMarketOptions"
        }
      }
    },
    "InstanceMetadataOptionsRequest": {
      "type": "object",
      "properties": {
        "HttpEndpoint": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Enables or disables HTTP endpoint for instance metadata."
        },
        "HttpProtocolIpv6": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Configures IPv6 support for instance metadata HTTP protocol."
        },
        "HttpPutResponseHopLimit": {
          "type": "integer",
          "description": "Sets maximum number of network hops for metadata PUT responses."
        },
        "HttpTokens": {
          "type": "string",
          "enum": [
            "optional",
            "required"
          ],
          "description": "Configures token requirement for instance metadata retrieval."
        },
        "InstanceMetadataTags": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Enables or disables instance metadata tags retrieval."
        }
      }
    },
    "InstanceNetworkInterfaceSpecification": {
      "type": "object",
      "properties": {
        "AssociateCarrierIpAddress": {
          "type": "boolean",
          "description": "Enables carrier IP address association."
        },
        "AssociatePublicIpAddress": {
          "type": "boolean",
          "description": "Enables public IP address assignment."
        },
        "ConnectionTrackingSpecification": {
          "$ref": "#/$defs/ConnectionTrackingSpecificationRequest"
        },
        "Description": {
          "type": "string",
          "description": "Descriptive text for the network interface."
        },
        "DeviceIndex": {
          "type": "integer",
          "description": "Unique index for the network interface."
        },
        "EnaSrdSpecification": {
          "$ref": "#/$defs/EnaSrdSpecificationRequest"
        },
        "InterfaceType": {
          "type": "string",
          "enum": [
            "interface",
            "efa",
            "efa-only"
          ],
          "description": "Specifies the type of network interface."
        },
        "Ipv4Prefixes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Ipv4PrefixSpecificationRequest"
          },
          "description": "IPv4 prefix configurations for the interface."
        },
        "Ipv4PrefixCount": {
          "type": "integer",
          "description": "Number of IPv4 prefixes to assign."
        },
        "Ipv6AddressCount": {
          "type": "integer",
          "description": "Number of IPv6 addresses to assign."
        },
        "Ipv6Addresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InstanceIpv6Address"
          },
          "description": "Specific IPv6 addresses for the interface."
        },
        "Ipv6Prefixes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Ipv6PrefixSpecificationRequest"
          },
          "description": "IPv6 prefix configurations for the interface."
        },
        "Ipv6PrefixCount": {
          "type": "integer",
          "description": "Number of IPv6 prefixes to assign."
        },
        "NetworkCardIndex": {
          "type": "integer",
          "description": "Index of the network card for multiple network interfaces."
        },
        "NetworkInterfaceId": {
          "type": "string",
          "description": "Unique identifier for the network interface."
        },
        "PrimaryIpv6": {
          "type": "boolean",
          "description": "Indicates the primary IPv6 configuration."
        },
        "PrivateIpAddress": {
          "type": "string",
          "description": "Primary private IP address for the interface."
        },
        "PrivateIpAddresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PrivateIpAddressSpecification"
          },
          "description": "List of private IP addresses for the interface."
        },
        "SecondaryPrivateIpAddressCount": {
          "type": "integer",
          "description": "Number of additional private IP addresses to assign."
        },
        "Groups": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Security groups associated with the network interface."
        },
        "SubnetId": {
          "type": "string",
          "description": "Subnet identifier for the network interface."
        }
      }
    },
    "InstanceNetworkPerformanceOptionsRequest": {
      "type": "object",
      "properties": {
        "BandwidthWeighting": {
          "type": "string",
          "enum": [
            "default",
            "vpc-1",
            "ebs-1"
          ],
          "description": "Defines bandwidth allocation strategy for network interfaces."
        }
      }
    },
    "Ipv4PrefixSpecificationRequest": {
      "type": "object",
      "properties": {
        "Ipv4Prefix": {
          "type": "string",
          "description": "Specific IPv4 prefix for network interface configuration."
        }
      }
    },
    "Ipv6PrefixSpecificationRequest": {
      "type": "object",
      "properties": {
        "Ipv6Prefix": {
          "type": "string",
          "description": "Specific IPv6 prefix for network interface configuration."
        }
      }
    },
    "LicenseConfigurationRequest": {
      "type": "object",
      "properties": {
        "LicenseConfigurationArn": {
          "type": "string",
          "description": "ARN of the license configuration for the WorkSpace Instance."
        }
      }
    },
    "ManagedInstanceRequest": {
      "type": "object",
      "properties": {
        "BlockDeviceMappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BlockDeviceMappingRequest"
          },
          "description": "Configures block device mappings for storage."
        },
        "CapacityReservationSpecification": {
          "$ref": "#/$defs/CapacityReservationSpecification"
        },
        "CpuOptions": {
          "$ref": "#/$defs/CpuOptionsRequest"
        },
        "CreditSpecification": {
          "$ref": "#/$defs/CreditSpecificationRequest"
        },
        "DisableApiStop": {
          "type": "boolean",
          "description": "Prevents API-initiated instance stop."
        },
        "EbsOptimized": {
          "type": "boolean",
          "description": "Enables optimized EBS performance."
        },
        "EnablePrimaryIpv6": {
          "type": "boolean",
          "description": "Enables primary IPv6 address configuration."
        },
        "EnclaveOptions": {
          "$ref": "#/$defs/EnclaveOptionsRequest"
        },
        "HibernationOptions": {
          "$ref": "#/$defs/HibernationOptionsRequest"
        },
        "IamInstanceProfile": {
          "$ref": "#/$defs/IamInstanceProfileSpecification"
        },
        "ImageId": {
          "type": "string",
          "description": "Identifies the Amazon Machine Image (AMI) for the instance."
        },
        "InstanceMarketOptions": {
          "$ref": "#/$defs/InstanceMarketOptionsRequest"
        },
        "InstanceType": {
          "type": "string",
          "description": "Specifies the WorkSpace Instance type."
        },
        "Ipv6Addresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InstanceIpv6Address"
          },
          "description": "Configures specific IPv6 addresses."
        },
        "Ipv6AddressCount": {
          "type": "integer",
          "description": "Specifies number of IPv6 addresses to assign."
        },
        "KernelId": {
          "type": "string",
          "description": "Identifies the kernel for the instance."
        },
        "KeyName": {
          "type": "string",
          "description": "Specifies the key pair for instance access."
        },
        "LicenseSpecifications": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LicenseConfigurationRequest"
          },
          "description": "Configures license-related settings."
        },
        "MaintenanceOptions": {
          "$ref": "#/$defs/InstanceMaintenanceOptionsRequest"
        },
        "MetadataOptions": {
          "$ref": "#/$defs/InstanceMetadataOptionsRequest"
        },
        "Monitoring": {
          "$ref": "#/$defs/RunInstancesMonitoringEnabled"
        },
        "NetworkInterfaces": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InstanceNetworkInterfaceSpecification"
          },
          "description": "Configures network interface settings."
        },
        "NetworkPerformanceOptions": {
          "$ref": "#/$defs/InstanceNetworkPerformanceOptionsRequest"
        },
        "Placement": {
          "$ref": "#/$defs/Placement"
        },
        "PrivateDnsNameOptions": {
          "$ref": "#/$defs/PrivateDnsNameOptionsRequest"
        },
        "PrivateIpAddress": {
          "type": "string",
          "description": "Specifies the primary private IP address."
        },
        "RamdiskId": {
          "type": "string",
          "description": "Identifies the ramdisk for the instance."
        },
        "SecurityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Specifies security group identifiers."
        },
        "SecurityGroups": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Configures security group settings."
        },
        "SubnetId": {
          "type": "string",
          "description": "Identifies the subnet for the instance."
        },
        "TagSpecifications": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagSpecification"
          },
          "description": "Configures resource tagging specifications."
        },
        "UserData": {
          "type": "string",
          "description": "Provides custom initialization data for the instance."
        }
      }
    },
    "Placement": {
      "type": "object",
      "properties": {
        "Affinity": {
          "type": "string",
          "description": "Specifies host affinity for dedicated instances."
        },
        "AvailabilityZone": {
          "type": "string",
          "description": "Identifies the specific AWS availability zone."
        },
        "GroupId": {
          "type": "string",
          "description": "Unique identifier for placement group."
        },
        "GroupName": {
          "type": "string",
          "description": "Name of the placement group."
        },
        "HostId": {
          "type": "string",
          "description": "Identifies the specific dedicated host."
        },
        "HostResourceGroupArn": {
          "type": "string",
          "description": "ARN of the host resource group."
        },
        "PartitionNumber": {
          "type": "integer",
          "description": "Specifies partition number for partition placement groups."
        },
        "Tenancy": {
          "type": "string",
          "enum": [
            "default",
            "dedicated",
            "host"
          ],
          "description": "Defines instance tenancy configuration."
        }
      }
    },
    "PrivateDnsNameOptionsRequest": {
      "type": "object",
      "properties": {
        "HostnameType": {
          "type": "string",
          "enum": [
            "ip-name",
            "resource-name"
          ],
          "description": "Specifies the type of hostname configuration."
        },
        "EnableResourceNameDnsARecord": {
          "type": "boolean",
          "description": "Enables DNS A record for resource name resolution."
        },
        "EnableResourceNameDnsAAAARecord": {
          "type": "boolean",
          "description": "Enables DNS AAAA record for resource name resolution."
        }
      }
    },
    "PrivateIpAddressSpecification": {
      "type": "object",
      "properties": {
        "Primary": {
          "type": "boolean",
          "description": "Indicates if this is the primary private IP address."
        },
        "PrivateIpAddress": {
          "type": "string",
          "description": "Specific private IP address for the network interface."
        }
      }
    },
    "RunInstancesMonitoringEnabled": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Enables or disables detailed instance monitoring."
        }
      }
    },
    "SpotMarketOptions": {
      "type": "object",
      "properties": {
        "BlockDurationMinutes": {
          "type": "integer",
          "description": "Duration of spot instance block reservation."
        },
        "InstanceInterruptionBehavior": {
          "type": "string",
          "enum": [
            "hibernate",
            "stop"
          ],
          "description": "Specifies behavior when spot instance is interrupted."
        },
        "MaxPrice": {
          "type": "string",
          "description": "Maximum hourly price for spot instance."
        },
        "SpotInstanceType": {
          "type": "string",
          "enum": [
            "one-time",
            "persistent"
          ],
          "description": "Defines the type of spot instance request."
        },
        "ValidUntilUtc": {
          "type": "string",
          "description": "Timestamp until which spot instance request is valid."
        }
      }
    },
    "TagSpecification": {
      "type": "object",
      "properties": {
        "ResourceType": {
          "type": "string",
          "enum": [
            "instance",
            "volume",
            "spot-instances-request",
            "network-interface"
          ],
          "description": "Type of resource being tagged."
        },
        "Tags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WorkspacesInstancesTag"
          },
          "description": "Collection of tags for the specified resource."
        }
      }
    },
    "WorkspacesInstancesTag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "Unique identifier for the tag."
        },
        "Value": {
          "type": "string",
          "description": "Value associated with the tag key."
        }
      }
    }
  }
}