Package: opsrampcli
OpsRamp Command Line InterfaceThis is a utility script that allows easy searching and manipulation of various OpsRamp items and configurations.  You can specify connection credentials via command line, or you canset up an environments fileto contain the credentials you need to use, which makes it easier if you need to manage multiple credentials.Available CommandsThe available commands are:opcli CommandDescriptiongetalertsSearch for and take action on alertspostalertsPost alerts using the API (using OAuth creds)webhookalertsPost alerts to a Webhook integrationgetincidentsSearch and take action on IncidentsgetresourcesSearch for and take action on resources/devicesexportservicemapsExport one or more full Service Map definitions to a file which can be manipulated and re-importedimportservicemapsImport (and optionally transform while doing so) from a Service Map export filecloneservicemapsCopy an existing Service Map, with transformations/replacements (useful when you have a template Service Map to re-use)transformsvcmapApply regex replacements to an exported Service Map and create a new transformed export file with the changesgetservicemapsGet Service Map definitionsgetchildsvcgroupsGet child Service Groups of a parent ServicegetservicegroupGet the full definition of a Service GroupexportcustattrfileGenerate an Excel or csv file from existing custom attribute valuesimportcustattrfileImport an Excel file containing custom attribute valuesgetcustomattrsGet custom attribute definitionsgetdiscoprofileGet discovery profile definitiongetalertescSearch and get Escalation Policy definitionsmigratealertescMigrate/copy Escalation Policies within same tenant or from one tenant to anotherclonetemplatesClone monitoring templatesFor more detailed help on a specific command use the -h option with the command, for example to get help on the cloneservicemaps command:%opclicloneservicemaps-h
usage:opclicloneservicemaps[-h]--envENV[--secureSECURE][--envfileENVFILE]--nameNAME--replaceREGEXREPLACEWITH[--parentlink][--clobber]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--nameNAMENameofServiceMaptotransformandclone(default:None)--replaceREGEXREPLACEWITHTransformingregexpatternandreplacementstring(optioncanberepeated)(default:None)--parentlinkIfrootServicehasalinktoaparent,linktheimportedServiceMap(default:False)--clobberOverwriteServiceMap(i.e.withsamename)ifitalreadyexists(default:False)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)Credentialsopcli requires credentials for most operations, either via command line arguments or anenvironments.ymlfile to be located in the directory where you running it.  Optionally you can specify an explicit environments file path & name using the --envfile option.  The file must follow the following format, where the name is the value you will specify to the --env option to define the URL and credentials you will use:-name:example1url:https://customer2name.api.opsramp.compartner:msp_nnnnntenant:client_nnnnnclient_id:abcdefg1234567client_secret:abcdefg1234567-name:example2url:https://customer2name.api.opsramp.compartner:msp_nnnnntenant:client_nnnnnclient_id:abcdefg1234567client_secret:abcdefg1234567If providing credentials directly on the command line, use the following options:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)--vtokenVTOKENOpsRampwebhooktoken(onlyusedforwebhookalertscommand)(default:None)Note that you only need to provide the attributes needed for the kind of API calls you are making.  Therefore:If you are making an API call that does not require a partner id (which is not needed  in most cases) you do not need to provide apartnervalue.If you are not doing webhook alert posts, you would not need to specify thevtokenvalue.If you are doing only webhook alert posts then you would not needclient_idandclient_secret.If you are using the environment for a bunch of different scenarios, there is no harm in having the extra values there for the cases where they are not needed.CommandsgetalertsSearch for and take action on alertsusage:opcligetalerts[-h]--envENV[--secureSECURE][--envfileENVFILE]--queryQUERY[--brief][--descr][--count][--filterFILTER][--actionACTION][--heal]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--queryQUERYQueryStringtofilteralertsasperhttps://develop.opsramp.com/resource-management/tenants-tenantid-resources-search(default:None)--briefIncludeonlykeyfieldsinoutput(default:False)--descrIncludethedescriptionfieldinresults(runs*much*slowerasitrequiresaseparateapicallperalert)(default:False)--countOnlyshowthecountofmatchingalerts(default:False)--filterFILTERPost-queryfilteronalerts.PythonexpressionthatwillevaluatetoTrueorFalsesuchasalert["resource"]["name"].startswith("prod")(default:None)--actionACTIONPerformanactiononmatchingalerts(Heal,acknowledge,suppress,close,unsuppress,unAcknowledge)(default:None)--healHealthematchingalerts(i.e.sendamatchingOk)(default:False)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)Alert search criteriaAlert search --query option uses the syntax documentedhereNote: Above link is to an Internet Archive capture of an old doc page, as the latest doc no longer lists query variablesExamplesSearch for all alerts with matching resource/device numeric id and metric% opcli getalerts --env myenvname --query 'resourceIds:9798408+metrics:testmetric' --briefSearch for all alerts last updated during given time range, and heal & close them% opcli getalerts --env myenvname --query 'startDate:2000-01-01T00:00:00 0000+endDate:2020-12-01T00:00:00 0000+alertTimeBase:updated+states:Critical,Warning,Info' --heal --action closepostalertsPost alerts directly to the API (using OAuth creds)usage:opclipostalerts[-h][--envENV][--envfileENVFILE][--urlURL][--client_idKEY][--client_secretSCRT][--tenantTENANT][--partnerPARTNER][--secureSECURE][--infileINFILE][--rangeRANGE][--subjectSUBJECT][--state{Critical,Warning,Info,Ok}][--metricMETRIC][--resourceRESOURCE][--sourceSOURCE][--compCOMP][--descDESC][--probPROB][--clientCLIENT][--customNAMEVALUE]optionalarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)Postalertsusingalertcontentfromajsonfile:--infileINFILEFilecontainingajsonarrayofalertpayloads(default:None)--rangeRANGEAnintegerorrangeidentifyingwhichalertinthefiletosend(default:None)Postanalertusingalertcontentfromthecommandline:--subjectSUBJECTAlertSubject(default:None)--state{Critical,Warning,Info,Ok}AlertCurrentState(default:None)--metricMETRICAlertmetric(default:None)--resourceRESOURCEAlertResourcename(default:None)--sourceSOURCEAlertSourcename(default:None)--compCOMPAlertComponentname(default:None)--descDESCAlertDescription(default:None)--probPROBAlertProblemArea(default:None)--clientCLIENTAlertClientID(onlyrequiredifpostingwithapartner-leveltenant(default:None)--customNAMEVALUEAlertcustomattributenameandvalue(canrepeatthisoptionformultiplecustomattributes)(default:None)Example% opcli postalerts --env myenv --subject 'test alert' --state Warning --metric testmetric --resource testhost  --comp c1 --desc mydesc --prob p1 --custom attr1 val1 --custom attr2 val2webhookalertsPost alerts to a Webhook integrationusage:opcliwebhookalerts[-h][--urlURL][--vtokenVTOKEN]--infileINFILE[--rangeRANGE]Command-specificarguments:-h,--helpshowthishelpmessageandexit--infileINFILEFilecontaininganarrayofjsonalertpayloads(default:None)--rangeRANGEAnintegerorrangeidentifyingwhichalertinthefiletosend(default:all)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--vtokenVTOKENOpsRampwebhooktoken(default:None)ExamplePost alert #5 from the specified json file (expected to contain an array of alerts), using vtoken authentication% opcli webhookalerts --vtoken mytoken --infile myalertsamples.json --range 5getincidentsSearch and take action on Incidentsusage:opcligetincidents[-h]--envENV[--secureSECURE][--envfileENVFILE]--queryQUERY[--brief][--count][--filterFILTER][--resolve]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--queryQUERYQueryStringtofilterincidents(default:None)--briefIncludeonlykeyfieldsinoutput(default:False)--countOnlyshowthecountofmatchingincidents(default:False)--filterFILTERPost-queryfilteronincidents.PythonexpressionthatwillevaluatetoTrueorFalsesuchasincident["resource"]["name"].startswith("prod")(default:None)--resolveResolvethematchingincidents(default:False)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)getresourcesSearch for and take action on resources/devicesusage:opcligetresources[-h]--envENV[--secureSECURE][--envfileENVFILE][--queryQUERY][--searchSEARCH][--count][--delete][--manage][--filterFILTER]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--queryQUERYQueryStringtofilterresourcesasperhttps://develop.opsramp.com/resource-management/tenants-tenantid-resources-search(default:None)--searchSEARCHSearchStringtofilterresourcesasitwouldbeenteredunderResources->Search(default:None)--countOnlyshowthecountofmatchingresources(default:False)--deleteDeletethematchingresources(default:False)--manageManagethematchingresources(default:False)--filterFILTERPost-queryfilteronresources.PythonexpressionthatwillevaluatetoTrueorFalsesuchasalert["resource"]["name"].startswith("prod")(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)exportservicemapsExport one or more full Service Map definitions to a file which can be manipulated and re-importedusage:opcliexportservicemaps[-h]--envENV[--secureSECURE][--envfileENVFILE][--nameNAME][--outdirOUTDIR][--clobber][--timestamp]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--nameNAMENameoftherootlevelServiceMap/Group(exportallifnotspecified)(default:None)--outdirOUTDIRDirectorypathwhereexportwillbesaved(default:.)--clobberRemove/overwritepriorexportsofsamemaps(default:False)--timestampIncludeatimestampintheServiceMapdirname(default:False)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)importservicemapsImport (and optionally transform while doing so) from a Service Map export fileusage:opcliimportservicemaps[-h]--envENV[--secureSECURE][--envfileENVFILE]--srcSRC[--replaceREGEXREPLACEWITH][--parentlink][--clobber]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--srcSRCSource:PathtotheexportfileofaServiceMap(default:None)--replaceREGEXREPLACEWITHTransformingregexpatternandreplacementstring(optioncanberepeated)(default:None)--parentlinkIfrootServicehasalinktoaparent,linktheimportedServiceMap(default:False)--clobberOverwriteServiceMap(i.e.withsamename)ifitalreadyexists(default:False)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)cloneservicemapsCopy an existing Service Map, with transformations/replacements (useful when you have a template Service Map to re-use)usage:opclicloneservicemaps[-h]--envENV[--secureSECURE][--envfileENVFILE]--nameNAME--replaceREGEXREPLACEWITH[--parentlink][--clobber]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--nameNAMENameofServiceMaptotransformandclone(default:None)--replaceREGEXREPLACEWITHTransformingregexpatternandreplacementstring(optioncanberepeated)(default:None)--parentlinkIfrootServicehasalinktoaparent,linktheimportedServiceMap(default:False)--clobberOverwriteServiceMap(i.e.withsamename)ifitalreadyexists(default:False)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)Example%opclicloneservicemaps--envmyenv--nameHUB--replaceHUBHUBCOPY--parentlinktransformsvcmapApply regex replacements to an exported Service Map and create a new transformed export file with the changes.  Note that no credentials are required for this command since it is just operating on local export files.usage:opclitransformsvcmap[-h]srcdest--replaceREGEXREPLACEWITH[--clobber]positionalarguments:srcSource:FilepathwhereaServiceMapwaspreviouslyexporteddestDestination:Filepathwherethetransformedexportwillbesaved

Command-specificarguments:-h,--helpshowthishelpmessageandexit--replaceREGEXREPLACEWITHTransformingregexpatternandreplacementstring(optioncanberepeated)(default:None)--clobberOverwritedestfileifitalreadyexists(default:False)getservicemapsGet Service Map definitionsusage:opcligetservicemaps[-h]--envENV[--secureSECURE][--envfileENVFILE]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)getchildsvcgroupsGet child Service Groups of a parent Serviceusage:opcligetchildsvcgroups[-h]--envENV[--secureSECURE][--envfileENVFILE]--parentPARENT

Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--parentPARENTIDoftheparentServiceMap/Group(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)getservicegroupGet the full definition of a Service Groupusage:opcligetservicegroup[-h]--envENV[--secureSECURE][--envfileENVFILE]--idID

Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--idIDIDoftheServiceMap/Group(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)exportcustattrfileGenerate an Excel or csv file from existing custom attribute valuesusage:opcliexportcustattrfile[-h]--envENV[--secureSECURE][--envfileENVFILE][--queryQUERY][--searchSEARCH][--filterFILTER][--filenameFILENAME]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--queryQUERYQueryStringtofilterresourcesasperhttps://develop.opsramp.com/resource-management/tenants-tenantid-resources-search(default:None)--searchSEARCHSearchStringtofilterresourcesasitwouldbeenteredunderResources->Search(default:None)--filterFILTERPost-queryfilteronresources.PythonexpressionthatwillevaluatetoTrueorFalsesuchasalert["resource"]["name"].startswith("prod")(default:None)--filenameFILENAMENameofexcelfiletogenerate(.xlsxextensionwillbeadded)(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)importcustattrfileImport an Excel file containing custom attribute valuesusage:opcliimportcustattrfile[-h]--envENV[--secureSECURE][--envfileENVFILE][--commit][--writeblanks][--filenameFILENAME]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--commitMaketheactualupdatesontheplatform.Ifnotspecified,onlyerrorcheckingandimportsimulationwilloccur.(default:False)--writeblanksWhennovalueisprovidedinthespreadsheetforaresource,removeanyexistingvalueforthatresourceontheplatform.Ifnotspecifiedthennoactionistakenforemptyvalues.(default:False)--filenameFILENAMENameofexcelfiletoimport(.xlsxextensionwillbeaddedifnotspecified.)(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)getcustomattrsGet custom attribute definitionsusage:opcligetcustomattrs[-h]--envENV[--secureSECURE][--envfileENVFILE]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)getdiscoprofileGet discovery profile definitionusage:opcligetdiscoprofile[-h]--envENV[--secureSECURE][--envfileENVFILE]--idID--tenantIdTENANTID

Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--idIDDiscoveryprofileID(default:None)--tenantIdTENANTIDClientIDorMSPIDofthetenant(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)getalertescSearch and get Escalation Policy definitionsusage:opcligetalertesc[-h]--envENV[--secureSECURE][--envfileENVFILE][--queryQUERY][--details][--count][--filterFILTER]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--queryQUERYQueryStringtofilteralerts(default:None)--detailsGetthefulldetailsforallmatchedpolicies(default:False)--countOnlyshowthecountofmatchingalerts(default:False)--filterFILTERPost-queryfilteronalerts.PythonexpressionthatwillevaluatetoTrueorFalsesuchasalert["resource"]["name"].startswith("prod")(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)migratealertescMigrate/copy Escalation Policies within same tenant or from one tenant to anotherusage:opclimigratealertesc[-h]--envENV[--secureSECURE][--envfileENVFILE][--queryQUERY][--filterFILTER][--preexecPREEXEC][--postexecPOSTEXEC]--to_envTO_ENV[--test][--update][--setactiveSETACTIVE]Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--queryQUERYQuerystringtofilterpoliciesfromsource/frominstance(default:None)--filterFILTERFilterforwhichpoliciestomigrate.PythonexpressionthatwillevaluatetoTrueorFalsesuchasalert["resource"]["name"].startswith("prod")(default:None)--preexecPREEXECPre-mappedexeccommand(default:None)--postexecPOSTEXECPost-mappedexeccommand(default:None)--to_envTO_ENVTargetenvironmenttowhichpolicydefinitionswillbemigrated.(--envoptiondefinesthesource/fromenvironment)(default:None)--testTestrunonly.Willcheckobjectmappingsformissingitemsandnotactuallychangethetargetinstance.(default:False)--updateUsedforbulkupdates,willonlyworkif--envand--to_envarethesame.Trytoupdateexistingpoliciesinsteadofcreatingnewones.(default:False)--setactiveSETACTIVESpecifyONorOFF.WillforceallpoliciescreatedonthetargettobeONorOFF.Otherwisewillbesetthesameasthesource.(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)clonetemplatesClone monitoring templatesusage:opcliclonetemplates[-h][--envENV][--envfileENVFILE][--urlURL][--client_idKEY][--client_secretSCRT][--tenantTENANT][--partnerPARTNER][--secureSECURE](--nameNAME|--infileINFILE)(--prefixPREFIX|--copynameCOPYNAME)Command-specificarguments:-h,--helpshowthishelpmessageandexit--secureSECUREWhetherornottoverifySSLcert(default:True)--nameNAMENameoftheMonitoringTemplatetoclone(default:None)--infileINFILEFilecontaininglistoftemplatestoclone(requiresuseof--prefixoption)(default:None)--prefixPREFIXNewtemplatenamewillbesameasoriginalnamebutwiththistextprepended(default:None)--copynameCOPYNAMENewtemplatewillhavethisasitsname(default:None)SpecifycredentialsviaYAMLfile:--envENVNameofenvironmenttouse,asdefinedinyourenvironments.ymlfile(default:None)--envfileENVFILELocationofenvironmentsYAMLfile(default:environments.yml)Specifycredentialsviacommandline:--urlURLOpsRampAPIURL(default:None)--client_idKEYOpsRampAPIKey(default:None)--client_secretSCRTOpsRampAPISecret(default:None)--tenantTENANTOpsRamptenantID(default:None)--partnerPARTNEROpsRamppartnerID(usuallyunnecessary-onlyneededforpartner-levelAPIcalls)(default:None)