createDevEnvironment method
- required InstanceType instanceType,
- required PersistentStorageConfiguration persistentStorage,
- required String projectName,
- required String spaceName,
- String? alias,
- String? clientToken,
- List<
IdeConfiguration> ? ides, - int? inactivityTimeoutMinutes,
- List<
RepositoryInput> ? repositories, - String? vpcConnectionName,
Creates a Dev Environment in Amazon CodeCatalyst, a cloud-based development environment that you can use to quickly work on the code stored in the source repositories of your project.
Parameter instanceType :
The Amazon EC2 instace type to use for the Dev Environment.
Parameter persistentStorage :
Information about the amount of storage allocated to the Dev Environment.
Parameter projectName :
The name of the project in the space.
Parameter spaceName :
The name of the space.
Parameter alias :
The user-defined alias for a Dev Environment.
Parameter clientToken :
A user-specified idempotency token. Idempotency ensures that an API
request completes only once. With an idempotent request, if the original
request completes successfully, the subsequent retries return the result
from the original successful request and have no additional effect.
Parameter ides :
Information about the integrated development environment (IDE) configured
for a Dev Environment.
Parameter inactivityTimeoutMinutes :
The amount of time the Dev Environment will run without any activity
detected before stopping, in minutes. Only whole integers are allowed. Dev
Environments consume compute minutes when running.
Parameter repositories :
The source repository that contains the branch to clone into the Dev
Environment.
Parameter vpcConnectionName :
The name of the connection that will be used to connect to Amazon VPC, if
any.
Implementation
Future<CreateDevEnvironmentResponse> createDevEnvironment({
required InstanceType instanceType,
required PersistentStorageConfiguration persistentStorage,
required String projectName,
required String spaceName,
String? alias,
String? clientToken,
List<IdeConfiguration>? ides,
int? inactivityTimeoutMinutes,
List<RepositoryInput>? repositories,
String? vpcConnectionName,
}) async {
_s.validateNumRange(
'inactivityTimeoutMinutes',
inactivityTimeoutMinutes,
0,
1200,
);
final $payload = <String, dynamic>{
'instanceType': instanceType.value,
'persistentStorage': persistentStorage,
if (alias != null) 'alias': alias,
if (clientToken != null) 'clientToken': clientToken,
if (ides != null) 'ides': ides,
if (inactivityTimeoutMinutes != null)
'inactivityTimeoutMinutes': inactivityTimeoutMinutes,
if (repositories != null) 'repositories': repositories,
if (vpcConnectionName != null) 'vpcConnectionName': vpcConnectionName,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v1/spaces/${Uri.encodeComponent(spaceName)}/projects/${Uri.encodeComponent(projectName)}/devEnvironments',
exceptionFnMap: _exceptionFns,
);
return CreateDevEnvironmentResponse.fromJson(response);
}