CreateEnvironment
Important
End of support notice: On March 31, 2027, AWS will end support for Amazon WorkSpaces Thin Client. After March 31, 2027, you will no longer be able to access the WorkSpaces Thin Client console or WorkSpaces Thin Client resources. For more information, see Amazon WorkSpaces Thin Client end of support.
Creates an environment for your thin client devices.
Request Syntax
POST /environments HTTP/1.1
Content-type: application/json
{
"clientToken": "string",
"desiredSoftwareSetId": "string",
"desktopArn": "string",
"desktopEndpoint": "string",
"deviceCreationTags": {
"string" : "string"
},
"kmsKeyArn": "string",
"maintenanceWindow": {
"applyTimeOf": "string",
"daysOfTheWeek": [ "string" ],
"endTimeHour": number,
"endTimeMinute": number,
"startTimeHour": number,
"startTimeMinute": number,
"type": "string"
},
"name": "string",
"softwareSetUpdateMode": "string",
"softwareSetUpdateSchedule": "string",
"tags": {
"string" : "string"
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- clientToken
-
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value
. If you don't provide this value, then AWS generates a random one for you.
If you retry the operation with the same
ClientToken, but with different parameters, the retry fails with anIdempotentParameterMismatcherror.Type: String
Length Constraints: Minimum length of 1. Maximum length of 512.
Required: No
- desiredSoftwareSetId
-
The ID of the software set to apply.
Type: String
Pattern:
[0-9]{1,9}Required: No
- desktopArn
-
The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Secure Browser, or WorkSpaces Applications.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern:
arn:[\w+=\/,.@-]+:[a-zA-Z0-9\-]+:[a-zA-Z0-9\-]*:[0-9]{0,12}:[a-zA-Z0-9\-\/\._]+Required: Yes
- desktopEndpoint
-
The URL for the identity provider login (only for environments that use WorkSpaces Applications).
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern:
(https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,32}(:[0-9]{1,5})?(\/.*)?Required: No
- deviceCreationTags
-
A map of the key-value pairs of the tag or tags to assign to the newly created devices for this environment.
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 50 items.
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Key Pattern:
(?!aws:)[A-Za-z0-9 _=@:.+-/]+Value Length Constraints: Minimum length of 0. Maximum length of 256.
Value Pattern:
[A-Za-z0-9 _=@:.+-/]+Required: No
- kmsKeyArn
-
The Amazon Resource Name (ARN) of the AWS Key Management Service key to use to encrypt the environment.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern:
arn:[\w+=\/,.@-]+:kms:[a-zA-Z0-9\-]*:[0-9]{0,12}:key\/[a-zA-Z0-9-]+Required: No
- maintenanceWindow
-
A specification for a time window to apply software updates.
Type: MaintenanceWindow object
Required: No
- name
-
The name for the environment.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 64.
Pattern:
$|^[0-9\p{IsAlphabetic}+:,.@'" -][0-9\p{IsAlphabetic}+=:,.@'" -]*Required: No
- softwareSetUpdateMode
-
An option to define which software updates to apply.
Type: String
Valid Values:
USE_LATEST | USE_DESIREDRequired: No
- softwareSetUpdateSchedule
-
An option to define if software updates should be applied within a maintenance window.
Type: String
Valid Values:
USE_MAINTENANCE_WINDOW | APPLY_IMMEDIATELYRequired: No
-
A map of the key-value pairs of the tag or tags to assign to the resource.
Type: String to string map
Required: No
Response Syntax
HTTP/1.1 201
Content-type: application/json
{
"environment": {
"activationCode": "string",
"arn": "string",
"createdAt": number,
"desiredSoftwareSetId": "string",
"desktopArn": "string",
"desktopEndpoint": "string",
"desktopType": "string",
"id": "string",
"maintenanceWindow": {
"applyTimeOf": "string",
"daysOfTheWeek": [ "string" ],
"endTimeHour": number,
"endTimeMinute": number,
"startTimeHour": number,
"startTimeMinute": number,
"type": "string"
},
"name": "string",
"pendingSoftwareSetId": "string",
"softwareSetUpdateMode": "string",
"softwareSetUpdateSchedule": "string",
"updatedAt": number
}
}
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The following data is returned in JSON format by the service.
- environment
-
Describes an environment.
Type: EnvironmentSummary object
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
Important
End of support notice: On March 31, 2027, AWS will end support for Amazon WorkSpaces Thin Client. After March 31, 2027, you will no longer be able to access the WorkSpaces Thin Client console or WorkSpaces Thin Client resources. For more information, see Amazon WorkSpaces Thin Client end of support.
You do not have sufficient access to perform this action.
HTTP Status Code: 403
- ConflictException
-
Important
End of support notice: On March 31, 2027, AWS will end support for Amazon WorkSpaces Thin Client. After March 31, 2027, you will no longer be able to access the WorkSpaces Thin Client console or WorkSpaces Thin Client resources. For more information, see Amazon WorkSpaces Thin Client end of support.
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
- resourceId
-
The ID of the resource associated with the request.
- resourceType
-
The type of the resource associated with the request.
HTTP Status Code: 409
- InternalServerException
-
Important
End of support notice: On March 31, 2027, AWS will end support for Amazon WorkSpaces Thin Client. After March 31, 2027, you will no longer be able to access the WorkSpaces Thin Client console or WorkSpaces Thin Client resources. For more information, see Amazon WorkSpaces Thin Client end of support.
The server encountered an internal error and is unable to complete the request.
- retryAfterSeconds
-
The number of seconds to wait before retrying the next request.
HTTP Status Code: 500
- ResourceNotFoundException
-
Important
End of support notice: On March 31, 2027, AWS will end support for Amazon WorkSpaces Thin Client. After March 31, 2027, you will no longer be able to access the WorkSpaces Thin Client console or WorkSpaces Thin Client resources. For more information, see Amazon WorkSpaces Thin Client end of support.
The resource specified in the request was not found.
- resourceId
-
The ID of the resource associated with the request.
- resourceType
-
The type of the resource associated with the request.
HTTP Status Code: 404
- ServiceQuotaExceededException
-
Important
End of support notice: On March 31, 2027, AWS will end support for Amazon WorkSpaces Thin Client. After March 31, 2027, you will no longer be able to access the WorkSpaces Thin Client console or WorkSpaces Thin Client resources. For more information, see Amazon WorkSpaces Thin Client end of support.
Your request exceeds a service quota.
- quotaCode
-
The code for the quota in Service Quotas.
- resourceId
-
The ID of the resource that exceeds the service quota.
- resourceType
-
The type of the resource that exceeds the service quota.
- serviceCode
-
The code for the service in Service Quotas.
HTTP Status Code: 402
- ThrottlingException
-
Important
End of support notice: On March 31, 2027, AWS will end support for Amazon WorkSpaces Thin Client. After March 31, 2027, you will no longer be able to access the WorkSpaces Thin Client console or WorkSpaces Thin Client resources. For more information, see Amazon WorkSpaces Thin Client end of support.
The request was denied due to request throttling.
- quotaCode
-
The code for the quota in Service Quotas.
- retryAfterSeconds
-
The number of seconds to wait before retrying the next request.
- serviceCode
-
The code for the service in Service Quotas.
HTTP Status Code: 429
- ValidationException
-
Important
End of support notice: On March 31, 2027, AWS will end support for Amazon WorkSpaces Thin Client. After March 31, 2027, you will no longer be able to access the WorkSpaces Thin Client console or WorkSpaces Thin Client resources. For more information, see Amazon WorkSpaces Thin Client end of support.
The input fails to satisfy the specified constraints.
- fieldList
-
A list of fields that didn't validate.
- reason
-
The reason for the exception.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: