async addNewAKProfile()

in src/Service.ts [435:450]


  async addNewAKProfile(submitValue: {
    profileName: string;
    accessKey: string;
    secretKey: string;
    defaultRegionId: string;
  }) {
    try {
      const profileInfo = await getProfileInfoInstance();
      await profileInfo.addProfile(submitValue);
      await profileInfo.refreshProfiles();
      await vscode.commands.executeCommand("alicloud.api.restart");
      return { success: true };
    } catch (e) {
      return { success: false, error: e };
    }
  }