updateProject method

Future<void> updateProject({
  1. required String projectId,
  2. required String projectName,
  3. String? clientToken,
  4. String? projectDescription,
})

Updates an IoT SiteWise Monitor project.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter projectId : The ID of the project to update.

Parameter projectName : A new friendly name for the project.

Parameter clientToken : A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

Parameter projectDescription : A new description for the project.

Implementation

Future<void> updateProject({
  required String projectId,
  required String projectName,
  String? clientToken,
  String? projectDescription,
}) async {
  final $payload = <String, dynamic>{
    'projectName': projectName,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (projectDescription != null) 'projectDescription': projectDescription,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/projects/${Uri.encodeComponent(projectId)}',
    exceptionFnMap: _exceptionFns,
  );
}