startImageBuilder method

Future<StartImageBuilderResult> startImageBuilder({
  1. required String name,
  2. String? appstreamAgentVersion,
})

Starts the specified image builder.

May throw ConcurrentModificationException. May throw IncompatibleImageException. May throw InvalidAccountStatusException. May throw ResourceNotAvailableException. May throw ResourceNotFoundException.

Parameter name : The name of the image builder.

Parameter appstreamAgentVersion : The version of the WorkSpaces Applications agent to use for this image builder. To use the latest version of the WorkSpaces Applications agent, specify [LATEST].

Implementation

Future<StartImageBuilderResult> startImageBuilder({
  required String name,
  String? appstreamAgentVersion,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.StartImageBuilder'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      if (appstreamAgentVersion != null)
        'AppstreamAgentVersion': appstreamAgentVersion,
    },
  );

  return StartImageBuilderResult.fromJson(jsonResponse.body);
}