misc.python.materialize.mz_env_util

mz env util

 1# Copyright Materialize, Inc. and contributors. All rights reserved.
 2#
 3# Use of this software is governed by the Business Source License
 4# included in the LICENSE file at the root of this repository.
 5#
 6# As of the Change Date specified in that file, in accordance with
 7# the Business Source License, use of this software will be governed
 8# by the Apache License, Version 2.0.
 9
10"""mz env util"""
11
12from materialize.mzcompose.composition import Composition
13from materialize.mzcompose.services.mz import Mz
14
15
16def get_cloud_hostname(
17    c: Composition,
18    app_password: str,
19    region: str = "aws/us-east-1",
20    environment: str = "production",
21    quiet: bool = False,
22) -> str:
23    with c.override(
24        Mz(region=region, environment=environment, app_password=app_password)
25    ):
26        return c.cloud_hostname(quiet=quiet)
def get_cloud_hostname( c: materialize.mzcompose.composition.Composition, app_password: str, region: str = 'aws/us-east-1', environment: str = 'production', quiet: bool = False) -> str:
17def get_cloud_hostname(
18    c: Composition,
19    app_password: str,
20    region: str = "aws/us-east-1",
21    environment: str = "production",
22    quiet: bool = False,
23) -> str:
24    with c.override(
25        Mz(region=region, environment=environment, app_password=app_password)
26    ):
27        return c.cloud_hostname(quiet=quiet)