Changes for page Microservice Cmdlets

Last modified by jklein on 2025/08/15 09:48

From version 6.2
edited by jklein
on 2025/07/16 07:38
Change comment: There is no comment for this version
To version 4.2
edited by jklein
on 2025/06/24 08:35
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -155,7 +155,7 @@
155 155  * **CpuUsage**: Die aktuelle CPU-Auslastung des Microservices in Prozent.
156 156  * **MemoryUsage**: Die aktuelle Speicherauslastung des Microservices in Bytes.
157 157  
158 -== Edit-AESBMicroservice ==
158 +== Edit-AESBMicroservices ==
159 159  
160 160  Dieses Cmdlet ermöglicht die Bearbeitung der Konfiguration eines spezifischen Microservice. Derzeit unterstützt es die Änderung des Starttyps (StartupType) und optional die Konfiguration von Anmeldeinformationen (Credentials) für den Microservice. Dies ist besonders nützlich, um das Startverhalten von Microservices zu steuern oder SICS-Anmeldeinformationen zu aktualisieren.
161 161  
... ... @@ -621,8 +621,8 @@
621 621  
622 622  |=(% style="width: 213px;" %)Parameter |=(% style="width: 217px;" %)Datentyp|=Optional|=Alias|=Beschreibung
623 623  |-ConnectionName|String|✅|C|Der Name der Verbindung, über die eine Vorlage hinzugefügt werden soll. Wird die Standardverbindung verwendet, wenn nicht angegeben.
624 -|-TemplateName|String|❌|Keine|Der Name für die Vorlage.
625 -|-TemplateConfig|XmlDocument|❌|Keine|Die Konfiguration der Vorlage.
624 +|-TemplateName|String|❌|Keine|Der Name für die Vorlage
625 +|-TemplateConfig|XmlDocument|❌|Keine|Die Konfiguration der Vorlage
626 626  
627 627  === **Beispiele** ===
628 628  
... ... @@ -634,57 +634,173 @@
634 634  
635 635  Dieses Beispiel fügt eine neue Templatekonfiguration mit dem Namen "Test" auf Basis des $templateConfig-Objekts hinzu. Die Standardverbindung wird verwendet.
636 636  
637 -{{apimacro title="Beispiel der Funktion in PowerShell"}}
638 -{{code language="PowerShell" layout="LINENUMBERS"}}
639 -function Add-MicroserviceTemplate {
637 +
638 +**Beispiel Funktion in PowerShell**
639 +
640 +|(((
641 +1
642 +
643 +2
644 +
645 +3
646 +
647 +4
648 +
649 +5
650 +
651 +6
652 +
653 +7
654 +
655 +8
656 +
657 +9
658 +
659 +10
660 +
661 +11
662 +
663 +12
664 +
665 +13
666 +)))|(((
667 +function Add-MicroserviceTemplate {
668 +
640 640   param (
670 +
641 641   [string]$Name
672 +
642 642   )
643 -
644 - $packages = Get-AESBMicroservicePackages
645 -
646 - $microserviceTemplateConfig = New-AESBMicroserviceTemplateConfig -PackageName $packages[0].PackageName -PackageVersion $packages[0].PackageVersions[0]
647 -
648 - $addMicroserviceResult = Add-AESBMicroserviceTemplate -TemplateName $Name -TemplateConfig $microserviceTemplateConfig
649 -
650 - return $addMicroserviceResult
674 +
675 +
676 + $packages = Get-AESBMicroservicePackages
677 +
678 +
679 + $microserviceTemplateConfig = New-AESBMicroserviceTemplateConfig -PackageName $packages[0].PackageName -PackageVersion $packages[0].PackageVersions[0]
680 +
681 +
682 + $addMicroserviceResult = Add-AESBMicroserviceTemplate -TemplateName $Name -TemplateConfig $microserviceTemplateConfig
683 +
684 +
685 + return $addMicroserviceResult
686 +
651 651  }
652 -{{/code}}
653 -{{/apimacro}}
688 +)))
654 654  
655 -{{apimacro title="Beispiel der Template-Konfiguration"}}
656 -{{code language="PowerShell" layout="LINENUMBERS"}}
657 -$templateConfig = "<MicroserviceConfiguration Version=`"1.11.0.895`" Type=`"SnmpConnector`" SessionKey=`"bcafdb4e94f2572eed78525430ad0e0275229f98`">
690 +
691 +
692 +**Beispiel Template Konfiguration**
693 +
694 +|(((
695 +1
696 +
697 +2
698 +
699 +3
700 +
701 +4
702 +
703 +5
704 +
705 +6
706 +
707 +7
708 +
709 +8
710 +
711 +9
712 +
713 +10
714 +
715 +11
716 +
717 +12
718 +
719 +13
720 +
721 +14
722 +
723 +15
724 +
725 +16
726 +
727 +17
728 +
729 +18
730 +
731 +19
732 +
733 +20
734 +
735 +21
736 +
737 +22
738 +
739 +23
740 +
741 +24
742 +
743 +25
744 +
745 +26
746 +)))|(((
747 +$templateConfig = "<MicroserviceConfiguration Version=`"1.11.0.895`" Type=`"SnmpConnector`" SessionKey=`"bcafdb4e94f2572eed78525430ad0e0275229f98`">
748 +
658 658   <SnmpConnectorConfiguration>
750 +
659 659   <SnmpReader>
752 +
660 660   <ParallelRequests>10</ParallelRequests>
754 +
661 661   <SchedulingConfig>
756 +
662 662   <SchedulingConfig_Scheduling>Interval</SchedulingConfig_Scheduling>
758 +
663 663   <SchedulingConfig_Interval>P1D</SchedulingConfig_Interval>
760 +
664 664   <SchedulingConfig_IgnoreLastExecutionTime>false</SchedulingConfig_IgnoreLastExecutionTime>
762 +
665 665   </SchedulingConfig>
764 +
666 666   <Groups />
766 +
667 667   <GlobalCredentialLists>
768 +
668 668   <GlobalCredentials />
770 +
669 669   <GlobalCredentialsNoPriv />
772 +
670 670   <GlobalCredentialsNoAuthNoPriv />
774 +
671 671   </GlobalCredentialLists>
776 +
672 672   </SnmpReader>
778 +
673 673   <SnmpWriters>
780 +
674 674   <DescriptionWriteMode>Keep</DescriptionWriteMode>
782 +
675 675   <LocationWriteMode>Ignore</LocationWriteMode>
784 +
676 676   <ContactWriteMode>Ignore</ContactWriteMode>
786 +
677 677   <ProcessorWriter />
788 +
678 678   <DispatcherStarter />
790 +
679 679   <FileDumper />
792 +
680 680   </SnmpWriters>
794 +
681 681   </SnmpConnectorConfiguration>
796 +
682 682  </MicroserviceConfiguration>"
683 -{{/code}}
684 -{{/apimacro}}
798 +)))
685 685  
686 -=== **Rückgabewerte** ===
687 687  
801 +
802 +==== 12.2. **Rückgabewerte** ====
803 +
688 688  Bei erfolgreicher Anwendung bekommt man zwei Objekte zurück.
689 689  
690 690  * String
... ... @@ -701,74 +701,71 @@
701 701  ** Version
702 702  *** Die Versionierung des Templates
703 703  
704 -{{apimacro title="Rückgabewerte der Template-Konfiguration"}}
705 -{{code language="PowerShell" layout="LINENUMBERS"}}
706 -Successfully added template 'Test'.
707 -
708 -TemplateId : 119398aa-8108-43bd-811b-bd3e703e7f5c
709 -Configuration : <SnmpConnectorConfiguration><SnmpReader><ParallelRequests>10</ParallelRequests><SchedulingConfig><Sched
710 - ulingConfig_Scheduling>Interval</SchedulingConfig_Scheduling><SchedulingConfig_Interval>P1D</Scheduling
711 - Config_Interval><SchedulingConfig_IgnoreLastExecutionTime>false</SchedulingConfig_IgnoreLastExecutionTi
712 - me></SchedulingConfig><Groups /><GlobalCredentialLists><GlobalCredentials /><GlobalCredentialsNoPriv
713 - /><GlobalCredentialsNoAuthNoPriv /></GlobalCredentialLists></SnmpReader><SnmpWriters><DescriptionWriteM
714 - ode>Keep</DescriptionWriteMode><LocationWriteMode>Ignore</LocationWriteMode><ContactWriteMode>Ignore</C
715 - ontactWriteMode><ProcessorWriter /><DispatcherStarter /><FileDumper
716 - /></SnmpWriters></SnmpConnectorConfiguration>
717 -Name : Test
718 -Type : SnmpConnector
719 -Version : 1.11.0.895
720 -{{/code}}
721 -{{/apimacro}}
722 722  
723 -== Export-MicroserviceTemplateConfig ==
724 724  
725 -Dieses Cmdlet ermöglicht es, die Konfiguration einer Microservice-Vorlagen zu exportieren.
822 +**Beispiel Template Konfiguration**
726 726  
727 -|=(% style="width: 213px;" %)Parameter |=(% style="width: 217px;" %)Datentyp|=Optional|=Alias|=Beschreibung
728 -|-ConnectionName|String|✅|C|Der Name der Verbindung, über die die Microservice-Vorlagen-Konfiguration exportiert werden soll. Wird die Standardverbindung verwendet, wenn nicht angegeben.
729 -|-TemplateConfig|XmlDocument|❌|Keine|Die Konfiguration, die exportiert werden soll.
730 -|-Path|String|❌|Keine|Der Pfad, unter dem die Microservice-Vorlagen-Konfiguration gespeichert werden soll.
824 +|(((
825 +1
731 731  
732 -=== **Beispiele** ===
827 +2
733 733  
734 -Beispiel 1: MicroserviceTemplate exportieren
829 +3
735 735  
736 -{{code language="PowerShell"}}
737 -Export-AESBMicroserviceTemplateConfig -TemplateConfig $templateConfig -Path $path
831 +4
738 738  
739 -{{/code}}
833 +5
740 740  
741 -In diesem Beispiel wird die $templateConfig am Speicherort "C:\Test.xml" exportiert.
835 +6
742 742  
743 -{{code language="PowerShell" layout="LINENUMBERS"}}
744 -function Export-MicroserviceTemplateConfig {
745 - param (
746 - [string]$Path
747 - )
748 -
749 - $microserviceTemplates = Get-AESBMicroserviceTemplates
750 -
751 - $microserviceTemplateConfig = Get-AESBMicroserviceTemplateConfig -TemplateName $microserviceTemplates[0].Name
752 -
753 - $exportMicroserviceTemplateConfigResult = Export-AESBMicroserviceTemplateConfig -TemplateConfig $microserviceTemplateConfig -Path $Path
754 -
755 - return $exportMicroserviceTemplateConfigResult
756 -}
757 -{{/code}}
837 +7
758 758  
759 -{{apimacro title="Beispielhafte XML-Datei nach dem Exportieren"}}
760 -
761 -{{/apimacro}}
839 +8
762 762  
763 -=== Rückgabewerte ===
841 +9
764 764  
765 -Nach erfolgreichem Exportieren bekommen Sie eine Statusmeldung zurück.
843 +10
766 766  
767 -{{code language="none"}}
768 -Writing the file was successful.
845 +11
769 769  
770 -{{/code}}
847 +12
771 771  
849 +13
850 +
851 +14
852 +)))|(((
853 +Successfully added template 'Test'.
854 +
855 +
856 +TemplateId    : 119398aa-8108-43bd-811b-bd3e703e7f5c
857 +
858 +Configuration : <SnmpConnectorConfiguration><SnmpReader><ParallelRequests>10</ParallelRequests><SchedulingConfig><Sched
859 +
860 + ulingConfig_Scheduling>Interval</SchedulingConfig_Scheduling><SchedulingConfig_Interval>P1D</Scheduling
861 +
862 + Config_Interval><SchedulingConfig_IgnoreLastExecutionTime>false</SchedulingConfig_IgnoreLastExecutionTi
863 +
864 + me></SchedulingConfig><Groups /><GlobalCredentialLists><GlobalCredentials /><GlobalCredentialsNoPriv
865 +
866 + /><GlobalCredentialsNoAuthNoPriv /></GlobalCredentialLists></SnmpReader><SnmpWriters><DescriptionWriteM
867 +
868 + ode>Keep</DescriptionWriteMode><LocationWriteMode>Ignore</LocationWriteMode><ContactWriteMode>Ignore</C
869 +
870 + ontactWriteMode><ProcessorWriter /><DispatcherStarter /><FileDumper
871 +
872 + /></SnmpWriters></SnmpConnectorConfiguration>
873 +
874 +Name          : Test
875 +
876 +Type          : SnmpConnector
877 +
878 +Version       : 1.11.0.895
879 +)))
880 +
881 +
882 +
883 +== Export-MicroserviceTemplateConfig ==
884 +
772 772  == Get-AESBMicroserviceTemplateConfig ==
773 773  
774 774  == Import-AESBMicroserviceTemplateConfig ==
© Aagon GmbH 2025
Besuchen Sie unsere Aagon-Community