Extensions
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting and using variables in Python Extension

lfoltran
Visitor

Does anyone knows how to retrive a value of a variable set on "extension.yaml" inside a Python Code ?

I was able to get the values from activation configuration using "self.activation_config", but I´m not able to retrieve a value from the section "vars" in extension.yaml.

vars:
  - id: environment
    displayName: Environment
    type: enum
    availableValues:
      - value: prod
        displayName: Production
      - value: uat
        displayName: UAT
      - value: dev
        displayName: Development
    description: Environment to monitor (e.g. production, staging)
    defaultValue: "dev"

 

1 REPLY 1

MostafaHussein
Champion

you can check this reply it has a rich example

https://community.dynatrace.com/t5/Extensions/Extensions-2-0-Is-there-detailed-documentation-on-the/...

 

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Certified Dynatrace Services - App Developer
Dynatrace Partner 2p.com.sa

Featured Posts