def get_cloud_url(self, subdirectory: str, id: str, as_user: bool=True) -> str:
    '\n        Convenience method for creating Prefect Cloud URLs for a given subdirectory.\n\n        Args:\n            - subdirectory (str): the subdirectory to use (e.g., `"flow-run"`)\n            - id (str): the ID of the page\n            - as_user (bool, optional): whether this query is being made from a USER scoped token;\n                defaults to `True`. Only used internally for queries made from RUNNERs\n\n        Returns:\n            - str: the URL corresponding to the appropriate base URL, tenant slug, subdirectory\n                and ID\n\n        Example:\n\n        ```python\n        from prefect import Client\n\n        client = Client()\n        client.get_cloud_url("flow-run", "424242-ca-94611-111-55")\n        # returns "https://cloud.prefect.io/my-tenant-slug/flow-run/424242-ca-94611-111-55"\n        ```\n        '
    if (prefect.config.backend == 'cloud'):
        tenant_slug = self.get_default_tenant_slug(as_user=as_user)
    else:
        tenant_slug = ''
    base_url = (re.sub('api-', '', prefect.config.cloud.api) if re.search('api-', prefect.config.cloud.api) else re.sub('api', 'cloud', prefect.config.cloud.api))
    full_url = prefect.config.cloud.api
    if tenant_slug:
        full_url = '/'.join([base_url.rstrip('/'), tenant_slug, subdirectory, id])
    elif (prefect.config.backend == 'server'):
        full_url = '/'.join([prefect.config.server.ui.endpoint, subdirectory, id])
    return full_url
Convenience method for creating Prefect Cloud URLs for a given subdirectory.

Args:
    - subdirectory (str): the subdirectory to use (e.g., `"flow-run"`)
    - id (str): the ID of the page
    - as_user (bool, optional): whether this query is being made from a USER scoped token;
        defaults to `True`. Only used internally for queries made from RUNNERs

Returns:
    - str: the URL corresponding to the appropriate base URL, tenant slug, subdirectory
        and ID

Example:

```python
from prefect import Client

client = Client()
client.get_cloud_url("flow-run", "424242-ca-94611-111-55")
# returns "https://cloud.prefect.io/my-tenant-slug/flow-run/424242-ca-94611-111-55"
```
def get_cloud_url(self, subdirectory: str, id: str, as_user: bool=True) -> str:
    '\n        Convenience method for creating Prefect Cloud URLs for a given subdirectory.\n\n        Args:\n            - subdirectory (str): the subdirectory to use (e.g., `"flow-run"`)\n            - id (str): the ID of the page\n            - as_user (bool, optional): whether this query is being made from a USER scoped token;\n                defaults to `True`. Only used internally for queries made from RUNNERs\n\n        Returns:\n            - str: the URL corresponding to the appropriate base URL, tenant slug, subdirectory\n                and ID\n\n        Example:\n\n        ```python\n        from prefect import Client\n\n        client = Client()\n        client.get_cloud_url("flow-run", "424242-ca-94611-111-55")\n        # returns "https://cloud.prefect.io/my-tenant-slug/flow-run/424242-ca-94611-111-55"\n        ```\n        '
    if (prefect.config.backend == 'cloud'):
        tenant_slug = self.get_default_tenant_slug(as_user=as_user)
    else:
        tenant_slug = 
    base_url = (re.sub('api-', , prefect.config.cloud.api) if re.search('api-', prefect.config.cloud.api) else re.sub('api', 'cloud', prefect.config.cloud.api))
    full_url = prefect.config.cloud.api
    if tenant_slug:
        full_url = '/'.join([base_url.rstrip('/'), tenant_slug, subdirectory, id])
    elif (prefect.config.backend == 'server'):
        full_url = '/'.join([prefect.config.server.ui.endpoint, subdirectory, id])
    return full_url