CreateWorkspaceInstance - WorkSpaces Instances

CreateWorkspaceInstance

Launches a new WorkSpace Instance with specified configuration parameters, enabling programmatic workspace deployment.

Request Syntax

{ "ClientToken": "string", "ManagedInstance": { "BlockDeviceMappings": [ { "DeviceName": "string", "Ebs": { "Encrypted": boolean, "Iops": number, "KmsKeyId": "string", "Throughput": number, "VolumeSize": number, "VolumeType": "string" }, "NoDevice": "string", "VirtualName": "string" } ], "CapacityReservationSpecification": { "CapacityReservationPreference": "string", "CapacityReservationTarget": { "CapacityReservationId": "string", "CapacityReservationResourceGroupArn": "string" } }, "CpuOptions": { "AmdSevSnp": "string", "CoreCount": number, "ThreadsPerCore": number }, "CreditSpecification": { "CpuCredits": "string" }, "DisableApiStop": boolean, "EbsOptimized": boolean, "EnablePrimaryIpv6": boolean, "EnclaveOptions": { "Enabled": boolean }, "HibernationOptions": { "Configured": boolean }, "IamInstanceProfile": { "Arn": "string", "Name": "string" }, "ImageId": "string", "InstanceMarketOptions": { "MarketType": "string", "SpotOptions": { "BlockDurationMinutes": number, "InstanceInterruptionBehavior": "string", "MaxPrice": "string", "SpotInstanceType": "string", "ValidUntilUtc": number } }, "InstanceType": "string", "Ipv6AddressCount": number, "Ipv6Addresses": [ { "Ipv6Address": "string", "IsPrimaryIpv6": boolean } ], "KernelId": "string", "KeyName": "string", "LicenseSpecifications": [ { "LicenseConfigurationArn": "string" } ], "MaintenanceOptions": { "AutoRecovery": "string" }, "MetadataOptions": { "HttpEndpoint": "string", "HttpProtocolIpv6": "string", "HttpPutResponseHopLimit": number, "HttpTokens": "string", "InstanceMetadataTags": "string" }, "Monitoring": { "Enabled": boolean }, "NetworkInterfaces": [ { "AssociateCarrierIpAddress": boolean, "AssociatePublicIpAddress": boolean, "ConnectionTrackingSpecification": { "TcpEstablishedTimeout": number, "UdpStreamTimeout": number, "UdpTimeout": number }, "Description": "string", "DeviceIndex": number, "EnaSrdSpecification": { "EnaSrdEnabled": boolean, "EnaSrdUdpSpecification": { "EnaSrdUdpEnabled": boolean } }, "Groups": [ "string" ], "InterfaceType": "string", "Ipv4PrefixCount": number, "Ipv4Prefixes": [ { "Ipv4Prefix": "string" } ], "Ipv6AddressCount": number, "Ipv6Addresses": [ { "Ipv6Address": "string", "IsPrimaryIpv6": boolean } ], "Ipv6PrefixCount": number, "Ipv6Prefixes": [ { "Ipv6Prefix": "string" } ], "NetworkCardIndex": number, "NetworkInterfaceId": "string", "PrimaryIpv6": boolean, "PrivateIpAddress": "string", "PrivateIpAddresses": [ { "Primary": boolean, "PrivateIpAddress": "string" } ], "SecondaryPrivateIpAddressCount": number, "SubnetId": "string" } ], "NetworkPerformanceOptions": { "BandwidthWeighting": "string" }, "Placement": { "Affinity": "string", "AvailabilityZone": "string", "GroupId": "string", "GroupName": "string", "HostId": "string", "HostResourceGroupArn": "string", "PartitionNumber": number, "Tenancy": "string" }, "PrivateDnsNameOptions": { "EnableResourceNameDnsAAAARecord": boolean, "EnableResourceNameDnsARecord": boolean, "HostnameType": "string" }, "PrivateIpAddress": "string", "RamdiskId": "string", "SecurityGroupIds": [ "string" ], "SecurityGroups": [ "string" ], "SubnetId": "string", "TagSpecifications": [ { "ResourceType": "string", "Tags": [ { "Key": "string", "Value": "string" } ] } ], "UserData": "string" }, "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ClientToken

Unique token to ensure idempotent instance creation, preventing duplicate workspace launches.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: No

ManagedInstance

Comprehensive configuration settings for the WorkSpaces Instance, including network, compute, and storage parameters.

Type: ManagedInstanceRequest object

Required: Yes

Tags

Optional metadata tags for categorizing and managing WorkSpaces Instances.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 30 items.

Required: No

Response Syntax

{ "WorkspaceInstanceId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

WorkspaceInstanceId

Unique identifier assigned to the newly created WorkSpaces Instance.

Type: String

Length Constraints: Minimum length of 15. Maximum length of 70.

Pattern: wsinst-[0-9a-zA-Z]{8,63}

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Indicates insufficient permissions to perform the requested action.

Message

Detailed explanation of the access denial.

HTTP Status Code: 400

ConflictException

Signals a conflict with the current state of the resource.

Message

Description of the conflict encountered.

ResourceId

Identifier of the conflicting resource.

ResourceType

Type of the conflicting resource.

HTTP Status Code: 400

InternalServerException

Indicates an unexpected server-side error occurred.

Message

Description of the internal server error.

RetryAfterSeconds

Recommended wait time before retrying the request.

HTTP Status Code: 500

ServiceQuotaExceededException

Indicates that a service quota has been exceeded.

Message

Description of the quota limitation.

QuotaCode

Specific code for the exceeded quota.

ResourceId

Identifier of the resource related to the quota.

ResourceType

Type of resource related to the quota.

ServiceCode

Code identifying the service with the quota limitation.

HTTP Status Code: 400

ThrottlingException

Indicates the request rate has exceeded limits.

Message

Description of the throttling event.

QuotaCode

Specific code for the throttling quota.

RetryAfterSeconds

Recommended wait time before retrying the request.

ServiceCode

Code identifying the service experiencing throttling.

HTTP Status Code: 400

ValidationException

Indicates invalid input parameters in the request.

FieldList

List of fields that failed validation.

Message

Overall description of validation failures.

Reason

Specific reason for the validation failure.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: