AddLogValuesForResourceIDString parses a resource ID string and adds common logging key/value pairs. It adds: subscription_id, resource_group, resource_name, and resource_id. If parsing fails, only the resource_id is added.
(resourceIDString string)
| 250 | |
| 251 | if hcpClusterName := metadataapihelpers.ClusterNameFromResourceID(resourceID); hcpClusterName != "" { |
| 252 | lv = lv.AddHCPClusterName(hcpClusterName) |
| 253 | } |
| 254 | return lv |
| 255 | } |
| 256 | |
| 257 | // AddLogValuesForResourceIDString parses a resource ID string and adds common logging key/value pairs. |
| 258 | // It adds: subscription_id, resource_group, resource_name, and resource_id. |
| 259 | // If parsing fails, only the resource_id is added. |
| 260 | func (lv LogValues) AddLogValuesForResourceIDString(resourceIDString string) LogValues { |
| 261 | resourceID, err := azcorearm.ParseResourceID(resourceIDString) |
no test coverage detected