Return a list of activated render passes for view layers?
I am not sure if there is a better method to do this but....
You can test all of the &quot;use_pass_****&quot; attribute in view-layer (and also eevee, cycles):
[
    attr
    for attr in dir(C.view_layer)
    if attr.startswith(&quot;use_pass&quot;) and getattr(C.view_layer, attr) == True
]  # -&gt; ['use_pass_combined', 'use_pass_mist', 'use_pass_normal', 'use_pass_z']

And eevee-only pass:
[
    attr
    for attr in dir(C.view_layer.eevee)
    if attr.startswith(&quot;use_pass&quot;) and getattr(C.view_layer.eevee, attr) == True
]  # -&gt; ['use_pass_volume_scatter', 'use_pass_volume_transmittance']


After seeking in Render Layer node, there is a outputs attribute contain different outputs that a node can potentially have. And each output can be enabled by attribute enable:

[
    key
    for key, output
    in C.scene.node_tree.nodes[&quot;Render Layers&quot;].outputs.items()
    if getattr(output, 'enabled', False)
]  # -&gt; ['Image', 'Alpha', 'Depth', 'Mist', 'Normal']