public void Update()

in Editor/Credentials/AwsCredentialsUpdate.cs [110:156]


        public void Update()
        {
            if (!CanUpdate)
            {
                _logger.Log(DevStrings.OperationInvalid, LogType.Error);
                return;
            }

            string profileName = AllProlfileNames[_selectedProfileIndex];
            Response response = _coreApi.UpdateAwsCredentials(profileName, AccessKeyId, SecretKey);

            if (!response.Success)
            {
                SetErrorStatus(response.ErrorCode);
                _logger.LogResponseError(response);
                return;
            }

            Response writeResponse = _coreApi.PutSetting(SettingsKeys.CurrentProfileName, profileName);

            if (!writeResponse.Success)
            {
                SetErrorStatus(writeResponse.ErrorCode);
                _logger.LogResponseError(writeResponse);
                return;
            }

            (bool success, string errorCode) = RegionBootstrap.Save();

            if (!success && errorCode != null)
            {
                string messageFormat = _textProvider.Get(Strings.StatusRegionUpdateFailedWithError);
                string error = _textProvider.GetError(errorCode);
                error = string.Format(messageFormat, error);
                _status.SetMessage(error, MessageType.Error);
            }
            else
            {
                _status.SetMessage(_textProvider.Get(Strings.StatusProfileUpdated), MessageType.Info);
            }

            CurrentProfileIndex = SelectedProfileIndex;
            CurrentProfileName = profileName;
            _currentAccessKeyId = AccessKeyId;
            _currentSecretKey = SecretKey;
            _status.IsDisplayed = true;
        }