updateCapability method

Future<UpdateCapabilityResponse> updateCapability({
  1. required String capabilityName,
  2. required String clusterName,
  3. String? clientRequestToken,
  4. UpdateCapabilityConfiguration? configuration,
  5. CapabilityDeletePropagationPolicy? deletePropagationPolicy,
  6. String? roleArn,
})

Updates the configuration of a managed capability in your Amazon EKS cluster. You can update the IAM role, configuration settings, and delete propagation policy for a capability.

When you update a capability, Amazon EKS applies the changes and may restart capability components as needed. The capability remains available during the update process, but some operations may be temporarily unavailable.

May throw AccessDeniedException. May throw InvalidParameterException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw ServerException.

Parameter capabilityName : The name of the capability to update configuration for.

Parameter clusterName : The name of the Amazon EKS cluster that contains the capability you want to update configuration for.

Parameter clientRequestToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation.

Parameter configuration : The updated configuration settings for the capability. You only need to specify the configuration parameters you want to change. For Argo CD capabilities, you can update RBAC role mappings and network access settings.

Parameter deletePropagationPolicy : The updated delete propagation policy for the capability. Currently, the only supported value is RETAIN.

Parameter roleArn : The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. If you specify a new role ARN, the capability will start using the new role for all subsequent operations.

Implementation

Future<UpdateCapabilityResponse> updateCapability({
  required String capabilityName,
  required String clusterName,
  String? clientRequestToken,
  UpdateCapabilityConfiguration? configuration,
  CapabilityDeletePropagationPolicy? deletePropagationPolicy,
  String? roleArn,
}) async {
  final $payload = <String, dynamic>{
    'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
    if (configuration != null) 'configuration': configuration,
    if (deletePropagationPolicy != null)
      'deletePropagationPolicy': deletePropagationPolicy.value,
    if (roleArn != null) 'roleArn': roleArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/clusters/${Uri.encodeComponent(clusterName)}/capabilities/${Uri.encodeComponent(capabilityName)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateCapabilityResponse.fromJson(response);
}