Resource ID¶
ResourceId¶
ResourceId is a NewType wrapping str. It represents a unique identifier for a resource.
Valid resource IDs match the regex [\w@-]+ (word characters, @ and -).
Functions¶
parse_resource_id(raw: str) -> ResourceId— parses a raw string into a validatedResourceId. RaisesResourceIdParseErrorif the string is invalid.is_resource_id(raw: str) -> TypeGuard[ResourceId]— returnsTrueif the string is a valid resource ID (can be used as a type guard).