| 250 | self._entities[key] = value |
| 251 | |
| 252 | def _handle_placeholders(self, spec: dict, current: dict, path: str) -> Any: |
| 253 | if "$$placeholder" in current: |
| 254 | if path not in PLACEHOLDER_MAP: |
| 255 | raise ValueError(f"Could not find a placeholder value for {path}") |
| 256 | return PLACEHOLDER_MAP[path] |
| 257 | |
| 258 | # Distinguish between temp and non-temp aws credentials. |
| 259 | if path.endswith("/kmsProviders/aws") and "sessionToken" in current: |
| 260 | path = path.replace("aws", "aws_temp") |
| 261 | |
| 262 | for key in list(current): |
| 263 | value = current[key] |
| 264 | if isinstance(value, dict): |
| 265 | subpath = f"{path}/{key}" |
| 266 | current[key] = self._handle_placeholders(spec, value, subpath) |
| 267 | return current |
| 268 | |
| 269 | def _create_entity(self, entity_spec, uri=None): |
| 270 | if len(entity_spec) != 1: |