updateEnvironmentAction method

Future<UpdateEnvironmentActionOutput> updateEnvironmentAction({
  1. required String domainIdentifier,
  2. required String environmentIdentifier,
  3. required String identifier,
  4. String? description,
  5. String? name,
  6. ActionParameters? parameters,
})

Updates an environment action.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The domain ID of the environment action.

Parameter environmentIdentifier : The environment ID of the environment action.

Parameter identifier : The ID of the environment action.

Parameter description : The description of the environment action.

Parameter name : The name of the environment action.

Parameter parameters : The parameters of the environment action.

Implementation

Future<UpdateEnvironmentActionOutput> updateEnvironmentAction({
  required String domainIdentifier,
  required String environmentIdentifier,
  required String identifier,
  String? description,
  String? name,
  ActionParameters? parameters,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (name != null) 'name': name,
    if (parameters != null) 'parameters': parameters,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/environments/${Uri.encodeComponent(environmentIdentifier)}/actions/${Uri.encodeComponent(identifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateEnvironmentActionOutput.fromJson(response);
}