Skip to content

Commit 1a2de03

Browse files
author
serverpod_cloud
committed
feat: 6e601abefc35ee1f434cd7c86027295b82825205
1 parent 3362ae0 commit 1a2de03

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

ground_control_client/lib/src/protocol/client.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,23 @@ class EndpointSecrets extends _i1.EndpointRef {
876876
'cloudCapsuleId': cloudCapsuleId,
877877
});
878878

879+
/// Upserts secrets for a cloud capsule.
880+
///
881+
/// Creates new secrets or updates existing ones. Unlike [create], this method
882+
/// allows updating existing secret keys without throwing an exception.
883+
///
884+
/// Requires capsule authorization.
885+
///
886+
/// Throws [NotFoundException] if the capsule is not found.
887+
/// Throws [InvalidValueException] if secret names are invalid.
888+
_i2.Future<void> upsert({
889+
required Map<String, String> secrets,
890+
required String cloudCapsuleId,
891+
}) => caller.callServerEndpoint<void>('secrets', 'upsert', {
892+
'secrets': secrets,
893+
'cloudCapsuleId': cloudCapsuleId,
894+
});
895+
879896
_i2.Future<void> delete({
880897
required String key,
881898
required String cloudCapsuleId,

0 commit comments

Comments
 (0)