putRuleGroupsNamespace method
Updates an existing rule groups namespace within a workspace. A rule
groups namespace is associated with exactly one rules file. A workspace
can have multiple rule groups namespaces.
Use this operation only to update existing rule groups namespaces. To
create a new rule groups namespace, use
CreateRuleGroupsNamespace.
You can't use this operation to add tags to an existing rule groups
namespace. Instead, use TagResource.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter data :
The new rules file to use in the namespace. A base64-encoded version of
the YAML rule groups file.
For details about the rule groups namespace structure, see RuleGroupsNamespaceData.
Parameter name :
The name of the rule groups namespace that you are updating.
Parameter workspaceId :
The ID of the workspace where you are updating the rule groups namespace.
Parameter clientToken :
A unique identifier that you can provide to ensure the idempotency of the
request. Case-sensitive.
Implementation
Future<PutRuleGroupsNamespaceResponse> putRuleGroupsNamespace({
required Uint8List data,
required String name,
required String workspaceId,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'data': base64Encode(data),
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceId)}/rulegroupsnamespaces/${Uri.encodeComponent(name)}',
exceptionFnMap: _exceptionFns,
);
return PutRuleGroupsNamespaceResponse.fromJson(response);
}