updateVariable method

Future<void> updateVariable({
  1. required String name,
  2. String? defaultValue,
  3. String? description,
  4. String? variableType,
})

Updates a variable.

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

Parameter name : The name of the variable.

Parameter defaultValue : The new default value of the variable.

Parameter description : The new description.

Parameter variableType : The variable type. For more information see Variable types.

Implementation

Future<void> updateVariable({
  required String name,
  String? defaultValue,
  String? description,
  String? variableType,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.UpdateVariable'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'name': name,
      if (defaultValue != null) 'defaultValue': defaultValue,
      if (description != null) 'description': description,
      if (variableType != null) 'variableType': variableType,
    },
  );
}