MCPcopy Create free account
hub / github.com/microsoft/PyRIT / run_az_json

Function run_az_json

infra/deploy_instance.py:85–96  ·  view source on GitHub ↗

Run an Azure CLI command and parse JSON output. Args: args (list[str]): The az CLI arguments (without the leading 'az'). Returns: dict | list | str: The parsed JSON output.

(*, args: list[str])

Source from the content-addressed store, hash-verified

83
84
85def run_az_json(*, args: list[str]) -> dict | list | str:
86 """
87 Run an Azure CLI command and parse JSON output.
88
89 Args:
90 args (list[str]): The az CLI arguments (without the leading 'az').
91
92 Returns:
93 dict | list | str: The parsed JSON output.
94 """
95 result = run_az(args=args + ["-o", "json"])
96 return json.loads(result.stdout)
97
98
99def set_subscription(subscription: str) -> None:

Callers 7

create_entra_appFunction · 0.70
create_sql_server_and_dbFunction · 0.70
create_storage_accountFunction · 0.70
create_key_vaultFunction · 0.70
deploy_bicepFunction · 0.70
_grant_aoai_rolesFunction · 0.70

Calls 1

run_azFunction · 0.70

Tested by

no test coverage detected