Changes for page Microservice Cmdlets

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

From version 4.3
edited by jklein
on 2025/06/24 10:54
Change comment: There is no comment for this version
To version 5.1
edited by jklein
on 2025/06/24 12:52
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -635,11 +635,52 @@
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 637  {{apimacro title="Beispiel der Funktion in PowerShell"}}
638 +{{code language="PowerShell" layout="LINENUMBERS"}}
639 +function Add-MicroserviceTemplate {
640 + param (
641 + [string]$Name
642 + )
638 638  
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
651 +}
652 +{{/code}}
639 639  {{/apimacro}}
640 640  
641 641  {{apimacro title="Beispiel der Template-Konfiguration"}}
642 -
656 +{{code language="PowerShell" layout="LINENUMBERS"}}
657 +$templateConfig = "<MicroserviceConfiguration Version=`"1.11.0.895`" Type=`"SnmpConnector`" SessionKey=`"bcafdb4e94f2572eed78525430ad0e0275229f98`">
658 + <SnmpConnectorConfiguration>
659 + <SnmpReader>
660 + <ParallelRequests>10</ParallelRequests>
661 + <SchedulingConfig>
662 + <SchedulingConfig_Scheduling>Interval</SchedulingConfig_Scheduling>
663 + <SchedulingConfig_Interval>P1D</SchedulingConfig_Interval>
664 + <SchedulingConfig_IgnoreLastExecutionTime>false</SchedulingConfig_IgnoreLastExecutionTime>
665 + </SchedulingConfig>
666 + <Groups />
667 + <GlobalCredentialLists>
668 + <GlobalCredentials />
669 + <GlobalCredentialsNoPriv />
670 + <GlobalCredentialsNoAuthNoPriv />
671 + </GlobalCredentialLists>
672 + </SnmpReader>
673 + <SnmpWriters>
674 + <DescriptionWriteMode>Keep</DescriptionWriteMode>
675 + <LocationWriteMode>Ignore</LocationWriteMode>
676 + <ContactWriteMode>Ignore</ContactWriteMode>
677 + <ProcessorWriter />
678 + <DispatcherStarter />
679 + <FileDumper />
680 + </SnmpWriters>
681 + </SnmpConnectorConfiguration>
682 +</MicroserviceConfiguration>"
683 +{{/code}}
643 643  {{/apimacro}}
644 644  
645 645  === **Rückgabewerte** ===
... ... @@ -660,73 +660,30 @@
660 660  ** Version
661 661  *** Die Versionierung des Templates
662 662  
663 -{{apimacro title="Rcükgabewerte der Template-Konfiguration"}}
704 +{{apimacro title="Rückgabewerte der Template-Konfiguration"}}
705 +{{code language="PowerShell" layout="LINENUMBERS"}}
706 +Successfully added template 'Test'.
664 664  
665 -{{/apimacro}}
666 -
667 -**Beispiel Template Konfiguration**
668 -
669 -|(((
670 -1
671 -
672 -2
673 -
674 -3
675 -
676 -4
677 -
678 -5
679 -
680 -6
681 -
682 -7
683 -
684 -8
685 -
686 -9
687 -
688 -10
689 -
690 -11
691 -
692 -12
693 -
694 -13
695 -
696 -14
697 -)))|(((
698 -Successfully added template 'Test'.
699 -
700 -
701 -TemplateId    : 119398aa-8108-43bd-811b-bd3e703e7f5c
702 -
708 +TemplateId : 119398aa-8108-43bd-811b-bd3e703e7f5c
703 703  Configuration : <SnmpConnectorConfiguration><SnmpReader><ParallelRequests>10</ParallelRequests><SchedulingConfig><Sched
704 -
705 705   ulingConfig_Scheduling>Interval</SchedulingConfig_Scheduling><SchedulingConfig_Interval>P1D</Scheduling
706 -
707 707   Config_Interval><SchedulingConfig_IgnoreLastExecutionTime>false</SchedulingConfig_IgnoreLastExecutionTi
708 -
709 709   me></SchedulingConfig><Groups /><GlobalCredentialLists><GlobalCredentials /><GlobalCredentialsNoPriv
710 -
711 711   /><GlobalCredentialsNoAuthNoPriv /></GlobalCredentialLists></SnmpReader><SnmpWriters><DescriptionWriteM
712 -
713 713   ode>Keep</DescriptionWriteMode><LocationWriteMode>Ignore</LocationWriteMode><ContactWriteMode>Ignore</C
714 -
715 715   ontactWriteMode><ProcessorWriter /><DispatcherStarter /><FileDumper
716 -
717 717   /></SnmpWriters></SnmpConnectorConfiguration>
717 +Name : Test
718 +Type : SnmpConnector
719 +Version : 1.11.0.895
720 +{{/code}}
721 +{{/apimacro}}
718 718  
719 -Name          : Test
723 +== Export-MicroserviceTemplateConfig ==
720 720  
721 -Type          : SnmpConnector
725 +Dieses Cmdlet ermöglicht es, die Konfiguration einer Microservice-Vorlagen zu exportieren.
722 722  
723 -Version       : 1.11.0.895
724 -)))
725 725  
726 -
727 -
728 -== Export-MicroserviceTemplateConfig ==
729 -
730 730  == Get-AESBMicroserviceTemplateConfig ==
731 731  
732 732  == Import-AESBMicroserviceTemplateConfig ==
© Aagon GmbH 2025
Besuchen Sie unsere Aagon-Community